Skip to content

Save and Load Sessions#63

Merged
MaddieWright merged 2 commits intoUBCMint:mainfrom
Tiya-Verma:main
Mar 11, 2026
Merged

Save and Load Sessions#63
MaddieWright merged 2 commits intoUBCMint:mainfrom
Tiya-Verma:main

Conversation

@Tiya-Verma
Copy link
Contributor

Pull Request Template

What?

Implemented end-to-end frontend session save/load support using the new backend session endpoints, and updated the settings bar layout.

Implementation

  • Added Load Session flow and Save Session flow wired to backend:

  • Added a unified SessionModal with two modes:

    • save: name input + validation (non-empty, unique)
    • load: searchable session selector (name + ID)
    • removed Filters menu item
  • Added notifications/toasts for success/failure states.

  • Added logic to:
    - save directly to already-loaded session (no modal)
    - store active session ID after load/create
    - disable actions during in-flight requests

  • Added frontend-state export/import plumbing for React Flow nodes/edges.


How?

  • Created a session API client in frontend/lib/session-api.ts and added robust error parsing.
  • Added frontend proxy route handlers
  • Added shared workspace state type guard in frontend/lib/frontend-state.ts.
  • Integrated save/load orchestration in frontend/components/ui-header/settings-bar.tsx.
  • Added event-based state bridge in frontend/components/ui-react-flow/react-flow-view.tsx:
  • Extended global context (frontend/context/GlobalContext.tsx) with activeSessionId.

Testing

Tested expected flow logic for:

  • save existing loaded session (direct save)
  • save new session via modal
  • load session via searchable picker
  • error toasts for API failures/invalid payloads

MaddieWright
MaddieWright previously approved these changes Mar 11, 2026
Copy link
Collaborator

@MaddieWright MaddieWright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, will work on some fixes, but overall good work!

@MaddieWright MaddieWright merged commit 281d229 into UBCMint:main Mar 11, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants