Add the read-only analysis catalog panel - #234
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
🚧 Files skipped from review as they are similar to previous changes (8)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Interlinearizer adds a localized, resizable Analysis Catalog with usage navigation, persisted panel state, command wiring, writing-system support, and expanded test coverage. ChangesAnalysis Catalog feature
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: 🔵 Low · up to The panel behavior is localized, but resizing retains bounded RTL-direction and duplicate-write risks that warrant explicit owner awareness or follow-up before merge; no high-impact correctness or availability risk is indicated. Sequence Diagram(s)sequenceDiagram
participant Menu
participant InterlinearizerLoader
participant AnalysisStore
participant AnalysisCatalogPanel
participant CatalogRowView
Menu->>InterlinearizerLoader: openAnalysisCatalog
InterlinearizerLoader->>AnalysisStore: provide book catalog state
AnalysisCatalogPanel->>AnalysisStore: select catalog rows
AnalysisStore-->>AnalysisCatalogPanel: return catalog rows
AnalysisCatalogPanel->>CatalogRowView: render rows
CatalogRowView->>InterlinearizerLoader: navigate to selected usage
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
41c174d to
89835a1
Compare
456d1bb to
ede5153
Compare
alex-rawlings-yyc
left a comment
There was a problem hiding this comment.
@alex-rawlings-yyc made 10 comments.
Reviewable status: 0 of 20 files reviewed, 10 unresolved discussions (waiting on imnasnainaec).
2805e78 to
bb82b77
Compare
alex-rawlings-yyc
left a comment
There was a problem hiding this comment.
@alex-rawlings-yyc made 5 comments.
Reviewable status: 0 of 21 files reviewed, 15 unresolved discussions (waiting on imnasnainaec).
81fcaab to
1f9d83d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
71e3428 to
3d122bb
Compare
alex-rawlings-yyc
left a comment
There was a problem hiding this comment.
@alex-rawlings-yyc made 1 comment.
Reviewable status: 0 of 21 files reviewed, 16 unresolved discussions (waiting on imnasnainaec).
8ce69da to
fecf51b
Compare
Hoists the analysis store above the cross-book fade curtain so a jump to a usage in another book cannot dim the panel. Search, sort, filter, and row windowing are deferred to #231.
Also commits a released drag width from a ref rather than from inside the setDragWidth updater, which React may run more than once.
An unparseable analysis-language tag threw out of Intl.Collator and blanked the whole view; the resize handle inverted in right-to-left interfaces; and the row toggle's aria-label suppressed the analysis it named. Rows now share one localization subscription instead of one apiece.
A pointer released where the window cannot see it — over a native menu, which takes the pointer with it — left the drag running, so the panel went on resizing under a button-less pointer and committed that width at the next click anywhere. A move reporting no button held now ends the drag at the width it had reached, since that move is the only word the window gets of such a release. Arrow keys stand aside while a drag is in flight. They stepped off the width the drag began at, reporting a width the panel was not showing only for the release to overwrite it; the pointer owns the width while it is held. The drag test helper now dispatches its moves with a held button, which a real one carries and jsdom does not.
The held-focus-request test left the reference on GEN while EXO's view mounted, a state the host never produces; move it to EXO with the jump.
The simulated drag omitted `buttons`, so the move arrived reporting none — which the resize hook reads as a release it never saw, ending the drag before it recorded a width. The panel fell back to its default, and the remount assertion compared that default against itself. Dropping width persistence outright left the test green. Carry `buttons` on the move so the drag resizes, and name the expected width at both ends rather than checking the two renders agree, since the default is what a dead drag and a dropped write alike leave behind.
Any button began a drag: the move handler asks only whether some button is held, so a middle-button press followed the pointer to its release and persisted the width it reached. A right-button press does the same wherever the context menu opens on release rather than on press. Also correct the loader's width-restore comment, which described a move reporting no buttons held while the move beneath it carries one.
The splitter gains Home/End and commits a drag the panel is unmounted holding; rows memoize and return to the inline usage cap when collapsed.
A drag seeded from a committed width outside the bounds drew the panel past its announced maximum on the press alone. The jump and arrow keys now skip writing a width the panel already holds.
Only writes notified subscribers, so a component reading a key another component reset never re-rendered — a future test would have failed for a reason the production code has nothing to do with. A reset also now lands on the resetting caller's default rather than restoring the seed, matching what the real hook leaves behind.
The widest width gives way to a container too narrow to hold the panel and the text both, an arrow key steps from the width the panel is drawn at rather than the committed one behind it, and a drag that ends where it began commits nothing.
Also skip resizing on modified arrow and jump keys, re-clamp the drag origin when the container shrinks mid-gesture, and resolve the rows' shared book label once for the list.
The ignore claimed no test could interleave a move into the window between the origin clearing and the listener's removal, which a move dispatched in the same act() as the drag's end disproves.
A drag only ever reaches a clamped width, so comparing what it reached against the raw committed width never matched when the bounds disallowed that width. A panel that went away mid-gesture then committed the container's clamp, overwriting a wider remembered width that a release in the same gesture would have kept. Compare against the clamped width instead, as the release path does. The comparison reads the bounds through a ref: listing clampWidth as a dependency would tear the effect down on every bounds change and commit part-way through a gesture. Cover the focus request the navigation provider abandons once the reader moves past the book it names. The existing probe claims from inside the provider, where child effects run first, so no test reached that path; routing through a third book leaves the request unclaimed long enough for it to run.
imnasnainaec
left a comment
There was a problem hiding this comment.
@imnasnainaec reviewed 12 files and all commit messages, and resolved 16 discussions.
Reviewable status: 12 of 21 files reviewed, all discussions resolved (waiting on alex-rawlings-yyc).
fecf51b to
d263102
Compare
Hoists the analysis store above the cross-book fade curtain so a jump to a
usage in another book cannot dim the panel. Search, sort, filter, and row
windowing are deferred to #231.
This change is
Summary by CodeRabbit
New Features
Bug Fixes