fix(desktop): persist rail grouping across restarts - #3099
Conversation
viewMode was a hard-coded useState('conversation'), so the rail grouping
control reset to time-order on every launch. Hydrate and persist it
through the same localStorage seam as the rail's collapsed flag.
Fixes apache#3060
Generated-by: Grok
|
Warning Review limit reached
Next review available in: 9 minutes Limit details: You’ve used all 3 included reviews currently available under your plan. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Comment |
Click 按项目, wait for the localStorage write, reload the Electron renderer, and assert the control is still project-grouped. Generated-by: Grok
|
Full-chain follow-up is on this branch. Official Electron e2e against the production desktop build:
The new case clicks 按项目, waits for |
Summary
viewMode(按时间 / 按项目) lived inuseState<SessionViewMode>('conversation'), so the rail grouping control reset to 按时间 on every launch. After #3033 the control is permanent sticky chrome, so the silent revert is visible every start.Grouping now uses the same localStorage seam as the rail's collapsed flag (
session-list-layout.ts):readSessionListViewMode()hydrates the shellwriteSessionListViewMode()persists throughuseAppShellPersistenceEffectsconversationFixes #3060
Verification
npx biome checkon the four changed files — cleannpx tsc -p tsconfig.renderer.json --noEmit— cleannpm --workspace @maka/desktop test— 860/860, including the new persist/hydrate casesreadSessionListViewMode/writeSessionListViewModebefore the production helpers existedNot run: desktop e2e / Electron window. The official desktop unit suite covers the persist/hydrate contract.
AI use
Select exactly one:
Tool(s) and scope:
Grok authored the implementation, tests, and this PR description.
Checklist
Does this PR entail a change in behavior?