Skip to content

Show homograph numbers on headwords in FW Lite - #2881

Merged
myieye merged 35 commits into
developfrom
claude/homograph-subscripts
Oct 31, 2026
Merged

myieye merged 35 commits into
developfrom
claude/homograph-subscripts

Conversation

@myieye

@myieye myieye commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

[Claude, autonomous]

FLEx shows an entry's homograph number as a subscript after its headword (bank₁, bank₂; 0 shows nothing). The viewer never displayed IEntry.homographNumber. This adds HomographNumber.svelte and uses it in the entry list and search rows, the entry editor title and dictionary preview, the entry picker's selection preview and the task review list, plus Unicode subscript digits in the delete prompt and the duplicate-check names.

  • Display only: search, sorting, duplicate matching and the persisted complex-form/component headwords are untouched.
  • Complex-form and component badges don't get a number yet: IComplexFormComponent only carries headword strings, so that needs a model field or a backend-baked subscript (follow-up).
  • The subscript is 0.6em to match the Unicode digits; Tailwind's preflight 75% is too big.
  • Test: new Playwright tests/ui/homograph-numbers.test.ts covers the list rows, the editor title and tooltip, and the dictionary preview.

Screenshots

Entry list Entry editor + dictionary preview Duplicate check on a new entry
Entry list showing bank₁ and bank₂ Entry editor title and dictionary preview showing bank₂ Duplicate-check banner listing bank₂ and bank₁

Generated by Claude Code

myieye and others added 20 commits October 26, 2026 11:18
Diff counterparts of the editor's entry, sense and example primitives, plus
a row-based diff for objects without an editor layout (parts of speech,
semantic domains, publications, complex form types, morph types, writing
systems, custom views). Nothing renders them yet; the activity detail view
adopts them next.

Every field of every previewed model is listed in diff-fields.ts, typed
against the generated models, so a new backend field fails svelte-check
until it gets a row or is skipped on purpose. Entry fields the editor
doesn't show (morph type, homograph number) are diffed when they change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A multi-string change in a writing system the view hides now shows
  instead of looking unchanged.
- Part of speech diffs by id, so a snapshot with an id but no object
  still shows the right value.
- Multi-selects drop duplicate ids (they crashed the keyed each) and sort
  labels numerically, so semantic domain 2.1 comes before 10.1.
- Guard missing example translations and string-serialized ws types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A custom view with no writing-system list shows every writing system, so
diffing it as an empty list hid a switch between "all" and "none". A
reorder-only picture change now marks the pictures that moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A custom view's field order and an entry's complex form types keep their
selection order, so a reorder-only change looked unchanged. Pictures and
multi-selects now share one helper for finding what moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eme form

entityConfig is now typed against the generated models: a new entry, sense
or example field fails svelte-check until it gets an editor field or is
listed as not having one. That replaces the diff's near-empty "extra rows"
tables, which guarded the same thing one step removed.

Morph type, which has no editor field yet, shows in the entry diff right
under the lexeme form when it changed, where FLEx has it. Homograph number
is left out: FW Lite doesn't display it anywhere yet.

A test checks every snapshot-able model has a diff or an explicit opt-out.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Like hidden writing systems, a field the current view hides (e.g. literal
meaning in FW Lite) now shows when the change touched it, so an activity
that only edited such a field doesn't render an empty diff. Empty values
count as missing and rich text compares as plain text.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AM78WFRziqVfs4zYnscP7E
A renamed but still selected publication, complex form type or semantic
domain no longer reveals a hidden field that would show nothing changed.
Selections compare by id, pictures by image and caption, and
translations by id and text.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AM78WFRziqVfs4zYnscP7E
DiffMultiString gave each row its own label column so the label stayed beside the value below the lg breakpoint, which left inputs misaligned between rows. Use the editor's row classes instead: the shared subgrid column from lg up, stacked below it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AM78WFRziqVfs4zYnscP7E
Render an entry's homograph number (N > 0) as a FLEx-style subscript after
its headword via a shared HomographNumber component: entry list and search
rows, dictionary preview, entry editor title, task review list, the entry
picker's selection preview and the activity preview. Plain-text contexts
(editor title tooltip, delete prompt, duplicate-check preview names) use
Unicode subscript digits. Headword strings used for logic are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AM78WBzrZB97vduoZFtHSr
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0ae015ca-74d1-4705-8061-b77579eacb2d
Commits

Reviewing files that changed from the base of the PR and between 85cb9d9 and 3200e47.

Files selected for processing: 9
  • frontend/viewer/src/lib/components/dictionary/Headwords.svelte
  • frontend/viewer/src/lib/components/dictionary/HomographNumber.svelte
  • frontend/viewer/src/lib/entry-editor/EntryOrSensePicker.svelte
  • frontend/viewer/src/lib/entry-editor/duplicate-check/DuplicateCheck.svelte
  • frontend/viewer/src/project/browse/EntryMenu.svelte
  • frontend/viewer/src/project/browse/EntryRow.svelte
  • frontend/viewer/src/project/browse/EntryView.svelte
  • frontend/viewer/src/project/tasks/ReviewList.svelte
  • frontend/viewer/tests/ui/homograph-numbers.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The viewer now displays positive homograph numbers as subscripts beside headwords in entry, dictionary, picker, duplicate-preview, and review-list interfaces. Entries with no positive homograph number do not display a subscript. UI tests cover entry lists, editor titles, and dictionary previews.

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Feature

Suggested reviewers: hahn-kev

Merge Risk: Minimal · up to 3200e

Positive homograph numbers are displayed as subscripts. No merge-blocking risk is established.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: displaying homograph numbers on headwords.
Description check Passed The description accurately explains the homograph-number display, affected locations, behavior, limitations, and test coverage.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (8 skipped: 8 unsupported.)

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

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

A rabbit hops past headwords bright,
Subscript numbers sit just right.
One and two now mark their place,
Zero leaves no trace to chase.
The preview shows each name with care,
The rabbit nibbles, pleased to share.

@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Oct 31, 2026
@myieye
myieye changed the base branch from develop to claude/activity-3-diff-view October 31, 2026 09:30
@github-actions github-actions Bot added 📦 Lexbox issues related to any server side code, fw-headless included 📙 Platform.Bible 🔩 FW Lite Core Shared MiniLcm, CRDT and sync libraries that ship in both FW Lite and FwHeadless labels Oct 31, 2026
@myieye
myieye added this pull request to stack #2887 October 31, 2026 10:27
Base automatically changed from claude/activity-3-diff-view to develop October 31, 2026 11:58
@myieye myieye changed the title [claude] Show homograph numbers on headwords Show homograph numbers on headwords in FW Lite Oct 31, 2026
@myieye
myieye marked this pull request as ready for review October 31, 2026 12:23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AM78WBzrZB97vduoZFtHSr
@myieye
myieye merged commit 5968200 into develop Oct 31, 2026
19 checks passed
@myieye
myieye deleted the claude/homograph-subscripts branch October 31, 2026 12:51
myieye pushed a commit that referenced this pull request Oct 31, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AM78WBzrZB97vduoZFtHSr

# Conflicts:
#	frontend/viewer/src/lib/components/dictionary/HomographNumber.svelte
#	frontend/viewer/src/lib/entry-editor/diff-view/inline-diff.test.ts
#	frontend/viewer/src/lib/entry-editor/diff-view/inline-diff.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔩 FW Lite Core Shared MiniLcm, CRDT and sync libraries that ship in both FW Lite and FwHeadless 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related 📦 Lexbox issues related to any server side code, fw-headless included 📙 Platform.Bible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants