feat!: remove view mode and non-xterm terminal renderers (xterm-only) - #220
Merged
Conversation
Terminal (xterm.js) is now the only view and the only renderer. - Remove "view mode": delete the /api/conversation route, the @autonomos/core ClaudeCodeParser + render/parser types, the dashboard ConversationView/DiffView, and the viewMode store/UI toggle. viewMode was dashboard-only localStorage state, so there is no server-side migration. - Remove non-xterm renderers: delete the Ghostty (ghostty-web) backend and the renderer-selection factory; useTerminal now calls createXtermBackend directly. OSC8 Ctrl/Cmd+click links are preserved via xterm's linkHandler. - terminalRenderer settings key added to REMOVED_KEYS (accept-and-discard: scrubbed on read with a warning naming it, dropped from disk on next persist) following the ADR-037/038 removed-feature convention. - Drop 5 now-dead dependencies: ghostty-web, react-syntax-highlighter (+ @types), and the unused @assistant-ui/react + @assistant-ui/react-streamdown. Note: the "Inbox Agent" control still visible in settings was a stale embedded dashboard bundle (server dist/.../_embedded_dashboard, built pre-#213), not live code; a rebuild clears it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KRUUfmiCZ55Q6Vp8H8T3Ux
aterrylu
enabled auto-merge (squash)
June 20, 2026 00:18
nox-0x
approved these changes
Jun 20, 2026
nox-0x
left a comment
Collaborator
There was a problem hiding this comment.
Approving — clean, mechanical removal of view-mode and the Ghostty renderer with no lingering references in source.
Verified:
- All source refs to viewMode / terminalRenderer / ghostty-web / ConversationView / DiffView / ClaudeCodeParser / assistant-ui / react-syntax-highlighter are gone from packages/** (only the intentional REMOVED_KEYS entry + corresponding test/comments remain).
- Settings migration is correct: terminalRenderer is added to REMOVED_KEYS so getSettings() scrubs it and updateSettings() drops it from disk on next persist — matches the ADR-037/038 precedent. The route also no longer accepts the key.
- xterm-backend.ts wires OSC 8 via the linkHandler ctor option with the hasPrimaryModifier + deduplicatedOpen gate, so Ctrl/Cmd+click parity with the old ghostty OSC8LinkProvider is preserved.
- bun.lock no longer contains the removed deps; the stale pnpm-lock.yaml files weren't touched but they haven't been updated in this repo for ages and bun is the active lockfile.
- Test edits look right: the two scrub tests that used terminalRenderer as a persist trigger were re-pointed to autoTrust (would otherwise be a compile error), and a dedicated scrub test asserts the new behavior.
Minor follow-up (non-blocking): the async IIFE wrapping the terminal init in useTerminal.ts existed because ghostty-web's WASM init was awaited; createXtermBackend is sync, so the IIFE could be unwound in a later pass.
This was referenced Jun 20, 2026
aterrylu
added a commit
that referenced
this pull request
Jun 20, 2026
Four append-only ADRs documenting decisions shipped across PRs #220, #219, #221, and #222: - ADR-039 — Terminal-only view, xterm.js-only renderer (#220, Cleanup@autonomOS) - ADR-040 — selectUsageOrg() picks chat/claude_max capability (#219, ClaudeUsage) - ADR-041 — Zero-touch Claude Usage via in-memory cookie harvest (#221, ClaudeUsage) - ADR-042 — Insecure-context clipboard fallback for OSC 52 (#222, RemoteCopy) Bundled to keep the docs cadence dense — each ADR is owned by the agent who shipped the underlying code. ADR-038 and prior entries untouched. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
johnnywang016
added a commit
that referenced
this pull request
Jun 26, 2026
…refactor) Conflicts arose from three independent changes landing on main after this branch diverged: 1. PR #220 (remove view mode / xterm-only): deleted ConversationView.tsx, DiffView.tsx, /api/conversation route, ClaudeCodeParser, and the parser/render/render types from @autonomos/core. This branch had modified ConversationView (Fix A2) and conversation.ts (Fix A1), and added buildCopyText + conversationLayout helpers. Since the entire view-mode subsystem was intentionally removed and the core types it depended on are gone, accept the deletions and remove the now-dead helpers and their tests (conversation-cache.test.ts, buildCopyText.*, conversationLayout.*). 2. PR (run.ts refactor): server startup logic moved from index.ts into run.ts as runServer(). Accept main's thin index.ts entry point and integrate the PR's additions (initMemory() call + /api/memory route) into run.ts. 3. gateway/router.ts broadcast: main added Codex-agent exclusion comment + logic; this branch added the `delivered` tracking array. Keep both. 4. routes/agents.ts DELETE handler: main added robust deleteAgentRaw fallback with CachePoisonedError handling; this branch added a recordEvent() call. Keep both — recordEvent fires after the delta flush. 5. core/src/index.ts: keep the PR's new `./types/memory` export, drop `./types/parser` which main intentionally removed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MDGAaQfEC1hR7mLJhTJD9F
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two alternative-surface features had accrued carrying cost with no real use:
/api/conversationroute parsed Claude Code session JSONL into a structured web "conversation" view (ClaudeCodeParser+ render/parser types in@autonomos/core,ConversationView/DiffViewin the dashboard), toggled against the live terminal. The parser had a single consumer.terminalRenderersetting let users switch between xterm.js and a Ghostty (ghostty-web) backend. The Ghostty path was a second renderer no one selected, and it dragged in a WASM blob.Per Terry's direction: terminal-based only from now on — one view, one renderer (xterm.js) — and slim the bundle.
Solution
flowchart LR subgraph REMOVE["🗑️ Removed"] A["View mode<br/>/api/conversation + core parser<br/>ConversationView/DiffView + viewMode"] B["Ghostty renderer<br/>ghostty-backend + factory<br/>terminalRenderer setting"] D["5 dead deps<br/>ghostty-web · react-syntax-highlighter<br/>+types · @assistant-ui/* ×2"] end subgraph KEEP["✅ Kept (load-bearing)"] K["xterm.js + @xterm/* · live PTY hook<br/>OSC8 links (linkHandler) · titleCache<br/>react-markdown/remark-gfm (preview panes)<br/>sidebarViewMode · providerSessionId"] end REMOVE -.collapses to.-> K/api/conversationroute, the coreClaudeCodeParser+ render/parser types (+ barrel re-exports), the dashboardConversationView/DiffView, and theviewModestore/UI toggle.viewModewas dashboard-onlylocalStoragestate — no server migration (zustand silently ignores the stale persisted key).ghostty-backend.tsand the renderer-selection factory (create.ts);useTerminalnow callscreateXtermBackenddirectly. TheTerminalRendererunion and the renderer toggle UI are gone.terminalRendereris asettings.jsonkey, so it's added toREMOVED_KEYSfor accept-and-discard — scrubbed on read with a warning naming it, dropped from disk on next persist. Non-credential, so no active-credential scrub (unlike the ADR-038 auth token). Matches theinboxAgent/anthropic*precedent (ADR-037/038).ghostty-web,react-syntax-highlighter(+@types), and the already-dead@assistant-ui/react+@assistant-ui/react-streamdown(zero source imports; in both root + dashboard manifests).bun.lockregenerated — the heavyprismjs/highlight.js/lowlight/refractorsubtree drops out.Net: −1,789 / +47 lines across 22 files (8 file deletions).
Why "Inbox Agent" was still showing in settings
Terry reported still seeing an "Inbox Agent" control in settings despite #213 removing it. Traced it: the current source has zero inbox UI — the visible control came from a stale embedded dashboard bundle (
packages/server/dist/<plat>/_embedded_dashboard/, a gitignored artifact built Jun 7, 5 days before #213 merged).git pullnever refreshes it. The fresh build in this PR confirms "Inbox Agent" is absent from the bundle. A rebuild clears the ghost — no inbox code to remove.Testing
make check(full CI gate) — green: biome (0 errors),tsc --build, server 462/462 (incl. the L3 real-agent integration test), dashboard 216/216.settings.test.tsasserts a staleterminalRendereris scrubbed on read. The two scrub tests that usedupdateSettings({ terminalRenderer })as a persist-trigger were re-pointed toautoTrust(the field-removal would otherwise have been a compile error failing the whole server suite — the load-bearing-test trap).vite build— clean (confirms no removed-dep imports linger)./polish(3 agents: code-reviewer, silent-failure-hunter, code-simplifier) — all clear. OSC8 Ctrl/Cmd+click parity independently verified againstxterm-backend.ts'slinkHandler.Risks
OSC8LinkProvider; xterm uses thelinkHandlerctor option with the samehasPrimaryModifiergate +deduplicatedOpen. Parity verified, but worth a manual click-a-link smoke test.useTerminal.tsis the live PTY/WebSocket hook — only renderer-selection + the Ghostty branch were removed; all PTY/resize/scroll/link wiring is untouched.Breaking changes
terminalRenderersetting and the view-mode toggle are removed from the settings UI. Oldsettings.jsonfiles withterminalRendererparse cleanly (scrubbed, with a warning). The/api/conversationendpoint is removed.🤖 Generated with Claude Code