293 Commits

Author SHA1 Message Date
Mark Rachapoom
c73acb731f fix: send image attachments to gateway and prefix attached file paths
Two issues with image handling in chat:

1. Images pasted/dropped in chat were uploaded to disk but only file
   paths were sent as plain text. The model never received actual image
   bytes. Now sends base64 image data as `attachments` in the chat.send
   RPC so vision-capable models can see images directly.

2. Attached file paths (e.g. assets/screenshot.png) were not prefixed
   with the workspace root, unlike [Context: workspace file '...'] paths.
   The agent couldn't resolve relative paths. Now both patterns get the
   workspace prefix.

Files changed:
- chat-panel.tsx: read images as base64 via FileReader, send as FileUIPart
- chat/route.ts: extract image file parts, prefix attached file paths
- gateway/chat/route.ts: accept attachments in request body
- active-runs.ts: thread attachments through startRun
- agent-runner.ts: forward attachments to chat.send RPC
- chat-message.tsx: render inline image previews in user messages

Made-with: Cursor
2026-03-20 21:39:07 -07:00
Mark Rachapoom
c38d1281d4 fix: send Origin header in gateway WebSocket connections
The Node.js ws library doesn't send an Origin header by default.
When the client identifies as openclaw-control-ui, the gateway
enforces origin checks and rejects connections with missing origin.

Pass the gateway URL as the Origin header so the gateway's
local-loopback check sees a valid loopback origin and allows it.

Bump to v2.3.20.

Made-with: Cursor
2026-03-20 19:26:09 -07:00
Mark Rachapoom
587dd6ae64 feat: make gateway client ID configurable via OPENCLAW_GATEWAY_CLIENT_ID
The desktop app runs in daemonless mode without device identity files.
The gateway clears operator scopes for "gateway-client" connections
that lack device identity. Allow the client ID to be overridden via
env var so the desktop can identify as "openclaw-control-ui" and
receive operator scopes with dangerouslyDisableDeviceAuth enabled.

Fallback to "gateway-client" preserves existing behavior for CLI
and web users.

Bump to v2.3.19.

Made-with: Cursor
2026-03-20 16:26:25 -07:00
kumarabhirup
9e80d899d6
🐛 FIX: Next.js Build Errors on Table Click + Next.js Deployment issue 2026-03-20 11:27:51 -07:00
kumarabhirup
065dc6aa9a
TEST: fix tests for v2.3.15 2026-03-20 10:30:41 -07:00
kumarabhirup
ecf0091b91
🐛 FIX: CodeQL 2026-03-20 09:59:16 -07:00
kumarabhirup
3b211eee04
👌 IMPROVE: responsiveness 2026-03-19 19:46:52 -07:00
kumarabhirup
5ebb752600
📦 NEW: Show channels 2026-03-19 19:39:07 -07:00
kumarabhirup
057fa3a764
👌 IMPROVE: dench version in web 2026-03-19 17:00:20 -07:00
kumarabhirup
4f523c74a7
🚀 RELEASE: Mobile Responsiveness 2026-03-19 15:54:20 -07:00
kumarabhirup
ab3ffa17e2
👌 IMPROVE: drop redundant Cache-Control from next.config headers
force-dynamic on root layout already handles page cache busting;
the blanket header risked overriding intentional API route caching.
2026-03-19 13:48:41 -07:00
kumarabhirup
08aa0949b7
👌 IMPROVE: identify 2026-03-19 13:33:15 -07:00
kumarabhirup
7fe870fec0
👌 IMPROVE: caching 2026-03-18 17:23:49 -07:00
kumarabhirup
295f5c008d
fix(agent): lower thinking level to high, fix indentation, and handle terminated errors
- Change thinkingLevel from xhigh to high for session patches
- Fix indentation of event handler blocks in wireSubscribeOnlyProcess
  and wireChildProcess
- Add user-friendly message when agent run is terminated by the gateway
2026-03-18 16:56:13 -07:00
kumarabhirup
f04c1a5dc3
fix(terminal): proxy WebSocket through host in daemonless mode
When DENCHCLAW_DAEMONLESS=1, route the terminal WebSocket through
the app host instead of connecting directly to 127.0.0.1, allowing
it to work in environments without direct port access.
2026-03-18 16:56:01 -07:00
kumarabhirup
351b71fd05
feat(telemetry): add person identity support and enable session replay
Add optional name, email, avatar, and denchOrgId fields to
telemetry.json. When present, all telemetry layers (CLI, web server,
web client, OpenClaw plugin) call PostHog identify() with $name,
$email, $avatar, and dench_org_id person properties.

Remove $process_person_profile:false from all layers so every install
gets a PostHog person profile. Enable session replay with masking
controlled by privacy mode (all text/inputs masked when on, nothing
masked when off).
2026-03-18 00:08:23 -07:00
kumarabhirup
98e9c245a5
feat(identity): extract DenchClaw identity into runtime plugin
Move identity injection from static IDENTITY.md generation at workspace seed
time to a runtime `dench-identity` OpenClaw plugin that prepends the system
prompt via the `before_prompt_build` hook. This keeps identity always current
without re-seeding, encourages dynamic skill discovery, and positions
DenchClaw as a CEO orchestrator that delegates to specialist subagents.
2026-03-17 16:24:00 -07:00
kumarabhirup
748e46ff9e
🚀 RELEASE: v2.3.7 2026-03-17 14:52:14 -07:00
kumarabhirup
ea8bab6179
feat(apps): expand platform API with objects, chat, store, cron, and webhooks
Enables apps to access the full DenchClaw platform — CRUD on workspace objects, AI chat with streaming, inter-app messaging, KV store, HTTP proxy, webhooks, cron scheduling, and widget display mode.
2026-03-17 14:42:01 -07:00
kumarabhirup
e92419760b
fix(workspace): show .app children in tree and fix cron tab opening
App folders are now expandable when hidden files are shown, and cron items properly open in tabs.
2026-03-17 14:41:52 -07:00
kumarabhirup
92b32fdf21
fix(chat): use refs in stop handler to avoid stale closures
Reads sessionId and subagentSessionKey from refs instead of state so the stop button works even before React re-renders.
2026-03-17 14:41:46 -07:00
kumarabhirup
786a729c83
fix(agent-runner): attach WS listeners before open and always use chat.send
Prevents listener-attachment race after handshake and ensures all runs are session-tracked for reliable abort.
2026-03-17 14:41:39 -07:00
kumarabhirup
8fa221554e
feat(agent-runner): per-session lanes, lifecycle error recovery, and slash command support
Use per-session gateway lanes (web:sessionId) so concurrent chat tabs
stream independently. Add a 15s recovery window after lifecycle errors
to accept continuation runIds. Route slash commands through chat.send
RPC and forward chat events to the UI.
2026-03-17 12:35:26 -07:00
kumarabhirup
11478c752e
refactor(workspace): remove chat-slot agent pool to prevent workspace pollution
Chat-slot agents were being persisted as durable entries in openclaw.json,
causing spurious workspace directories (e.g. chat-slot-main-1) to appear.
Only explicit workspace creation via init now creates durable agent entries.
Workspace discovery and session routing ignore chat-slot internals.
2026-03-17 12:35:18 -07:00
kumarabhirup
0f864fb0ef
fix(agent-runner): remove Origin header to fix pairing required error
Server-side WebSocket connections should not set Origin (a browser security
concept). The header caused the gateway to treat the web runtime as a browser
client, blocking silent local device pairing after device identity auth was
added.
2026-03-15 13:18:12 -07:00
kumarabhirup
aa97489785
👌 IMPROVE: feat(telemetry): add DenchClaw and OpenClaw version tracking
Integrate version tracking for DenchClaw and OpenClaw into the telemetry system. The versions are now read from the package.json and environment variables, and are included in the PostHog client initialization and telemetry events. This enhancement allows for better monitoring and analytics of the versions in use.
2026-03-15 04:33:44 -07:00
Kumar Abhirup
d6ca3b329c
Merge pull request #107 from DenchHQ/bp/6-workspace-ui-browse-mode
feat(workspace): support browse-mode paths in editors and file tree
2026-03-15 04:20:52 -07:00
Kumar Abhirup
9298bd1080
Merge pull request #106 from DenchHQ/bp/5-workspace-api-routes-browse
refactor(api): migrate workspace routes to resolveFilesystemPath
2026-03-15 04:20:46 -07:00
Kumar Abhirup
022e8db3e9
Merge pull request #108 from DenchHQ/bp/7-agent-runner-device-auth
feat(agent-runner): add device identity challenge-response auth
2026-03-15 04:20:36 -07:00
kumarabhirup
a27d4d28f8
feat(agent-runner): add device identity challenge-response auth
Gateway connections use Ed25519 device keypair for challenge-response auth and surface actionable error messages for scope failures.
2026-03-15 04:18:22 -07:00
kumarabhirup
ef86960d00
feat(workspace): support browse-mode paths in editors and file tree
Editors and file tree use workspace-paths helpers to route saves and classify system files correctly for absolute and home-relative paths.
2026-03-15 04:17:47 -07:00
kumarabhirup
3fe5a91033
refactor(api): migrate workspace routes to resolveFilesystemPath
All workspace API routes use resolveFilesystemPath and isProtectedSystemPath, enabling browse-mode writes to external paths.
2026-03-15 04:17:11 -07:00
kumarabhirup
acc80615c4
refactor(workspace): add unified path resolution with browse mode support
resolveFilesystemPath replaces ad-hoc path helpers with a single resolver for absolute, home-relative, and workspace-relative paths.
2026-03-15 04:16:40 -07:00
kumarabhirup
89289bb31d
feat(chat): multi-session chat tabs with stop controls UI
Tab-based multi-chat system supporting concurrent parent and subagent sessions, per-session stop controls, layout/scroll fixes, and attachment display improvements.
2026-03-15 00:31:55 -07:00
kumarabhirup
2c2164ed2c
feat(chat): add stream status labels and partial tool output
Keep a visible streaming status indicator throughout the assistant turn and forward partial tool output to the UI so users see real-time progress.
2026-03-15 00:31:19 -07:00
kumarabhirup
8838cc4e16
feat(chat): add runs API, subagent registry, and cascade stop
Backend support for multi-session chat: /api/chat/runs endpoint for parent/subagent run status, subagent registry for reading run state, and cascade stop to abort child sessions when stopping a parent.
2026-03-15 00:30:43 -07:00
kumarabhirup
46fe15df81
fix(workspace): repair managed workspace routing and block reserved names
Prevent workspace-main / agent-main collision by adding ensureManagedWorkspaceRouting() repair on chat create/send/switch, and reject reserved workspace names (main, default, chat-slot-*).
2026-03-15 00:29:57 -07:00
kumarabhirup
584d974f07
style: increase sidebar vs chat panel background contrast
Darken --color-sidebar-bg to create more visual hierarchy between
the sidebar and main content area, inspired by animclaw's approach.

Light: #f5f5f4 → #ebebea (delta 15 from main-bg, was 5)
Dark:  #141413 → #0c0c0b (delta 10 from main-bg, was 2)
2026-03-14 22:26:40 -07:00
Mark
ae7e497fe0 style: polish data table UI with glassmorphism toolbar, rounded controls, and zebra-striped rows
Made-with: Cursor
2026-03-14 19:20:29 -07:00
Mark
95a91bc729 style: update accent color to #4FA1EE
Made-with: Cursor
2026-03-12 21:54:08 -07:00
Mark
5f8b9ed98e fix: remove hero animations and ensure new chat tab always exists
- Remove framer-motion animations from hero greeting, input bar, and
  suggestion buttons so they render instantly
- Fix SSR hydration mismatch by deferring hero render until client mount
- Always create a "New Chat" tab on fresh load and when closing last tab

Made-with: Cursor
2026-03-12 21:49:25 -07:00
Mark
f39130c8f7 style: update sidebar animations and accent colors
- Add 'sidebar-animate' class to sidebar elements for improved transition effects.
- Change accent color scheme to a green palette for better visual consistency.
- Ensure sidebar animations are disabled during resizing for smoother user experience.
2026-03-12 21:12:15 -07:00
Mark
63c463a726 polish: declutter CRM table UI and use shared dropdown components
- Replace custom RowActionsMenu and Columns menu with shared DropdownMenu component
- Restyle ViewTypeSwitcher from bordered button group to subtle rounded tabs
- Simplify DataTable toolbar: remove button borders, tighten spacing
- Use rounded-2xl for compact sidebar chat input, keep rounded-3xl for main

Made-with: Cursor
2026-03-12 17:56:50 -07:00
Mark
d740334da7 refactor: improve sidebar layout and transition effects
- Simplify sidebar visibility logic by removing unnecessary variables.
- Enhance sidebar width handling with smooth transitions for collapsed states.
- Update chat sidebar to adjust width dynamically based on its open state.
- Refactor component structure for better readability and maintainability.
2026-03-12 17:52:00 -07:00
Mark
a62f21bffb polish: refine tab bar, sidebar colors, and session loading
- Fix session load error by handling 404 gracefully
- Unify sidebar backgrounds to stone-100, make main-bg fully opaque
- Add divider + gap before new tab button, hide when last tab active
- Make tab hover cursor default, new tab button fully rounded
- Remove glass background from chat header
- Replace show/hide output button with clickable step labels
- Fix chat sidebar header to use solid background
- Set min-height on tab bar wrapper for loading state

Made-with: Cursor
2026-03-12 17:42:57 -07:00
Mark
6d99d3c959 feat: Chrome-style tabs with curved connectors, new chat tab button, and link handling
- Tab bar uses distinct strip background with curved connectors on active tab
- "+" button creates new chat tabs (like Chrome new tab)
- Markdown links intercepted for in-app navigation and anchor scrolling
- Fix borderColor shorthand conflict in database-viewer spinner
- Align sidebar header height with tab bar

Made-with: Cursor
2026-03-12 14:13:47 -07:00
Mark
fbfdee21a5 feat: redesign workspace UI — glassmorphism dropdowns, Chrome-style tabs, chat popover
- Move chat history from left sidebar to floating popover on tab bar
- Add dench-ui components (Button, Card, Input, Label, Switch) with deps
- Glassmorphism styling for all dropdowns/context menus with dark mode
- Chrome-style active tab that merges with content area
- Align sidebar header with tab bar (34px)
- Condense sidebar header to single line
- Move sidebar expand button into tab bar
- Add next-themes for proper dark mode with system preference support
- Add Tailwind v4 class-based dark mode via @custom-variant
- Add dench-ui CSS tokens (light + dark)
- Restore pointer cursor for all interactive elements
- New chat button always visible in tab bar
- "Delete this chat" label in dropdown menu

Made-with: Cursor
2026-03-12 13:30:04 -07:00
Mark
45db1bcf54 feat: merge file tree and chat history into single left sidebar with tabs
Made-with: Cursor
2026-03-12 12:03:29 -07:00
Mark
c5f392e1fd fix: plain text user bubbles and remove trailing empty paragraph gap
Made-with: Cursor
2026-03-12 11:51:04 -07:00
kumarabhirup
7052395b0e
fix(workspace): parse YAML list syntax in parseSimpleYaml
parseSimpleYaml only matched `key: value` lines (regex required `.+`
after the colon), so `permissions:` followed by indented `- database`
list items was never parsed. This caused app bridge methods like
db.query to always fail with "Unknown method or insufficient
permissions" even when the app manifest granted the database permission.

Change the regex to `.*` to also match keys with no inline value, then
collect subsequent indented `- item` lines into an array.

Closes #87
2026-03-10 13:29:50 -07:00