feat(spaces): drive the sidebar list from the search box - #3864
Conversation
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Replace the flag-gated task thread with Timeline, Artifacts, and Comments views. Include multi-run artifacts and selected historical pull request review while leaving flag-off behavior unchanged. Generated-By: PostHog Code Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
The Activity panel's header was padding-sized (~41px) while the pane to its left — TabbedPanel's tab bar — is a fixed 32px row, so the two bottom borders never lined up. The panel also stacked a title row on top of a tabs row where the left pane has a single strip. Give ActivityPanel its own 32px header carrying the tabs directly: no separate "Activity" title row, the tab list fills the row so the line indicator lands on the bottom border, and the window controls sit right-aligned. Matches TabbedPanel and ReviewToolbar, which share the same height and border token. The shared ThreadPanelHeader is now the legacy panel's alone, so it stays exactly as it was — flag-off chrome is unchanged. Generated-By: PostHog Code Task-Id: 8ccf3555-2c68-4dbb-8b9f-1a96fd85d95a
Starring a channel is already reachable from the sidebar back row's hover star and the channel list's context menu, so the header's copy was a third affordance for the same action sitting next to the channel name chip. Generated-By: PostHog Code Task-Id: 8ccf3555-2c68-4dbb-8b9f-1a96fd85d95a
The pane read the run artifact manifest and then dropped everything on `type === "plan"` — a type nothing in the product has ever written. The only deliverable type agents actually produce is `output`, via the `upload_artifact` tool, so the manifest branch was unreachable and files handed back by a run never appeared. Verified against a live run's manifest: 6 `output`, 2 `user_attachment`, zero `plan`. The `plan` row was speculative — down to a bare-UUID fallback for names that never arrive — so it goes rather than shipping a UI affordance for data that doesn't exist. It can come back with a producer. Same inversion is why the conversation's Files box showed these while the pane said "No artifacts yet": it filters to `output`, the exact complement. - `parseRunPlans` becomes `parseRunArtifacts(raw, types)`, and reads the `size`/`content_type`/`uploaded_at` the rows need. - Re-uploads collapse to the newest per name: agents revise a deliverable and upload it again, and keeping every copy buries the current one under its own drafts. - `formatFileSize` moves out of CloudArtifactDownloads so both surfaces format sizes the same way. Generated-By: PostHog Code Task-Id: 8d187d00-0633-4706-8443-f79130b65f9f
The rows already use the same FileIcon the chat's file list does, so markdown resolves to the markdown icon and HTML to the HTML one. Lock that in — the row it replaced hardcoded a single clipboard glyph, and nothing else would catch a regression back to a generic icon. Generated-By: PostHog Code Task-Id: 8d187d00-0633-4706-8443-f79130b65f9f
5048498 to
1dbd099
Compare
|
Reviews (1): Last reviewed commit: "feat(spaces): drive the sidebar list fro..." | Re-trigger Greptile |
|
Note 🤖 stamphog reviewed Gates denied the PR outright due to unresolved merge conflicts, a deny-listed auth file match, and size far over the auto-review ceiling; none of these can be waived by review judgment.
Gate mechanics and policy version
|
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
The spaces list was a plain tree with a filter box bolted on: the only way to reach a row was the mouse, and the box could not be cleared without one either. Every row is now an Autocomplete option, filtered or not, so the arrows and Enter work the moment the pane opens rather than only once you have typed something. Rows keep their hover menus, context menu and dialogs — SpaceRowSurface renders quill's Button off the layout and an AutocompleteItem on it, so only the click and highlight routing changes. Notes on the pieces that are not obvious: - `items` carries the row values in DOM order even though the rows render as elements. Without it the highlight has no list to index into, and the first ArrowDown after a keystroke is swallowed re-establishing the highlight it is already showing. - `open` rather than `defaultOpen`: picking a row closes an ordinary combobox, and a closed one stops answering the arrow keys, so coming back from a space found the list dead. - `keepHighlight`: Base UI resets the highlight on pointer-leave and `autoHighlight="always"` re-seeds it at the top, so drifting the mouse across the gap between two rows threw the keyboard back to #me. - Collapsed groups unmount under the layout. A kept-mounted collapsed row is still an option, and the arrows would walk onto spaces that were folded away. - quill sizes its list as a popup (a ~250px cap, its own padding) and ships it unlayered, so the overrides that make the list fill the pane have to be important to outrank it. Returning from a space focuses the box, selects any stale query, and sends Home so the list reopens at the top — Autocomplete otherwise leaves the highlight on the row you opened and exposes no way to move it. Escape clears the query and the clear button gets a real tab stop; Base UI's is a tabIndex=-1 decoration. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The channel pane's placeholder rows were fixed-height pills that sat at their own scale rather than the rows' — a stack of near-white bars that didn't read as the list they become. SkeletonText sizes its bar off the line it stands in, so giving each row the type scale of the title it replaces (and the label bar the scale of the MenuLabel above it) makes the placeholder the shape of the content. Row widths move from Tailwind fractions to the percentages the primitive takes. The item glyph stays a plain Skeleton: it is a square, not text. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
53629f2 to
c7ca956
Compare
There was a problem hiding this comment.
Contained, flag-gated UI refactor of the sidebar/search component in packages/ui — no touch of data models, APIs, auth, billing, deps, or CI, so it's outside risky territory and my own reading of the diff (plus the added test coverage) suffices without requiring independent assurance.
- Author wrote 15% of the modified lines and has 16 merged PRs in these paths (familiarity MODERATE).
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 527L, 2F substantive, 722L/3F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (722L, 3F, single-area, feat) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ 542eee4 · reviewed head c7ca956 |
|
😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details. |
|
Retaining stamphog approval — delta since last review classified as |
Stacked on #3815.
The spaces list was a plain tree with a filter box bolted on: the only way to reach a row was the mouse, and the box couldn't be cleared without one either.
What changes
Every row is now an Autocomplete option — filtered or not — so ↑/↓/⏎ work the moment the pane opens rather than only once you've typed something. Rows keep their hover menus, context menu and dialogs:
SpaceRowSurfacerenders quill'sButtonoff the layout and anAutocompleteItemon it, so only the click and highlight routing changes.Returning from a space focuses the search box, selects any stale query, and reopens the list at the top. Escape clears the query, and the clear button gets a real tab stop.
All of it is behind
code-spaces-layout; off the flag the list is the tree it was.The non-obvious pieces
itemscarries the row values in DOM order even though the rows render as elements. Without it the highlight has no list to index into, and the first ArrowDown after a keystroke is swallowed re-establishing the highlight it already shows.open, notdefaultOpen. Picking a row closes an ordinary combobox, and a closed one stops answering the arrow keys — so coming back from a space found the list dead.keepHighlight. Base UI resets the highlight on pointer-leave (resetOnPointerLeave: !keepHighlight) andautoHighlight="always"re-seeds it at the top, so drifting the mouse across the gap between two rows threw the keyboard back to#me.keepMountedcomment was avoiding.!importantto outrank it.Testing
11 new tests in
ChannelsList.test.tsx(19 total); 374 pass across canvas + sidebar. The pointer-leave test was checked to fail withkeepHighlightremoved.Manually, with the flag on:
🤖 Generated with Claude Code