Galleries Library Refactor
Status
- Active source of truth
- Started on 2026-04-11
Problem
The current galleries domain is still session-first:
- a gallery cannot exist without a session because
galleries.session_idis required, - the main owner entry point lives inside the session workspace,
- the session gallery tab tries to do too much at once: creation, library, assignment context, and navigation,
- the empty state and setup copy are confusing because they sit inside a session-specific screen while the feature is becoming a broader delivery workspace.
This creates two product issues:
- galleries feel secondary to sessions instead of being a delivery surface on their own,
- photographers cannot prepare or draft galleries before deciding which session should own them.
Product Goal
Turn galleries into an owner-level workspace with two valid states:
- assigned to a session,
- unassigned draft library item.
The owner experience should become:
- open
/galleries, - create a gallery with or without a linked session,
- assign or reassign it later,
- edit delivery, sharing, and presentation in a dedicated editor,
- keep the session page as a contextual surface, not as the main gallery library.
Target UX
Owner gallery library
Add a dedicated owner page:
- route:
/galleries - purpose: list all owner galleries
- primary groups:
- assigned galleries
- unassigned galleries
- main actions:
- create gallery
- assign session
- remove session assignment
- open editor
- open preview
Session contextual tab
Keep the session gallery tab, but reduce its responsibility:
- show galleries already linked to the current session,
- allow quick creation for this session,
- provide a clear CTA to open the full gallery library,
- remove the misleading right-side “big placeholder workspace” pattern.
Editor direction
The gallery editor should become session-agnostic:
- assigned gallery: editable from the gallery library and from the session context,
- unassigned gallery: still fully editable,
- session-specific actions should degrade gracefully when no session is linked.
Domain Changes
Database
galleries.session_id must become nullable.
This is required before the frontend can honestly expose unassigned galleries.
Backend
Add owner-global routes:
GET /galleriesPOST /galleriesGET /galleries/:galleryIdPATCH /galleries/:galleryIdPUT /galleries/:galleryId/assign-session
Session-scoped routes remain for contextual workflows and backward compatibility.
Frontend
Add owner-global client hooks and routes for:
- gallery library listing,
- owner-global create,
- assignment changes,
- owner-global detail/editor entry.
Delivery Plan
Slice 1
- document the refactor,
- add the owner gallery library route and page,
- make
session_idnullable, - add owner-global list/create/assign endpoints,
- simplify the session gallery tab CTA and empty state.
Slice 2
- make the editor work without a required session route,
- support full owner-global edit flows,
- unify session/global gallery hooks.
Slice 3
- move remaining “session-only” assumptions out of delivery/sharing logic,
- add stronger assignment UX and filters in the gallery library,
- finalize OpenAPI cleanup and regenerate client types.
Non-Goals For Slice 1
- replacing every existing session-scoped gallery route immediately,
- redesigning the public gallery rendering again,
- changing the client portal gallery model.
Notes
- Public and preview URLs stay backward compatible.
- Session-linked gallery workflows must continue to work during the migration.
- The owner gallery library is a product-level workspace, not just another tab variation.