Repository navigation
Fix tasks not nesting/collapsing under Changes in tree views - #47
Merged
Merged
Conversation
Reported from live use: task items rendered flush with their parent Change instead of nested under it, and didn't collapse/expand. Root cause: no TreeItem subclass in changes-tree.ts or templates-tree.ts set an explicit .id. Per VS Code's own API contract, omitting .id falls back to a label-derived identity that "cannot be kept stable" once items are recreated across refreshes — exactly what every provider in this codebase does on every getChildren() call. Adds stable, scope-unique ids to every tree item in both files (the Templates tree has the identical latent defect, not yet reported, fixed here too). The actual visual symptom can't be directly re-verified in this environment (no desktop-UI automation tool available, a limitation already disclosed in this session's other tree-feature smoke tests) — the fix is grounded in VS Code's documented behavior and verified indirectly via id-distinctness unit tests, not a screenshot. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
# Conflicts: # README.md # packages/extension/CHANGELOG.md # packages/extension/package.json # packages/extension/src/tree/changes-tree.test.ts
Cover the two RepoBootstrapRootTreeItem/RepoBootstrapActionTreeItem classes that landed via repo-bootstrap-tree-ui after this change was written, and record the 0.12.2 -> 0.13.1 version rebase forced by merging updated main. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
TreeItemsubclass inchanges-tree.tsortemplates-tree.tssets an explicit.id. Per VS Code's own API contract, omitting.idfalls back to a label-derived identity that "cannot be kept stable" once items are recreated across refreshes — exactly what every provider in this codebase does on everygetChildren()call (never reuses object references, by design)..ids to every tree item in both files.templates-tree.tsgets the same fix even though it wasn't reported — identical latent defect (real nested collapsible groups, no ids anywhere)..idsemantics and verified indirectly via id-distinctness unit tests, not a before/after screenshot. If the symptom persists after this ships, the root cause is something else and needs a fresh live report.Test plan
npm run verify(typecheck/lint/english-policy/test) passes repo-wide — extension 89/89changes-tree.test.ts,archive-tree.test.ts,templates-tree.test.ts, including explicit regression checks that a task's id differs from its parent Change's idnpm run test:integration) — 6/6 passingopenspec change validate --strict tree-item-stable-idspasses🤖 Generated with Claude Code