Skip to content

Update scroll-group hook stubs for the new sourceProjectId tuple element#162

Open
alex-rawlings-yyc wants to merge 1 commit into
mainfrom
sync-papi-scroll-group-tuple
Open

Update scroll-group hook stubs for the new sourceProjectId tuple element#162
alex-rawlings-yyc wants to merge 1 commit into
mainfrom
sync-papi-scroll-group-tuple

Conversation

@alex-rawlings-yyc

@alex-rawlings-yyc alex-rawlings-yyc commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What

paranext-core added a trailing sourceProjectId element to
UseWebViewScrollGroupScrRefHook, so it now returns a 5-element tuple:

() => [scrRef, setScrRef, scrollGroupId, setScrollGroupId, sourceProjectId]

Our test stubs still constructed the old 4-element tuple, so tsc --noEmit
(via npm run lint) fails against current @papi/core with
Source has 4 element(s) but target requires 5.

This updates the stubs to match. No production code changes
InterlinearNavContext destructures only the first four elements, so it was
already compatible; only the test doubles that build the tuple needed the
extra element.

Changes

  • test-helpers.ts: ScrollGroupTuple is now aliased from
    ReturnType<UseWebViewScrollGroupScrRefHook> instead of restating the tuple
    shape, so it tracks the platform hook's arity and can't drift again;
    makeScrollGroupHook gained a sourceProjectId param defaulting to
    undefined.
  • Three tests that inlined their own 4-element tuple type
    (Interlinearizer, InterlinearizerLoader, interlinearizer.web-view) now
    use the shared ScrollGroupTuple alias plus a trailing undefined value.
  • InterlinearNavContext.test.tsx: one inline stub got its fifth element.

Why separate from the feature work

main itself fails to type-check against the current PAPI types, independent of
any feature branch — this restores main to green on its own.

Verification

  • npm run lint (eslint + stylelint + tsc --noEmit) — pass
  • npm test — 1284 passing
  • npm run test:coverage — 100%
    `

This change is Reviewable

paranext-core added a trailing sourceProjectId element to
UseWebViewScrollGroupScrRefHook; alias ScrollGroupTuple from the hook's
return type and pad the stubs so tests type-check against it.
@alex-rawlings-yyc alex-rawlings-yyc self-assigned this Jul 10, 2026
@alex-rawlings-yyc alex-rawlings-yyc added the 🟥High High-priority PR: please review this asap! label Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@alex-rawlings-yyc, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 68427741-b6c0-48ae-a715-bc83586914d2

📥 Commits

Reviewing files that changed from the base of the PR and between 9fe2e58 and 079340f.

📒 Files selected for processing (5)
  • src/__tests__/components/InterlinearNavContext.test.tsx
  • src/__tests__/components/Interlinearizer.test.tsx
  • src/__tests__/components/InterlinearizerLoader.test.tsx
  • src/__tests__/interlinearizer.web-view.test.tsx
  • src/__tests__/test-helpers.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync-papi-scroll-group-tuple

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@alex-rawlings-yyc alex-rawlings-yyc added the up next Auto adds an issue to the PT Lexical Extensions project label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🟥High High-priority PR: please review this asap! up next Auto adds an issue to the PT Lexical Extensions project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant