Repository navigation
feat(command-bar): reach folders through a view row, like sessions - #12013
Conversation
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsFINDING -- website/src/apps/command-bar/CommandBarOverlay.tsx:984 -- False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify the accepted trade-off: with the launcher disabled, palette folder search is gone entirely — the sidebar filter is the only remaining surface there. [DESIGN-REVIEWED] 2f19b16 |
UX Review (Fable 5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS Primary rows were only guessed, not known: nothing on screen says the "Search Folders" row opens a view rather than searching immediately. Watch
Suggestions
[UX-REVIEWED] 2f19b16 |
First Principles Review (Fable 5) — ✅ human override accepted@chenmingwei23 overrode this lane for |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsVerified the two load-bearing facts: The candidate list produced no candidates, and independent falsification confirms this frontend refactor has no reachable defect: the new No findings. [OPUS-REVIEWED] 2f19b16 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
|
Dispositions for head GPT 5.6 (blocking, UX evidence gaps - closed with four frames, all produced by the harness against the real built SPA, each with its own assertion so a frame of the wrong state fails instead of passing vacuously:
UX watch, "two doors" - answered, not changed. The two rows are already distinguishable by their own text: the View row reads First Principles (blocking) - not something this PR can close. It asks for an accepted RFC on base for the product-shape decision, or a maintainer's recorded decision. The shape here was requested directly by the repository owner; the decision is his to record, so it is left for him rather than self-authorized here. |
Reaching a session folder by name had the wrong shape on the default launcher, and two implementations instead of one. Shape: PR #11525 put the sidebar's folders into the Command Bar as individual root rows, which no other corpus there is. The bar teaches "a corpus is a row you enter" -- Search Sessions and Search Artifacts both do -- so folders are now a Search Folders view row: enter it, see every folder in sidebar order with its ancestry, and narrow from the first character. The root also keeps a tail row, "Search folders for <query>", which carries text already typed into that view. Ownership: the host quick-search palette carried a second folder search, a Folders scope plus an All-aggregator registration. Two surfaces answering the same gesture are free to disagree about ranking and about what a reveal does, and only one of them is the surface people use, since Command Bar is default-on and replaces the quick-search slot. That copy is deleted, the corpus moved to apps/command-bar/foldersProvider.ts, and useFoldersProvider, whose only caller was the host, is gone. Failure states: a folder read that fails renders through ErrorNotice above the list, like the artifacts view's, rather than as a hand-written red title inside a listbox option (AUTOSDE errors-use-error-notice). The retry row carries the action only. The sessions row keeps its own tag and stays byte-identical to main, so this change does not reshape a surface it does not own. Pinned in tests: a palette test fails if a Folders scope comes back; the overlay test asserts the failure notice by role, that backend wording stays out of the copy, and that the failure text is not a row; the capture harness shoots eight states, including the host palette with the launcher off. Refs #11525
e0818ad to
2f19b16
Compare
|
/ai-review override first-principles 2f19b16: The repository owner asked for this exact shape (folder search entered as a corpus view, like session search) and records that decision here, so the launcher's folder-search placement is settled without a separate RFC. |
Human judgment recorded@chenmingwei23 marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
…irodotdev#12013) Reaching a session folder by name had the wrong shape on the default launcher, and two implementations instead of one. Shape: PR kirodotdev#11525 put the sidebar's folders into the Command Bar as individual root rows, which no other corpus there is. The bar teaches "a corpus is a row you enter" -- Search Sessions and Search Artifacts both do -- so folders are now a Search Folders view row: enter it, see every folder in sidebar order with its ancestry, and narrow from the first character. The root also keeps a tail row, "Search folders for <query>", which carries text already typed into that view. Ownership: the host quick-search palette carried a second folder search, a Folders scope plus an All-aggregator registration. Two surfaces answering the same gesture are free to disagree about ranking and about what a reveal does, and only one of them is the surface people use, since Command Bar is default-on and replaces the quick-search slot. That copy is deleted, the corpus moved to apps/command-bar/foldersProvider.ts, and useFoldersProvider, whose only caller was the host, is gone. Failure states: a folder read that fails renders through ErrorNotice above the list, like the artifacts view's, rather than as a hand-written red title inside a listbox option (AUTOSDE errors-use-error-notice). The retry row carries the action only. The sessions row keeps its own tag and stays byte-identical to main, so this change does not reshape a surface it does not own. Pinned in tests: a palette test fails if a Folders scope comes back; the overlay test asserts the failure notice by role, that backend wording stays out of the copy, and that the failure text is not a row; the capture harness shoots eight states, including the host palette with the launcher off. Refs kirodotdev#11525
The Command Bar's Folders view derives its rows from the sidebar's own
`['chat-folders']` cache, but cached them under `['command-bar', 'folders', q]`
— a key outside that namespace. React-Query invalidates by key PREFIX, so the
`invalidateQueries({ queryKey: ['chat-folders'] })` that ends every folder
create, delete and update in `ChatSidebar` reached the corpus and not the rows
built from it.
`QuickSearchSurface` mounts the overlay only while the bar is open, and a
remount refetches only what is stale. A folder deleted while the bar was closed
therefore came back on the next open: listed, selectable, and carrying an id the
sidebar no longer has, so activating it asked for a reveal that silently did
nothing. The window is the view's own `staleTime`, 15s.
The key is now nested under the corpus, `['chat-folders', 'command-bar', 'view',
q]` — the shape the artifacts view in this same file already uses
(`['artifacts', 'command-bar', 'view', q]`), which is why that view has never had
this gap. Nothing reads `['chat-folders']` as a prefix except `invalidateQueries`
and `cancelQueries`; every get/set in the repo uses the exact key, so no other
reader's match changes.
Named by the Design review on #12013 and shipped unaddressed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Leon <276034861+leonlaiyc@users.noreply.github.com>
The Command Bar's Folders view derives its rows from the sidebar's own
`['chat-folders']` cache, but cached them under `['command-bar', 'folders', q]`
— a key outside that namespace. React-Query invalidates by key PREFIX, so the
`invalidateQueries({ queryKey: ['chat-folders'] })` that ends every folder
create, delete and update in `ChatSidebar` reached the corpus and not the rows
built from it.
`QuickSearchSurface` mounts the overlay only while the bar is open, and a
remount refetches only what is stale. A folder deleted while the bar was closed
therefore came back on the next open: listed, selectable, and carrying an id the
sidebar no longer has, so activating it asked for a reveal that silently did
nothing. The window is the view's own `staleTime`, 15s.
The key is now nested under the corpus, `['chat-folders', 'command-bar', 'view',
q]` — the shape the artifacts view in this same file already uses
(`['artifacts', 'command-bar', 'view', q]`), which is why that view has never had
this gap. Nothing reads `['chat-folders']` as a prefix except `invalidateQueries`
and `cancelQueries`; every get/set in the repo uses the exact key, so no other
reader's match changes.
Named by the Design review on #12013 and shipped unaddressed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Leon <276034861+leonlaiyc@users.noreply.github.com>
The Command Bar's Folders view derives its rows from the sidebar's own
`['chat-folders']` cache, but cached them under `['command-bar', 'folders', q]`
— a key outside that namespace. React-Query invalidates by key PREFIX, so the
`invalidateQueries({ queryKey: ['chat-folders'] })` that ends every folder
create, delete and update in `ChatSidebar` reached the corpus and not the rows
built from it.
`QuickSearchSurface` mounts the overlay only while the bar is open, and a
remount refetches only what is stale. A folder deleted while the bar was closed
therefore came back on the next open: listed, selectable, and carrying an id the
sidebar no longer has, so activating it asked for a reveal that silently did
nothing. The window is the view's own `staleTime`, 15s.
The key is now nested under the corpus, `['chat-folders', 'command-bar', 'view',
q]` — the shape the artifacts view in this same file already uses
(`['artifacts', 'command-bar', 'view', q]`), which is why that view has never had
this gap. Nothing reads `['chat-folders']` as a prefix except `invalidateQueries`
and `cancelQueries`; every get/set in the repo uses the exact key, so no other
reader's match changes.
Named by the Design review on #12013 and shipped unaddressed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Leon <276034861+leonlaiyc@users.noreply.github.com>
…ist (#15339) The Command Bar's Folders view derives its rows from the sidebar's own `['chat-folders']` cache, but cached them under `['command-bar', 'folders', q]` — a key outside that namespace. React-Query invalidates by key PREFIX, so the `invalidateQueries({ queryKey: ['chat-folders'] })` that ends every folder create, delete and update in `ChatSidebar` reached the corpus and not the rows built from it. `QuickSearchSurface` mounts the overlay only while the bar is open, and a remount refetches only what is stale. A folder deleted while the bar was closed therefore came back on the next open: listed, selectable, and carrying an id the sidebar no longer has, so activating it asked for a reveal that silently did nothing. The window is the view's own `staleTime`, 15s. The key is now nested under the corpus, `['chat-folders', 'command-bar', 'view', q]` — the shape the artifacts view in this same file already uses (`['artifacts', 'command-bar', 'view', q]`), which is why that view has never had this gap. Nothing reads `['chat-folders']` as a prefix except `invalidateQueries` and `cancelQueries`; every get/set in the repo uses the exact key, so no other reader's match changes. Named by the Design review on #12013 and shipped unaddressed. Co-authored-by: Leon <leon.lai.yc@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Leon <276034861+leonlaiyc@users.noreply.github.com>
What is the problem?
Folder search reached the reader through the wrong shape, and through two
implementations instead of one.
Shape. The Command Bar is the default Cmd+K surface, and PR #11525 put the
sidebar's folders into it as individual root rows. On that surface a folder list
behaves unlike every other corpus the bar holds:
idleDemoteand a group cap of two, so atmost two folders appeared, chosen by the alphabet rather than by the user;
searchable had no row telling them so.
Sessions and artifacts, the surface's other two corpora, are reached the opposite
way: one Search Sessions or Search Artifacts row you enter, which then owns
the whole list.
Ownership. The same PR also gave the HOST quick-search palette its own folder
search: a Folders scope in its tab list plus a registration in its All aggregator,
with the corpus filed under
components/commandPalette/providers/. So the gesture"find a folder by name and land on it" had two implementations, on two surfaces,
free to disagree about ranking and about what a reveal does.
Why this issue matters to the user
The feature reads as missing. A user who shipped it and then went looking for it in
the launcher asked where it had gone: the two surviving folder rows were not the two
they wanted, and no row in the bar mentions folders at all. The inconsistency is
also a learning cost, because the bar teaches "a corpus is a row you enter" through
Search Sessions and then contradicts itself for folders.
The second implementation costs the user in a quieter way. Only one of the two
surfaces is the one people use, since Command Bar is enabled by default and replaces
the quick-search slot, so the host's copy is the one that receives no attention and
drifts, and the reader who does disable the launcher gets whatever it drifted into.
How our fix solves it
One corpus row per corpus, entered. The root holds one row per corpus, and each
one is a
viewthe reader enters:Entering the row lands on the whole folder list in the order the sidebar draws it,
with each row's ancestry path under its name:
It narrows from the first character, because the corpus is the cached
['chat-folders']list rather than a backend, so there is no minimum query length:One implementation, owned by the app. The host palette now carries no Folders
scope at all. Typing
foldthere raises no hint beside the input, and Tab adoptsnothing, while the sidebar behind it holds six folders, so the absence is the
palette's and not the fixture's:
The corpus moved with the capability:
components/commandPalette/providers/foldersProvider.tsis now
apps/command-bar/foldersProvider.ts, anduseFoldersProvideris deletedbecause the host was its only caller. What stays shared is the
Resultrowcontract, which every corpus view in this app renders and the Enter matrix
dispatches; forking that would fork the Enter matrix with it.
The rest of the shape:
offers Search folders for "<query>", next to the existing sessions and
artifacts ones, and entering through it carries the query so nothing is retyped.
keyboard can act on them: a failed folder read is a retry row, and a query that
matches nothing offers the full list back.
Session.
change in
CommandBarOverlayalongside this app's other two engines. Everynavigation in that component goes through
usePaletteActions, and one componentholding two navigation mechanisms is how one of them ends up unexercised.
view is the activation event that may pay for one folder fetch on a cold cache,
the same bargain the sessions view makes.
foldersroot group goes, with its idle cap and its two catalogkeys, so a future caller cannot push folder rows back into the root without
reopening the question.
ROOT_GROUPSis asserted not to contain it.The folders view follows the per-corpus slot tags this file already uses for
artifacts (
fallback-folders,retry-folders), so the three corpora are wired thesame way and the artifacts paths are untouched.
docs/feature-map/README.mdanddocs/system-specs/modules/command-bar.mdrecordboth halves: the entry point that now exists, and which layer owns the corpus.
What tests we did
CommandBarOverlay.folders.test.tsxrewritten for the new shape: the root offersthe corpus row and never a folder row even when the cache holds a matching folder;
a failed read gives a retryable row; a non-array cache and a non-string folder
name leave the launcher standing.
rootIndex.test.ts: the folders-group tests are replaced by one that pins thegroup's absence, and the opening-page composition test now reads apps/settings.
CommandPalette.test.tsxgains the assertion for the other direction: typingfoldraises no Folders hint and Tab adopts no folders scope. It ismutation-verified rather than assumed. Putting a stub Folders provider back into
the host's tab list fails exactly that test and nothing else (1 failed, 49 passed),
and the file was restored from a copy taken before the mutation.
src/apps/command-bar/andsrc/components/commandPalette/run green together at570 tests across 33 files, which includes the 25 artifacts-corpus tests, so the
three corpora coexist rather than one replacing another.
foldersProvider.test.tscarries 13 of them at its new path.
website/scripts/capture-command-bar-folder-scope.mjsis the harness that took thefour frames above. It drives the real built SPA with
/api/**stubbed and assertswhat each frame is supposed to evidence, so it fails instead of quietly
photographing a regression: that both corpus rows are offered at the root, that a
folder's own name typed at the root produces no folder row, that the placeholder
changes inside the view, that an empty query lists the corpus, that a query
narrows it, that a narrowed row still carries its parent path, and now that the
host palette under a disabled launcher raises no folders scope and adopts none on
Tab. Frame 4 checks the surface it is on before asserting anything about it, so a
frame of the wrong overlay fails rather than passing vacuously.
tsc --noEmit,eslintandnpm run buildclean.npm run i18n:pseudoregenerateden-XA;i18n:checkreports the 5 new keys aswell-shaped with zero passthrough findings among the values added.
Any other suggestions on the work
The five new catalog keys are translated in all eleven translated
website/src/i18n/localescatalogs by mirroring each one's existing sessionswording with its own word for a folder, so no locale ships an English placeholder;
en-XA.jsonis regenerated, not hand-edited. Two keys the removed root group owned(
group_folders,kind.folder) are deleted from every catalog.The sidebar's own search box still matches folder names, keeping a matched folder
with its whole subtree. That is left in place deliberately: it is a different
gesture on a different surface (filter the list I am looking at, rather than jump to
a folder from anywhere), and it is the one folder-search surface that is not a second
copy of the launcher's. Removing it is a separate call, not a consequence of this
one.
One asymmetry is left alone deliberately: the Search Artifacts row carries a
subtitle and the other two corpus rows do not. That is how the artifacts row landed,
and changing it belongs to whoever owns that copy.
This is the same work as #11921, re-raised from a branch on this repository. On the
fork PR both hard-gate reviewers returned "review incomplete" on every head and every
re-run for five hours: the Opus job died fetching its toolchain
(
connect ECONNREFUSED ... :443, exit 127) and the GPT job failed both passes withConnection failed: error sending requestafter five reconnects. It was repo-wide,not this diff: over the same window every fork PR measured (#11967, #11972) carried
the identical
review incompletetitle on both lanes, while same-repo PRs carriedreal verdicts. A fork lane consumes no
/ai-review overridemarker, so an overridecould not have produced a verdict either. The commits here are the fork branch's,
rebased onto current main; #11921 is closed pointing at this PR.
Supersedes #11921
Refs #11525