Skip to content

Upgrade ThinkFlow flashcards with generation controls, citations, and animated study UX#23

Open
Huangdingcheng wants to merge 1 commit intothinkflowfrom
dingcheng-dev
Open

Upgrade ThinkFlow flashcards with generation controls, citations, and animated study UX#23
Huangdingcheng wants to merge 1 commit intothinkflowfrom
dingcheng-dev

Conversation

@Huangdingcheng
Copy link
Copy Markdown
Collaborator

Summary

This PR upgrades the ThinkFlow flashcard workflow end to end.

It adds configurable flashcard generation, structured source citations, persistent generation metadata, improved
flashcard study UI, and source import support for generated flashcard/quiz outputs.

Changes

  • Add flashcard generation controls:
    • difficulty level: basic / intermediate / advanced
    • card count
    • topic
    • test focus
  • Persist flashcard generation config and show it when reopening existing flashcard outputs.
  • Add structured flashcard citations with:
    • source number
    • file name
    • file path
    • preview
    • chunk index
  • Render inline citation tokens like [1] and [2] in flashcard answers.
  • Support citation preview tabs for cards with multiple sources.
  • Show “open full source” only when a real source file can be resolved.
  • Fix outputs-v2 flashcard citation display so user-facing sources point back to real source files instead of
    generation_input.md.
  • Add compatibility handling for older flashcard outputs whose citations already reference generation_input.md.
  • Support importing flashcard and quiz outputs back into knowledge sources by generating Markdown when no direct
    output file exists.
  • Improve Chinese flashcard study UI with animated flip cards, gradients, glow effects, and difficulty-specific
    visual styles.
  • Improve dark and intermediate card readability.
  • Fix back-face leakage where source panels could appear mirrored before flipping.
  • Update English flashcard viewer with matching citation/config display behavior.
  • Add design and implementation documentation for the flashcard upgrade.

Validation

  • Ran backend syntax checks:
python3 -m py_compile fastapi_app/routers/kb.py fastapi_app/services/output_v2_service.py

- Ran Chinese frontend build:

cd frontend_zh
npm run build

## Notes

- Existing flashcard outputs that stored generation_input.md as their citation file are handled at display time
  using the saved output source snapshot.
- New outputs-v2 flashcard generations pass real source_paths and source_names into citation metadata.
- Unrelated local files were not included in this commit.

- add flashcard generation controls for difficulty, count, topic, and test focus
- persist generation config and show it when reopening flashcard outputs
- add structured card citations with inline citation preview and source switching
- map outputs-v2 flashcard citations back to real source files instead of generation_input.md
- support flashcard and quiz outputs importing back as knowledge sources
- improve Chinese and English flashcard study UI with animated flip cards
- fix flashcard back-face leakage, source preview behavior, and dark-card readability
- document the final flashcard design and implementation plan
@Huangdingcheng Huangdingcheng changed the base branch from main to thinkflow April 21, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant