Repository navigation
chore: remove unused layout-tree helpers (closeGroup, paneRects, insertionIndex) - #33
Open
detail-app[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes three exported functions from
packages/devtools/src/utils/layout-tree.tsthat had no production callers anywhere in the repo, only test references:
closeGroup,paneRects, andinsertionIndex. Their tests were removed too.🎯 Changes
Removes three exported helpers from
packages/devtools/src/utils/layout-tree.tsplus their dedicated test blocks:
closeGroup— a whole-group closer; production code closes tabs individually viacloseTabinstead.paneRects— maps each plugin id to its group rect; unreferenced outside tests.Note:
plugin-workspace.tsxuses a distinct localpaneRect(singular), whichis 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 cascadingremoval was warranted.
Net: 87 lines deleted (38 source, 49 tests). Exceeds the 20-line dead-code
threshold.
✅ Checklist
pnpm test:pr, or these tests do not apply to this pull request.Verified with
pnpm tsc --noEmitandpnpm vitest run(364 tests pass across 20 files).Detail: Dead Code
🚀 Release Impact
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.