Skip to content

fix(ui): smooth scrolling and preserve differential results#707

Merged
BigSimmo merged 9 commits into
mainfrom
codex/scrolling-cleanup-20260717
Jul 17, 2026
Merged

fix(ui): smooth scrolling and preserve differential results#707
BigSimmo merged 9 commits into
mainfrom
codex/scrolling-cleanup-20260717

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • coalesce desktop action-popup placement updates to one animation frame and use passive scroll listeners
  • keep submitted differential results visible when indexed document matches are empty
  • harden affected popup and mode-menu browser helpers against hydration timing races

Verification

  • npm run verify:pr-local — local aggregate wrapper was disrupted by concurrent-worktree resource contention; scoped stages and production build passed separately
  • Scoped Prettier and ESLint for all changed source/test files
  • Scroll-focused Chromium coverage: 28/28
  • Final affected Chromium coverage on latest synced base: 5/5
  • Production build passed before the final upstream-only sync
  • npm run verify:ui — full run reached 181/184; all three failures were isolated, hardened, and then passed repeatedly; hosted UI remains the exact-head gate
  • npm run verify:release — not run because it includes provider-backed gates outside this UI change

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact is unchanged; this is interaction-state and scrolling behavior only

Notes

  • No OpenAI, Supabase, production-data, or live clinical provider workflow was run.
  • Hosted required CI and review threads must be green before merge.

Summary by CodeRabbit

  • Bug Fixes

    • Improved desktop action-popup positioning during scrolling for smoother performance.
    • Differential searches with no matching documents now remain visible instead of returning to the home state.
    • Strengthened popup and navigation behavior during page loading.
  • Tests

    • Added regression coverage for scroll-related layout performance.
    • Updated mobile differential search coverage for empty results and asynchronous response handling.
  • Documentation

    • Recorded review outcomes, validation results, and merge-gate requirements.

@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 ↗︎.

@github-actions

Copy link
Copy Markdown

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • UI regressionpossible known flake: UI/Playwright job; check tests/flake-ledger.json (tests/ui-smoke.spec.ts, tests/ui-smoke.spec.ts, tests/ui-tools.spec.ts, tests/ui-tools.spec.ts) and re-run before bisecting.
  • PR requiredpossible known flake: UI/Playwright job; check tests/flake-ledger.json (tests/ui-smoke.spec.ts, tests/ui-smoke.spec.ts, tests/ui-tools.spec.ts, tests/ui-tools.spec.ts) and re-run before bisecting.

Heuristic only — a main-side or flake label is a starting point, not a verdict.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Popup placement updates are coalesced per animation frame, differential-search submission state is propagated, and browser regression tests cover repeated scrolling and zero-match search responses.

Changes

Scrolling and differential behavior

Layer / File(s) Summary
Coalesced popup placement updates
src/components/clinical-dashboard/mode-action-popup.tsx, tests/ui-smoke.spec.ts
Popup resize and scroll handling now schedules at most one placement update per animation frame with passive listeners and cancellable cleanup. A desktop regression test verifies repeated scrolling performs no more than one layout read.
Submitted differential-search fallback
src/components/differentials/differentials-home-page.tsx, tests/ui-tools.spec.ts
searchSubmitted is passed to DifferentialsHome; the mobile regression test waits for a zero-match, weak-relevance search response before validating the compare action.
Regression review record
docs/branch-review-ledger.md
The ledger records the fixes, scoped checks, build results, and hosted CI merge-gate requirement.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main UI scrolling and differential-result behavior changes.
Description check ✅ Passed The description follows the template with Summary, Verification, Clinical Governance Preflight, and Notes sections filled in.
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.
✨ 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/scrolling-cleanup-20260717

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

BigSimmo added 2 commits July 17, 2026 16:51
…up-20260717

# Conflicts:
#	tests/ui-smoke.spec.ts
…up-20260717

# Conflicts:
#	tests/ui-smoke.spec.ts
#	tests/ui-stress.spec.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/ui-smoke.spec.ts (1)

1344-1344: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Require exactly one placement read.

Allowing zero reads means this test still passes if the scroll listener stops scheduling placement entirely. The twenty same-frame events should produce exactly one read.

Proposed fix
-    expect(placementReads).toBeLessThanOrEqual(1);
+    expect(placementReads).toBe(1);
🤖 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/ui-smoke.spec.ts` at line 1344, Update the placement read assertion in
the scroll-listener test to require exactly one read from the twenty same-frame
events, replacing the less-than-or-equal check with an exact equality assertion.
🤖 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.

Outside diff comments:
In `@tests/ui-smoke.spec.ts`:
- Line 1344: Update the placement read assertion in the scroll-listener test to
require exactly one read from the twenty same-frame events, replacing the
less-than-or-equal check with an exact equality assertion.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 73ce138f-9db8-43d0-a352-6b258efc2882

📥 Commits

Reviewing files that changed from the base of the PR and between 67aaf33 and 39e92c4.

📒 Files selected for processing (3)
  • docs/branch-review-ledger.md
  • tests/ui-smoke.spec.ts
  • tests/ui-tools.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/branch-review-ledger.md
  • tests/ui-tools.spec.ts

@BigSimmo
BigSimmo merged commit 2d1fd1b into main Jul 17, 2026
16 checks passed
@BigSimmo
BigSimmo deleted the codex/scrolling-cleanup-20260717 branch July 18, 2026 18:26
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