Skip to content

feat: UI improvements — FTS search, scrollbar, scroll-to-top, toolbar polish, copy buttons, server tooltip#34

Merged
Killea merged 3 commits intoKillea:mainfrom
bertheto:feat/ui-search-polish
Mar 3, 2026
Merged

feat: UI improvements — FTS search, scrollbar, scroll-to-top, toolbar polish, copy buttons, server tooltip#34
Killea merged 3 commits intoKillea:mainfrom
bertheto:feat/ui-search-polish

Conversation

@bertheto
Copy link
Contributor

@bertheto bertheto commented Mar 3, 2026

Summary

This PR bundles two sets of UI improvements developed on feat/ui-search-polish:

PR H — Core features (commit 1)

  • UI-02 Full-Text Search (FTS5): Backend SQLite FTS5 index with /api/search endpoint; frontend search bar with scope pills (current thread / all threads), Fuse.js fuzzy match, result highlighting, keyboard navigation
  • UI-08 Scroll-to-top button: Floating button in #messages-wrap, auto-shows after 300px scroll, smooth scroll to top
  • UI-09 Styled scrollbar: Custom thin scrollbar on #messages and #thread-pane with accent-blue thumb (webkit + Firefox scrollbar-width)

UI Polish bundle (commit 2)

  • Unified toolbar style: All toolbar buttons (search, export, settings, theme-toggle, sidebar-toggle) share .toolbar-btn base style — transparent background, light border, accent-blue hover/active scale. #btn-new-thread remains distinct CTA.
  • Settings icon: Consistent SVG gear icon replaces emoji in topbar and thread header
  • Theme toggle icons: Dynamic sun/moon SVG icons replace plain "Light"/"Dark" text
  • Desktop sidebar toggle: Collapse/expand button with animated chevron; #sidebar.collapsed CSS state
  • Message copy button (.msg-copy-btn): Per-bubble copy-to-clipboard with checkmark feedback on hover
  • System prompt copy button (.msg-sys-prompt-copy-btn): Copy button on .msg-sys-prompt-body (absolute bottom-right), with stopPropagation to avoid toggle conflict
  • Fix: #search-toggle-btn was white in light mode → now matches toolbar style
  • Fix: All-threads search result click navigated to empty zone → exposes window.selectThread + _trySrollToPendingSeq polling mechanism
  • Feat: Connected indicator tooltip: Hover on #status-dot / #status-label triggers AcbTooltip.showRich() with data from /api/metrics (30s cache) — uptime, started at, schema version, threads by status, messages total + activity rate (1m/5m/15m), agents online

Test plan

  • Search bar opens/closes, scope pills switch, results highlight in current thread
  • All-threads search: clicking result navigates to correct thread and scrolls to message
  • Scroll-to-top button appears after scrolling, disappears at top, works on click
  • Scrollbars styled correctly in light and dark mode
  • All toolbar buttons have consistent sober style; hover is accent-blue
  • Settings icon consistent in topbar and thread header
  • Theme toggle shows sun in dark mode, moon in light mode
  • Sidebar collapses/expands with chevron rotation
  • Copy button appears on message hover; clipboard receives content; checkmark shown briefly
  • Copy button appears on system prompt hover; does not collapse/expand the block
  • Hover on Connected dot/label shows rich tooltip with server metrics
  • Tooltip data refreshes after 30s cache expiry

bertheto added 3 commits March 3, 2026 13:11
UI-08: Floating scroll-to-top button (#btn-scroll-top) — visible when
scrollTop > 300px, smooth-scrolls to top on click.

UI-09: Styled scrollbar on #messages — 8px, blue accent thumb
(webkit + Firefox scrollbar-color), hover brightens to --accent.

UI-02: Full-text search (Fuse.js + SQLite FTS5)
- Backend: messages_fts virtual table, INSERT trigger, backfill migration;
  msg_search() CRUD; GET /api/search endpoint; msg_search MCP tool
- Frontend: Fuse.js v7.0.0 vendored; shared-search.js module;
  search bar with pills (Content/Author/Metadata), scope toggle
  (Current thread / All threads), prev/next navigation, highlight/dim,
  mark text wrapping, all-threads dropdown with click-to-navigate
- Tests: 9 unit tests, 7 integration tests, 16 Vitest frontend tests
  (309 total pass, 0 regressions)
…, server tooltip

- Unified toolbar button style (.toolbar-btn): transparent bg, border, accent-blue hover/active
- Settings button: consistent SVG gear icon replacing emoji (topbar + thread header)
- Theme toggle: dynamic sun/moon SVG icons replacing plain text
- Desktop sidebar collapse/expand button (chevron animation, CSS .collapsed state)
- Scroll-to-top button: resized 28px, absolute in #messages-wrap, no overlap with compose
- #thread-pane scrollbar: matches #messages accent-blue style
- Per-message copy button (.msg-copy-btn): clipboard + checkmark visual feedback
- System prompt copy button (.msg-sys-prompt-copy-btn): on .msg-sys-prompt-body
- Fix: #search-toggle-btn was white in light mode, now unified toolbar style
- Fix: all-threads search navigation to empty zone (window.selectThread + poll-for-seq scroll)
- Feat: Connected indicator rich tooltip via /api/metrics (30s cache) — uptime, started,
  schema version, threads by status, messages total + rate pills (1m/5m/15m), agents online
@Killea Killea merged commit 9677166 into Killea:main Mar 3, 2026
1 check passed
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.

2 participants