13 Commits
Author SHA1 Message Date
luccast 154c93131e chore: regenerate lock file, bump to 1.0.7 2026-01-30 20:44:40 -05:00
Luciano Castillo 2ba3ef6d47 feat(monitor): add follow mode to track new nodes (#23)
* feat(monitor): implement follow mode in ActionGraph for new nodes

- Added a follow mode feature that automatically pans the viewport to new nodes in the ActionGraph.
- Introduced a button to toggle follow mode, enhancing user experience by allowing users to track new nodes easily.
- Updated the ActionGraphInner component to manage viewport changes and node tracking effectively.

* feat(graph-layout): implement caching for spawn Y positions to prevent jitter

- Introduced a caching mechanism for spawn Y positions of child sessions to maintain stability during parent action accumulation.
- Updated the layoutGraph function to utilize cached values, reducing recalculation and improving layout consistency.
- Added cleanup logic to remove entries from the cache for sessions that no longer exist, ensuring efficient memory usage.

* style(ActionGraph): enhance follow mode button appearance

- Updated the styling of the follow mode button in the ActionGraphInner component to include a backdrop blur effect, improving visual feedback for users when the mode is active.
2026-01-30 16:52:29 -05:00
Malachi bddf8b81a6 infra: use nitro for docker production (#21)
* infra: use nitro for docker production

* small fix

* fix: bufferutil error

* Remove ALLOWED_HOSTS
2026-01-30 08:36:15 -05:00
luccast 3c29e63d44 chore: bump version to 1.0.5 2026-01-28 18:04:22 -05:00
Luciano Castillo 80c28485f5 feat(monitor): exec events visualization + hierarchical spawn layout (#14)
Merging select features from https://github.com/luccast/crabwalk/pull/11 

* feat(exec-events): bead-1 - add exec protocol and monitor types

* feat(exec-events): bead-2 - parse exec started output completed

* feat(exec-events): bead-3 - add exec collection and aggregation

* feat(exec-events): bead-4 - persist exec events

* feat(exec-events): bead-5 - hydrate exec events after actions

* feat(exec-events): bead-6 - emit exec events in subscription

* feat(exec-events): bead-7 - wire exec events into monitor route

* feat(exec-events): bead-8 - add exec node component

* feat(exec-events): bead-9 - render exec nodes under sessions

* feat(exec-events): bead-10 - final validation and hydrate exec-only data

* fix(parser): remove incorrect sessionKey assignment

* feat(monitor): link subagents to parent sessions via spawnedBy, add timestamps to session nodes

* feat(monitor): add clear completed execs button

- Add clearCompletedExecs() to remove completed/failed execs
- Add getCompletedExecCount() for UI badge count
- Add clearInactiveSessions() for optional inactive session cleanup
- Add "Clear Completed" button in monitor header with badge count
- Button only shows when there are clearable items
- Add keyboard shortcut: Ctrl+K / Cmd+K to clear
- Add vitest test infrastructure with 8 tests covering:
  - Clearing completed execs
  - Clearing failed execs
  - Preserving running execs
  - Counting clearable items
  - Clearing inactive sessions by threshold

* feat(monitor): add copy PID button to ExecNode header

- Copy icon positioned left of status indicator
- Click copies PID to clipboard
- Animated feedback: copy → checkmark for 1.5s
- stopPropagation prevents expand/collapse on click

* feat(monitor): add copy session key button to SessionNode header

- Copy icon positioned left of status indicator
- Click copies full session key to clipboard
- Animated feedback: copy → checkmark for 1.5s
- stopPropagation prevents node selection interference

* feat(ui): horizontal spawn layout for action graph

- Redesigned graph layout algorithm for horizontal spawn positioning
- Sessions arranged in columns (X = spawn depth hierarchy)
- Events within a session flow DOWN vertically (Y = time progression)
- Child sessions appear to the RIGHT at the Y-level where spawned
- Added left/right handles on SessionNode for horizontal spawn edges
- Smoothstep edges connect parent → child sessions horizontally
- Collision avoidance for multiple sessions at same depth
- Orphan nodes (without session) get positioned in separate area
- Compact action nodes (180x80) vs larger session/exec nodes

* fix(ui): improve graph spacing and alignment

- Increase COLUMN_GAP from 300 to 400 for wider horizontal separation
- Increase ROW_GAP from 40 to 80 for more vertical breathing room
- Enlarge NODE_DIMENSIONS for better layout calculations
- Add MIN_SESSION_GAP (120px) for collision avoidance
- Implement adjustSpawnY to shift overlapping sessions down
- Sort sessions by column before positioning (parents first)
- Ensure all nodes in same depth share same X coordinate

* chore: remove non-feature files from contributor PR

Remove planning docs, security audit, vitest config, and revert
package.json/lockfile to original state.

* fix(monitor): add periodic update for session node component

- Introduced useEffect to trigger a state update every 30 seconds
- Simplified relative time calculation for better readability

* fix: Removed the Ctrl+K shortcut. The "clear completed" button in the UI still works — no need for a global keyboard shortcut that conflicts with browser/OS defaults.

* chore: update package dependencies and remove unused packages

- Removed "@types/dagre" and "dagre" from package.json and package-lock.json
- Added "peer": true to several dependencies in package-lock.json for better compatibility

* fix(clawdbot): optimize output chunk truncation logic

The new version iterates forward, accumulating dropped chars from the front until the remaining tail fits within budget. This keeps the maximum number of recent chunks possible.

- Refactored the logic for truncating output chunks to improve performance and readability.
- Changed variable declarations for clarity and adjusted the loop to determine the starting index for slicing the capped array.

* refactor(monitor, graph): introduce nodeData utility for type casting

- Added a utility function `nodeData` to cast domain data to ReactFlow's Node data type for improved type safety.
- Updated the ActionGraph and graph layout components to utilize the new `nodeData` function for data handling.

* fix(monitor): handle clipboard copy errors in ExecNode and SessionNode

- Updated clipboard copy functionality in ExecNode and SessionNode to handle potential errors by adding a catch block to the writeText method.
- Ensured that the user experience remains smooth by maintaining the existing feedback mechanism for copy actions.
2026-01-28 12:16:23 -05:00
luccast a132a33c6b 1.0.4 2026-01-27 09:43:33 -05:00
Kirill 6811bf7c60 fix(docker): make image runnable + document CLAWDBOT_URL 2026-01-26 23:50:17 -08:00
luccast 271d0c47b2 1.0.3 2026-01-26 23:08:08 -05:00
luccast 6ccd394838 Add persistence feature to monitor
- Introduced a persistence service to enable data retention across sessions.
- Updated SettingsPanel to manage persistence state and actions.
- Implemented hydration from server persistence in collections.
- Enhanced TRPC router with persistence-related queries and mutations.
- Updated monitor page to handle persistence status and actions.
2026-01-26 20:25:12 -05:00
luccast 37a4db51de 1.0.2 2026-01-26 19:32:46 -05:00
luccast 1b323b3ae3 Add react-markdown dependency and integrate Markdown rendering in ActionNode component
- Added `react-markdown` as a dependency to enable Markdown rendering.
- Updated the `ActionNode` component to display full content using Markdown when expanded, enhancing content presentation.
- Adjusted styles for the Markdown content to ensure readability and visual consistency within the component.
2026-01-26 14:01:12 -05:00
luccast 4d82b71a7a Refactor ActionGraph and related components for improved type safety and code clarity. Removed unnecessary peer dependency in package-lock.json. Updated session and action node components to use explicit types and fixed minor styling issues. Enhanced local collection options in clawdbot integration and demo-db. Adjusted live query handling in demo and monitor routes for better data management. 2026-01-25 17:59:15 -05:00
luccast 58973da692 init 2026-01-25 17:47:27 -05:00