213 Commits

Author SHA1 Message Date
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
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
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
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
c084caf78c
feat(terminal): enhance WebSocket connection handling and port management
- Refactor WebSocket connection logic to dynamically fetch the port from the server, improving flexibility.
- Introduce global variables to manage WebSocket server state and port, allowing for better control and error handling.
- Update terminal drawer component to use the new port fetching mechanism, ensuring consistent connection behavior.
2026-03-09 10:54:40 -07:00
kumarabhirup
e49b74c990
fix(terminal): keep terminal drawer open when shell process exits
The terminal drawer was flickering closed immediately after opening because
the spawned shell process exited with code 1, triggering handleExited →
closeTerminal → onClose which unmounted the entire drawer within ~500ms.

- Stop auto-closing the drawer on process exit so users can see error output
- Extract URL param building into testable buildWorkspaceSyncParams function
  that correctly includes terminal state, preventing param stripping on navigation
- Add 21 tests covering terminal param preservation across navigation scenarios
2026-03-09 10:06:25 -07:00
kumarabhirup
e7ab121879
fix(workspace): update query parameters to manage terminal state 2026-03-09 09:34:44 -07:00
kumarabhirup
2c52012d1e
feat(chat): fix infinite loading and enable concurrent sessions
Chat panel froze because `thinking: "xhigh"` silently killed gateway runs, sessions used mutable global agent state, and OpenClaw's one-run-per-agent limit blocked concurrent chats.
2026-03-09 08:58:50 -07:00
kumarabhirup
8deeccf646
feat(web): add workspace app tabs and embedded runtime
This makes Dench apps behave like first-class workspace views with persistent tabs and embedded app loading instead of exposing raw folders.
2026-03-08 21:47:41 -07:00
kumarabhirup
1af9d75396
fix(terminal): add try/catch around PTY spawn to prevent silent hangs
Without error handling, if node-pty require or pty.spawn throws (bad
permissions, missing cwd, stale server), the client gets no response and
the terminal hangs with a blinking cursor. Now sends an exit event back.
2026-03-08 21:45:17 -07:00
kumarabhirup
7975405da9
fix(terminal): defer PTY spawn until container has layout dimensions
fitAddon.fit() was called synchronously on mount before the browser laid
out the container, sending 0-dimension cols/rows to the PTY. The shell
would hang without displaying a prompt. Now defers WS connection by 50ms,
re-fits after the shell reports ready, and shows an error if WS fails.
2026-03-08 21:27:37 -07:00
kumarabhirup
e1fc698f2e
feat(web): add in-browser terminal panel (Cmd+J)
xterm.js frontend + node-pty WebSocket server spawning the user's real shell,
with drag-to-resize drawer, multi-terminal tabs, live theme sync, and URL state.
2026-03-08 20:45:10 -07:00
kumarabhirup
039cbe6a43
feat: async I/O, tags field type, rich chat messages, deploy verification
- Convert sync filesystem and DuckDB operations to async across API routes,
  workspace lib, and active-runs to prevent event loop blocking during tree
  discovery, object lookups, and database queries
- Add "tags" field type for free-form string arrays with parse-tags utility,
  TagsBadges/TagsInput UI components, filter operators, and CRM skill docs
- Preserve rich text formatting (bold, italic, code, @mentions) in user chat
  messages by sending HTML alongside plain text through the transport layer
- Detect empty-stream errors, improve agent error emission, and add file
  mutation queues for concurrent write safety in active-runs
- Add pre-publish standalone node_modules verification in deploy script
  checking serverExternalPackages are present
- Extract syncManagedSkills and discoverWorkspaceDirs for multi-workspace
  skill syncing, add ensureSeedAssets for runtime app dir
- Bump version 2.1.1 → 2.1.4
2026-03-08 19:53:18 -07:00
kumarabhirup
36e9cf9517
fix(agent-runner): ensure tool events stream on first chat message
sessions.patch for verboseLevel=full was called before the agent RPC
created the session, so it silently failed on new chats. Tool events
were never emitted and the frontend only showed brief text responses.

Now patches both before (for existing sessions) and after the agent RPC
(for newly created sessions). Also adds SSE keepalive to the POST /api/chat
stream to prevent connection drops during long tool executions, and removes
the unused legacy CLI spawn codepath.
2026-03-06 23:30:31 -08:00
kumarabhirup
eaef8df20b
fix(telemetry): prevent anonymousId from leaking via npm package
The root layout called getOrCreateAnonymousId() in a Server Component
without marking the route as dynamic. Next.js treated it as static,
pre-rendering the developer's UUID into the standalone build shipped
via npm — so every `npx denchclaw` user shared the same PostHog identity.

- Add `export const dynamic = "force-dynamic"` to root layout
- Replace `process.env.HOME || "~"` fallback with `homedir()` in web
  telemetry and posthog-analytics plugin (Node.js path.join doesn't
  expand "~", creating a relative path under cwd instead)
2026-03-06 23:30:31 -08:00
kumarabhirup
8f4fd62d63
fix(workspace): prevent URL sync from wiping params on hydration render
The URL sync effect and hydration effect run in the same React render
cycle. Since React state updates (setActivePath) are batched, the URL
sync effect still saw activePath=null and pushed "/", stripping all
query params. This caused an alternating refresh bug where odd refreshes
showed the homepage and even refreshes worked correctly.

Skip the URL sync effect for one render after hydration completes, giving
React state time to update before the effect writes the URL.
2026-03-06 21:29:03 -08:00
kumarabhirup
4578dfa945
feat(cron): project schedule occurrences on calendar view
Parse cron/every/at schedules and project all occurrences within the
visible date range so the calendar shows upcoming runs, not just the
next one. Display scheduled times on event chips.
2026-03-05 22:54:37 -08:00
kumarabhirup
d829b73265
refactor(workspace): centralize URL sync and add back/forward navigation
Remove scattered router.replace("/") calls in favor of the URL sync effect.
Add popstate listener to restore app state on browser back/forward.
Preserve object-view params across shell-level URL updates.
Fix ObjectView overwriting URL params on initial mount.
2026-03-05 22:54:31 -08:00
kumarabhirup
5b87256cac
fix(workspace): preserve query params during sidebar and database navigation
Use URLSearchParams to merge new params instead of replacing the full URL.
2026-03-05 22:54:24 -08:00
kumarabhirup
7dd38c185c
refactor(workspace): rename replaceUrlToWorkspace to replaceUrlToRoot
URL sync is now handled by the centralized effect, not callers.
2026-03-05 22:54:18 -08:00
kumarabhirup
ec73141a01
chore: bump version to 2.0.16 and enhance feedback API message handling
Update package versions for denchclaw and dench to 2.0.16. Refactor feedback API to convert chat lines into PostHog-compatible messages, preserving chronological order and including tool calls and results. Improve test cases to reflect changes in message handling.
2026-03-05 21:38:55 -08:00
kumarabhirup
38b062a71e
chore: fix test mocks, suppress cron pageview tracking, and minor docs
Add workspace mock to agent-runner tests, skip PostHog pageviews on cron paths to reduce noise, document web-chat storage path in CRM skill, and include cursor plans and build info.
2026-03-05 21:20:35 -08:00
kumarabhirup
f279524e32
feat(chat): add hero state with prompt suggestions for new conversations
Show an animated hero screen with rotating prompt suggestion cards when the chat is empty, using framer-motion for layout transitions. Add setText method to ChatEditor for programmatic content insertion.
2026-03-05 21:20:25 -08:00
kumarabhirup
c21bbb6cea
feat(cron): overhaul dashboard with calendar/timeline/insights views and action bar
Add tabbed views (overview, calendar, timeline, insights) to the cron dashboard, run status filters and action buttons (run now, disable, delete) to job detail, reuse ChatMessage for session transcripts, and wire URL state through workspace content.
2026-03-05 21:20:18 -08:00
kumarabhirup
7cb654ea6a
fix(api): improve cron run transcript parsing for toolCall and toolResult formats
Handle the current toolCall message format alongside legacy tool_use, and merge toolResult messages back into the preceding assistant message.
2026-03-05 21:20:10 -08:00
kumarabhirup
cc1194b5eb
feat(api): add agent session fallback to web-sessions endpoint
When no web chat session file exists, search agent session directories (cron runs, CLI) and parse transcripts into UIMessage-compatible format.
2026-03-05 21:20:04 -08:00
kumarabhirup
ca3f559b8f
fix(web): honor initial session ID and forward subagent session keys
Reconnect to the correct chat session when initialSessionId is provided instead of always picking the latest, and pass through the subagent sessionKey for clickable subagent cards.
2026-03-05 19:09:39 -08:00
kumarabhirup
3533aa3358
feat(web): persist file tree expansion and add column visibility callbacks
Save expanded file tree paths to localStorage so they survive page reloads, and surface an onColumnVisibilityChanged callback from DataTable/ObjectTable.
2026-03-05 19:09:34 -08:00
kumarabhirup
1c21b039fc
refactor(web): consolidate workspace onto root route with URL state machine
Move the workspace shell from /workspace to / and introduce a typed URL state codec (parseUrlState/serializeUrlState) for deep-linkable workspace params. Legacy /workspace URLs are still recognized for backward compatibility.
2026-03-05 19:09:29 -08:00
kumarabhirup
f9d454f5c7
feat(web): forward client identity to server and improve feedback traces
Bootstrap posthog-js with the persisted install ID from the server, forward distinctId to API routes, and restructure feedback traces to use chronological conversation order.
2026-03-05 19:09:19 -08:00
kumarabhirup
c4ee320994
feat(feedback): forward client PostHog distinct ID to server-side AI traces
Ensures server-side trace events are attributed to the same user as client-side analytics.
2026-03-05 16:09:12 -08:00
kumarabhirup
00c04f89d3
refactor(telemetry): remove server-side anonymous ID in favor of PostHog native tracking
Let PostHog generate its own distinct ID client-side instead of deriving one from hostname/username.
2026-03-05 16:09:06 -08:00
kumarabhirup
ab8906a421
feat(web): wrap app in PostHog React provider with survey-based feedback
Enables useThumbSurvey for feedback buttons and sends un-redacted conversation traces on user feedback.
2026-03-05 15:36:02 -08:00