Commit Graph

413 Commits

Author SHA1 Message Date
MarlburroW
a129d22007 Merge pull request #22 from b4arena/fix/password-mode-device-signing
fix: exclude token from device signing payload in password auth mode
2026-03-09 22:00:24 +01:00
Marcel Hild
daeac3d631 test: add regression test for password-mode device signing
Covers the case where authMode is 'password' and deviceIdentity is present.
Asserts that buildDeviceAuthPayload is called with token:null (not the password
value) and that the connect request uses auth.password, not auth.token.

Addresses Copilot review comment on PR #22.
2026-03-09 09:19:43 +01:00
Marcel Hild
5a6179aa8b fix: exclude token from device signing payload in password auth mode
When authMode is 'password', the auth token is null/undefined, but was
being included in the device signing payload. This caused a signature
mismatch on the gateway side, preventing password-mode auth from working.
2026-03-08 13:19:44 +01:00
ppzzxx
c9dc2a671a Fix/chinese ime enter send (#21)
* fix: prevent message send when Chinese IME is composing

- Add e.isComposing check to Enter key handler in ChatInput
- This prevents accidental message sending when pressing Enter to confirm Chinese/Japanese input
- Fixes issue where messages would be sent prematurely when using IME composition

Refs: #issue

* fix: prevent message send when Chinese IME is composing

- Add isComposing state to track IME composition status
- Add onCompositionStart/onCompositionEnd event handlers to textarea
- Check isComposing state in Enter key handler to prevent accidental send

This fixes the issue where pressing Enter to confirm Chinese/Japanese input
would prematurely send the message instead of just confirming the IME selection.

The fix uses explicit composition state tracking instead of relying solely on
e.isComposing, which provides more reliable cross-browser behavior.

---------

Co-authored-by: 代码专家 <coder@openclaw.ai>
2026-03-08 13:15:11 +01:00
Nicolas Varrot
463a73b6ab chore: bump version to 1.69.1 2026-03-06 09:03:46 +00:00
Nicolas Varrot
6e9f0e39cc fix(a11y): add role=status and aria-hidden to TypingIndicator
- Add role="status" with aria-label for screen reader announcement
- Mark decorative bounce dots as aria-hidden
2026-03-06 09:03:40 +00:00
Nicolas Varrot
8540902a8a chore: bump version to 1.69.0 2026-03-05 09:02:52 +00:00
MarlburroW
e6d2319adc Merge pull request #18 from ruhanirabin/ui-font-appearance
UI font appearance
2026-03-05 10:01:30 +01:00
MarlburroW
d34be43bb3 Merge pull request #19 from kerbeus-a/feature/per-agent-identity
feat: per-agent identity and session filtering via VITE env vars
2026-03-05 10:00:44 +01:00
Ruhani Rabin
5712d0da40 fix: storage key re-declaration removed 2026-03-05 11:11:41 +08:00
kerbeus-a
397a0e9137 docs: add VITE_AGENT_SESSION and VITE_AGENT_PREFIX to .env.example 2026-03-04 22:05:03 -05:00
Codex
6d4e47774b feat: per-agent identity and session filter via VITE env vars 2026-03-04 21:10:48 -05:00
Nicolas Varrot
effa9f2c2c chore: bump version to 1.68.4 2026-03-04 09:05:21 +00:00
Nicolas Varrot
e2d68925ce refactor: extract history parsing into shared historyParser lib with tests
- Extract duplicated raw message parsing from useGateway and useSecondarySession into src/lib/historyParser.ts
- Add 15 tests covering text, thinking, image, tool_use, tool_result, toolCall/toolResult formats, merging, orphan handling, metadata, and edge cases
- Remove ~126 lines of duplicated code across the two hooks
- Slight bundle size reduction (index: 142.11→140.29 KB)
2026-03-04 09:05:15 +00:00
Ruhani Rabin
87bdaaee37 fix: polish typography settings and storage helpers 2026-03-04 11:45:28 +08:00
Ruhani Rabin
989b74f48a fix: Fixed TypeScript error in SettingsModal.tsx 2026-03-04 11:10:39 +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
Nicolas Varrot
b7c18d5f3c refactor: extract autoFormat utils from ChatMessage to lib with tests
- Move guessLanguage, looksLikeCode, autoFormatText to src/lib/autoFormat.ts
- Add comprehensive test suite (23 tests) covering language detection, code detection, and auto-formatting
- Reduce ChatMessage.tsx by ~90 lines
- Total tests: 238 (up from 215)
2026-03-03 21:04:06 +00:00
Nicolas Varrot
bd7763a6d3 chore: bump version to 1.68.2 2026-03-03 09:02:00 +00:00
Nicolas Varrot
772ec18d9d fix: slash commands without args now submit immediately on selection
When selecting a slash command without arguments (e.g. /new, /status, /help)
from the autocomplete menu, the command now executes immediately instead of
getting stuck in a loop where the menu kept intercepting Enter keypresses.

Fixes #17
2026-03-03 09:01:51 +00:00
Nicolas Varrot
e634083465 refactor: deduplicate ReactMarkdown lazy import in ChatInput
Replace standalone lazy import of ReactMarkdown + remark-gfm in
ChatInput with the existing LazyMarkdown component, which already
handles lazy loading with remark-gfm, remark-breaks, and
rehype-highlight. Reduces code duplication and ensures consistent
markdown rendering between chat messages and the input preview.
2026-03-01 09:03:10 +00:00
Nicolas Varrot
01e8ea2836 test: add tests for extractAgentIdFromKey and formatAgentId 2026-02-28 21:02:18 +00:00
MarlburroW
c2a4ddc5e7 Merge pull request #16 from yardobr/feat/new-session-command
feat: add /new slash command to create chat sessions
2026-02-28 22:00:29 +01: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
a11cebdc55 a11y: add aria-labels to sidebar footer buttons 2026-02-28 09:02:52 +00:00
Nicolas Varrot
d852652390 chore: bump to v1.67.4 2026-02-27 21:02:18 +00:00
Nicolas Varrot
9ef1c8be0d perf: lazy-load highlight.js in ToolCall for better code-splitting
ToolCall.tsx previously imported highlight.js statically, pulling the
entire hljs bundle into the main Chat chunk and preventing Vite from
splitting it into the lazy markdown chunk.

Now hljs is dynamically imported and loaded on first use. This:
- Removes the Vite build warning about mixed static/dynamic imports
- Reduces the Chat chunk by ~1.6 KB
- Consolidates hljs into the lazy markdown chunk
- Renders unhighlighted text instantly, then re-renders with syntax
  highlighting once hljs loads (typically < 100ms)
2026-02-27 21:02:13 +00:00
Nicolas Varrot
e77a1c8dcb fix: display image attachments in user message bubbles
Images sent by the user were transmitted to the gateway correctly but
not shown in the chat UI, making it appear as if attachments were lost.

Now image blocks are included in the user message for immediate visual
feedback.

Closes #14
2026-02-27 13:31:39 +00:00
Nicolas Varrot
88c98f4a66 a11y: add role and keyboard dismiss to overlay backdrops in Sidebar 2026-02-27 09:02:19 +00:00
Nicolas Varrot
8279687898 chore: bump to v1.67.2 2026-02-25 21:02:33 +00:00
Nicolas Varrot
d49d118e26 a11y: add aria-labels and aria-pressed/expanded to LoginScreen buttons 2026-02-25 21:02:23 +00:00
Nicolas Varrot
a9fb646662 chore: bump to v1.67.1 2026-02-24 21:02:05 +00:00
Nicolas Varrot
59a4da1933 refactor: extract shared message parsing helpers into lib/messageExtract
- Move extractText and extractThinking from useGateway and useSecondarySession into shared lib
- Add comprehensive unit tests (13 tests) for both functions
- Eliminate code duplication between the two hooks
2026-02-23 21:02:45 +00:00
Nicolas Varrot
ecdff58dca chore: bump to v1.66.7 2026-02-23 14:46:27 +00:00
Nicolas Varrot
f685f716f8 test: add unit tests for usePwaInstall hook 2026-02-23 14:46:19 +00: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
6ed6a4eadf chore: bump to v1.66.6 2026-02-23 09:05:01 +00:00
Nicolas Varrot
3b28de9f72 test: add unit tests for useNotifications hook and setBaseTitle 2026-02-23 09:04:32 +00:00
Nicolas Varrot
9faa5014a6 perf: wrap ToolCall, CodeBlock, ThinkingBlock, ImageBlock in React.memo
Prevents unnecessary re-renders of these frequently rendered child
components when parent message list updates but individual props
haven't changed.
2026-02-22 21:03:31 +00:00
Nicolas Varrot
4163124c6a test: add unit tests for useSwipeSidebar and useLocale hooks, exclude tests from build tsconfig 2026-02-22 09:03:17 +00:00
Nicolas Varrot
3c51e46cbb test: add unit tests for useSendShortcut hook and @testing-library/react 2026-02-21 21:03:55 +00:00
Nicolas Varrot
a9da9407d4 chore: bump to v1.66.3 2026-02-21 09:04:21 +00:00
Nicolas Varrot
2a23f089cb fix: add missing aria-labels to icon-only buttons for accessibility
- ChatInput: add aria-labels to remove file, send shortcut toggle, and stop buttons
- CodeBlock: add aria-labels to word wrap, line numbers, and collapse/expand buttons
- Header: add aria-labels to session info, copy, close, and compact buttons
2026-02-21 09:03:45 +00:00
Nicolas Varrot
d607da691d refactor: remove duplicate exportConversation module, consolidate into exportChat 2026-02-20 21:02:19 +00:00
Nicolas Varrot
3970e8a00c test: add unit tests for hooks (useBookmarks, useUpdateCheck)
- Export loadBookmarks/saveBookmarks and isNewer for testability
- Add 12 tests covering bookmark persistence and semver comparison
- Total: 165 tests passing
2026-02-20 09:04:38 +00:00
Nicolas Varrot
295ba7b3e5 test: add unit tests for notificationSound module 2026-02-19 21:02:49 +00:00
Nicolas Varrot
525075e1fe chore: bump to v1.66.0 2026-02-18 22:07: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
togotago
16db1cf811 feat: strip webchat envelope metadata from user messages (#10)
When OpenClaw's webchat relays user messages, it wraps them in metadata
(conversation info JSON block + UTC timestamp prefix). This strips the
envelope at render time so users see only their actual text.

- Add hasWebchatEnvelope() and stripWebchatEnvelope() to systemEvent.ts
- Chain webchat + webhook stripping via stripAll() helper in ChatMessage
- Fix 'webhook' label only appearing for actual webhook messages, not
  for envelope-stripped webchat messages

Co-authored-by: togotago <drewmfleury@gmail.com>
2026-02-18 23:00:55 +01:00
togotago
0740d55dde feat: make system event messages collapsible (#9)
System events now render as compact pills (label + chevron + timestamp)
that expand on click to reveal the full message content.

- Collapsed (default): rounded-full pill with Zap icon, label, ChevronDown,
  and timestamp. Clean single-line appearance.
- Expanded (on click): rounded-xl container with full message text shown
  below in whitespace-pre-wrap. Chevron rotates 180deg.
- Added cursor-pointer and hover:bg-pc-elevated/50 for discoverability.
- Removed always-visible truncated text from collapsed state for a cleaner
  default appearance.

Co-authored-by: togotago <drewmfleury@gmail.com>
2026-02-18 23:00:50 +01:00