Skip to content

fix: recompute terminal layout on mobile breakpoint changes#997

Open
web3dev1337 wants to merge 3 commits into
mainfrom
fix/remove-worktree-list-version
Open

fix: recompute terminal layout on mobile breakpoint changes#997
web3dev1337 wants to merge 3 commits into
mainfrom
fix/remove-worktree-list-version

Conversation

@web3dev1337

Copy link
Copy Markdown
Owner

Summary

  • Track mobile/desktop viewport mode transitions in the orchestrator client.
  • Normalize sidebar state when crossing the mobile breakpoint (clear transient mobile sidebar-open state and restore desktop preference).
  • Recompute terminal grid layout when the viewport crosses mobile/desktop boundaries so returning to desktop restores the desktop terminal column layout.

Testing

  • node --check client/app.js
  • node --check client/terminal.js

web3dev1337 and others added 3 commits April 3, 2026 11:04
…'t miss them

Review feedback: resize events fire in bursts and only the last event's
debounced callback runs, so diffing two point-in-time layout snapshots
missed crossings that happened mid-burst (continuous window drags,
orientation changes) — exactly the scenario this PR exists to handle.
syncDesktopMobileLayoutState now latches a crossed flag at the moment of
the crossing, and the debounced callback consumes it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@web3dev1337

Copy link
Copy Markdown
Owner Author

Reviewed in the open-PR sweep. Found and fixed a real gap: the debounced resize callback compared two point-in-time snapshots of the layout mode, but resize events come in bursts and only the last event's callback runs — a breakpoint crossing mid-burst (continuous drag through 768px, orientation change) was silently missed, which is the exact scenario the PR targets. The crossing is now latched in syncDesktopMobileLayoutState and consumed by the debounced callback. Also noting for the record: ~70% of this diff is a second, undisclosed feature (terminal history preload from /api/sessions/:id/log + scroll-listener consolidation + 100ms→180ms scroll-settle change). It was verified synchronization-safe and merges cleanly against current main, but the PR description doesn't mention it — worth updating the description before merge.

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