Skip to content

chore: remove unused layout-tree helpers (closeGroup, paneRects, insertionIndex) - #33

Open
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-unused-layout-tree-helpers-closegroup-535542
Open

detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-unused-layout-tree-helpers-closegroup-535542

Conversation

@detail-app

@detail-app detail-app Bot commented Nov 2, 2026

Copy link
Copy Markdown

Removes three exported functions from packages/devtools/src/utils/layout-tree.ts
that had no production callers anywhere in the repo, only test references:
closeGroup, paneRects, and insertionIndex. Their tests were removed too.

🎯 Changes

Removes three exported helpers from packages/devtools/src/utils/layout-tree.ts
plus their dedicated test blocks:

  • closeGroup — a whole-group closer; production code closes tabs individually via
    closeTab instead.
  • paneRects — maps each plugin id to its group rect; unreferenced outside tests.
    Note: plugin-workspace.tsx uses a distinct local paneRect (singular), which
    is unrelated to this export.
  • insertionIndex — computes a tab-drop insertion index; unreferenced outside tests.

All three were introduced together in the workbench redesign and never wired up to
the UI that landed. Test files don't count as production consumers, so these were
dead. Their internal dependencies (findGroupById, closeTab, layoutRects,
allGroups) remain in use by other live exported functions, so no further cascading
removal was warranted.

Net: 87 lines deleted (38 source, 49 tests). Exceeds the 20-line dead-code
threshold.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm test:pr, or these tests do not apply to this pull request.
    Verified with pnpm tsc --noEmit and pnpm vitest run (364 tests pass across 20 files).
  • I fully understand the code in this pull request, including any code generated with AI assistance.
    Detail: Dead Code

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).
    These were internal helpers; they were never re-exported from the package entry
    (src/index.ts), so removal has no impact on the published API.

History


Dead Code PRs can be configured here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants