Repository navigation
feat: direct acpmux React agent pane - #18068
Closed
azooz2003-bit wants to merge 40 commits into
Closed
azooz2003-bit wants to merge 40 commits into
azooz2003-bit wants to merge 40 commits into
Conversation
Add the versioned Swift bridge, React transcript renderer, Pretext layout model, customization registry, and standalone preview harness. Keep native rendering as the default. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Move transcript projection and ACP actions into the React client. Keep Swift as the WKWebView host and pass an authenticated loopback endpoint through the versioned handshake. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Handle permission envelopes, settle optimistic prompts, and reset streaming rows between turns. Install the webview lockfile before bundling Pretext resources in CI. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merge in-flight events with attach pages, reconcile legacy prompt echoes, and mark rejected sends failed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Emit snapshots for session-list changes even when the selected session is unchanged, so the picker stays current for sessions created or purged elsewhere.\n\nCo-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Handle prompt acknowledgements, preserve tool update metadata, compute turn durations, and reset session-local reducer state. Restore the compiled Tailwind asset pipeline and align markdown measurement with the rendered blocks.\n\nCo-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Pair turn_end and turn_result summaries without duplicate rows, preserve duration and state across session resets, and account for code block padding in precomputed geometry. Keep fallback transcript events visible during reconnects.\n\nCo-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merge daemon model catalogs, expose new-session creation, and show edited-file diff counts. Add code copying and keep the generated web assets aligned with the React renderer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ignore stale history responses after session changes and keep non-edit tool activity visible alongside edited-file details. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Use an LCS line diff for ACP edit blocks so replacement changes report both additions and deletions accurately. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reuse a pending turn-end summary when a later turn result supplies the turn id, avoiding duplicate transcript cards across daemon versions. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep the shell, scroller, spacer, thread, row, composer, and markdown geometry rules in the source and generated WebKit assets. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reset virtual transcript anchors when the selected session changes so each session opens at its newest content. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Use the app section prefix required by the settings catalog so CmuxSettings validation and generated config schema stay consistent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Move agentSession.renderer under app in the public and embedded cmux.json schemas so the catalog key and schema validation agree. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
This PR carries the React TypeScript agent pane over a direct authenticated acpmux WebSocket client. Swift hosts WKWebView and provides the endpoint, token, and initial session. React attaches, folds the versioned event stream, pages history, handles permissions and queue state, and sends ACP actions directly. Native remains the default renderer.
The renderer uses Pretext-style measurement, memoized row versions, typed-array geometry, binary-search virtualization, scroll anchoring, registry-based React row components, and hot-reloaded theme, layout, and user renderers. The standalone preview includes Claude and Codex recordings, real-speed streaming replay, seeded 5,000-row transcripts, permission and queue fixtures, theme controls, width controls, and fling timing.
Base and recovery
This PR uses the owned base branch feat/acpmux-ts-pane-base, which contains the pre-React acpmux pane snapshot. It does not use or update Lawrence's branches.
The earlier PR #16042 was opened against the wrong stacked base and auto-merged into that parent. This replacement PR is the direct-to-acpmux implementation on an owned base so it can be reviewed and merged independently.
The projections RFC is https://github.com/manaflow-ai/cmuxterm-hq#1051: acpmux owns sessions and event history, Swift hosts, and React and native are both clients.
Preview
cd webviews bun run preview:dev bun run preview:buildStatic output: webviews/dist/acpmux-agent-session-preview/.
Validation
Changelog
Added: React TypeScript agent pane over a direct authenticated acpmux event stream, with a standalone preview harness.
Summary by cubic
Adds a React TypeScript agent session pane that renders a direct authenticated acpmux WebSocket stream. Swift stays the WKWebView host and passes the authenticated loopback endpoint, per-launch token, and selected session through a new versioned bridge; React pages the event stream, merges in-flight events with paged history, creates sessions, merges daemon model, mode, and config catalogs, handles prompt acknowledgements and permission and queue state, sends ACP actions, and routes native-only actions (copy, open URL, open file, focus) back through the host bridge.
Lifecycle hardening ignores stale attach replies, session selections, and history pages, persists new sessions before prompting, settles optimistic sends, preserves tool update metadata, computes turn durations, pairs turn summaries without duplicate rows across daemon versions, preserves turn boundaries and duplicate queued prompts with their session defaults, retains implicit turn rows during history replay, keeps fallback transcript events visible during reconnects, and keeps non-edit tool activity visible alongside edited-file details. Every session change reopens the transcript at its latest turn, and the composer stays ready across live snapshots. The transcript uses Pretext measurement aligned with the rendered markdown blocks, coalesces streaming thoughts, binary-search virtualization, memoized rows, cached prepared markdown blocks, code copying, and LCS-based edited-file diff counts. Native rendering remains the default.
Renderer selection
app.agentSession.rendererconfig selects native (default) or TypeScript for new agent session panes; the catalog key placement mirrors the schema nesting so validation stays consistent.Preview
webviews/src/agent-session/acpmux-previewreplays recorded Claude and Codex streams with seeded 5,000-row transcripts, permission and queue fixtures, and theme and width controls.Written for commit 00937c1. Summary will update on new commits.
Migrated from #16203 after correcting the PR author identity. The original branch and commit history are preserved.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.