Skip to content

fix(ui): preserve right panel width across minimize and restore - #850

Merged
pascalandr merged 1 commit into
devfrom
fix/right-panel-minimize-width
Oct 5, 2026
Merged

pascalandr merged 1 commit into
devfrom
fix/right-panel-minimize-width

Conversation

@pascalandr

@pascalandr pascalandr commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

I stopped window resize events from overwriting the right panel's saved width. Minimizing can briefly report a tiny viewport and previously persisted the 200px minimum; restoring then retained that reduced width.

The existing drawer layout still constrains the displayed width when space is limited. Explicit divider resizing still updates the saved preference. This is a shared UI change for Tauri and Electron, with no host-specific workaround.

Validation

I added browser regressions using the real Solid shell for transient 0/160/320px viewport measurements, ordinary viewport shrink/restore, overlay transitions, and subsequent divider resizing. Both new tests fail before the fix.

I ran the UI typecheck, two drawer-layout unit tests, and 33 renderer checks across runs. One cold-navigation timeout passed on an isolated rerun. The existing Electron-only fixture was unavailable in this checkout and excluded from the Tauri-only validation.

I built the Windows Tauri release executable (tauri build --no-bundle), passed packaged-resource checks, and launched/closed it with an isolated config. I did not replace the installed app, restart OpenCode, or repeat the native minimize reproduction after the user's confirmation. Native minimize/restore acceptance on the new binary is therefore not claimed; the regressions cover the real renderer's resize and persistence path.

Independent gatekeeper review: zero actionable findings on a0a02fc3398aaf1de35ac29e408336b909ce1650, published in this PR. The existing instance-shell2.tsx remains approximately 1,335 lines; no unrelated refactor is included.

Closes #849

Keep the selected right drawer width separate from transient viewport constraints. Native minimize resize events previously clamped and persisted the preference to the 200px minimum, so restoring the window could not recover the user's layout.

Use the existing drawer layout to constrain display without changing the saved width. Divider gestures still update the preference; overlay transitions and responsive center-width limits remain unchanged in the shared Tauri/Electron UI.

Add real Solid shell browser regressions for zero and small transient viewport measurements, ordinary shrink/restore, overlay transitions and subsequent user resizing. Both tests fail before the fix. UI typecheck and drawer layout unit tests pass; wider browser and native Tauri checks are recorded in the PR.

@pascalandr pascalandr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent gatekeeper review — a0a02fc

I had an independent reviewer inspect the complete three-file diff. Zero actionable findings.

The reviewer checked responsive display constraints, the 390px conversation minimum, overlay transitions, explicit divider resizing, listener cleanup, shared host behavior, and opt-in fixture initialization. Five targeted checks passed: the two new browser regressions, two drawer-layout unit tests, and the existing docked-drawer browser test. Whitespace validation passed.

The review does not claim native desktop validation or native snapshot-storage coverage. Existing mount-time clamping when reloading a narrow window is unchanged and outside this minimize/restore fix. An existing Electron-only fixture could not run because Electron is not installed in this isolated checkout; desktop validation is Tauri-only.

The existing shell file remains oversized at approximately 1,335 lines; this change does not attempt an unrelated refactor.

@pascalandr
pascalandr merged commit 193ec94 into dev Oct 5, 2026
10 of 14 checks passed
@pascalandr
pascalandr deleted the fix/right-panel-minimize-width branch October 5, 2026 13:46
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.

[Bug]: Minimizing the CodeNomad window resets the width of the right-hand file status panel

1 participant