Surface stale places in the Analysis Catalog (#373) - #377
alex-rawlings-yyc wants to merge 10 commits into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID:
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 |
4f13c61 to
395d9d1
Compare
42805fe to
bca1d99
Compare
There was a problem hiding this comment.
LGTC 😉
Heavily relied on AI for this review 🤖
⛏️ Same as #378: worth an entry in user-questions.md? "Apply goes to the word the reader picked, and a stale jump focuses nothing" is a call users might see differently. The morpheme question inline would fit there too.
Screenshots would be nice here too. One real question inline.
@myieye reviewed 24 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on alex-rawlings-yyc and jasonleenaylor).
src/store/analysisSlice.ts line 1426 at r1 (raw file):
let approvedId = analysisId; if (normalizeSurfaceForm(analysis.surfaceText) !== normalizeSurfaceForm(surfaceText)) {
When the spelling differs, the copy keeps the old morpheme forms. So after the test's own case, receive is stored with a morpheme spelled recieve. Apply un-believ-able to incredible and incredible gets those three morphemes. That wrong breakdown then shows under the word and is suggested for every later incredible.
I know #349 says "morpheme forms travel unchanged", but I don't think that's what we want. The gloss, POS and features are about the meaning and should travel. The breakdown is about the spelling and shouldn't.
Proposal: when the spelling differs, copy gloss, POS and features. If the breakdown is a single morpheme, keep it and set its form to the new word. If it has several morphemes, drop it; the user re-splits.
alex-rawlings-yyc
left a comment
There was a problem hiding this comment.
Added the Apply/jump question to user-questions.md, and #381 covers the morpheme breakdown. Screenshots are in a comment above.
@alex-rawlings-yyc made 2 comments.
Reviewable status: 22 of 24 files reviewed, 1 unresolved discussion (waiting on jasonleenaylor and myieye).
src/store/analysisSlice.ts line 1426 at r1 (raw file):
Previously, myieye (Tim Haasdyk) wrote…
When the spelling differs, the copy keeps the old morpheme forms. So after the test's own case,
receiveis stored with a morpheme spelledrecieve. Applyun-believ-abletoincredibleandincrediblegets those three morphemes. That wrong breakdown then shows under the word and is suggested for every laterincredible.I know #349 says "morpheme forms travel unchanged", but I don't think that's what we want. The gloss, POS and features are about the meaning and should travel. The breakdown is about the spelling and shouldn't.
Proposal: when the spelling differs, copy gloss, POS and features. If the breakdown is a single morpheme, keep it and set its form to the new word. If it has several morphemes, drop it; the user re-splits.
Done for the single morpheme. When its form is the old spelling, it now takes the new one. The check is there because a morpheme's form can be a lexical form rather than the word's spelling (e.g. receive on recieved), and that form stays as is. A breakdown of several morphemes still travels unchanged for now, because dropping it would also lose its morpheme glosses and lexicon links. Instead, #381 will mark it stale until the reader re-splits or confirms it, and #349 now says so.




Closes #373. Part of #349.
Catalog rows list the places an analysis went stale at, apart from its usages, with a stale count in the row header. Each stale place jumps to its verse without focusing a token, since its offset may name a different word by now, and offers Discard and Apply to the word focused in the view. Applying to a word spelled differently approves a copy of the analysis under that spelling, or an identical stored one, so the suggestion pool keeps matching by the recorded form; applied where it went stale, the approval keeps the stale link's confidence and earlier creation date.
A Stale filter keeps rows with a stale place; Used nowhere no longer includes them, and a row's books include those it is stale in. Staleness is recorded only for books opened since their text changed, which the filter label says.
A Discard or Apply that would drop an analysis with an unsaved morpheme breakdown asks first, as delete and merge do.
The view publishes the word the reader focused through the navigation context (
publishedFocus), which the catalog reads as the Apply target. A focus the view placed itself, as on landing at a verse, is withheld, so Apply waits for the reader to pick a word; a stale jump also cancels any focus an earlier jump left pending.Checked in the running app.
This change is