Skip to content

test(e2e): retarget the canary and capture specs from the retired Dashboard tiles to the ruled rows - #890

Merged
mforce merged 3 commits into
mainfrom
fix/canary-dashboard-handles
Sep 16, 2026
Merged

mforce merged 3 commits into
mainfrom
fix/canary-dashboard-handles

Conversation

@mforce

@mforce mforce commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

The dispatch-only canary (specs-canary/canary.spec.ts) and the two capture specs (specs-screenshots/palettes.spec.ts, screenshots.spec.ts) still waited for .capture-grid / .capture-tile, which #883 retired when the Dashboard became the ruled list. Only the quick smoke suite runs on pull requests, so nothing caught it until the full e2e run on the release branch: https://github.com/mforce/cluckwork/actions/runs/35136083182/job/104928693885.

They now key on the page heading and the role="group" rows (one per flock), the same handles owner.spec.ts moved to in #883.

Verified

Against the sim stack rebuilt at this head: the canary's "dashboard stays correct and is measured" passes (it was the failing test), and the palettes capture's dashboard step passes. tsc --noEmit clean in tools/simulation/ui. No app code changes.

Refs #829.

Summary by CodeRabbit

  • Tests
    • Updated dashboard readiness checks to use accessible headings and group roles, matching the current interface structure.
    • Updated palette and dashboard screenshot tests to verify visible grouped content through role-based selectors.
    • Improved test alignment with the current dashboard markup without changing screenshot coverage or application behavior.

…hboard tiles to the ruled rows

#883 replaced the Dashboard's .capture-grid and .capture-tile markup
with one role="group" row per flock, but only the quick smoke suite
runs on pull requests, so the dispatch-only canary and the two capture
specs kept waiting for a class that no longer renders (workflow run
35136083182). They now key on the page heading and the group rows.
@mforce

mforce commented Sep 16, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 6b50bcf7-19b3-4a17-a7bf-addf0eded76e

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 0aa62b39-a3d6-4a87-ad19-b55ddec1be38

📥 Commits

Reviewing files that changed from the base of the PR and between b66f8b8 and a5bcc4c.

📒 Files selected for processing (3)
  • tools/simulation/ui/specs-canary/canary.spec.ts
  • tools/simulation/ui/specs-screenshots/palettes.spec.ts
  • tools/simulation/ui/specs-screenshots/screenshots.spec.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Dashboard locator alignment

Layer / File(s) Summary
Update dashboard test locators
tools/simulation/ui/specs-canary/canary.spec.ts, tools/simulation/ui/specs-screenshots/*.spec.ts
Dashboard readiness checks now use the translated heading and group roles. Screenshot tests use the first group role instead of .capture-tile. Comments describe the current flock-based layout.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to a5bcc

The test-only locator updates match the current dashboard structure and present no material merge risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: retargeting end-to-end canary and capture tests from retired Dashboard tile selectors to ruled-list rows.
Description check ✅ Passed The description explains what changed, why the retired selectors failed, how the tests were verified, and references the related issue. It does not include the template checklist, but the required cha…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/canary-dashboard-handles

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…ix the README capture's stale one

A harness locator whose class the app no longer renders fails only on
the dispatch-only runs, weeks after the deletion (#883, run
35136083182). styles.harness-selectors.test.ts walks every locator()
string under tools/simulation/ui and fails the unit suite when a class
is neither a styles.css rule (comments stripped) nor a className token
in the SPA source. Red first on main's .capture-grid/.capture-tile, and
it found a second live one: the README capture's .dash-list, retired by
#883 too, now the role-named sales list. AGENTS.md's call-site rule
says to grep the whole repo before deleting a class.
@mforce

mforce commented Sep 16, 2026

Copy link
Copy Markdown
Owner Author

Second commit, 9b41bfd, on the owner's question "how did we miss this?":

  • Guard. web/src/styles.harness-selectors.test.ts walks every locator("...") string under tools/simulation/ui and fails the unit suite when a .class in it is neither a styles.css rule (comments stripped) nor a className token in the SPA source. Red first against main's canary spec (.capture-grid, .capture-tile), green here. It runs on every pull request, so a deletion and its stale selector now meet on the same PR instead of weeks later on a dispatch run.
  • Second live find. With comments stripped, the guard flagged .dash-list li in the README capture spec, retired by feat(web): convert the Dashboard and app shell to MUI (#829) #883 as well (styles.css only mentions it in a comment). Now the role-named sales list; the README capture's dashboard step passes against the stack at this head.
  • AGENTS.md. The call-site rule now says to grep the whole repo before deleting a class, harness and docs included, and names the guard.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

@mforce I will review commit 9b41bfd, including the selector guard, the README capture update, and AGENTS.md.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…rness-selector guard

Codex review of #890: an unscoped getByRole("group") also matched the
DayStrip, so the canary and the captures could pass with no flock rows;
the guard read only locator() literals and only plain className strings,
and its comment stripper could not see quotes. The rows are now scoped
to the section headed by the Today title; the guard also reads
querySelector, querySelectorAll, $ and $$ literals, every quoted string
inside a className expression, skips MUI's own classes, and pins that
styles.css carries no quoted comment opener.
@mforce

mforce commented Sep 16, 2026

Copy link
Copy Markdown
Owner Author

Review round on 9b41bfd (CodeRabbit rate limited; Codex review as a Paseo agent stood in): four findings, all against this PR's own scaffolding, all fixed in 74c00d0.

  1. An unscoped getByRole("group") also matched the DayStrip, so the canary and both captures could pass with zero flock rows. The rows are now scoped to the section headed by the Today title, in all three specs.
  2. The guard read only locator() literals; it now also reads querySelector, querySelectorAll, $ and $$ literals (a mutant querySelector(".capture-tile") goes red), and states that variable-built selectors are outside its scope.
  3. The guard read only plain className strings; it now takes every quoted string inside a className={...} expression (ternaries, clsx, templates), and skips MUI's own .Mui* classes.
  4. The comment stripper could not see quotes; the guard now pins that styles.css carries no quoted /*, so a future one fails loudly instead of eating rules.

Zero product defects this round; loop stopped here (rule 7). The canary's dashboard test, the README capture's dashboard step and the eight palette captures pass against the stack at this head.

@mforce
mforce merged commit 3c835e8 into main Sep 16, 2026
17 of 18 checks passed
@mforce
mforce deleted the fix/canary-dashboard-handles branch September 16, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant