Files
SubMiner/backlog/tasks/task-239.3 - Add-live-Anki-template-preview-for-card-output.md

1.8 KiB

id, title, status, assignee, created_date, labels, milestone, dependencies, references, parent_task_id, priority
id title status assignee created_date labels milestone dependencies references parent_task_id priority
TASK-239.3 Add live Anki template preview for card output To Do
2026-03-26 20:49
feature
anki
ux
m-2
src/anki-integration.ts
src/anki-integration/card-creation.ts
src/config/resolve/anki-connect.ts
src/renderer
TASK-239 high

Description

Users currently have to infer what card output will look like from config fields and post-mine results. Add a live preview surface that shows the resolved card template output before mining so users can catch broken field mappings, missing media, or undesirable formatting earlier.

Acceptance Criteria

  • #1 Users can open a preview that renders the resolved front/back field output for the current note/card template configuration.
  • #2 The preview clearly surfaces missing or unmapped fields instead of silently showing blank content.
  • #3 Preview generation uses the same transformation logic as the live card-creation path so it stays trustworthy.
  • #4 The first slice works with representative sample mining payloads and handles missing optional media gracefully.
  • #5 Tests cover preview rendering for at least one valid and one invalid/missing-field configuration.

Implementation Plan

  1. Identify the current card-creation data path and extract any logic needed to render a preview without duplicating transformation rules.
  2. Add a focused preview UI in the most relevant existing configuration/setup surface.
  3. Surface validation/warning states for empty mappings, missing fields, and media-dependent outputs.
  4. Verify with Anki integration tests plus renderer coverage for preview states.