Summary
Instructors currently photograph a whiteboard to log a session, but the OCR flow lands in the MuscleMap confirm step and does not offer to save the result as a reusable gruppetime template. A separate camera entry point in the Sett-sammen tab should let instructors capture a whiteboard, review the parsed exercise list, and save it directly as a named template in the library — without logging an actual session.
Priority
Medium
UI spec (Carbon g100)
- Entry point: «Knips tavla» featured card in SetSammen landing (below the two existing ActionCards), using the
Camera Carbon icon; same two-color treatment as the existing cards
- Flow:
- Camera/file picker opens (same
<input type="file" accept="image/*" capture="environment"> pattern as MuscleMap)
- Image compressed via existing
compressImage util — same 5 MB base64 limit
- Synchronous Claude Vision call via
/api/claude (same proxy, no jobId, no polling)
- Result lands in a review step: editable exercise list (same
ExerciseRow pattern), template name TextInput at the top, live BodyPanel coverage preview
- «Lagre som mal»
Button kind="primary" saves via replaceTemplateExercises + saveTemplate; navigates to GruppetimePicker on success
- «Avbryt» discards and returns to SetSammen landing
- Error states:
InlineNotification for compression failure, Claude error, or save failure — same patterns as MuscleMap upload step
- No session is created — this flow is template-only
Data model
No schema changes. Uses existing session_templates + session_template_exercises tables and existing replaceTemplateExercises / saveTemplate db.js functions.
The analyze prompt (ANALYZE_PROMPT in prompts.js) is reused as-is — output shape is identical to the session log flow.
Acceptance criteria
Out of scope
- Multi-image capture in one template
- Editing the template after creation (use GruppetimeEditor for that)
- Session logging from this flow
Summary
Instructors currently photograph a whiteboard to log a session, but the OCR flow lands in the MuscleMap confirm step and does not offer to save the result as a reusable gruppetime template. A separate camera entry point in the Sett-sammen tab should let instructors capture a whiteboard, review the parsed exercise list, and save it directly as a named template in the library — without logging an actual session.
Priority
Medium
UI spec (Carbon g100)
CameraCarbon icon; same two-color treatment as the existing cards<input type="file" accept="image/*" capture="environment">pattern as MuscleMap)compressImageutil — same 5 MB base64 limit/api/claude(same proxy, no jobId, no polling)ExerciseRowpattern), template nameTextInputat the top, liveBodyPanelcoverage previewButton kind="primary"saves viareplaceTemplateExercises+saveTemplate; navigates to GruppetimePicker on successInlineNotificationfor compression failure, Claude error, or save failure — same patterns as MuscleMap upload stepData model
No schema changes. Uses existing
session_templates+session_template_exercisestables and existingreplaceTemplateExercises/saveTemplatedb.js functions.The analyze prompt (
ANALYZE_PROMPTinprompts.js) is reused as-is — output shape is identical to the session log flow.Acceptance criteria
sessionstableInlineNotification(compression, Claude, save)Out of scope