feat: add tree view mode to changes tab#1319
feat: add tree view mode to changes tab#1319CaioDGallo wants to merge 2 commits intoPostHog:mainfrom
Conversation
|
Ready for review when you have bandwidth. @jonathanlab , since this builds on #1197, I’d especially appreciate a check that this matches what you had in mind. This implements #1197 with an intentionally scoped approach: tree view mode for the Changes tab, stable selection/expansion across refreshes, virtualized visible rows for larger diffs, and keyboard navigation aligned with the existing list behavior. Happy to trim or reshape scope if any part feels too heavy. |
d171293 to
7352ed6
Compare
e7d56de to
56f2f5a
Compare
|
Thanks @CaioDGallo - We are actually going to close this one as it conflicts with some internal work on cloud runs and pulling the status from the sandbox. I understand the tree view desire, will keep that in mind, but this PR is a little too broad and conflicts with our current priority. Thanks you for the submission |
|
No worries @k11kirky , thank you for the feedback! |
Problem
Changes
ChangedFile[]with normalized paths and stable node ids. This keeps selection and expansion stable across refresh/reorder.ChangesFilesView, to keep main-thread and scroll cost bounded for large change sets.changesPanelStore, plus stale-path pruning. This preserves user context on refresh and removes invalid expanded paths.up/down/left/right) inuseChangesKeyboardNavigation, so selection remains stable when visible rows change.getCloudChangesStateto centralize waiting/loading/empty/error resolution, so cloud state handling is defined in one place.ChangesFilesView, row components, keyboard hook, state helper), to reduce coupling and reviewer overhead.ChangedFilecontract changes.How did you test this?
Automated
pnpm --filter code typecheckpnpm --filter code test -- changesPanelStore.test.ts changesTreeModel.test.tsManually
Left/Right, including file -> parent onLeft).Different feature states and cases
Closes #1197