Skip to content

fix: Claude Code classic renderer + browser-block zoom margin - #263

Closed
robdmac wants to merge 3 commits into
mainfrom
fix/claude-altscreen-and-vnc-margin
Closed

robdmac wants to merge 3 commits into
mainfrom
fix/claude-altscreen-and-vnc-margin

Conversation

@robdmac

@robdmac robdmac commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Two small UX fixes.

1. Claude Code stops taking over the terminal in full-screen

Claude Code's newer full-screen (alternate-screen) TUI takes over the xterm.js terminal block and asks a one-time "use full screen?" prompt. Now sets CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 for Claude PTYs (right beside the existing IS_SANDBOX=1), which forces the classic inline renderer and skips the prompt non-interactively, regardless of any saved tui setting. (Verified as the current, authoritative knob via the Claude Code fullscreen docs.)

2. Browser block's black margin no longer grows when zoomed out

Root cause: noVNC's _screenSize() measures the container with getBoundingClientRect(), which includes React Flow's ancestor transform: scale(zoom). Both the remote-resize request and the autoscale use that value, so a browser opened while the canvas is zoomed out asks for a framebuffer smaller than the block and paints the leftover with the dark background — a black margin that grows the further you're zoomed out (and new browser blocks often need zooming out to place, so the 2nd/3rd get progressively worse). At zoom 1 the two size functions agree, so only the tiny server-mode-snap margin shows.

Fix: override _screenSize to use clientWidth/clientHeight — the true untransformed layout size, and the same measure noVNC's own _currentClientSize() uses (so no resize loop). The framebuffer + scale now target the real block at any zoom → no zoom-dependent margin. Mirrors the existing absX/absY zoom-compensation patch in the same file, and stays consistent with it (pointer mapping still correct).

The tiny residual margin at 100% (server RandR mode-snapping) is unchanged and separate — this fix removes only the zoom-scaling growth.

Testing

  • go build ./internal/sessions/ clean; tsc --noEmit + eslint clean.
  • The margin fix is best verified visually: open a browser block, zoom the canvas out, confirm it still fills the block instead of showing growing black bars.

🤖 Generated with Claude Code

https://claude.ai/code/session_014t8Ukp4NPWtqJ55X261wMZ

robdmac and others added 3 commits July 12, 2026 17:41
Two visibility gaps in the desktop app:

1. No indication of which version is running. Added a `get_app_version` Tauri
   command (app.package_info().version) exposed via getAppVersion(), and a small
   "v0.5.0" badge (DesktopVersionBadge) next to the OrcaBot wordmark in both the
   dashboards-list and single-dashboard headers. Desktop-only (renders nothing on
   web / until the version resolves).

2. Auto-update gave no feedback between accepting the native "Update available"
   dialog and the relaunch. The Rust updater now emits `update-progress` events
   from the download_and_install closures (throttled to once per MB) covering
   starting → downloading (bytes + %) → installing → error. A new
   UpdateProgressOverlay listens for these and shows a fixed download bar; it's
   mounted once for all app routes via a new (app)/layout.tsx.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014t8Ukp4NPWtqJ55X261wMZ
…screen)

Claude Code's newer full-screen (alternate-screen buffer) TUI takes over the
xterm.js terminal block and prompts a one-time "use full screen?" question. Set
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 for Claude PTYs (next to IS_SANDBOX=1) —
this forces the classic inline renderer and skips the prompt non-interactively,
regardless of any saved `tui` setting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014t8Ukp4NPWtqJ55X261wMZ
…med out

noVNC's `_screenSize()` measures the container with getBoundingClientRect, which
includes React Flow's ancestor `transform: scale(zoom)`. Both the remote-resize
request and the autoscale use it, so a browser opened while the canvas is zoomed
out asks for a framebuffer smaller than the block and paints the leftover with the
dark `background` — a black margin that grows the further you zoom out (and new
browsers often need zooming out to place). Override `_screenSize` to use
clientWidth/Height (the true untransformed layout size, matching noVNC's own
`_currentClientSize`), so the framebuffer + scale target the real block at any
zoom. Mirrors the existing absX/absY zoom-compensation patch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014t8Ukp4NPWtqJ55X261wMZ
@robdmac robdmac closed this Jul 13, 2026
@robdmac
robdmac deleted the fix/claude-altscreen-and-vnc-margin branch July 13, 2026 10:42
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