fix(mobile): reconcile authoritative terminal frames - #197
Draft
Lint111 wants to merge 5 commits into
Draft
Conversation
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.
Summary
mux-visiblepane after keyboard resize, WebSocket attachment, or foreground dialogue submission.Motivation
Codex can emit several resize redraws while the mobile visual viewport changes. xterm may briefly expose an older pane, blank rows, or overlapping history before the TUI reaches its final size. A visual cover removes the intermediate paint, while cursor-qualified reconciliation makes the frame behind that cover current before it is revealed.
Dialogue selection uses the same path because a prompt can be replaced immediately after Enter or a terminal mouse selection. Input is still dispatched once; the frame capture is asynchronous and cannot block delivery.
Commit Scope
This branch is a focused terminal stack:
92dbe64retains buffer-load ownership during replay (also carried by fix(terminal): preserve replay and history ownership #193).45f425dcoalesces keyboard viewport settling (patch-equivalent to fix(mobile): coalesce keyboard viewport settling #194).cc37643drains deferred terminal output without a later wake event (patch-equivalent to fix(terminal): drain deferred output without a wake event #190).7bfee75adds the inert resize-frame cover.fddd53aadds authoritative cursor reconciliation and its tests.It does not include the mobile navigation pad, terminal tap policy, repository viewer, shutdown endpoint, input controller, or other features from #173.
Dependencies
Merge the terminal contracts before this PR:
takeControl/refitresize options.An integration rehearsal combined #189, #191, and this branch. Two overlapping merge blocks are additive:
t: "h") and viewport takeover (a: true) inws-routes.ts, with one sharedannouncedViewportdeclaration beside announced rows/columns._requestTerminalFrameReconcile()inmobile-handlers.jsinstead of the older directsendResize()call.The reconciled tree built successfully and passed the joint route and browser suites.
Failure Behavior
mux-visible, non-empty, and has a valid stream cursor.Verification
npm run buildnpm run typechecknpm run lintnpm run check:frontend-syntaxnpm run check:public-assetsnpm run format:checknpm run test:ciwith test: isolate runtime state and PTY integration #175 fixture safeguards: 189 files passed, 1 skipped; 3,817 tests passed, 12 skippedRelated
Extracted from the terminal transition portion of #173 in response to the maintainer's scope review.