Repository navigation
test(sidebar): golden for accented, mixed-case and numbered names - #29966
Conversation
…ames Records the post-#29946 text order for workspace rows (Name, Recent and project-name sort), project group names and folder workspace names, ungrouped and grouped by project, so a future ordering change shows up as a golden diff.
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
🧹 Nitpick comments: 1
src/renderer/src/components/sidebar/sidebar-list-goldens.test.tsx: 1
313-313: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMake one grouped fixture distinguish
projectOrderBy.
projectOrderBychanges the order of repository sections inside a project group. The name-order fixture has only one repository in each project group, somanualandrecentmust produce identical grouped output. Add a second repository to one group with different manual order and recent activity, then update the golden. Keep project-grouptabOrderunchanged because project-group headers intentionally do not depend onprojectOrderBy.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
58982aa3-238a-409c-b3dd-4da5cac42fb4
📒 Files selected for processing: 3
src/renderer/src/components/sidebar/__goldens__/sidebar-list/scenario-name-order.txtsrc/renderer/src/components/sidebar/sidebar-list-golden-name-order.test-fixture.tssrc/renderer/src/components/sidebar/sidebar-list-goldens.test.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
ELI5
The sidebar list has saved "golden" snapshots that fail when the list order changes. None of the saved snapshots used names with accents, capital letters or numbers, so the recent change to how the sidebar sorts names (#29946) did not show up in them. This adds one snapshot that does.
What Changed
Test-only. No production code changes and no change users can see.
sidebar-list-golden-name-order.test-fixture.ts: three projects ("Éclair", "ångström", and an SSH project "eclair"), workspaces namedéclair,Eclair,eclair,éclairwritten with a separate accent mark,zebra,w2,W2,w10,ångström,angstrom, the same workspace id on two hosts, and the same labels on a local and an SSH project. Project groups and folder workspaces use the same kinds of names, all with equal manual order so only the name decides.scenario-name-order.txt, captured for no grouping and grouping by project, across Name, Recent and project-name sort, and both project orders (identical captures are folded into "same as" pointers).Recorded order (Name sort):
angstrom,angstrom(same id, second host),ångström,Eclair,eclair(SSH),eclair,éclair(separate accent),éclair,W2,w2(SSH),w2,w10,zebra. Recent sort puts the two recently active rows (w10,zebra) first, then the rest by name. Project groups:angstrom,ångström,eclair,Éclair,zebra. Folders:Eclair,éclair,W2,w2,w2,w10,zebra, with the twow2folders ordered by id. This matches the comparator: case and accents only break exact ties, digit runs compare by value, and full ties fall back to the host-qualified id.Why
The existing goldens are the reference for any change to the sidebar list pipeline. Without these names in them, a sorting change can pass every golden. One extra scenario in the existing harness covers this without adding a parallel test setup.
Linked Issue
Follow-up to #29946.
Visual Proof
N/A. Test-only change; nothing on screen changes.
Testing
pnpm tc,pnpm test src/renderer/src/components/sidebar/sidebar-list-goldens.test.tsx src/shared/sidebar-list/text-order.test.ts,pnpm run check:code-quality:changed,pnpm formatall pass. The golden was reviewed by hand against the rules above.AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)