Skip to content

Surface stale places in the Analysis Catalog (#373) - #377

Open
alex-rawlings-yyc wants to merge 10 commits into
mainfrom
feat/349-stale-catalog
Open

alex-rawlings-yyc wants to merge 10 commits into
mainfrom
feat/349-stale-catalog

Conversation

@alex-rawlings-yyc

@alex-rawlings-yyc alex-rawlings-yyc commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

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 Reviewable

@alex-rawlings-yyc alex-rawlings-yyc self-assigned this Sep 28, 2026
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 0594fa28-f368-4f82-a792-b54cae30e83c

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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 force-pushed the feat/349-stale-catalog branch 4 times, most recently from 4f13c61 to 395d9d1 Compare September 29, 2026 20:38
@alex-rawlings-yyc
alex-rawlings-yyc marked this pull request as ready for review September 29, 2026 21:45

@myieye myieye left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author
1-stale-count 2-expanded-no-target 3-apply-to-focused 4-stale-filter

@alex-rawlings-yyc alex-rawlings-yyc left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, 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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Surface stale places in the Analysis Catalog

2 participants