Repository navigation
test(ui): share sidebar drag data fixture - #143901
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
f33b5fe to
4ae5a80
Compare
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 5:59 AM ET / 09:59 UTC. ClawSweeper reviewWhat this changesShares one synthetic drag-data factory across three sidebar test suites without changing their events or assertions. Merge readiness✅ Ready for maintainer review The cleanup remains useful: current main still contains the duplicated factories, and the extraction preserves their behavior and callers. No actionable defect was found; this maintainer-authored PR also carries a protected label. Priority: P3 Review scores
Verification
How this fits togetherControl UI sidebar tests simulate dragging sessions, groups, and navigation entries. The shared fixture supplies event data to the existing sidebar component tests, which check ordering and mutation outcomes. flowchart LR
A[Sidebar test cases] --> B[Shared drag-data factory]
B --> C[Fresh data object per call]
C --> D[Suite-specific drag events]
D --> E[Sidebar component]
E --> F[Ordering and mutation assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -24. Total -24 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one stateless test factory while preserving fresh drag data and each suite's distinct event geometry. Do we have a high-confidence way to reproduce the issue? Not applicable: this removes duplicated test setup rather than repairing a reported runtime defect; the duplication is directly visible on current main. Is this the best way to solve the issue? Yes: extracting the identical factory preserves allocation isolation and avoids combining event dispatchers whose coordinate behavior differs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 20fb81f2489d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Three sidebar test suites duplicated the same synthetic drag-data factory. Separate copies add maintenance work without protecting different behavior.
Why This Change Was Made
Put the unchanged factory in a focused 12-line test helper and import it from the three suites. The existing sidebar harness remains unchanged. The same 13 factory calls still allocate fresh objects and Maps; the distinct event dispatchers and their coordinate behavior remain unchanged.
User Impact
No production behavior or public API change. The four test-support files add 15 lines and remove 39, for a net reduction of 24 lines. The existing file-size limit remains intact.
Evidence
The original baseline and revised candidate each passed all 352 cases through the same full sidebar entry, with identical identities, order and outcomes. The directly affected suites retain all 38 definitions and 105 assertion sites.
All 19 selected local changed checks passed, including core and UI types, i18n, formatting, lint, styles, and structural guards. Independent Codex review found no actionable issues through P2. The focused module keeps the existing sidebar harness within its unchanged file-size limit.
This is a synthetic drag-data fixture, not native DataTransfer or browser-conformance proof.
The first hosted run failed on an unchanged desktop panel that exceeded the line limit after two upstream changes combined. This branch now includes the canonical repair from #143889; the complete sidebar patch and all four tested file contents are unchanged. Fresh CI on the refreshed head is required before landing.