Skip to content

fix(dashboard): implement interrupt button with proper icon and backend endpoint#139

Merged
khaliqgant merged 5 commits intomainfrom
feature/fix-interrupt-button
Jan 11, 2026
Merged

fix(dashboard): implement interrupt button with proper icon and backend endpoint#139
khaliqgant merged 5 commits intomainfrom
feature/fix-interrupt-button

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

Summary

  • Updated InterruptIcon to show ESC key symbol instead of generic stop icon - better represents "send keyboard signal" action
  • Implemented /api/agents/by-name/:name/interrupt endpoint in dashboard-server that sends ESC ESC sequence to agent's PTY
  • Sends escape sequences (\x1b\x1b) to break agents out of stuck loops without terminating them

Changes

Frontend (LogViewerPanel.tsx)

  • Replaced stop/square icon with ESC key symbol
  • Updated button tooltip to "Send ESC to agent - interrupt current operation"

Backend (server.ts)

  • Added new POST endpoint /api/agents/by-name/:name/interrupt
  • Uses spawner.sendWorkerInput() to inject ESC ESC sequence to PTY
  • Returns proper error handling for missing spawner or agent not found

Test plan

  • Click interrupt button on spawned agent's log viewer
  • Verify ESC ESC is sent to PTY (agent should show interrupted behavior)
  • Verify no console errors
  • Verify button icon displays ESC key symbol
  • Verify 404 response when agent not found

🤖 Generated with Claude Code

Agent Relay and others added 5 commits January 11, 2026 15:21
- XTermLogViewer: Change overflow-hidden to overflow-auto on mobile,
  keeping overflow-hidden on md+ breakpoints where xterm.js handles
  internal scrolling
- LogViewer inline mode: Add touch-pan-y for consistent touch behavior
- Both components: Add WebkitOverflowScrolling: 'touch' for iOS
  momentum scrolling

Fixes mobile users being unable to scroll through logs due to
overflow-hidden blocking touch scroll gestures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The /api/spawned endpoint now returns agents from two sources:
1. Spawner's in-memory activeWorkers map (authoritative for spawned agents)
2. Daemon's agents.json registry (fallback for docker restarts)

This fixes the issue where workspace.agents returned empty in docker
deployments after container restarts. The spawner's in-memory state
would be lost, but agents that reconnected to the daemon are tracked
in agents.json with lastSeen timestamps.

The fix only includes daemon-registered agents that are:
- Not already tracked by spawner (to avoid duplicates)
- Recently active (within 30s heartbeat window)

Also added source debugging info to the response for troubleshooting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update InterruptIcon to show ESC key symbol instead of stop icon
- Add /api/agents/by-name/:name/interrupt endpoint
- Endpoint sends ESC ESC (0x1b 0x1b) to agent's PTY
- Works for spawned agents via AgentSpawner

The interrupt button now sends escape sequences to break agents out
of stuck loops without terminating them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The collapsible header feature was using isHeaderCollapsed state but
the useState declaration was missing, causing a TypeScript error.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@khaliqgant khaliqgant merged commit 6f9f36b into main Jan 11, 2026
6 checks passed
@khaliqgant khaliqgant deleted the feature/fix-interrupt-button branch January 11, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant