test(ui): read the Admin Help bar only after its rows have loaded

Merged
BI
1mo ago
+6-0

User description

Requested by Josh ยท project thread

Summary

Before: ui-on-call-boards.spec.ts:558 "declares no anchor the page does not render" failed on both iPhone WebKit projects in release-browser-matrix run 38236585559: "Support is offered but absent", #admin-help-support count 0. While Admin Help loads, every section including Support is drawn as a skeleton; once rows arrive, Support drops out when it has no rows (admin-help-page.tsx, audit 11 Oct). The test read the section bar's words during loading, then looked for anchors on the settled page.

After: the test waits until no admin-help-*-loading skeleton remains before reading the bar, so it checks the bar and the anchors of the same settled page. The assertion itself is unchanged; no test skipped, disabled or quarantined.

Inferred, not proven: the race explains why only the slower iPhone emulation hit it. WebKit is not installed in this container, so proof needs a matrix run once #3487 (the WebKit launch fix) is on main.

Areas touched: Delivery and assurance

Verification

  • prettier clean; pre-commit hooks passed.
  • Not yet proven on WebKit (see above).

Risk and rollout

  • Risk: low, test only.
  • Rollback: revert this PR.
  • Provider or production effects: None.

๐Ÿค– Generated with Claude Code

https://claude.ai/code/session_01DCghuougzFFXRF3dQQEcYr


Generated by Claude Code


Summary by cubic

Two test reliability fixes: the Admin Help anchor test now reads the section bar only after its rows load, and the SQL stripper ReDoS guard now warms up once and checks every measured run against its speed ceiling.

  • Waits for admin-help-*-loading skeletons to disappear before reading the bar, so the test checks the bar and anchors on the same settled page. Previously a slower engine could read "Support" from the skeleton and then fail to find #admin-help-support after rows loaded.
  • Runs the stripper once to warm up, then requires all five timed runs to stay below the 100 ms limit. Checking every run catches regressions that a fastest-run statistic could hide; a single cold run under coverage on a busy runner no longer trips the limit on its own (observed at ~102 and ~104 ms on two unrelated PRs).

CodeAnt-AI Description

Wait for Admin Help to finish loading before checking its section links

What Changed

  • The anchor check now waits for Admin Help loading placeholders to disappear before comparing section labels with their links
  • This prevents the test from checking a Support link that is removed once loading finishes

Impact

โœ… Fewer false Admin Help anchor test failures
โœ… More reliable WebKit checks after content loads

๐Ÿ’ก Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.


Summary by Gitar

  • Test stability:
    • Timed stripMigrationSql in the challenger SQL stress test as the fastest of five runs to avoid cold-run slowdowns under coverage

This will update automatically on new commits.