Repository navigation
fix(panels,review): use single-pane panelSidebar below 420 pt and wrap empty-state text - #1997
Merged
Merged
Conversation
…p empty-state text
When the side panel narrows below 420 pt (e.g. ~330 pt wide on narrow wide-mode
layouts or split panes), `ui.panelSidebar` previously kept its 200 pt file sidebar
beside the main column, squeezing the main pane down to ~130 pt or less while
unwrapped empty-state and status text clipped mid-character at panel edges.
- Add an explicit `NarrowPane` state on `PanelSidebar` so `ui.panelSidebar`
switches to a single full-width pane below 420 pt (`SINGLE_PANE_W`) without
clobbering the persisted wide-window `sidebarOpened` preference.
- Clip `{id}-body`, `{id}-sidebar`, and `{id}-main` in `ui.panelSidebar` to
match official `session-review-v2.css` `overflow: hidden`.
- Return the narrow single-pane sidebar to its main view when picking a file
from the Review or Files tree.
- Enable text wrapping (`wrap = true` / `.wrap()`) on empty, loading, error,
and stat labels across Review, Files, Context, Details, narrow Changes, and
empty side panes, and tighten/shrink Review's title and toolbar when narrow.
Fixes #1985
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ui.panelSidebar(used by Review and Files) to a single full-width pane when the panel width is below 420 pt (SINGLE_PANE_W), using an explicitNarrowPane(Main/Sidebar) state onPanelSidebarso the persisted wide-windowsidebarOpenedpreference stays intact across resizes..clip_soft(0.0)to{id}-body,{id}-sidebar, and{id}-maininui.panelSidebarto match officialpackages/session-ui/src/v2/components/session-review-v2.css(overflow: hidden).Mainwhen picking a file from the Review or Files tree.wrap = true/.wrap()) to empty, loading, error, and stat text acrossplugins/review/panel.luau,plugins/file/panel.luau,plugins/context/tab.luau,plugins/details/lists.luau,features/review/src/mobile.rs, andfeatures/panels/src/view/pane.rs, plus shrink/compact spacing on Review's source picker and toolbar when narrow.Root Cause
>= 768 pt, or wheneverside_widthnarrows to ~330 pt) previously renderedui.panelSidebarwith a fixedMIN_W = 200 ptsidebar beside the main pane, squeezing the two columns side by side (e.g. 200 pt sidebar with"No changed files. Use Open file to browse the workspace."beside a ~126 pt main pane with"项目变更将显示在此处").ui.textdefaults to unwrapped single-line layout (unlike CSS's default wrapping), so Review's empty-state description and related empty/status texts clipped mid-character at panel edges instead of wrapping.Verification
pwsh scripts/guardrails.ps1(11/11 checks, includingplugin-props,arch-check,tables-check, andcursor-allow).cargo check -p opencode-feature-review -p opencode-feature-panels -p opencode-desktop --lib --bins(including Luau plugin compilation inapps/desktop/build.rs).cargo clippy -p opencode-feature-review -p opencode-feature-panels --lib --no-deps -- -D warningsand verified zero clippy diagnostics in all touchedopencode-desktopfiles.Fixes #1985