Skip to content

feat(dashboard): six UX fixes across chat, folders, artifacts and settings - #9781

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
bolichen97:salvage/p5-dashboard-ux
Sep 10, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
bolichen97:salvage/p5-dashboard-ux

Conversation

@bolichen97

@bolichen97 bolichen97 commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Six dashboard UX defects, ported by content from open code reviews on the retiring
predecessor product.

  1. Ctrl+F opened find-in-chat on macOS. Ctrl+F is the standard move cursor forward binding there and Mac users expect Cmd+F, so typing in the composer opened the search bar.
  2. No way to hand someone a prepared prompt. A link could open a new session but not seed its composer.
  3. A long background turn had to be watched. Nothing told the user when it finished.
  4. A folder's default agent did not reach subfolders. resolveFolderAgent did a single flat lookup and fell through to the global default, while its sibling resolveFolderProjectDir already walked parent_id with a cycle guard.
  5. File-backed artifacts needed a manual refresh to show changes.
  6. An agent could not link a user to a setting it was discussing.

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.ts now
persists the last-entered goal per slot and AutoNudgePopover restores it on open — with the
same pristine-default skip the 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, an
MCP tool or another tab, never typed into this popover — when it is removed) is a narrow
enhancement on the bounded-monitors subsystem main just rewrote in #5185, which moved
auto-nudge out of ChatPage into useWebSocket's autonudge_state handler and
SessionAutomationPopover. That 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.

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 binds f only for
cycle-approval (Alt+Shift+F), and find-in-chat still goes through
hasCommandModifier(e) && e.key === 'f' where hasCommandModifier is metaKey !== 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 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 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 concurrent
completions 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_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, so coverage is
unchanged.

Tests

Vitest across the six kept fixes plus the settings-registry pytest cases. All run against a real
npm ci install with a clean tsc -b and clean eslint.

  • 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 to pendingInput.
  • 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 real
SettingsToggle (i18n resolved, role="switch"), that the left pane reads aria-checked=false
and the right aria-checked=true, and that the section title and label really rendered — then
shoots. A screenshot of a blank or single-state frame is worse evidence than none.

Notify on background chat complete — dark

Light theme

Notify on background chat complete — light

Related Issues

None filed — these originate from code reviews on the predecessor product.

Pattern harvest

Rule candidate: lint
Pattern: two sibling resolvers over the same tree where only one walks parent_id. Item 4
is exactly this — resolveFolderAgent and resolveFolderProjectDir live in the same file,
are meant to be symmetric, and silently diverged. The generalizable defence is that any pair of
resolveFolderX functions should share the traversal rather than each implementing it, and a
lint rule keyed on a folders.find(f => f.id === …) call in a file that also contains a
parent_id walk would flag the asymmetry directly.

Checklist

  • At most two commits, with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated — settings deep-link scheme doc added
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and buluoray September 9, 2026 21:37
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5, fork) — 🟡 CONCERNS

UX-level review of 20c61060ea59e37b2e8d23f6566c2996e1ef47ad via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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

  • Toggle on ≠ notifications on. saveChatCompleteNotify requests permission only when Notification.permission === 'default'; if the user has denied it (or dismisses the prompt just triggered), the toggle stays checked, shouldNotifyOnChatComplete returns false forever, and Settings shows an enabled feature that never fires — with no indication why. Frequency: every previously-denied browser; impact: feature silently absent; persistence: permanent. Smallest fix: when permission is denied, render the row with an inline "notifications are blocked in your browser" note (and revert the toggle if the just-fired request resolves to denied).

Evidence gaps

  • "Desktop alerts" section + "Notify when a background chat finishes" toggle (off and on): the PR's screenshots are fork-only binaries, and no blind read ran — push the branch to this repo to get the cold read.
  • FolderConfigModal's changed empty-option label ("Inherit (nearest-ancestor agent)") appears in no screenshot.
  • The ?new=1&prefill= seeded-but-unsent composer appears in no screenshot.
  • Artifact live-reload (content updating in place) has no recording; the repo's browser-recording skill would close it.

Suggestions

  • Give the completion toast a click handler that focuses the window and activates the finished slot — new Notification(doneTitle, …) in useWebSocket.ts currently names the session but clicking it takes the away user nowhere.

[UX-REVIEWED] 20c6106

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — 🟡 CONCERNS

Design-level review of 20c61060ea59e37b2e8d23f6566c2996e1ef47ad via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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

  • Item 4 fixes the wrong-context bug only where the resolver happens to live — the sidebar create path. The PR's own spec edit states the gap: "That walk is FRONTEND-ONLY … every non-sidebar create-in-folder path (cron folder assignment, channel_slots.surface_channel_session, MCP slot creates) still gets the global default … a DIRECTLY set one included." Meanwhile FolderConfigModal now renders "Inherit (<ancestor agent>)" as a factual claim, so a channel or cron chat filed into that folder runs a different agent than the modal asserts — the exact "silently runs a different agent than the folder says" harm the PR names, now with a UI label affirming the wrong answer. The sibling rule (project_dir) was deliberately moved server-side for this class of reason (chat_handlers.py:2480), so the precedent for the right layer already exists in-tree.
    Clears when: a backend _resolve_folder_agentbeside_resolve_folder_project_dir covers the non-sidebar create paths — here or as a committed, tracked follow-up.

[DESIGN-REVIEWED] 20c6106

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — ✅ PASS

Premise-level review of 20c61060ea59e37b2e8d23f6566c2996e1ef47ad via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 ships

Inventory (10 items) — 8 justified

Intent: 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).

  1. Bare Ctrl+F on macOS no longer opens find-in-chat; Cmd+F does — justified
  2. A ?new=1&prefill= link opens a new session with the composer seeded, never auto-sent — justified
  3. Opt-in "Desktop alerts" toggle; a finishing background chat raises an OS toast naming the session, only while away — justified
  4. Sound section moves down one slot to make room for Desktop alerts — rides along, harm-free placement of item 3
  5. Sidebar chats in a subfolder now run the nearest ancestor's default agent — justified
  6. Folder modal's "Inherit (…)" names the agent that would actually run — justified
  7. Open artifact surfaces repaint when the backing file is rewritten externally — justified
  8. The agent can answer "where is that setting?" with a prebuilt deep link from a bundled generated registry — justified
  9. That registry joins the brand-gate GENERATED_PATHS exemption — rides along, matches the two existing generated artifacts
  10. Capture harness + committed screenshots — rides along, repo convention (1579 prior temp-screenshots files, ~150 capture/ pairs)

Verified against base: hasCommandModifier is the XOR claimed and shortcutRegistry.ts:175 binds f only as Alt+Shift+F, so no existing mechanism covers item 1; writePrefill/setPendingInput are the existing channels item 2 reuses; item 5 deletes the duplicated walk into one shared nearestFolderValue (2 consumers) rather than adding a second traversal; item 7 reuses the existing /api/file-watch SSE; item 8's declared frontend-only residual (backend create paths still ignore folder agents) is stated at its level in the spec updated in-commit.

[FIRST-PRINCIPLES-REVIEWED] 20c6106

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review (fork) — ✅ no blocking findings

Reviewed 20c61060ea59e37b2e8d23f6566c2996e1ef47ad via the fork AI-review pipeline; updated in place on each push.

Review details

I'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, useArtifactLiveReload debounce/edit-guard/unmount cleanup, the chatCompleteNotify opt-in + away gate + chat_done toast wiring, the new=1&prefill= seed-only deep link, the resolveFolderAgent ancestor-walk with cycle guard, and the buildAgentRegistry key:-form route override) against the base sources and found no reachable defect meeting the (a)/(b)/(c) bar at 80+. The packaging/docs/i18n/registry changes are non-behavioral or guarded by the byte-match and packaging tests.

No findings.

[OPUS-REVIEWED] 20c6106

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

Reviewed 20c61060ea59e37b2e8d23f6566c2996e1ef47ad via the fork AI-review pipeline; updated in place on each push.

Review details

FINDING -- website/src/pages/chat/useChatPageSessionController.ts:237 -- initialNewRef.current ignores the stated ?newSession=1&prefill= URL, so no session is created or seeded -> Fix: recognize that combination without affecting auto-send flows.
[GPT-REVIEWED] 20c6106

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 9, 2026
@bolichen97
bolichen97 force-pushed the salvage/p5-dashboard-ux branch 2 times, most recently from 3a9eca4 to 0071cac Compare September 9, 2026 23:24
@github-actions github-actions Bot added readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention labels Sep 9, 2026
@bolichen97
bolichen97 force-pushed the salvage/p5-dashboard-ux branch 2 times, most recently from 7d2f3f9 to ff5d3fc Compare September 10, 2026 02:46
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`.
@bolichen97
bolichen97 force-pushed the salvage/p5-dashboard-ux branch from ff5d3fc to 20c6106 Compare September 10, 2026 02:50
@bolichen97 bolichen97 changed the title feat(dashboard): seven UX fixes across chat, folders, artifacts and settings feat(dashboard): six UX fixes across chat, folders, artifacts and settings Sep 10, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Sep 10, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) September 10, 2026 04:41
@bolichen97
bolichen97 merged commit b8cc49d into kirodotdev:main Sep 10, 2026
73 of 78 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 10, 2026
amadsalmon pushed a commit to amadsalmon/KiroCrew that referenced this pull request Sep 22, 2026
…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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants