feat(tui): translation picker with persistent indicator and fuzzy filter#16
Open
ivanmaierg wants to merge 10 commits into
Open
feat(tui): translation picker with persistent indicator and fuzzy filter#16ivanmaierg wants to merge 10 commits into
ivanmaierg wants to merge 10 commits into
Conversation
…REQ-03, REQ-08–REQ-10)
…tChapter and getPassage (REQ-05–REQ-07)
…twork-error variants (REQ-11–REQ-13)
… actions (REQ-14–REQ-34, REQ-47)
… useTranslationsFetch wired (REQ-39–REQ-44)
…se-picker (REQ-35–REQ-37)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the ability to change Bible translation from inside the TUI. Press
tin the reader to open an overlay listing translations from the helloao API, filter by typing, pick withEnter, and the passage re-fetches under the new translation. The active translation name renders in the reader header at all times so you always know what you're reading.Translationdomain type + brandedTranslationIdflow end-to-endgetTranslationsadded to theBibleRepositoryport; helloao adapter implements it with a session-scoped closure cache (one fetch per run)getChapter/getPassageuse cases promoted:translationIdis now an explicit parameter (CLI passesDEFAULT_TRANSLATION_ID; TUI passes fromReaderState)ReaderStatevariantsloading/loaded/network-errorcarrytranslationId+translationName;loadedgains atranslationPickersub-state machine (loading | ready | error)name+languageEnglishName, lowercase; cap 50 visible items (no virtualization in OpenTUI)Scope
In v1: picker overlay,
tshortcut, persistent header indicator, substring fuzzy filter, session cache, full passage re-fetch on switch.Deferred (separate slices): favorites section, cross-run persistence, RTL text rendering, fzf-grade ranked scoring.
SDD artifacts
openspec/changes/translation-picker/proposal.mdopenspec/changes/translation-picker/spec.md— 49 REQsopenspec/changes/translation-picker/design.md— state machine, ADRs, key-routing diagramopenspec/changes/translation-picker/tasks.md— 47 work-unit tasks, Red/Green TDD pairsopenspec/changes/translation-picker/verify-report.md— pass with 4 WARNINGs, 0 CRITICALSize note
~2,170 lines changed (production + tests + openspec docs). `tasks.md` flagged this as a high review-budget risk and recommended a chained PR along the
getChaptersignature-break seam. Shipping as a single PR (`size:exception`) since the signature break and its UI consumer must land together for the feature to deliver any value, and this is a solo repo where round-trip cost > review surface cost. The breaking-change seam is isolated to commit `2a218f0` and is reviewable on its own.Verify report — known deviations
languageEnglishName(display name) notlanguage(ISO code). Functional improvement; spec text drifted from intent — code is correct, spec needs to follow.translation-picker → verse-picker. Spec text reversed them; code is correct per the modal contract.useTranslationsFetchhook test and three type-only assertions inreader-screen.test.ts. Non-blocking.Test plan