Skip to content

FW Lite adapter: resolve lexicon refs for display #227

Description

@imnasnainaec

First real lexicon integration: implement the port over FW Lite and render glosses that came from a lexicon link.

Scope

The adapter. Implement the port against the Lexicon extension's lexicon.entryService network object, using getEntry / getSense (landed in sillsdev/languageforge-lexbox#2249) and reporting FW Lite's capabilities.

Resolution. Resolve lazily per visible segment, not per project load — a book's worth of refs must not be fetched to render one screen. Cache resolved senses; invalidate on lexicon switch.

The render ladder, which follows the precedence rule already in the model — free-form gloss wins over glossSenseRef / senseRef, and the ref is retained either way:

  1. stored free-form gloss, if present
  2. otherwise the resolved sense gloss
  3. otherwise unglossed

An unresolvable ref is not an error state. Provider offline, entry deleted, and foreign ref (#225) all fall through the same ladder with no error surface and no data loss. The ref stays on the analysis.

Link indicator. Display only — show that a gloss is lexicon-backed, using the third grid row MorphemeBox already reserves for it (src/components/MorphemeBox.tsx). Picking and changing a link is the next item.

Non-goals

No search, no linking, no writes. Read path only.

Note

The deleted-entry and foreign-ref cases overlap #143. Keep the rule in one place — cite it from whichever issue lands second rather than restating it.

Blocked on

#44 (which lexicon), #225, #226.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions