Skip to content

test(ui): share sidebar drag data fixture - #143901

Merged
steipete merged 1 commit into
mainfrom
codex/test-sidebar-drag-fixture
Sep 10, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-sidebar-drag-fixture

Conversation

@steipete

@steipete steipete commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor
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.

@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 10, 2026 09:16
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 10, 2026
@steipete
steipete force-pushed the codex/test-sidebar-drag-fixture branch from f33b5fe to 4ae5a80 Compare September 10, 2026 09:54
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 5:59 AM ET / 09:59 UTC.

ClawSweeper review

What this changes

Shares 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
Reviewed head: 4ae5a8026341d177caa501d453e1f176bd32cae7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with useful reported validation and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR changes only synthetic test support; reported before/after sidebar-suite results cover that purpose, and no production or native-browser behavior claim requires live proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR changes only synthetic test support; reported before/after sidebar-suite results cover that purpose, and no production or native-browser behavior claim requires live proof.
Evidence reviewed 6 items Behavior-preserving extraction: The complete introduced diff replaces three identical local factories with imports. The shared function retains its per-call Map, live types getter, data accessors, and effect defaults; event dispatchers and assertions are unchanged.
Current-main necessity: Fetched main retains all three local factory definitions and the same 13 calls. The latest supplied release has no shared drag-data helper at the proposed path; there is no established merged replacement for this cleanup.
Existing test entrypoint preserved: The jsdom sidebar entry imports all three affected suites. Their full contents and the sidebar mounting harness were inspected; the extraction adds no test registration, global state, or production import.
Findings None None.
Security None None.

How this fits together

Control 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -24. Total -24 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 15 39 -24
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 15 39 -24

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a low-risk test-fixture cleanup with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR changes only synthetic test support; reported before/after sidebar-suite results cover that purpose, and no production or native-browser behavior claim requires live proof.

Label justifications:

  • P3: This is a low-risk test-fixture cleanup with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR changes only synthetic test support; reported before/after sidebar-suite results cover that purpose, and no production or native-browser behavior claim requires live proof.

Evidence

What I checked:

  • Behavior-preserving extraction: The complete introduced diff replaces three identical local factories with imports. The shared function retains its per-call Map, live types getter, data accessors, and effect defaults; event dispatchers and assertions are unchanged. (ui/src/test-helpers/drag-data.ts:1, 4ae5a8026341)
  • Current-main necessity: Fetched main retains all three local factory definitions and the same 13 calls. The latest supplied release has no shared drag-data helper at the proposed path; there is no established merged replacement for this cleanup. (ui/src/test-helpers/app-sidebar-cases/section-reordering.ts:14, 20fb81f2489d)
  • Existing test entrypoint preserved: The jsdom sidebar entry imports all three affected suites. Their full contents and the sidebar mounting harness were inspected; the extraction adds no test registration, global state, or production import. (ui/src/components/app-sidebar.test.ts:24, 4ae5a8026341)
  • Reported validation and review limits: The captured PR body reports matching 352-case baseline/candidate results and 19 selected checks, explicitly identifying the fixture as synthetic rather than native browser proof. This review ran no tests under the read-only contract; git diff --check passed and the checkout remained clean. (4ae5a8026341)
  • Related repair is distinct: The supplied GitHub context verifies fix: restore desktop checks after concurrent UI fixes #143889 as merged. It repairs desktop-panel checks and forms this branch's merge base; it does not implement the sidebar fixture extraction. (7b6287b2db9b)
  • Area-history routing: Current-main follow-history for the section-reordering suite includes Peter Steinberger's earlier sidebar interaction and refactoring work. Deeper blame/search inspection encountered an unavailable historical object, so no source-line introduction attribution is asserted. (ui/src/test-helpers/app-sidebar-cases/section-reordering.ts, 4b49d9e670be)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete steipete self-assigned this Sep 10, 2026
@steipete
steipete merged commit 25ae005 into main Sep 10, 2026
134 of 136 checks passed
@steipete
steipete deleted the codex/test-sidebar-drag-fixture branch September 10, 2026 10:18
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant