Fix tmux startup resize failure - #67
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe app now preserves viewport claims made before tmux client creation. Startup uses the latest stored size for the native client and initial refresh. Active-session lifecycle updates claim the selected viewport before discovery work. ChangesViewport-aware startup
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change retains startup viewport updates until the tmux client is ready, preventing premature resize failures; no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant RemuxRootModel
participant TmuxSessionController
participant NativeClient
RemuxRootModel->>TmuxSessionController: claim selected active viewport
TmuxSessionController->>TmuxSessionController: store clientSize before client creation
RemuxRootModel->>TmuxSessionController: start session
TmuxSessionController->>NativeClient: create client with latest clientSize
TmuxSessionController->>NativeClient: refresh viewport
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Deploying remux with
|
| Latest commit: |
8ee287f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2e0b5ba0.remux-agx.pages.dev |
| Branch Preview URL: | https://fix-tmux-startup-resize.remux-agx.pages.dev |
Deploying getremux with
|
| Latest commit: |
8ee287f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://43f39360.getremux.pages.dev |
| Branch Preview URL: | https://fix-tmux-startup-resize.getremux.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a936168c18
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| guard client != nil else { | ||
| clientSize = nextSize | ||
| return |
There was a problem hiding this comment.
Retain the pre-start viewport claim
When the selected viewport changes while transport.start is still awaiting, TmuxScreenModel calls this method with claimActiveViewport: true, but this branch records only the size and discards the claim. After start, no topology handler restores that intent, so unlike the already-started path—which queues both the refresh and active-window claim—the selected client can remain unclaimed until a later input or action, leaving a multi-client session at the wrong active-window grid during initial display. Preserve the pending claim and submit it once topology becomes available.
Useful? React with 👍 / 👎.
Summary
Fix a startup race that could show
tmux: resize failedeven when the session connected successfully.Viewport updates received before the native tmux client starts are now retained. The latest viewport becomes the client’s initial grid instead of being sent as a premature resize command.
Testing
Summary by CodeRabbit
Bug Fixes
Tests