feat(ui): add an accessible VS Code-parity Tree - #1065
Open
EhabY wants to merge 1 commit into
Open
Conversation
EhabY
force-pushed
the
feat/ui-tree-suite
branch
from
August 5, 2026 14:11
510e466 to
309f05d
Compare
EhabY
force-pushed
the
feat/ui-tree-suite
branch
17 times, most recently
from
August 13, 2026 13:03
3a55395 to
3fe1ebe
Compare
EhabY
force-pushed
the
feat/ui-tree-suite
branch
from
August 14, 2026 12:10
3fe1ebe to
53d6612
Compare
EhabY
added a commit
that referenced
this pull request
Aug 14, 2026
MVP for DEVEX-621: render the Workspaces panel in the experimental coder.workspacesPanel webview using the @repo/ui Tree from #1065 so the row and panel components can be exercised with mock data before the real IPC wiring lands. - WorkspacesPanel with SearchInput live filtering and the Mine / All / Shared WorkspaceFilterSelect (Shared gated by isOwner) - Workspace and agent rows as rich Tree labels with status pills and hover-revealed inline actions - Inline App Statuses and Agent Metadata sections under agents, with a collected-at tooltip on metadata values - Loading / error / empty state panels over the mock data - @repo/ui becomes a webview dependency; the shared Vite config aliases its TypeScript source and package-internal subpath imports This pull request description was generated by Coder Agents.
EhabY
force-pushed
the
feat/ui-tree-suite
branch
3 times, most recently
from
August 14, 2026 14:29
fef2ca2 to
6fec430
Compare
EhabY
added a commit
that referenced
this pull request
Aug 14, 2026
MVP for DEVEX-621: render the Workspaces panel in the experimental coder.workspacesPanel webview using the @repo/ui Tree from #1065 so the row and panel components can be exercised with mock data before the real IPC wiring lands. - WorkspacesPanel with SearchInput live filtering and the Mine / All / Shared WorkspaceFilterSelect (Shared gated by isOwner) - Workspace and agent rows as rich Tree labels with status pills and hover-revealed inline actions - Inline App Statuses and Agent Metadata sections under agents, with a collected-at tooltip on metadata values - Loading / error / empty state panels over the mock data - @repo/ui becomes a webview dependency; the shared Vite config aliases its TypeScript source and package-internal subpath imports This pull request description was generated by Coder Agents.
EhabY
added a commit
that referenced
this pull request
Aug 14, 2026
MVP for DEVEX-621: render the Workspaces panel in the experimental coder.workspacesPanel webview using the @repo/ui Tree from #1065 so the row and panel components can be exercised with mock data before the real IPC wiring lands. - WorkspacesPanel with SearchInput live filtering and the Mine / All / Shared WorkspaceFilterSelect (Shared gated by isOwner) - Workspace and agent rows as rich Tree labels with status pills and hover-revealed inline actions - Inline App Statuses and Agent Metadata sections under agents, with a collected-at tooltip on metadata values - Loading / error / empty state panels over the mock data - @repo/ui becomes a webview dependency; the shared Vite config aliases its TypeScript source and package-internal subpath imports This pull request description was generated by Coder Agents.
EhabY
added a commit
that referenced
this pull request
Aug 14, 2026
MVP for DEVEX-621: render the Workspaces panel in the experimental coder.workspacesPanel webview using the @repo/ui Tree from #1065 so the row and panel components can be exercised with mock data before the real IPC wiring lands. - WorkspacesPanel with SearchInput live filtering and the Mine / All / Shared WorkspaceFilterSelect (Shared gated by isOwner) - Workspace and agent rows as rich Tree labels with status pills and hover-revealed inline actions - Inline App Statuses and Agent Metadata sections under agents, with a collected-at tooltip on metadata values - Loading / error / empty state panels over the mock data - @repo/ui becomes a webview dependency; the shared Vite config aliases its TypeScript source and package-internal subpath imports This pull request description was generated by Coder Agents.
EhabY
force-pushed
the
feat/ui-tree-suite
branch
from
August 14, 2026 15:15
33e2c52 to
215c027
Compare
EhabY
added a commit
that referenced
this pull request
Aug 14, 2026
MVP for DEVEX-621: render the Workspaces panel in the experimental coder.workspacesPanel webview using the @repo/ui Tree from #1065 so the row and panel components can be exercised with mock data before the real IPC wiring lands. - WorkspacesPanel with SearchInput live filtering and the Mine / All / Shared WorkspaceFilterSelect (Shared gated by isOwner) - Workspace and agent rows as rich Tree labels with status pills and hover-revealed inline actions - Inline App Statuses and Agent Metadata sections under agents, with a collected-at tooltip on metadata values - Loading / error / empty state panels over the mock data - @repo/ui becomes a webview dependency; the shared Vite config aliases its TypeScript source and package-internal subpath imports This pull request description was generated by Coder Agents.
EhabY
force-pushed
the
feat/ui-tree-suite
branch
from
August 14, 2026 16:00
215c027 to
85c00af
Compare
EhabY
force-pushed
the
feat/ui-tree-suite
branch
from
August 14, 2026 16:20
85c00af to
cb58b18
Compare
EhabY
added a commit
that referenced
this pull request
Aug 14, 2026
MVP for DEVEX-621: render the Workspaces panel in the experimental coder.workspacesPanel webview using the @repo/ui Tree from #1065 so the row and panel components can be exercised with mock data before the real IPC wiring lands. - WorkspacesPanel with SearchInput live filtering and the Mine / All / Shared WorkspaceFilterSelect (Shared gated by isOwner) - Workspace and agent rows as rich Tree labels with status pills and hover-revealed inline actions - Inline App Statuses and Agent Metadata sections under agents, with a collected-at tooltip on metadata values - Loading / error / empty state panels over the mock data - @repo/ui becomes a webview dependency; the shared Vite config aliases its TypeScript source and package-internal subpath imports This pull request description was generated by Coder Agents.
EhabY
added a commit
that referenced
this pull request
Aug 14, 2026
MVP for DEVEX-621: render the Workspaces panel in the experimental coder.workspacesPanel webview using the @repo/ui Tree from #1065 so the row and panel components can be exercised with mock data before the real IPC wiring lands. - WorkspacesPanel with SearchInput live filtering and the Mine / All / Shared WorkspaceFilterSelect (Shared gated by isOwner) - Workspace and agent rows as rich Tree labels with status pills and hover-revealed inline actions - Inline App Statuses and Agent Metadata sections under agents, with a collected-at tooltip on metadata values - Loading / error / empty state panels over the mock data - @repo/ui becomes a webview dependency; the shared Vite config aliases its TypeScript source and package-internal subpath imports This pull request description was generated by Coder Agents.
A controlled Tree that follows current VS Code workbench behavior: every visible node renders as a flat `treeitem` row with declared aria-level, posinset, and setsize, while keyboard navigation keeps DOM focus on the container and names the active row with `aria-activedescendant`. Focus and selection stay independent, as they do natively. Arrow keys, Home, and End move the active row; Arrow Right and Left walk into and out of branches; Enter, Space, and the twistie follow VS Code's split between selecting and expanding, under either expand mode. Rows are 22px with the native twistie gutter and indent guides, and `variant="explorer"` aligns leaf icons with branch twisties for icon-less file trees. The model, the input policy, and the interaction transitions are pure modules; `useTreeAdapter` is the only place React state and the DOM meet. Pointer, focus, and key events are delegated from the container, which leaves rows as memoized presentation, so a keystroke re-renders the two rows it touched instead of every row. The flat projection leaves room for windowing later. Closes #1037
EhabY
force-pushed
the
feat/ui-tree-suite
branch
from
August 17, 2026 11:33
cb58b18 to
901af1d
Compare
EhabY
marked this pull request as ready for review
August 17, 2026 11:33
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
Adds a controlled, accessible
Treeto@repo/uithat follows current VS Code workbench behavior and visuals.aria-activedescendantCloses #1037
This is the first of three stacked PRs, kept to the behavior a tree needs to be
usable at all:
Architecture
treeModel.ts,treePolicy.ts, andtreeTransition.tsare pure.useTreeAdapter.tsis the thin React and DOM boundary, which is what lets the two PRs above stack on this one without reshaping it.The container delegates pointer, focus, and key events, so a row is memoized
presentation with no handlers and no adapter of its own. The flat visible model
supports future windowing, but this Tree is not currently virtualized.
API surface, checked against native
Every prop maps to something VS Code has, so the component stays a parity layer rather than a superset:
expandMode: "singleClick" | "doubleClick"workbench.tree.expandMode, same valuesvariant="explorer"align-icons-and-twistiesrender modeTreeNode.icon,.actionTreeItem.iconPath, the row action barTreeNode.classNameis the one non-native field, kept as the hook for per-row color or emphasis. Webviews receive noworkbench.tree.*settings, so a consumer that wants to mirror them reads them in the extension host and passes them down.Two things deliberately do not exist, because native does not have them:
TreeItemhas no such field, and everyaria-disabledin the workbench is an action item or a toggle, never a list row. Dim a row throughclassNameinstead.inertblocks hit-testing rather than only tab order, so gating it left a visible button that took neither a hover nor a click.Divergences from native, and why
workbench.experimental.modernUI, so the package picks the newer look anddata-ui-style="stable"restores stable row geometry, focus behavior, and menu motion.Escapehandling. Selection clears first, then the focus mark, and only then is the key left to the host, so an embedding webview can still use it.Choices worth a second look
useMemoon the model andmemoon the row are explicit, not left to the React Compiler. Every memoized row compares against the row objects the model holds, and a consumer of this package may not compile it; without theuseMemothe memoization silently stops paying off.posInSetandsetSizelive on the row. Flat rows have no group element, so each row declares its own set. A parent-to-count map would have to be threaded into every row render, including the rows the sticky-scroll PR renders outside the tree, which have no model.:not()..ui-tree-item:not([aria-selected="true"], .ui-tree-item--focused) > .ui-tree-item__row:hoveris native's own.monaco-list-row:hover:not(.selected):not(.focused); dropping it paints hover over a focused row.Diff composition
Measured against
origin/main...HEADwithgit diff --numstat:Production source to automated test code is approximately 1.10:1.
Performance
Measured in jsdom with 5,020 expanded rows (20 branches of 250 leaves), median
of three runs: mount 724ms, twenty ArrowDown presses 423ms, so roughly 20ms
a keystroke. That is the cost of building 5,020 elements and comparing their
props; only the two rows whose state changed re-render. Remove
memofrom therow and those same twenty presses take 4,746ms, because the React Compiler
memoizes a
.map()as one unit and the focused id invalidates all of it.The Tree is not virtualized. Virtualization, if it is ever needed, is a
windowed slice over the same projection.
Validation
pnpm test:webview --reporter=dot: 41 files, 372 tests passedpnpm typecheck,pnpm lint,pnpm format:check,pnpm storybook:cipackages/uicompiles under the React Compiler with no bailout, checked by runningbabel-plugin-react-compilerover the package: 47 files, no bailouts.TreeRowused to bail out silently by reading other props from its parameter defaults; AGENTS.md and the package README now record the rule.Implementation plan and decisions
This pull request description was updated by Coder Agents on behalf of @EhabY.