Uh oh!
There was an error while loading. Please reload this page.
fix(desktop): indent project session rows - #3175
Conversation
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan includes up to 3 reviews per rolling hour; 2 remain after this review. 📝 WalkthroughWhat this PR solvesProject session rows in the desktop sidebar lost their normal nesting indentation because the child container applied Source of truthThe PR extends the existing sidebar CSS behavior. It does not create a parallel rendering path or public API. The contract test reads Solution scope and complexityThe change is the smallest coherent solution:
The added tests are necessary to prevent both stylesheet regressions and visible layout regressions. No added implementation complexity appears unnecessary. Simplification opportunitiesNo code or test can be removed without weakening either the CSS contract or the user-visible geometry coverage. The test setup could only be simplified if another existing test already provided equivalent coverage for both the rule and rendered spacing. Risks and validationThe change affects desktop sidebar layout. Session rows now appear 24px farther from the project row. Incorrect CSS specificity could still prevent the intended rule from applying. The PR adds:
The final status of required checks is unverified from the available evidence. Review-relevant risksThe current diff has a user-visible desktop layout effect. Material changes in user-visible behavior require independent human review under repository policy. No public contract, security, licensing, release, or governance effect was identified in the current diff. The person performing the merge must review the final diff. A maintainer makes the final determination. WalkthroughProject child session rows now render with a 24px nesting offset. Contract and end-to-end tests verify the stylesheet rule and horizontal separation. ChangesSidebar hierarchy
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk:⚪ Minimal · up to This PR restores project/session indentation and adds targeted regression coverage; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
PR Summary by QodoFix desktop sidebar: indent project session rows (restore spacing-6)
AI Description
Diagram
High-Level Assessment
Files changed (4) |
Code Review by Qodo
1. Geometry assertion races visibility |
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
e1906de to
2478d5aCompareThanks — the fix is correct and minimal: the old Conclusion: PASS — all P3, nothing blocking. P3-1 — the contract test pins the mechanism, not the visual result: if someone later deletes this now-redundant override (pixel-identical), the regex match fails and P3-2 — the unit test's candidate-path fallback has a dead branch: in the desktop build P3-3 — the e2e threshold AI-assisted review disclosure: this review was produced with AI assistance (pi review subagent on 中文摘要(AI 辅助审查)结论:PASS,全 P3。问题真实(main 上 padding-inline-start: 0 !important 偏离设计系统,Astryx 默认 childrenInner 本就是 --spacing-6/24px),改动最小(唯一行为变更是一个 CSS 值 0→var(--spacing-6),其余是注释校正与测试)。!important 必要性判断准确(Astryx Stylex 类经 :not(##)×3 特异性达 (3,1,0),Maka (0,2,2) 不加 !important 会输);子组合器链只落到 childrenInner 不误伤更深嵌套。单测 + e2e 都在 CI 真实执行且全绿。P3-1:契约测试钉的是实现机制而非视觉结果——将来删掉这条像素零变化的多余 override 会被测试拦下;反向若 Astryx 改了自己的嵌套步进,!important 会让 Maka 静默停在 24px 且测试全绿,契约与设计系统悄悄脱节(建议改用 computed-style 断言)。P3-2:单测路径回退有死分支(desktop 构建里 dist/renderer/styles/sidebar.css 不存在,dist 运行态必落第二个 candidate 读源码)。P3-3:e2e 阈值 20 是魔法数,未指向 --spacing-6(24px) 容差;PR 描述称 Electron sidebar test 实为 Playwright spec。附注:时间排序贴左缘 vs 项目排序 24px inset 是明示取舍,属产品判断。 |
Summary
Restore the standard
spacing-6(24px) SideNav nesting step for sessions rendered under a project. The CSS contract test pins the hierarchy, and the Electron test verifies the visible indentation after waiting for both measured controls to become visible.Verification
npx biome check apps/desktop/src/renderer/styles/sidebar.css packages/ui/src/session-history-list.tsx apps/desktop/src/main/__tests__/session-project-hierarchy-contract.test.ts apps/desktop/e2e/sidebar-project-row.spec.ts— passednode --test apps/desktop/src/main/__tests__/session-project-hierarchy-contract.test.ts— 1 passednpx playwright test --config e2e/playwright.config.ts e2e/sidebar-project-row.spec.ts— 3 passedReview focus
The implementation restores the existing design-system spacing token rather than introducing a new value. The geometry assertion waits for the project and first-session controls to be visible before reading
boundingBox(), addressing the review reliability concern.AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex audited the sidebar hierarchy, implemented and tested the CSS/E2E fix, incorporated review feedback, and drafted this description. The human contributor reviewed the work, chose to submit it, and remains responsible for its accuracy, provenance, and licensing.
Checklist
Does this PR entail a change in behavior?