* feat: add copy-as-markdown and copy-as-json buttons to question card
Adds two small icon buttons in the QuestionCard header so users can copy
the full question payload (text, options, descriptions) to the clipboard
in either Markdown or JSON form. Useful for forwarding interactive
questions to an external LLM or note.
- Markdown serialization preserves question headers, multi-select hints
and option descriptions.
- JSON serialization mirrors the on-wire QuestionRequest shape for
programmatic reuse.
- Toast feedback on success/failure using the shared @/components/ui
wrapper and the existing copyTextToClipboard helper (clipboard API
with execCommand fallback).
- New i18n keys added across all 7 locales.
* test: extract question serializers and cover with 15 unit tests
The two serializers backing the copy-as-markdown and copy-as-json
buttons on QuestionCard were defined as top-level consts inside
QuestionCard.tsx. Exposing them for unit tests would trip the
react-refresh/only-export-components ESLint rule because that file
also exports the QuestionCard component.
Move serializeQuestionAsMarkdown and serializeQuestionAsJson into a
React-free sibling module, questionSerializers.ts, and re-import them
from QuestionCard.tsx. Behavior is byte-identical.
Add 15 unit tests via bun:test covering header fallback, multi-select
hint gating, blank-description elision, ordering across multiple
questions, JSON canonical shape (no transient id/sessionID), boolean
normalisation, and the empty-questions edge case.