Skip to content

Cover the Show changes highlight gates in source CI - #49

Merged
grawish merged 1 commit into
mainfrom
fix/pdf-highlight-gate-tests
Oct 15, 2026
Merged

grawish merged 1 commit into
mainfrom
fix/pdf-highlight-gate-tests

Conversation

@grawish

@grawish grawish commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Requested by Grawish · project thread

Before: the fix for the vanishing "Show changes" highlight (#45) was only checked by the native Mac smoke (npm run test:pdf-highlight), which ordinary CI does not run. Reverting the guard would pass npm test.

After: the three rules that fix relies on are pure functions with source tests, so npm test fails if any of them regresses. App behaviour is unchanged.

How: src/change-highlight-gate.ts holds the late before-PDF read guard (project id + revision, not the active run), the displayed-document gate, and the change-stop page clamp. App.tsx and PdfPreview.tsx call them in place of the inline expressions. tests/change-highlight-gate.test.ts covers the late read after the run clears, project switch, newer edit, a different displayed buffer, and page clamping. REMAINING_WORK.md PDF-02 notes the new coverage.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KwQt4pZZ1aiywiemc2AmRv


Generated by Claude Code

Extracts the PR #45 late before-PDF read guard, displayed-document gate and
change-stop page clamp into src/change-highlight-gate.ts and tests them under
npm test, so a regression is caught without the native Mac smoke.

Claude-Session: https://claude.ai/code/session_01KwQt4pZZ1aiywiemc2AmRv
@grawish
grawish merged commit 56f384b into main Oct 15, 2026
2 checks passed
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