Skip to content

fix(browser): auto-reveal session tabs and prevent preview clipping - #50

Open
devswha wants to merge 1 commit into
codex/chat-tasks-above-conversationfrom
codex/browser-auto-reveal-fit
Open

fix(browser): auto-reveal session tabs and prevent preview clipping#50
devswha wants to merge 1 commit into
codex/chat-tasks-above-conversationfrom
codex/browser-auto-reveal-fit

Conversation

@devswha

@devswha devswha commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Scope

Focused browser-panel follow-up stacked on #49. This PR contains only the browser auto-reveal/layout work; merge #49 first and retarget this PR to main afterward. It does not rebuild, install, or replace published beta.10 assets.

Problem and behavior

  • The preview only listened for browser activity after the user manually mounted the Browser tab. Watch validated, current-session metadata while the panel is closed, revealing its first active tab and newly opened tabs. Routine state updates/reconnects respect manual dismissal and tab selection.
  • The watcher reads the existing sidecar recovery cache. It does not launch Chromium, subscribe to image frames, create grants, or stop a visible preview when disconnected. Browser session types and validation now have one shared definition.
  • Saved rail widths were only clamped while dragging, so a smaller window/sidebar could clip the preview and toolbar. Re-clamp on container attachment/resize and preserve chat's 200px minimum.
  • Keep images inside the measured surface; sync Chromium after status-before-mount races and reconnects; map clicks against the loaded frame instead of a pending requested viewport. Hide mismatched previous-tab images.

Reproduction and visual evidence

Restore a 1200px browser rail, then use a 1024×768 window. The old controller placed its right edge at x=1400; the new one keeps it at x=1024.

The comparison is an isolated fixture using the real WorkspacePanel/BrowserPanel, app CSS, React Compiler and Chromium sidecar. The before fixture replays the width controller from 1339b672, with the same viewer/test page. See docs/BROWSER-CUA-VERIFICATION.md and the checked-in before/after images under docs/images/browser-panel/.

Before:

Before: rail extends beyond the window

After:

After: toolbar and all four page corners fit

Verification

  • npm run verify passed (audit policy, TypeScript, Rust core, all tests, lint/boundaries, identity, production builds).
  • npm run test:e2e:browser: 3 passed.
  • npm run test:e2e:gjc: 8 passed.
  • New DOM/server regressions cover idle metadata watching, first-tab reveal, manual dismissal, reconnects, foreign/retired sessions, delayed status, loaded-frame click mapping, frame cleanup and restored desktop widths.
  • Interactive Browser-skill QA: 1024×768, 768×768, 390×844, 320×568 and expanded 1600×1200. All page corners visible; real bottom-right input reached the page button. Initial agent-open and new-tab auto-reveal worked; ordinary navigation stayed dismissed.
  • No packaged Tauri GUI, release installer, or installed-app update is claimed. Current installed beta.10 remains unchanged.

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