Reference Text: cache the plan's chapters when a project goes offline
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- electron, react, typescript
- Ambito
- desktop
Direzione di ricerca
Read web/src/business/referenceText/referenceTextChapters.ts and trace the project download flow in ProjectDownload and ProjectDownloadAlert.tsx; the issue also points to CONTEXT.md and docs/adr/0014-reference-texts-in-project-defaults.md. Check how parseRef, defaultParams.referenceTexts, and the existing cancel check are used. Done means every chapter referenced by the project plan is available from disk when offline, including when audio is already present.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follows #788. With #788, a desktop app saves a Reference Text chapter in offlineData/referencetext/{id}/{BOOK}/{chapter}.simple.json the first time a passage needs it, then reads it from disk. A team that goes offline before opening a passage's Internalize step gets fetchFailed for that passage. Rows can't be added or deleted while offline, so the chapters a project needs are known when it goes offline.
Goal: when a project is downloaded for offline work (the same flow that downloads its audio in ProjectDownload), also cache every Reference Text chapter the project plan references.
Decided
- Prefetch only the chapters that the project's passages reference, for the Project Book. Use each passage's
parseRefstart and end chapters, for both the Primary and the Secondary Reference Text indefaultParams.referenceTexts. - Reuse
getChapter/getChaptersinweb/src/business/referenceText/referenceTextChapters.ts. It already reads from disk first and writes after fetching, so any chapter already on disk is skipped. - Until this ships, and afterwards for anything not prefetched, a cache miss still tries the network even when the app thinks it is offline.
Proposed, to confirm when picked up
- Expose a
cacheReferenceTexts(project, …)fromreferenceTextChapters.ts. Call it inProjectDownload's Import step after the zip is extracted and before moving to the next project. It honors the existing cancel check. - A failure doesn't stop the download. Log it with
logErrorand show one snackbar warning. Lazy fetching fills the gap later when online. - Fetch at most 4 chapters at a time, to be polite to a free API. Desktop only.
- New strings in the
transcriptionTabXLIFF group (regenerate them through the localization pipeline):downloadingReferenceTexts: "Downloading reference texts for {0}"referenceTextsDownloadFailed: "Some reference text chapters could not be downloaded. They will download when you open the passage online."
Watch out
ProjectDownloadAlertdecides which projects need a download only from missing media files (ProjectDownloadAlert.tsx, thepath !== local.localnamecheck). A project whose audio is already on disk never reachesProjectDownload, so its Reference Texts would never be prefetched. The same is true when a project's Reference Texts change after it was downloaded. The needs-download check, or a separate pass, has to cover missing Reference Text chapters too.
Done when: after making a project available offline and going offline, every passage in the plan returns its Reference Text text from the disk cache.
See CONTEXT.md "Reference Text" and docs/adr/0014-reference-texts-in-project-defaults.md.
🤖 Generated with Claude Code
- Lingua principale
- TypeScript
- Stelle
- 1
- Fork
- 7
- Merge medio
- 1g 12h
- PR unite (30g)
- 64
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sillsdev/apm
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 36/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di sillsdev/apm
Issue simili
-
pending close triaging
Difficoltà 1/5 1-3 ore Idoneità per principianti 74/100
anomalyco/opencode#63090 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-qa bug claude Cosmetic
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-qa bug claude Minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
linagora/twake-mail-admin#609 ·
I maintainer di solito rispondono entro 1 giorno