Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Width setting contract crates/zephium-core/src/preferences.rs |
The preferences registry recognizes sidebar.width and accepts canonical decimal values from 180 through 460. Tests cover accepted and rejected values. |
Sidebar width save and restore frame/src/session/sidebar-mode.svelte.ts, frame/src/session/tests/sidebar-width.svelte.test.ts |
Width changes are persisted, and initialization restores valid saved widths. Tests cover resize persistence, restoration, hidden mode, native resize values, and invalid saved values. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related PRs
- zephium-browser/Zephium#183: Introduced live sidebar resizing and hidden-sidebar mode, whose expanded width this change persists and restores.
- zephium-browser/Zephium#206: Uses the expanded width for temporary sidebar expansion; this change restores that width from settings.
Suggested labels: bug, area: browse, size: M
Merge Risk: 
Minimal · up to b11f1
-
The reviewed change has no established issue requiring a fix before merge. Normal checks and a packaged-app quit-and-relaunch test remain appropriate.
Pre-merge checks: 
9 · 
1
-
Failed checks: 1 warning Passed checks: 9 passed-
Full details: Linked Issues check
-
Explanation
Issue
#337requires the sidebar to reopen at its prior custom width after a full restart. The change adds thesidebar.widthpreference, saves completed drag and native resize widths throughrememberWidth, restores a valid width duringinit()before publishing the initial layout, and keeps 240 px for missing or invalid values. Tests cover save, new-session restore, and validation behavior.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue
#337. The native preference allowlist change admits the new sidebar width setting, and the session tests verify the required persistence, restoration, cancellation, stale-revision, hidden-mode, and temporary-panel behavior. No unrelated product behavior or IPC binding changes are present.
Full details: One Logical Change
-
Explanation
All three changed files serve the sidebar-width persistence change: preference admission, sidebar save/restore behavior, and focused regression tests. The diff contains no unrelated refactors, renames, or formatting of untouched code, and
git diff --checkreports no whitespace errors.
Full details: Linked Issue For Larger Changes
-
Explanation
The pull request is a small, contained bug fix. It changes three files to persist and restore the sidebar width and adds focused validation tests. The description links issue
#337with “Fixes#337,” which meets the stated issue-link condition.
Full details: Tests Cover Changed Behavior
-
Explanation
Tests cover the changed behavior. Rust tests verify the new
sidebar.widthallowlist, accepted bounds, canonical formatting, and rejected values. Sidebar tests verify drag and keyboard saves, restoration after a new session, hidden-mode and temporary-panel preservation, stale/non-finite native inputs, rounding, and missing or invalid stored widths retaining 240 px.
Full details: Generated Files Follow Their Source
-
Explanation
The pull request changes only
crates/zephium-core/src/preferences.rs,frame/src/session/sidebar-mode.svelte.ts, and a sidebar test. It does not changeframe/src/shared/ipc/bindings.ts,Cargo.lock,pnpm-lock.yaml, or generated i18n output. Therefore, none of the specified generated-file failure conditions apply.
Full details: Privileged Boundary Intact
-
Explanation
The PR changes only the preference allowlist, the privileged browser-session sidebar module, and its tests. It reuses existing
setting_getandsetting_setcommands; it adds no IPC command, Wry handler, custom protocol, or privileged initialization object. Rust authorizessetting_setonly for the main privileged webview and validates the key and value throughzephium_core::preferences::value_allowed; the newsidebar.widthvalidator accepts only canonical decimal widths from 180 through 460. The CSP, devtools configuration, and desktop IPC boundary files are unchanged. No content-page IPC exposure or release devtools change is introduced.
-
Full details: Performance Impact Stated
-
Explanation
The PR changes the sidebar session hot path and startup initialization. The diff adds width persistence in
frame/src/session/sidebar-mode.svelte.tsand adds a second concurrentsettingGetininit(). The description reports functional test and build results, but it does not state the performance impact or provide a performance measurement.Resolution
Update the PR description with the performance impact or a performance measurement. Include startup read overhead and resize persistence write behavior, or provide benchmark/timing results.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
The sidebar restores its mode after a restart but always initializes the expanded width to 240 px. Resize commits never save a width. A person who chooses 350 px therefore loses that width after quitting and relaunching.
Persist the expanded width when a native/fallback drag commits or a keyboard resize changes it, and read it alongside the mode before publishing the initial native layout. The native preference allowlist accepts only canonical whole widths from 180 through 460 px. Missing or invalid saved values retain 240 px.
Hidden mode retains the last expanded width. Cancelled/in-progress drags, stale native revisions and temporary utility-panel widths do not replace it.
Fixes #337.
Validation on Windows:
cargo test -p zephium-core --locked: 469 tests passed, including native preference admission bounds.pnpm -C frame check --maxWorkers 2: static checks and 1,073 unit tests passed (181 files).pnpm -C frame buildand emitted CSS check (144 files) passed.cargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warningsSession and renderer tests mock IPC. A packaged-app quit/relaunch on macOS or Windows has not been exercised. Existing native setting commands and layout admission are reused; no IPC bindings change.
Summary by CodeRabbit