Repository navigation
Add onAnalysisChanged for Scripture edits - #468
Conversation
BookService watches each source project's open book, the one whose outline was last asked for, apart from the held-book cache, since the whole-text read replaces the held book. An edit to it releases the held text and fires interlinearizer.onAnalysisChanged with the source project, a change id and the edited book; the WebView reloads the book when the event names its project and book. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
A failed open-book watch stayed current, so later outlines of the same book kept it and edits to that book went unreported. Drop it, if it is still the current watch, and stop it, since an error on the first delivery leaves the subscription open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Give stopping a failed watch its own test, make the replaced-watch test fail without its guard, and have the close test check the open watch is unsubscribed. Document watchOpenBook, scope the onAnalysisChanged doc to the open book, and drop the side panel doc's claim that one project is routinely open in two tabs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
imnasnainaec
left a comment
There was a problem hiding this comment.
@imnasnainaec made 7 comments.
Reviewable status: 0 of 9 files reviewed, 7 unresolved discussions (waiting on alex-rawlings-yyc and imnasnainaec).
alex-rawlings-yyc
left a comment
There was a problem hiding this comment.
@alex-rawlings-yyc reviewed 9 files and all commit messages, and resolved 7 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on imnasnainaec).
Closes #438. Part of Phase 2 (#425).
Summary
A Scripture edit to the open book refreshes the view again.
BookServicewatches each project's open book: the one whose outline was last asked for. The watch is separate from the book cache, because the whole-text read pushes the open book out of the cache. On an edit, the host emitsinterlinearizer.onAnalysisChanged. The WebView then reloads the book.closeProjectandcloseAllProjectsalso stop the open-book watches.Evidence
After: new tests in
bookService.test.ts,main.test.tsanduseInterlinearizerBookData.test.tspass, among them:Manual test plan
Deviations from the plan
getTokenizedBook, a bridge [5d] Serve the concordance from the host and remove the read bridges #459 removes.Comments to post on other issues
#439 (2e): posted
#467 (2c): posted
#449 (3j): posted
#450 (3k): posted
#459 (5d): posted
Decisions with a close contender
USJ_Bookfor open books … caches the tokenized book".watchBookcommand.scriptureEdit: { bookId }overscriptureEdit: { bookIds: string[] }.changeIdover a per-host counter.Merge Danger
Door: two-way
The event is new, and only this extension listens to it. Reverting removes it cleanly. No stored data changes.
Blast Radius: small
deactivatewaits for the open watch's first delivery before unsubscribing, up to the request timeout (30s by default). It's the samestop()wait Fetch and tokenize books in a host BookService (#435) #460 has for held books.🤖 Generated with Claude Code
This change is
Summary by CodeRabbit