Repository navigation
feat(dashboard): six UX fixes across chat, folders, artifacts and settings - #9781
Conversation
UX Review (Fable 5, fork) — 🟡 CONCERNSUX-level review of I have full coverage of the user-visible changes. Composing the review. UX-Verdict: CONCERNS Solid, well-scoped fixes, but the new notify toggle can silently lie when OS permission is denied, and no first-time reader has seen any of the new surfaces. Watch
Evidence gaps
Suggestions
[UX-REVIEWED] 20c6106 |
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Sound fixes, but folder-agent inheritance lands frontend-only, so the modal now promises an agent that non-dashboard session creates will never run. Watch
[DESIGN-REVIEWED] 20c6106 |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify item 3 on a real desktop: the OS toast itself (and its suppression when toggled off) is the one behavior no test in this PR can prove — the author says so. What this change shipsInventory (10 items) — 8 justifiedIntent: remove six declared dashboard frictions — three FIXes (Mac Ctrl+F, subfolder default agent, its modal label) and three declared ADDITIONS (prefill link, completion toast, settings deep links).
Verified against base: [FIRST-PRINCIPLES-REVIEWED] 20c6106 |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed Review detailsI've validated the diff independently. The discovery pass reported no candidates, so there is nothing to falsify; I re-derived the behavior of each changed code path (the Mac find-chord gate, No findings. [OPUS-REVIEWED] 20c6106 |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsFINDING -- website/src/pages/chat/useChatPageSessionController.ts:237 -- |
3a9eca4 to
0071cac
Compare
7d2f3f9 to
ff5d3fc
Compare
Ported by content from open code reviews on the predecessor product, which shares no git history with this repo — each is hand-written against the current design rather than an applied diff, and each carries a test that fails on the pre-image. - Ctrl+F stole find-in-chat on macOS, where it is the standard move-cursor-forward binding, so typing in the composer opened the search bar. The recent shortcuts registry does not cover this: find-in-chat still goes through `hasCommandModifier(e) && e.key === 'f'`, and that helper is `metaKey !== ctrlKey` — an XOR, so bare Ctrl+F matches on macOS. - `?newSession=1&prefill=` seeds a new session's composer without sending, so a link can hand someone a prepared prompt to review first. `writePrefill`'s false return is now honoured — a refused best-effort storage write falls back to the in-memory `pendingInput` channel the command bar already seeds composers through, and the ref is cleared only once the prompt is staged somewhere, so a disabled or quota-exhausted store no longer drops the prompt. - Opt-in native notification when a background chat finishes: default OFF, gated on the user being AWAY (deliberately not the chime's gate, which ignores focus so every turn stays audible), titled with the finishing session, and per-slot `tag`ged so concurrent completions coalesce per session. - A folder's default agent did not reach subfolders: `resolveFolderAgent` did a single flat lookup while its sibling `resolveFolderProjectDir` already walked `parent_id` with a cycle guard, so a session created in a subfolder silently ran the wrong agent. It now reuses that walk. The server-side path is still flat; that gap is pre-existing and documented, not addressed here. - File-backed artifacts live-reload over a file-watch SSE stream. - Agent-emitted settings deep-links: a generated registry plus the scheme doc. The generated registry joins the brand-name gate's `GENERATED_PATHS` beside the two artifacts already listed: it is JSON so it offers no line for a `brand-ok` comment, and it re-emits wholesale on regeneration, which would fail a PR on text its author cannot correct where the error points. Its source, the settings panels, stays enforced. NOT included — the seventh fix (stop-loses-goal-text in the auto-nudge popover) was dropped rather than ported. Upstream has since landed it: `utils/goalDrafts.ts` persists the last-entered goal per slot and `AutoNudgePopover` restores it on open (with the same pristine-default skip this port carried), so the core bug is already fixed on main. The only residual — capturing an EXTERNALLY-armed loop's goal (a `/goal` from the CLI/Slack/MCP/another tab, never typed into this popover) when it is removed — is a narrow enhancement on the bounded-monitors subsystem main just rewrote (kirodotdev#5185 moved auto-nudge out of ChatPage into `useWebSocket`'s `autonudge_state` handler + `SessionAutomationPopover`). It belongs in its own change against the new design, with the monitor-exclusion rule re-validated against the rewritten wire shape, not force-fit here. Vitest across the six kept fixes plus the settings-registry pytest cases, run against a real install with a clean `tsc -b` and clean `eslint`.
ff5d3fc to
20c6106
Compare
…irodotdev#9781) Ported by content from open code reviews on the predecessor product, which shares no git history with this repo — each is hand-written against the current design rather than an applied diff, and each carries a test that fails on the pre-image. - Ctrl+F stole find-in-chat on macOS, where it is the standard move-cursor-forward binding, so typing in the composer opened the search bar. The recent shortcuts registry does not cover this: find-in-chat still goes through `hasCommandModifier(e) && e.key === 'f'`, and that helper is `metaKey !== ctrlKey` — an XOR, so bare Ctrl+F matches on macOS. - `?newSession=1&prefill=` seeds a new session's composer without sending, so a link can hand someone a prepared prompt to review first. `writePrefill`'s false return is now honoured — a refused best-effort storage write falls back to the in-memory `pendingInput` channel the command bar already seeds composers through, and the ref is cleared only once the prompt is staged somewhere, so a disabled or quota-exhausted store no longer drops the prompt. - Opt-in native notification when a background chat finishes: default OFF, gated on the user being AWAY (deliberately not the chime's gate, which ignores focus so every turn stays audible), titled with the finishing session, and per-slot `tag`ged so concurrent completions coalesce per session. - A folder's default agent did not reach subfolders: `resolveFolderAgent` did a single flat lookup while its sibling `resolveFolderProjectDir` already walked `parent_id` with a cycle guard, so a session created in a subfolder silently ran the wrong agent. It now reuses that walk. The server-side path is still flat; that gap is pre-existing and documented, not addressed here. - File-backed artifacts live-reload over a file-watch SSE stream. - Agent-emitted settings deep-links: a generated registry plus the scheme doc. The generated registry joins the brand-name gate's `GENERATED_PATHS` beside the two artifacts already listed: it is JSON so it offers no line for a `brand-ok` comment, and it re-emits wholesale on regeneration, which would fail a PR on text its author cannot correct where the error points. Its source, the settings panels, stays enforced. NOT included — the seventh fix (stop-loses-goal-text in the auto-nudge popover) was dropped rather than ported. Upstream has since landed it: `utils/goalDrafts.ts` persists the last-entered goal per slot and `AutoNudgePopover` restores it on open (with the same pristine-default skip this port carried), so the core bug is already fixed on main. The only residual — capturing an EXTERNALLY-armed loop's goal (a `/goal` from the CLI/Slack/MCP/another tab, never typed into this popover) when it is removed — is a narrow enhancement on the bounded-monitors subsystem main just rewrote (kirodotdev#5185 moved auto-nudge out of ChatPage into `useWebSocket`'s `autonudge_state` handler + `SessionAutomationPopover`). It belongs in its own change against the new design, with the monitor-exclusion rule re-validated against the rewritten wire shape, not force-fit here. Vitest across the six kept fixes plus the settings-registry pytest cases, run against a real install with a clean `tsc -b` and clean `eslint`.
Problem / Motivation
Six dashboard UX defects, ported by content from open code reviews on the retiring
predecessor product.
resolveFolderAgentdid a single flat lookup and fell through to the global default, while its siblingresolveFolderProjectDiralready walkedparent_idwith a cycle guard.Scope note — a seventh fix was dropped
The predecessor review set also carried a fix for stopping an auto-nudge goal loses the goal
text. It is not in this PR: upstream has since landed it.
utils/goalDrafts.tsnowpersists the last-entered goal per slot and
AutoNudgePopoverrestores it on open — with thesame pristine-default skip the port carried — so the core bug is already fixed on
main. Theonly residual (capturing an externally-armed loop's goal — a
/goalfrom the CLI, Slack, anMCP tool or another tab, never typed into this popover — when it is removed) is a narrow
enhancement on the bounded-monitors subsystem
mainjust rewrote in #5185, which movedauto-nudge out of
ChatPageintouseWebSocket'sautonudge_statehandler andSessionAutomationPopover. That belongs in its own change against the new design, with themonitor-exclusion rule re-validated against the rewritten wire shape — not force-fit here.
Why it matters
Item 4 is a wrong-context bug — a session created in a subfolder silently runs a different agent
than the folder says it should, and nothing indicates the mismatch.
Item 1 makes the composer hostile on macOS: a standard cursor movement pops a search UI over
what you are writing. Items 2, 3, 5 and 6 are each a small friction that the product otherwise
handles well — a prompt that has to be copy-pasted by hand, a turn that has to be babysat, an
artifact that has to be manually refreshed, a setting that has to be described in prose instead
of linked.
What changed (motivation → approach → change)
Item 1. Root cause is that the chord test is platform-blind. Note for review: the recent
shortcuts registry (
8543abf68) does not already cover this — it bindsfonly forcycle-approval(Alt+Shift+F), and find-in-chat still goes throughhasCommandModifier(e) && e.key === 'f'wherehasCommandModifierismetaKey !== ctrlKey,an XOR, so bare Ctrl+F still matches on macOS. I checked this specifically because the registry
looked like it might have subsumed the fix.
Item 2. A
?newSession=1&prefill=seed that does not auto-send.writePrefill's falsereturn is now honoured — a refused best-effort storage write falls back to the in-memory
pendingInputchannel the command bar already seeds composers through, and the ref is clearedonly once the prompt is staged somewhere, so a disabled or quota-exhausted store no longer drops
the prompt outright.
Item 4. The fix is to reuse the sibling's parent walk (same file, same cycle guard) instead
of adding a second traversal — the two resolvers were already meant to be symmetric. The
FolderConfigModal's empty-option label now names the agent an empty selection would ACTUALLY run
(nearest ancestor, then the global default), instead of always reading "Inherit (kirocrew)".
Items 3, 5, 6 are additive: an opt-in completion notification (default OFF, gated on the
window being away, titled with the finishing session and per-slot
tagged so concurrentcompletions coalesce), a file-watch SSE stream for artifacts, and a generated settings registry
plus its scheme doc.
On the brand-name gate: the new generated registry joins
GENERATED_PATHSbeside the twoartifacts already listed. It is JSON so it offers no line for a
brand-okcomment, and itre-emits wholesale on regeneration, which would fail a PR on text its author cannot correct
where the error points. Its source — the settings panels — stays enforced, so coverage is
unchanged.
Tests
Vitest across the six kept fixes plus the settings-registry pytest cases. All run against a real
npm ciinstall with a cleantsc -band cleaneslint.useMessageSearchMacFind.test.ts— Cmd+F still opens on macOS; bare Ctrl+F no longer does; Ctrl+F still opens on non-Mac.ChatPageNewSessionPrefill.test.tsx— the composer is seeded and nothing is sent; a refused prefill write falls back topendingInput.chatCompleteNotify.test.ts— fires only when opted in, and only for a background turn.folderDefaultAgent.test.ts— a subfolder inherits the nearest ancestor's default; a cycle terminates.FolderConfigModal.test.tsx— the empty-option label names the inherited agent.useArtifactLiveReload.test.ts,ArtifactLiveReload.wiring.test.tsx— the stream drives a reload and is torn down on unmount.test_settings_deeplink_registry.py— the generated registry is well-formed and covers the panels.The generated registry was regenerated against current
main—settingsRegistry.test.ts(a byte-match guard) is the only detector of that drift, and it is green.
Manual verification
Item 3's actual OS notification is the one thing not provable here — the test covers the
decision to notify, not the platform toast. Worth a maintainer confirming the toast appears and
is suppressed when the toggle is off.
Item 5 involves motion (content updating in place without a refresh), which a still image
cannot prove; its behaviour is covered by the two wiring tests instead.
Screenshots / video
Item 3 adds a new Desktop alerts section to Settings > Notifications — the one change in
this PR a still image genuinely proves. The toggle at its default (off) and enabled:
Captured by a self-checking harness added in this PR
(
website/capture/notify-on-chat-complete.{html,tsx}+website/scripts/capture-notify-on-chat-complete.mjs): it asserts both panes mounted the realSettingsToggle(i18n resolved,role="switch"), that the left pane readsaria-checked=falseand the right
aria-checked=true, and that the section title and label really rendered — thenshoots. A screenshot of a blank or single-state frame is worse evidence than none.
Light theme
Related Issues
None filed — these originate from code reviews on the predecessor product.
Pattern harvest
Rule candidate:
lintPattern: two sibling resolvers over the same tree where only one walks
parent_id. Item 4is exactly this —
resolveFolderAgentandresolveFolderProjectDirlive in the same file,are meant to be symmetric, and silently diverged. The generalizable defence is that any pair of
resolveFolderXfunctions should share the traversal rather than each implementing it, and alint rule keyed on a
folders.find(f => f.id === …)call in a file that also contains aparent_idwalk would flag the asymmetry directly.Checklist