feat: in-browser terminal for the workspace pane + rename boot→workspace, claude→nexus #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/workspace-window-terminal"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
boot→workspaceand the tmux session fromclaude→nexusacross the entrypoint, session service, and all AGENTS.md references.upgrade.ts); add a newworkspace-upgrade.tshandler atGET /api/workers/:id/terminal.SessionTerminal.sveltewith amodeprop ('session' | 'workspace') so the same component covers both terminal targets.margin-left: auto.Bug fixes during smoke testing
self is not defined): xterm.js evaluated at SSR time. Fixed by lazy-loading insideonMount.pane_current_commandreturnedsh(claude is a child of the/bin/sh -cwrapper). Fixed by scanning/proc/<pid>/cwdfor a process with CWD/workspace.respawn-windowrelaunched claude on close:tmux respawn-window -kwithout an explicit command replayed the window's original launch. Fixed by passing-- /bin/bashexplicitly.workspaceShellRunningbefore claude actually settled. Fixed with a server-sidewaitForWorkspaceShellpoll loop and a client-sidereprobeHealthcall after the action instead of an optimistic flip.stream.destroy()doesn't reliably terminate the docker exec on the daemon side withTty: true. Leaked grouped sessions stayed(attached), blockingdestroy-unattached onand hijacking the operator'sdocker exec ... tmux awithprefix=None/status=off. Fixed by firing an explicittmux kill-session -t \<viewId\>from a fresh short-lived exec inpty.end().Test plan
tmux lsinside the container — no staleview-sessionspnpm testinsidenexus/— all tests passdocker exec -it <container> tmux astill works with Ctrl-b intact after the in-browser terminal is closedThis PR closes #7
Adds an upgrade handler that attaches the operator's browser to the workspace tmux window via a grouped view-session — the same PTY-over-WS mechanism used by session terminals. Changes: - Refactor handleTerminalUpgradeCore to accept a pluggable resolveTarget strategy; handleSessionTerminalUpgrade becomes the thin session caller. - handleWorkspaceTerminalUpgrade resolves the 'workspace' window on any running worker (no isWorkspaceShellRunning gate — the pane always hosts something useful). - Route GET /api/workers/:id/terminal → workspace upgrade handler. - SessionTerminal gains a mode prop ('session' | 'workspace') to route the WS URL. - Workspace card shows a Terminal button when the worker is running.