Skip to content

refactor(pane-layout): retire the unread intent tag; renamedLeafIds is the one layout delta - #30734

Merged
nwparker merged 2 commits into
mainfrom
nwparker/r4-7-drop-layout-intent
Oct 19, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/r4-7-drop-layout-intent

Conversation

@nwparker

@nwparker nwparker commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​33 $\color{#cf222e}{\Huge{\mathbf{−}}}$​109 $\color{#cf222e}{\Huge{\mathbf{−}}}$​76
Prod 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​40 $\color{#cf222e}{\Huge{\mathbf{−}}}$​42 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2

ELI5

When you drag a pane divider or rename a pane on a paired remote host, the app sent the new layout plus a little "this was a gesture" sticker. No host ever looked at the sticker. This removes it, so there's one way to say "the user changed this": the list of panes they renamed.

What Changed

  • User-visible: nothing. Layout and title edits behave exactly as before, locally and on remote hosts.
  • Client: onLayoutChanged, persistLayoutSnapshot, the remote layout pusher and updateWebRuntimePaneLayout no longer take or send an intent argument (PaneLayoutEditIntent is deleted from 11 files).
  • Params schema: session.tabs.updatePaneLayout no longer declares intent. Zod's default object mode strips it, so an older client that still sends intent: 'gesture' keeps working; session-tabs-pane-layout-intent.test.ts pins that.
  • Rule: docs/reference/remote-snapshot-intent.md records "a snapshot never carries intent; intent travels as an explicit optional delta" (round 4, R4-7 item 1), with renamedLeafIds as the example.
  • Tests that only pinned the tag are rewritten to assert the call, not the argument; the twin-refusal, persist-gate, dedupe and title-clear cases are kept, and a test for the clear-title shortcut push is added.

Why

R4-7 item 2: after #30496 the host reads renamedLeafIds, and two intent fields must not coexist. Honouring 'gesture' for geometry was the alternative, but a tag on the whole snapshot can't say which part the user changed, so a receiver would apply it to fields the user never touched. Deleting it is smaller and leaves one delta.

Wire compatibility: an old host gets no intent from a new client (it was .optional() there); a new host strips an old client's intent. No opcode or published content changes.

Linked Issue

Part of the SSH/remote hardening round 4 (R4-7). No issue.

Visual Proof

N/A: no visual or interaction change; the removed field was never read.

Testing

  • Automated tests updated: 949 files across lib/pane-manager, components/terminal-pane, renderer/src/runtime, shared/rpc-contract, shared/workspace-layout/old-client and the session-tabs RPC tests, single worker.
  • Full static-analysis job run locally (0 failures), including generate-rpc-params-catalog --check (the catalog imports the schema, so it needs no regeneration).
  • Not exercised on a live host: behaviour is unchanged because no host read the field.

Review

  • Codex (gpt-6.1-sol, high): see the PR comments/report.
  • Opus: no findings on the intent change; three P3 test-coverage notes fixed (clear-title shortcut push test added, a duplicated schema test dropped).

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Security, cross-platform, SSH, mobile: no behaviour change. Mobile never sent the tag. Net −82 lines.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…s the one layout delta

No host ever read intent: 'gesture'. The client stops sending it, the params
schema strips it from older clients, and docs/reference records the rule that a
snapshot never carries intent.
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 777e54eb-dc0c-4f2d-91a7-b82233f6e2bf
📥 Commits

Reviewing files that changed from the base of the PR and between f870220 and 37eb810.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 986f93a6-c7a2-4e95-bcda-2db7c5b341ce
📥 Commits

Reviewing files that changed from the base of the PR and between 90e99c4 and f870220.

📒 Files selected for processing: 23
  • docs/reference/remote-snapshot-intent.md
  • src/main/runtime/rpc/methods/session-tabs-pane-layout-intent.test.ts
  • src/renderer/src/components/terminal-pane/remote-pane-layout-push.test.ts
  • src/renderer/src/components/terminal-pane/remote-pane-layout-push.ts
  • src/renderer/src/components/terminal-pane/terminal-layout-title-persist.test.tsx
  • src/renderer/src/components/terminal-pane/terminal-pane-lifecycle-types.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-manager-options-persist.test.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-manager-options.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-layout-persistence.ts
  • src/renderer/src/lib/pane-manager/pane-divider-capture-loss.test.ts
  • src/renderer/src/lib/pane-manager/pane-divider-drag.ts
  • src/renderer/src/lib/pane-manager/pane-divider.test.ts
  • src/renderer/src/lib/pane-manager/pane-drag-reorder.test.ts
  • src/renderer/src/lib/pane-manager/pane-drag-reorder.ts
  • src/renderer/src/lib/pane-manager/pane-drop-no-op.test.ts
  • src/renderer/src/lib/pane-manager/pane-layout-change-notify.test.ts
  • src/renderer/src/lib/pane-manager/pane-manager-layout-sweeps.ts
  • src/renderer/src/lib/pane-manager/pane-manager-types.ts
  • src/renderer/src/lib/pane-manager/pane-tree-ops.ts
  • src/renderer/src/runtime/web-runtime-pane-layout-params.test.ts
  • src/renderer/src/runtime/web-runtime-terminal-actions.ts
  • src/shared/rpc-contract/session-tabs-schemas-params.ts
  • src/shared/workspace-layout/old-client/old-client-pane-layout-translation.ts
💤 Files with no reviewable changes: 1
  • src/renderer/src/components/terminal-pane/remote-pane-layout-push.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

📝 Walkthrough

Pane-layout edit intent is removed from layout-change callbacks, snapshot persistence, and remote update parameters. The shared RPC parameter schema no longer defines the intent type or field. Tests now check layout persistence and callback behavior without asserting an intent value. Documentation describes the distinction between snapshot state and delta fields.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to f8702

Layout and title updates retain their documented behavior, with no actionable merge-blocking risk established.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the change, rationale, compatibility behavior, testing, visual impact, and checklist status. However, the required Linked Issue section states that there is no issue, while th… Add the applicable issue reference under the Linked Issue section, such as Fixes #<issue-number>, or provide the repository-approved issue link if this work belongs to an existing tracking issue.
Docstring Coverage Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 21 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: retiring the unread pane-layout intent tag and retaining renamedLeafIds as the layout delta.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the change, rationale, compatibility behavior, testing, visual impact, and checklist status. However, the required Linked Issue section states that there is no issue, while the template requires an actual linked issue.

Resolution

Add the applicable issue reference under the Linked Issue section, such as Fixes #&lt;issue-number&gt;, or provide the repository-approved issue link if this work belongs to an existing tracking issue.

Full details: Docstring Coverage

Explanation

Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 21 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit 59a9da2 into main Oct 19, 2026
57 checks passed
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