Commit Graph

125 Commits

Author SHA1 Message Date
Nicolas Varrot
b3eea972a1 feat: unread message count badges in sidebar sessions 2026-02-15 10:03:02 +00:00
Nicolas Varrot
578c0d2a47 feat: collapsible long assistant messages with show more/less toggle
Long assistant messages (>3000 chars) are now collapsed to 400px with a
gradient fade-out and a 'Show more' button. Clicking it reveals the full
message with a 'Show less' button to re-collapse. Streaming messages are
never collapsed. Fully i18n'd (8 languages).
2026-02-15 06:03:38 +00:00
Nicolas Varrot
bc59ed4a91 feat: unified settings modal consolidating theme, language, sound, and send shortcut preferences 2026-02-15 04:04:49 +00:00
Nicolas Varrot
e1ba4aaf9d fix: session deletion persistence and action button overlap
- Fix blacklist reconciliation logic that was removing blacklisted keys
  for sessions still on the gateway (inverted filter condition)
- Move message action buttons (copy, bookmark, metadata, retry) above
  the message bubble (-top-3) to prevent overlapping text content

Closes #73, #74
2026-02-15 02:02:00 +00:00
Nicolas Varrot
fbb63b920c feat: session info popover on header click 2026-02-14 16:25:08 +00:00
Nicolas Varrot
be631a4df7 feat: slash command autocomplete in chat input
Type '/' to see available OpenClaw commands (/status, /reasoning,
/verbose, /model, /compact, /reset, /help) with descriptions.
Navigate with arrow keys, select with Tab/Enter.
Supports EN/FR i18n.
2026-02-14 15:57:39 +00:00
Nicolas Varrot
bd5ff6b75a feat: context compaction button in token bar (≥50% usage) 2026-02-14 15:25:17 +00:00
Nicolas Varrot
926971324b feat: export conversation as Markdown download 2026-02-14 14:54:52 +00:00
Nicolas Varrot
70d29dc70e feat: preserve messages after compaction (IndexedDB cache) + show agent name in header
- Add IndexedDB message cache to retain pre-compaction history locally
- Show compaction separator with amber styling when messages are compacted
- Archived messages render at 60% opacity above the separator
- Display agent name (from gateway identity) in header instead of 'PinchChat' when available
- Fallback to 'PinchChat' when no agent name is configured
- Add i18n keys for compaction separator (EN/FR)

Closes #72, #69
2026-02-14 14:25:41 +00:00
Nicolas Varrot
143e9486c2 feat: PWA install prompt, brand-colored channel icons, image load fix, semantic connection indicator
- Fix image display bug: remove loading='lazy' + use opacity instead of hidden (#66)
- PWA: add id/scope to manifest, fix SW cache name, add install prompt hook + button (#64)
- Colorize channel icons with brand colors (Discord blurple, Telegram blue, etc.) (#68)
- Use semantic green for connection indicator instead of theme accent (#70)
- Replace Sparkles icon with PinchChat logo in sidebar (#65)
- Replace decorative dots in sidebar footer with GitHub link (#71)
2026-02-14 13:58:18 +00:00
Nicolas Varrot
1c9e90b132 feat: persist scroll position per session when switching 2026-02-14 11:53:05 +00:00
Nicolas Varrot
aa9680cad6 feat: message bookmarks — star important messages and jump back to them
- Add bookmark button on message hover (amber star icon)
- Bookmarked messages show a small star indicator in the timestamp row
- Floating bookmarks panel to list and jump to bookmarked messages
- Bookmarks persisted in localStorage per session
- i18n support (EN/FR)
2026-02-14 09:56:37 +00:00
Nicolas Varrot
1c804cb53b feat: word-wrap toggle for code blocks
Add a persistent wrap/nowrap toggle button in the code block header bar,
consistent with the existing tool call content viewer. Persisted in
localStorage. Default is nowrap (existing behavior).
2026-02-14 07:55:58 +00:00
Nicolas Varrot
1c564d57b5 feat: configurable send shortcut (Enter vs Ctrl+Enter)
Add toggle in chat input to switch between Enter-to-send (default)
and Ctrl+Enter-to-send modes. Preference persists in localStorage.
Keyboard shortcuts modal reflects the current setting.
2026-02-14 05:54:11 +00:00
Nicolas Varrot
058501709e chore: fix lint warnings — suppress eslint-disable on setState in effects 2026-02-14 03:54:30 +00:00
Nicolas Varrot
28fe46d523 feat: show new message count badge on scroll-to-bottom button
When scrolled up and new messages arrive, the scroll-to-bottom button
now shows a count badge (e.g. '3', '99+') instead of just bouncing.
This gives users a clear sense of how many messages they missed.
2026-02-14 01:54:13 +00:00
Nicolas Varrot
a52bca40d5 refactor: remove HighlightedTextarea (cursor desync unfixable) 2026-02-14 00:49:53 +00:00
Nicolas Varrot
cb5a67ba20 fix: disable syntax highlight by default (cursor desync issue) 2026-02-14 00:45:55 +00:00
Nicolas Varrot
b248963e71 feat: auto-detect WSS gateway URL for HTTPS deployments 2026-02-14 00:36:13 +00:00
Nicolas Varrot
0bf25f40a9 feat: add suggestion chips to empty chat state
Clickable example prompts appear when a session has no messages,
giving users quick-start ideas. 2x2 grid on desktop, stacked on mobile.
Fully i18n'd (EN/FR).
2026-02-13 23:55:26 +00:00
Nicolas Varrot
d3b1b931b2 fix: clearer update indicator — current version + separate green badge for available update 2026-02-13 22:11:04 +00:00
Nicolas Varrot
d478eee638 fix: cursor desync in highlighted textarea (#68) + update indicator (#67)
- Remove font-style:italic from .ht-italic (different glyph widths cause desync)
- Remove font-weight:600 from .ht-heading (bolder glyphs are wider)
- Remove background/border-radius from code token spans
- Remove text-decoration from .ht-link
- Token spans now ONLY use color — zero text geometry changes
- Use inherit for font-size/line-height in shared .ht-backdrop/.ht-textarea
- Add update check hook: polls GitHub releases, shows indicator in sidebar
2026-02-13 22:01:25 +00:00
Nicolas Varrot
2b095278c7 feat: session filter chips in sidebar — filter by channel type, active status 2026-02-13 21:54:45 +00:00
Nicolas Varrot
48814a263c fix: improve avatar fallback in header, strengthen session switch reset (#63) 2026-02-13 20:52:41 +00:00
Nicolas Varrot
84512b1f15 fix: new message indicator, cursor desync, button overlap, avatar fallback
- #63: 'New messages' label only shows when actual new messages arrive while scrolled up; plain arrow button shown otherwise
- #64: Fix cursor desync in HighlightedTextarea by matching backdrop border width to textarea
- #65: Move floating buttons inside scroll container with sticky positioning to prevent overlap with growing textarea
- #66: Graceful fallback to Bot icon when agent avatar image fails to load
2026-02-13 20:51:09 +00:00
Nicolas Varrot
c596bdd99a feat: line numbers in code blocks with toggle button
- Show line numbers for code blocks with more than 3 lines
- Toggle button (# icon + line count) in the language header bar
- Preference persisted in localStorage
- Line numbers are non-selectable (won't copy with code)
- Hidden for short snippets to reduce visual noise
2026-02-13 19:53:04 +00:00
Nicolas Varrot
1927fce788 fix: restore textarea border, only remove accent focus ring 2026-02-13 18:14:46 +00:00
Nicolas Varrot
51de6984b6 feat: message grouping — hide avatar and reduce spacing for consecutive same-role messages
Consecutive messages from the same role within 2 minutes are visually
grouped: subsequent messages hide the avatar (keeping alignment) and
use tighter vertical spacing. Date separators and role changes break
groups. This matches modern chat UX patterns (Discord, Telegram).
2026-02-13 18:12:44 +00:00
Nicolas Varrot
2f25c45942 fix: remove textarea inner border, keep only container border 2026-02-13 17:57:03 +00:00
Nicolas Varrot
0329fa48bf fix: replace ugly focus ring with subtle border color change on textarea 2026-02-13 17:55:19 +00:00
Nicolas Varrot
ac29646dc8 fix: hide non-essential header buttons on mobile (sound, export, theme, language) 2026-02-13 17:50:49 +00:00
Nicolas Varrot
219d487c43 fix: hide preview and syntax highlight buttons on mobile to give textarea more space 2026-02-13 17:50:00 +00:00
Nicolas Varrot
622aa107f8 feat: show response generation time on assistant messages
Track how long each assistant response took to generate and display
it subtly next to the timestamp (e.g. '· 12.3s'). The timing is
measured from the first streaming delta to the final state, and
preserved across the history reload that follows stream completion.

Only visible for messages generated during the current session.
2026-02-13 15:46:29 +00:00
Nicolas Varrot
d3e8f3143a fix: sync html lang attribute with i18n locale selection
- Set document.documentElement.lang on initial load and locale change
- Ensures screen readers and browser features respect the active language
- Removes duplicate aria-label on MessageSearch input
2026-02-13 15:11:39 +00:00
Nicolas Varrot
1942ba18c7 feat: semantic <time> elements with full-date tooltip on message timestamps
- Replace raw text timestamps with <time> HTML elements
- Add dateTime attribute (ISO 8601) for accessibility and machine readability
- Add title attribute showing full date+time on hover (weekday, date, time with seconds)
- Localized tooltip using the user's language preference
- Helps users see exact timestamps for older messages shown as abbreviated times
2026-02-13 14:43:05 +00:00
Nicolas Varrot
3d707dbd90 perf: lazy-load ReactMarkdown and plugins for faster initial render
Move react-markdown, remark-gfm, remark-breaks, and rehype-highlight
imports from eager to dynamic via a LazyMarkdown wrapper component.
The ~336KB markdown bundle is now loaded on-demand after initial paint
instead of blocking the critical rendering path.

- Create LazyMarkdown component with Suspense fallback
- Pre-load plugins in parallel on module init
- Replace all ReactMarkdown usage in ChatMessage with LazyMarkdown
2026-02-13 14:26:14 +00:00
Nicolas Varrot
388879e14e style: add print stylesheet for conversation export
- Hide sidebar, header, chat input, and scroll button when printing
- Reset backgrounds to white, text to black for readability
- Code blocks get light background with borders
- Tool calls styled for print (compact, bordered)
- External links show their URL in parentheses
- Chat scroll area becomes fully visible (no overflow)
- Messages avoid page-break-inside for clean pagination
- Remove shadows and backdrop filters in print
2026-02-13 14:12:41 +00:00
Nicolas Varrot
e230f9791f feat: improve accessibility — semantic HTML landmarks, skip-to-content link, ARIA attributes
- Replace div with <main> for primary chat pane (screen reader landmark)
- Replace div with <section> for split pane
- Add skip-to-content link for keyboard navigation (Tab → jump to chat input)
- Add aria-expanded and aria-label to tool call badge buttons
- Add id='chat-input' to textarea for skip link target
- Add i18n keys for new ARIA labels (EN + FR)
2026-02-13 13:28:02 +00:00
Nicolas Varrot
beced29c91 fix: textarea not expanding in flex layout with syntax highlight enabled 2026-02-13 11:51:55 +00:00
Nicolas Varrot
ccabb8699f perf: memoize ChatMessage component and hoist ReactMarkdown plugin arrays
- Wrap ChatMessageComponent with React.memo to skip re-renders when props unchanged
- Hoist remarkPlugins and rehypePlugins arrays to module scope to avoid
  creating new array references on every render (prevents unnecessary
  ReactMarkdown re-processing)
- Use proper PluggableList type from unified instead of any
2026-02-13 10:58:11 +00:00
Nicolas Varrot
1c09ccde22 fix: improve accessibility — add ARIA attributes to ThemeSwitcher, ThinkingBlock, ThinkingIndicator, ErrorBoundary, SessionIcon
- ThemeSwitcher: aria-expanded, aria-haspopup, aria-pressed on theme/accent buttons, Escape to close, dialog role
- ThinkingBlock: aria-expanded on toggle, region role on content
- ThinkingIndicator: role=status, aria-label, decorative icon aria-hidden
- ErrorBoundary: role=alert on error state
- SessionIcon: aria-hidden on decorative SVG brand icons
2026-02-13 10:42:10 +00:00
Nicolas Varrot
5acc5a820d fix: improve light theme readability for tool badges and user bubbles
- Expose resolvedTheme in ThemeContext for theme-aware rendering
- Tool call badges: darker text colors and higher bg opacity in light theme
- User message bubbles: increased bg opacity and border strength in light theme
- Progress bars and send button already use accent CSS variables (no change needed)

Closes feedback #60
2026-02-13 09:27:42 +00:00
Nicolas Varrot
b783ae181b feat: optimistic message rendering with send status indicators
- User messages appear instantly with 'sending' state (dimmed, clock icon)
- Transitions to 'sent' (checkmark) when server acknowledges
- Shows error state (alert icon, retry visible) if send fails
- Applied to both primary and secondary sessions
2026-02-13 09:12:09 +00:00
Nicolas Varrot
85a14224ad fix: theme switcher portal — max z-index, remove backdrop-blur to fix compositing 2026-02-13 08:46:13 +00:00
Nicolas Varrot
885cd0ea22 fix: render theme switcher via portal to escape overflow/stacking context 2026-02-13 08:44:26 +00:00
Nicolas Varrot
317096499c fix: theme switcher click handling — prevent click-outside from swallowing button clicks 2026-02-13 08:36:12 +00:00
Nicolas Varrot
6b0261f9c1 perf: reduce bundle size by using custom highlight.js subset
Replace highlight.js/lib/common (36 languages) with a curated subset
of 16 languages relevant for coding-assistant chat UIs. Both ToolCall
(direct hljs) and ChatMessage (rehype-highlight) now share the same
custom bundle from src/lib/highlight.ts.

Languages included: bash, css, diff, dockerfile, go, ini, javascript,
json, markdown, python, rust, shell, sql, typescript, xml, yaml.

Markdown chunk: 477KB → 336KB (-30%, -45KB gzipped)
2026-02-13 06:11:46 +00:00
Nicolas Varrot
de6976bae8 fix: add missing aria-labels to icon-only buttons for accessibility
- Sidebar close button: aria-label for screen readers
- Sidebar search clear button: aria-label
- ChatMessage raw JSON copy button: aria-label
- Added i18n keys: sidebar.close, sidebar.clearSearch (EN + FR)
2026-02-13 05:42:23 +00:00
Nicolas Varrot
5f3f73e4c9 fix: add loading skeleton and error fallback for images
- Show a pulsing placeholder while images load
- Display a graceful error state with ImageOff icon when images fail to load
- Prevents broken image icons from cluttering the chat
2026-02-13 04:56:47 +00:00
Nicolas Varrot
dfbfc375da fix: open external links in new tab with rel=noopener noreferrer
Markdown links pointing to external URLs (http/https) now open in a
new tab with target=_blank and rel='noopener noreferrer' for security.
Internal/relative links are unaffected.
2026-02-13 04:42:39 +00:00