Remove configurable isLapis sentence/audio field overrides so sentence cards always map to Sentence and SentenceAudio. Update types and docs to reflect the simplified config surface.
2.0 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-83 | Simplify isLapis sentence card field config to fixed field names | Done |
|
2026-02-19 08:38 | 2026-02-19 08:40 |
|
medium |
Description
Remove sentenceCardSentenceField and sentenceCardAudioField from the ankiConnect.isLapis config surface so Lapis mode always uses fixed field names Sentence and SentenceAudio. Update types/defaults/docs/examples and adjust integration code to stop reading those keys.
Acceptance Criteria
- #1
isLapisconfig no longer exposessentenceCardSentenceFieldorsentenceCardAudioFieldin types/defaults/examples/docs - #2 Anki integration uses fixed sentence-card field names
SentenceandSentenceAudiowhen Lapis/Kiku sentence-card flow runs - #3 Project build and relevant tests pass after removal
Implementation Notes
Removed sentenceCardSentenceField and sentenceCardAudioField from isLapis config types/defaults (src/types.ts, src/config/definitions.ts).
Updated Anki integration to always use fixed sentence-card field names Sentence and SentenceAudio in effective sentence-card config (src/anki-integration.ts).
Hardened config resolution for ankiConnect.isLapis to only read enabled and sentenceCardModel, and emit warnings when deprecated sentence/audio field override keys are provided (src/config/service.ts).
Updated examples/docs to remove the two keys and document fixed mapping (config.example.jsonc, docs/public/config.example.jsonc, docs/configuration.md, docs/anki-integration.md, docs/mining-workflow.md).
Added regression coverage ignores deprecated isLapis sentence-card field overrides in src/config/config.test.ts.
Verification: bun run build && bun run test:config:dist passed (33/33).