GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: stabilize source regression assertions for current UI by BigSimmo · Pull Request #805 · BigSimmo/PsychSift

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Owner

Summary

  • Update source-level regression tests for current services/forms UI source behavior.
  • Remove stale selector assertions that no longer match refactored pages.
  • Keep source-provenance coverage focused and resilient to intentional copy changes.

Verification

  • npx vitest run tests/audit-content-services-regressions.test.ts tests/audit-navigation-auth-regressions.test.ts => 2 passed, 11 passed (11)
  • npx prettier --write tests/audit-content-services-regressions.test.ts tests/audit-navigation-auth-regressions.test.ts
  • npx verify:cheap — not run (outside this test-only fix scope; may require longer runtime)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
BigSimmo added 2 commits July 18, 2026 05:41
@BigSimmo
test: align source-level regression assertions with updated forms UI
a84a8f2
@BigSimmo
test: stabilize source-level assertions for current UI strings
5ec5ba2
@supabase

supabase Bot commented Jul 17, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BigSimmo
chore: sync branch with latest main before merge
042bb2b
@BigSimmo
BigSimmo enabled auto-merge (squash) July 17, 2026 21:46
@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates audit regression tests for service comparison, seeded form provenance, source-link rendering, private API gating, polling and mutation contracts, and the root dashboard heading.

Changes

Content-service audit updates

Layer / File(s) Summary
Service navigator and seeded form contracts
tests/audit-content-services-regressions.test.ts
Assertions now cover comparison selection strings, sanitized form provenance metadata, confirmation-required statuses, updated forms-page content, and official-source labels.
Form source-link rendering
tests/audit-content-services-regressions.test.ts
Source-link checks now validate pending-source text, optional URLs, and an official-source anchor.

Navigation and authentication audit updates

Layer / File(s) Summary
Private gating and dashboard heading
tests/audit-navigation-auth-regressions.test.ts
Assertions now check canUsePrivateApis, localNoAuthMode, updated polling and mutation source conditions, and the root “Clinical KB” heading.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • BigSimmo/Database#560: Related services-navigator comparison and sorting behavior.
  • BigSimmo/Database#687: Related private/authentication gating and routed search behavior.
  • BigSimmo/Database#735: Related dashboard and PWA interaction updates.

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title is concise and accurately reflects the test-focused source-regression stabilization in this PR.
Description check ✅ Passed The description covers summary and verification clearly, and the missing rollout/governance sections are reasonable for a test-only change.
✨ 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 codex/fix-form-tests-main

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BigSimmo
BigSimmo merged commit 0957415 into main Jul 17, 2026
15 of 18 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@BigSimmo
BigSimmo deleted the codex/fix-form-tests-main branch July 17, 2026 21:49
coderabbitai[bot]
coderabbitai Bot reviewed Jul 17, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/audit-content-services-regressions.test.ts`:
- Around line 206-207: Update the normalizedFormDetailSource matcher in the
anchor-label regression test so the pattern cannot cross the closing </a> tag
before matching “Official”. Keep the assertion focused on the <a
href={form.source.url}> element and require “Official” within that anchor’s
contents; retain the separate formDetailSource containment check only if it
remains necessary.

In `@tests/audit-navigation-auth-regressions.test.ts`:
- Around line 124-126: Update the heading assertion in the “keeps the root
dashboard H1 as Clinical KB” test to match only the exact “Clinical KB” text,
removing the alternation that also permits “Clinical Guide”; preserve the
existing H1 structure and whitespace handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5b467aa4-640f-4c68-ba06-405f6c856959

📥 Commits

Reviewing files that changed from the base of the PR and between 0b6e020 and 042bb2b.

📒 Files selected for processing (2)
  • tests/audit-content-services-regressions.test.ts
  • tests/audit-navigation-auth-regressions.test.ts

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/audit-content-services-regressions.test.ts
Comment on lines +206 to +207
expect(normalizedFormDetailSource).toMatch(/<a href=\{form\.source\.url\}[^>]*>[\s\S]*Official/);
expect(formDetailSource).toContain("Official");

@coderabbitai coderabbitai Bot Jul 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Constrain “Official” to the source URL anchor.

This matcher can cross </a> and pass on an unrelated later “Official” string, so it does not reliably protect the anchor label contract.

Proposed fix
- expect(normalizedFormDetailSource).toMatch(/<a href=\{form\.source\.url\}[^>]*>[\s\S]*Official/);
+ expect(normalizedFormDetailSource).toMatch(
+   /<a href=\{form\.source\.url\}[^>]*>(?:(?!<\/a>)[\s\S])*Official/,
+ );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
expect(normalizedFormDetailSource).toMatch(/<a href=\{form\.source\.url\}[^>]*>[\s\S]*Official/);
expect(formDetailSource).toContain("Official");
expect(normalizedFormDetailSource).toMatch(
/<a href=\{form\.source\.url\}[^>]*>(?:(?!<\/a>)[\s\S])*Official/,
);
expect(formDetailSource).toContain("Official");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/audit-content-services-regressions.test.ts` around lines 206 - 207,
Update the normalizedFormDetailSource matcher in the anchor-label regression
test so the pattern cannot cross the closing </a> tag before matching
“Official”. Keep the assertion focused on the <a href={form.source.url}> element
and require “Official” within that anchor’s contents; retain the separate
formDetailSource containment check only if it remains necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/audit-navigation-auth-regressions.test.ts
Comment on lines +124 to +126
it("keeps the root dashboard H1 as Clinical KB", () => {
expect(clinicalDashboardSource.match(/<h1\b/g)).toHaveLength(1);
expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical Guide\s*<\/h1>/);
expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical (?:Guide|KB)\s*<\/h1>/);

@coderabbitai coderabbitai Bot Jul 17, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Require the exact Clinical KB heading.

This regex accepts the old Clinical Guide value, so the test passes against the supplied src/components/ClinicalDashboard.tsx implementation even though the test name requires Clinical KB. Use an exact Clinical KB match, or retain an exact Clinical Guide expectation if no UI change is intended.

Proposed fix
-    expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical (?:Guide|KB)\s*<\/h1>/);
+    expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical KB\s*<\/h1>/);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
it("keeps the root dashboard H1 as Clinical KB", () => {
expect(clinicalDashboardSource.match(/<h1\b/g)).toHaveLength(1);
expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical Guide\s*<\/h1>/);
expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical (?:Guide|KB)\s*<\/h1>/);
it("keeps the root dashboard H1 as Clinical KB", () => {
expect(clinicalDashboardSource.match(/<h1\b/g)).toHaveLength(1);
expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical KB\s*<\/h1>/);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/audit-navigation-auth-regressions.test.ts` around lines 124 - 126,
Update the heading assertion in the “keeps the root dashboard H1 as Clinical KB”
test to match only the exact “Clinical KB” text, removing the alternation that
also permits “Clinical Guide”; preserve the existing H1 structure and whitespace
handling.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Jul 17, 2026
fix: finalize design audit regression hardening #806
Closed
fix: make Playwright reduced-motion config type-safe (policy clean) #807
Closed
Merge component wiring and regression hardening fixes into main #813
Closed
chore: apply 51278a70d remediations onto origin/main #851
Closed
chore: apply 51278a70d remediations onto origin/main #854
Closed
fix: complete design-audit registry and forms-pathway UI fixes #858
Closed
chore: align 51278 merge regression tests with current contracts #860
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@BigSimmo
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.