You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The consumer end is live: Interlinearizer.tsx:305 calls consumeFocusRequest(book.bookRef) and focuses the returned token. The producer end is not — the only calls to requestFocusToken are in src/__tests__/components/Interlinearizer.test.tsx and src/__tests__/components/InterlinearNavContext.test.tsx. So the slot can currently only ever be filled by a test.
Why it's worth deciding
The doc comment states the contract the caller has to honor:
A request moves focus and nothing else, so the caller must navigate to the token's verse itself: unpaired, the focus lands outside the verse on screen, and the request is dropped only once navigation happens to leave the book it names.
That pairing is asserted only by tests that already do it correctly. Nothing fails if a future caller forgets the navigate half — the failure is a focus silently landing outside the verse on screen, and a request that lingers until navigation happens to leave the book. The first production caller has to read the doc comment to get it right.
The first caller is already planned
#193 (analysis catalog: read-only panel) states "Depends on the store hoist and focus seam, and on the pure query core", and lists jump-to-usage navigation among its deliverables. Jumping from a catalog row to a usage is exactly the paired gesture the contract describes: navigate to that usage's verse and focus that token. So this is not dead code to delete — it is a seam about to get its first real caller, which is the moment to decide whether the pairing should be enforced by the API.
Options
(a) Fold the navigate into requestFocusToken so the pairing can't be forgotten. Makes the hazard unrepresentable; changes the API and touches InterlinearNavContext plus its tests. Cheapest to do beforeAnalysis catalog: read-only panel, command, and jump-to-usage navigation #193 adds the first call site rather than after.
(b) Keep the seam as-is and note in the doc comment that it currently has no production caller, so a reader knows the contract is untested against real usage.
Not exclusive — (b) is worth doing regardless if (a) is deferred past #193.
requestFocusTokenhas no production caller, and the pairing contract it carries is not self-enforcing.Raised by @imnasnainaec in review of #235 (#235 (comment)), where it was explicitly out of scope.
What's there now
InterlinearNavContextexposes a focus-request slot as three members:requestFocusToken(tokenRef)— producer,src/components/InterlinearNavContext.tsx:172focusRequestCount— the notice signal,src/components/InterlinearNavContext.tsx:179consumeFocusRequest(bookCode)— consumer,src/components/InterlinearNavContext.tsx:189The consumer end is live:
Interlinearizer.tsx:305callsconsumeFocusRequest(book.bookRef)and focuses the returned token. The producer end is not — the only calls torequestFocusTokenare insrc/__tests__/components/Interlinearizer.test.tsxandsrc/__tests__/components/InterlinearNavContext.test.tsx. So the slot can currently only ever be filled by a test.Why it's worth deciding
The doc comment states the contract the caller has to honor:
That pairing is asserted only by tests that already do it correctly. Nothing fails if a future caller forgets the
navigatehalf — the failure is a focus silently landing outside the verse on screen, and a request that lingers until navigation happens to leave the book. The first production caller has to read the doc comment to get it right.The first caller is already planned
#193 (analysis catalog: read-only panel) states "Depends on the store hoist and focus seam, and on the pure query core", and lists jump-to-usage navigation among its deliverables. Jumping from a catalog row to a usage is exactly the paired gesture the contract describes: navigate to that usage's verse and focus that token. So this is not dead code to delete — it is a seam about to get its first real caller, which is the moment to decide whether the pairing should be enforced by the API.
Options
requestFocusTokenso the pairing can't be forgotten. Makes the hazard unrepresentable; changes the API and touchesInterlinearNavContextplus its tests. Cheapest to do before Analysis catalog: read-only panel, command, and jump-to-usage navigation #193 adds the first call site rather than after.Not exclusive — (b) is worth doing regardless if (a) is deferred past #193.