Commit Graph

58 Commits

Author SHA1 Message Date
Ruhani Rabin
87bdaaee37 fix: polish typography settings and storage helpers 2026-03-04 11:45:28 +08:00
Ruhani Rabin
090e39016f feat: Font options for the UI in larger screens, for code and screen fonts display 2026-03-04 11:08:31 +08:00
Yaro
4e66d7c4bd feat: add /new slash command to create chat sessions
Introduces a `/new` slash command that lets users create a fresh chat
session for the current agent without leaving the chat input.

- Add `createNewSession` to `useGateway` that calls `sessions.create`
  on the gateway (with a client-side fallback key when the RPC is
  unavailable).
- Register `/new` in the slash-command menu with i18n descriptions
  across all 8 supported languages.
- Wire `onNewSession` through `Chat` → `ChatInput` so typing `/new`
  triggers session creation.
- Add `extractAgentIdFromKey` and `formatAgentId` helpers to
  `sessionName.ts` to derive a human-readable agent name from the
  session key (e.g. `agent:my-cool-bot:…` → "My Cool Bot").
- Use the new helpers in `Header` and `App` to show per-session agent
  names, especially for sub-agent sessions where the gateway-level
  identity differs from the session agent.

Made-with: Cursor
2026-02-28 22:43:20 +02:00
Nicolas Varrot
e8fe3329f3 feat: add configurable client ID for WebSocket connect frame
Add a clientId option that can be set via:
- VITE_CLIENT_ID env var at build time
- Advanced section in the login screen at runtime
- Stored in localStorage with other credentials

Defaults to 'webchat' for backward compatibility. Users can set it
to 'openclaw-control-ui' to use OpenClaw's dangerouslyDisableDeviceAuth
bypass without post-install patching.

Closes #11
2026-02-23 14:41:15 +00:00
Nicolas Varrot
5c47dd2aeb feat: add password authentication support (closes #7)
Add token/password auth mode toggle on the login screen.
When password mode is selected, sends { password } instead of
{ token } in the WebSocket connect handshake.

Also adds clipboard utility tests and fixes credential test
to include authMode field.
2026-02-18 22:07:06 +00:00
Nicolas Varrot
151215cd4b feat: device identity for OpenClaw 2026.2.14+ pairing (#6)
- Generate Ed25519 keypair via Web Crypto API
- Persist keypair in IndexedDB (survives page reloads)
- Sign connect payload with device private key
- Include device object in connect params (id, publicKey, signature, signedAt)
- Handle NOT_PAIRED error with 'pairing' connection status
- Show pairing-pending banner with instructions to run openclaw devices approve
- Extract nonce from connect.challenge for v2 payload signing
- Add i18n translations for pairing banner in all 8 languages

Closes #6
2026-02-16 00:00:20 +00:00
Nicolas Varrot
7890d34583 feat: session rename — double-click or pencil icon to set custom session names
- Double-click session name in sidebar to rename inline
- Pencil icon on hover for discoverability
- Custom names persisted in localStorage
- Enter to confirm, Escape to cancel, blur to save
- Clear name to revert to auto-generated display name
- Search filter respects custom names
- i18n for all 8 languages
2026-02-15 14:03:10 +00:00
Nicolas Varrot
f012336e30 feat: reply-to-message with quote preview in chat input 2026-02-15 12:04:13 +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
156c6d1990 feat: add Italian (it) locale support 2026-02-15 00:01:46 +00:00
Nicolas Varrot
45d5469c5c feat: add Chinese Simplified (zh) locale support 2026-02-14 22:01:55 +00:00
Nicolas Varrot
474701ba5e feat: add Portuguese (pt) locale support 2026-02-14 20:02:12 +00:00
Nicolas Varrot
d7250ead32 feat: add Japanese (ja) locale support 2026-02-14 17:53:48 +00:00
Nicolas Varrot
bc7fc08a5c feat: add German (de) locale support 2026-02-14 17:24:01 +00:00
Nicolas Varrot
8a95abe809 feat: add Spanish (es) locale support 2026-02-14 16:55:53 +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
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
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
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
2b095278c7 feat: session filter chips in sidebar — filter by channel type, active status 2026-02-13 21:54:45 +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
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
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
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
2157d7ebd5 feat: add System theme option that follows OS color scheme
Adds a 'System' option to the theme switcher that automatically uses
light or dark theme based on the OS prefers-color-scheme setting.
Dynamically updates when the OS preference changes (e.g. scheduled
dark mode). i18n labels added for EN/FR.
2026-02-13 04:13:01 +00:00
Nicolas Varrot
f09482e6cb feat: multi-tab split view for 2 sessions side by side
- Add split view button (columns icon) in sidebar session actions
- Click to open any session in a secondary pane alongside the primary
- Resizable divider between panes (drag to resize, persisted in localStorage)
- Secondary pane supports full chat: history, streaming, send, abort
- Close split view via X button or clicking the split icon again
- Each pane has independent scroll, search, and tool collapse
- Keyboard shortcut and i18n support (EN/FR)
2026-02-13 02:44:33 +00:00
Nicolas Varrot
4dfaaff2b5 feat: live markdown preview toggle in chat input
- Eye icon button next to file picker toggles preview on/off
- Shows rendered markdown above textarea in real-time
- Lazy-loads ReactMarkdown (no bundle impact when off)
- Preference persisted in localStorage
- i18n: EN/FR labels for show/hide preview
2026-02-13 01:56:13 +00:00
Nicolas Varrot
82d2e37a27 feat: raw JSON viewer toggle on each message
Add a {⁠} button (visible on hover) that toggles a collapsible panel
showing the full raw gateway JSON payload for any message.
Includes copy-to-clipboard, word-wrap, and i18n (EN/FR).
Useful for debugging and understanding the gateway protocol.

Closes feedback #52
2026-02-13 01:41:04 +00:00
Nicolas Varrot
6c19c26b84 feat: message search with Ctrl+F — filter and navigate matches in conversation 2026-02-13 00:57:19 +00:00
Nicolas Varrot
b20bf41bf4 feat: theme switcher — dark, light, OLED modes with configurable accent colors
- Add ThemeContext with CSS custom properties for all base colors
- Three theme modes: Dark (default), Light, OLED Black
- Six accent colors: Cyan, Violet, Emerald, Amber, Rose, Blue
- Theme switcher dropdown in header (palette icon)
- Persisted in localStorage
- CSS variables replace hardcoded hex colors in index.css and components
- i18n support (EN/FR) for theme labels
2026-02-12 23:51:01 +00:00
Nicolas Varrot
25e63f8d18 feat: improved thinking/reasoning indicator with elapsed time counter
When the agent is reasoning with hidden thinking (thinking=low), show a
pulsing 'Reasoning...' indicator with elapsed time instead of generic
bouncing dots. Once text content starts streaming, falls back to the
regular streaming dots.

Closes feedback #40
2026-02-12 23:42:39 +00:00
Nicolas Varrot
b4813f091a feat: add message metadata viewer on hover
Small info button appears on hover of each message bubble.
Click to expand a panel showing raw message metadata (id, role,
timestamp, channel, sender info, etc.) from the gateway.
Useful for debugging and understanding message routing.
Collapsed by default, doesn't clutter the UI.

Closes feedback item #39
2026-02-12 23:17:27 +00:00
Nicolas Varrot
2b1ca2d0c8 feat: add collapse/expand all tool calls toggle button
Adds a floating button in the chat area that lets users collapse or expand
all tool call details at once. Useful for long conversations with many tool
calls where scrolling through expanded results is tedious.

- New ToolCollapseContext provides global collapse/expand state
- ToolCall components react to global state changes via version tracking
- Toggle button appears only when conversation has tool calls
- Supports EN/FR i18n
2026-02-12 19:36:53 +00:00
Nicolas Varrot
1fc63b4e92 feat: add Alt+↑/↓ keyboard shortcuts to navigate between sessions 2026-02-12 19:08:00 +00:00
Nicolas Varrot
8d4b606482 feat: export conversation as Markdown file
Add a download button in the header that exports the current session's
messages as a well-formatted Markdown file. Includes:
- User/assistant/system event labels with timestamps
- Thinking blocks as collapsible <details>
- Tool calls with JSON parameters
- Tool results as collapsible sections
- Image placeholders
- Session label and export date in header

i18n: EN + FR translations for the export tooltip.
2026-02-12 18:38:54 +00:00
Nicolas Varrot
e94325b38a feat: delete session from sidebar with confirmation dialog 2026-02-12 16:57:18 +00:00
Nicolas Varrot
e24378aa75 feat: add session pinning to sidebar
- Pin icon appears on hover for each session, filled when pinned
- Pinned sessions sort to top of list (preserved across page reloads via localStorage)
- Subtle divider separates pinned from unpinned sessions
- i18n support for pin/unpin labels (EN + FR)
2026-02-12 12:19:18 +00:00
Nicolas Varrot
0c95150635 feat: add elapsed time counter to thinking indicator
Shows how long the agent has been thinking (e.g. '5s', '1m 23s').
Timer appears after 2 seconds to avoid flicker on fast responses.
Helps users gauge if a request is still processing or stuck.
2026-02-12 10:37:07 +00:00
Nicolas Varrot
8301cba339 fix: guard Notification API for unsupported browsers
Check typeof Notification before accessing .permission or
requestPermission(). Fixes crash on browsers/contexts where
the Notification API is unavailable (e.g. some WebViews).
2026-02-12 07:58:23 +00:00
Nicolas Varrot
dc49734819 feat: validate WebSocket URL on login screen
Show inline hint when the gateway URL doesn't start with ws:// or wss://
and disable the connect button until it's valid. Prevents confusing
connection errors from malformed URLs.
2026-02-12 06:55:19 +00:00
Nicolas Varrot
cb882f5ead feat: add loading indicator when switching sessions
Show a spinner with 'Loading messages…' text while chat history
is being fetched during session switches, instead of briefly
flashing the empty welcome screen. Includes EN/FR i18n.
2026-02-12 05:52:06 +00:00
Nicolas Varrot
375bd102d4 feat: add date separators between messages from different days
Shows a subtle horizontal line with the date label (Today, Yesterday, or
full date) when messages span multiple days. Helps orient users when
scrolling through long conversation histories.

Includes i18n support (EN/FR) for the date labels.
2026-02-12 00:40:03 +00:00
Nicolas Varrot
5b2f3a340d feat: add retry/resend button on user messages
Hover over any user message to reveal a retry button (↻) that resends
the message text. Disabled while a response is generating.
Includes EN/FR i18n strings.
2026-02-11 21:56:48 +00:00
Nicolas Varrot
b61a232948 feat: add ErrorBoundary for graceful crash recovery
- Catches render errors and shows a styled recovery UI instead of blank white screen
- Try Again button re-renders, Reload button refreshes the page
- Error details shown in a collapsible pre block
- Full i18n support (EN/FR)
- Wraps the entire app in main.tsx
2026-02-11 20:53:16 +00:00
Nicolas Varrot
ae83545377 feat: add keyboard shortcuts help modal (press ? to open) 2026-02-11 19:56:18 +00:00