Skip to content

feat: history panel UX improvements - #26

Merged
quiet-node merged 5 commits into
mainfrom
worktree-expressive-questing-cascade
Apr 4, 2026
Merged

feat: history panel UX improvements#26
quiet-node merged 5 commits into
mainfrom
worktree-expressive-questing-cascade

Conversation

@quiet-node

Copy link
Copy Markdown
Owner

Summary

  • Dynamic SwitchConfirmation labels: The confirmation dialog now shows context-appropriate text — "New conversation?" / "Save & Start New" / "Start New" when triggered from the "+" button, vs the existing "Switch conversations?" wording for loading saved conversations
  • Search box hidden for new-conversation prompt: The "+" button dropdown no longer shows the inherited search box — only the confirmation options
  • Cancel button fix: Cancel in the new-conversation confirmation now properly closes the dropdown (was a no-op before)
  • Active conversation indicator: The currently open conversation is highlighted in the history list with a primary-tinted background, left border accent, and bold title (plus aria-current for accessibility)
  • Relative timestamps: Conversation items show "just now", "2m ago", "5h ago", etc. instead of message counts — also fixes a seconds/milliseconds unit mismatch with the backend

Test plan

  • All 267 frontend tests pass
  • 100% code coverage maintained across lines, functions, branches, statements
  • validate-build passes (lint + format + typecheck + build)
  • Manual verification: click "+" with unsaved conversation → see "New conversation?" prompt without search box
  • Manual verification: Cancel button in the prompt closes the dropdown
  • Manual verification: active conversation is visually highlighted in history panel
  • Manual verification: relative timestamps display correctly for conversations of varying ages

🤖 Generated with Claude Code

quiet-node and others added 5 commits April 3, 2026 22:57
…sation

The SwitchConfirmation component now accepts a variant prop ("switch" | "new")
to display context-appropriate titles and button labels. The "+" button dropdown
hides the search box and shows "New conversation?" / "Save & Start New" /
"Start New" instead of the generic switch wording.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
…dropdown

Added onCancelNew prop to HistoryPanel so the Cancel button in the
new-conversation confirmation properly closes the history panel instead
of only clearing pendingId (which had no effect).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
ConversationItem now accepts an isActive prop that renders a primary-tinted
background, left border accent, and bold title for the currently open chat.
Includes aria-current for accessibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Conversation items now show "just now", "2m ago", "5h ago", etc. instead
of message counts. Also fixes groupByDate and formatRelativeTime to use
milliseconds matching the backend's now_millis() storage format.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
- Add App-level test for onCancelNew callback (restores 100% coverage)
- Fix stale JSDoc: ConversationItem "message count" → "relative timestamp"
- Fix stale JSDoc: HistoryPanel prop comments to match new button labels
- Fix stale JSDoc: types/history.ts updated_at "seconds" → "milliseconds"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
@quiet-node
quiet-node merged commit 2c3de16 into main Apr 4, 2026
0 of 3 checks passed
@quiet-node
quiet-node deleted the worktree-expressive-questing-cascade branch April 4, 2026 04:30
quiet-node added a commit that referenced this pull request Apr 10, 2026
* fix: dynamic SwitchConfirmation labels and hide search for new conversation

The SwitchConfirmation component now accepts a variant prop ("switch" | "new")
to display context-appropriate titles and button labels. The "+" button dropdown
hides the search box and shows "New conversation?" / "Save & Start New" /
"Start New" instead of the generic switch wording.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: Cancel button in new-conversation SwitchConfirmation now closes dropdown

Added onCancelNew prop to HistoryPanel so the Cancel button in the
new-conversation confirmation properly closes the history panel instead
of only clearing pendingId (which had no effect).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* feat: active state indicator for current conversation in history panel

ConversationItem now accepts an isActive prop that renders a primary-tinted
background, left border accent, and bold title for the currently open chat.
Includes aria-current for accessibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* feat: replace message count with relative timestamps in history panel

Conversation items now show "just now", "2m ago", "5h ago", etc. instead
of message counts. Also fixes groupByDate and formatRelativeTime to use
milliseconds matching the backend's now_millis() storage format.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: code review — coverage gap and stale JSDoc comments

- Add App-level test for onCancelNew callback (restores 100% coverage)
- Fix stale JSDoc: ConversationItem "message count" → "relative timestamp"
- Fix stale JSDoc: HistoryPanel prop comments to match new button labels
- Fix stale JSDoc: types/history.ts updated_at "seconds" → "milliseconds"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

---------

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
quiet-node added a commit that referenced this pull request Apr 10, 2026
* fix: dynamic SwitchConfirmation labels and hide search for new conversation

The SwitchConfirmation component now accepts a variant prop ("switch" | "new")
to display context-appropriate titles and button labels. The "+" button dropdown
hides the search box and shows "New conversation?" / "Save & Start New" /
"Start New" instead of the generic switch wording.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: Cancel button in new-conversation SwitchConfirmation now closes dropdown

Added onCancelNew prop to HistoryPanel so the Cancel button in the
new-conversation confirmation properly closes the history panel instead
of only clearing pendingId (which had no effect).

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* feat: active state indicator for current conversation in history panel

ConversationItem now accepts an isActive prop that renders a primary-tinted
background, left border accent, and bold title for the currently open chat.
Includes aria-current for accessibility.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* feat: replace message count with relative timestamps in history panel

Conversation items now show "just now", "2m ago", "5h ago", etc. instead
of message counts. Also fixes groupByDate and formatRelativeTime to use
milliseconds matching the backend's now_millis() storage format.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: code review — coverage gap and stale JSDoc comments

- Add App-level test for onCancelNew callback (restores 100% coverage)
- Fix stale JSDoc: ConversationItem "message count" → "relative timestamp"
- Fix stale JSDoc: HistoryPanel prop comments to match new button labels
- Fix stale JSDoc: types/history.ts updated_at "seconds" → "milliseconds"

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

---------

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
quiet-node added a commit that referenced this pull request Apr 11, 2026
* fix: dynamic SwitchConfirmation labels and hide search for new conversation

The SwitchConfirmation component now accepts a variant prop ("switch" | "new")
to display context-appropriate titles and button labels. The "+" button dropdown
hides the search box and shows "New conversation?" / "Save & Start New" /
"Start New" instead of the generic switch wording.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: Cancel button in new-conversation SwitchConfirmation now closes dropdown

Added onCancelNew prop to HistoryPanel so the Cancel button in the
new-conversation confirmation properly closes the history panel instead
of only clearing pendingId (which had no effect).

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* feat: active state indicator for current conversation in history panel

ConversationItem now accepts an isActive prop that renders a primary-tinted
background, left border accent, and bold title for the currently open chat.
Includes aria-current for accessibility.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* feat: replace message count with relative timestamps in history panel

Conversation items now show "just now", "2m ago", "5h ago", etc. instead
of message counts. Also fixes groupByDate and formatRelativeTime to use
milliseconds matching the backend's now_millis() storage format.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: code review — coverage gap and stale JSDoc comments

- Add App-level test for onCancelNew callback (restores 100% coverage)
- Fix stale JSDoc: ConversationItem "message count" → "relative timestamp"
- Fix stale JSDoc: HistoryPanel prop comments to match new button labels
- Fix stale JSDoc: types/history.ts updated_at "seconds" → "milliseconds"

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

---------

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant