fix(flaky): machine-timeline 'View all' strict mode violation#1587
Draft
timothyfroehlich wants to merge 1 commit into
Draft
fix(flaky): machine-timeline 'View all' strict mode violation#1587timothyfroehlich wants to merge 1 commit into
timothyfroehlich wants to merge 1 commit into
Conversation
The `getByRole("link", { name: /view all/i })` call in the overview
Recent activity test resolved to more than one element when the machine
details page contained a second "View all" link (e.g. after the
feat/machine-info-tab restructure added extra links on the same page).
Playwright strict mode throws on multi-element matches, causing a
consistent failure that looked intermittent across branches.
Fix: scope the locator to `getByRole("region", { name: /recent activity/i })`
so it only matches the link inside the Recent Activity section. The
<section aria-labelledby="recent-activity-heading"> element has the
implicit ARIA role "region", making this a zero-markup-change fix.
Root cause class: brittle selector (not scoped to its container).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018JNchvk5N4rBnsR9CNMybE
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"View all"link locator ine2e/full/machine-timeline.spec.tsto the<section aria-labelledby="recent-activity-heading">region, preventing Playwright strict mode violations when the machine details page contains more than one"View all"link.Root-cause analysis
Flaky test audit — 2026-06-28 (7-day window: 2026-06-21 to 2026-06-28)
Methodology
Findings
No truly flaky tests found in the 7-day window. Every failing SHA appeared in exactly one run — no SHA had both a passing and a failing run. All 6 failing runs fell into two categories:
feat/machine-info-tabbranch restructured the machine details page, breaking selectors written before the Info tab existedLatent quality issue (this PR)
The closest issue to "flaky" was a strict mode violation in the overview Recent-activity test:
The
feat/machine-info-tabwork added a second"View all"link elsewhere on the machine details page, making the existing locator non-unique. While it failed consistently (3/3 retries) rather than intermittently, the root cause — an unscoped breadth-first link match — will cause unpredictable failures any time the page gains another"View all"link.Fix
The
MachineRecentActivitycomponent renders:A
<section>witharia-labelledbygets the implicit ARIA roleregion. Scoping the locator:Zero markup changes required — the
<section aria-labelledby>pattern was already there.Infrastructure note
Supabase CLI setup failed in ~10% of runs (3/30). These are transient GHA network issues, not code problems. No action needed beyond awareness.
🤖 Generated with Claude Code
https://claude.ai/code/session_018JNchvk5N4rBnsR9CNMybE
Generated by Claude Code