Skip to content

feat #113: save recommended exercise to library inline from report page#115

Merged
ChristopherRotnes merged 1 commit into
masterfrom
feat/113-save-rec-to-library
May 4, 2026
Merged

feat #113: save recommended exercise to library inline from report page#115
ChristopherRotnes merged 1 commit into
masterfrom
feat/113-save-rec-to-library

Conversation

@ChristopherRotnes
Copy link
Copy Markdown
Owner

@ChristopherRotnes ChristopherRotnes commented May 4, 2026

Closes #113

Summary

  • Tapping + on a recommendation row now calls saveLibraryExercise in the background — no navigation away from the report page
  • On success the button switches to a disabled Checkmark icon (grayed out) and stays that way
  • Duplicate inserts (Postgres 23505) are treated as success — checkmark appears immediately
  • Any other save error shows an InlineNotification kind="error" above the recs list; button stays pressable

Changes

  • app/src/components/Report.jsx only — no schema or db.js changes needed

Test plan

  • Get recommendations on the report page
  • Tap + on a row → button turns into grayed-out checkmark, exercise appears in Bibliotek
  • Tap + on a row that's already in the library → checkmark appears immediately (no error)
  • Verify no navigation away from the report page at any point

🤖 Generated with Claude Code

Replace the + button's navigate-to-Bibliotek behaviour with a background
saveLibraryExercise call. Button turns into a disabled checkmark on success;
duplicate inserts (23505) are silently treated as success; other errors show
an inline error notification above the recs list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ChristopherRotnes ChristopherRotnes self-assigned this May 4, 2026
@ChristopherRotnes ChristopherRotnes merged commit 8720bcd into master May 4, 2026
2 checks passed
@ChristopherRotnes ChristopherRotnes deleted the feat/113-save-rec-to-library branch May 4, 2026 21:18
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-island-090dfd003-115.westeurope.7.azurestaticapps.net

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.

As a user I want to save a recommended exercise to my library directly from the report page so I can build my programme without leaving my analysis

1 participant