Repository navigation
fix(heybox-up): apply the shortcuts setting to left-rail links - #272
Conversation
The shortcuts preference only hid the duplicated right-rail block while the left-rail favour and article links stayed visible. Apply the same preference to both rails, keep community/search links visible, and add a left-rail hidden rule. Refs: #271
CYoJkoY
left a comment
There was a problem hiding this comment.
Review Report
Scope reviewed: docs/heybox-up.md, scripts/heybox-up/meta.ts, scripts/heybox-up/src/ui/desktop.ts, scripts/heybox-up/src/ui/theme.ts, tests/heybox-up-navigation.test.ts, tests/heybox-up-publishing.test.ts.
Findings
- P0: none.
- P1: none.
- P2: none.
- P3: The live site was not exercised in a logged-in browser session; the release should still receive a manual smoke test. This is an environment limitation, not a code defect.
Correctness
The preference event path is now coherent: setDesktopRailPreference() writes storage and dispatches heybox-up:desktop-rail-preference; the desktop shell listener calls sync(true); syncDesktopQuickLinks() applies the same value to the left-rail favour/article links; syncDesktopHot() continues to apply it to the right-rail block. Community and search links are untouched.
Risk
The change is limited to the desktop rail. The explicit [hidden] rule is required because .rail-link { display: flex; } would otherwise override the user-agent hidden behavior. The regression test covers hide, show, unaffected links, and the CSS contract.
Scores
| Criterion | Score |
|---|---|
| C1 Correctness | 4.90 / 5.00 |
| C2 Scope control | 5.00 / 5.00 |
| C3 Test coverage | 4.90 / 5.00 |
| C4 Compatibility | 5.00 / 5.00 |
| C5 Documentation | 4.90 / 5.00 |
| C6 Maintainability | 4.90 / 5.00 |
| C7 Safety | 5.00 / 5.00 |
| Overall | 4.94 / 5.00 |
Conclusion: PASS. No unresolved P0/P1/P2 findings.
Linked Issue
Closes #271
Change summary
快捷入口(desktopShortcuts) control the left-rail我的收藏/我的文章links as well as the duplicated right-rail block.DesktopLeftRail.quickLinks,syncDesktopQuickLinks(), and call it from the desktop shell sync path so both initial mount and preference events update the left rail.#heybox-up-left-rail .rail-link[hidden] { display: none !important; }because the flex rule otherwise overrides the browser's default hidden handling.热门排行and快捷入口hints: the former is wide-screen right-rail only, the latter covers the left rail and the wide-screen right rail.Verification & Dependencies
pnpm typecheck- passed.pnpm test- 60 files / 926 tests passed.pnpm build -- --target heybox-up- passed; generated header reports@version 0.12.23.pnpm check- typecheck, full test suite, and all builds passed.Review conclusion
PASS - no unresolved P0/P1/P2 findings. The change is scoped to the desktop rail preference path, keeps community/search links unaffected, and has a regression test plus documentation.
Permission Notice
This PR was prepared with repository-owner authorization for the HeyBox Up fix requested in the task. It only modifies HeyBox Up source, tests, metadata, and documentation.