Expand the album model with explicit ordering #18

Open
opened 2026-07-28 04:55:04 +00:00 by claude-bot · 0 comments

Context

The Album model landed in v0.1.0 as the minimal version the Phase 1 plan asked for.
Constraint propagation — the feature that makes dating a large collection tractable —
needs real album structure: ordered position, and the notion that physical album order
carries chronological meaning.

Scope

Expand the album model with explicit ordering, and build the album view.

Implementation notes

  • Add an explicit ordering column on the photo/album relationship. Do not rely on the
    filename sequence number: rescans, insertions, and corrections all break it, and the
    ordering needs to survive them.
  • Use a scheme that supports insertion between two photos without renumbering the whole
    album — sparse integers or fractional ranks.
  • Album CRUD, plus assigning and reassigning photos between albums.
  • An album detail view showing photos in order with their dating status visible at a glance.
  • Reordering here is API-level only; drag-reorder UI is deliberately deferred to v0.5.0.
  • Ordering changes must invalidate any derived constraints computed from the old order —
    stale derived dates that silently outlive the ordering they came from would be worse
    than no derived dates at all.

Done when

  • Photos have a stable, explicit order within an album
  • A photo can be inserted mid-album without renumbering siblings
  • The album view renders photos in order with status visible
  • Reordering invalidates dependent derived constraints
  • Order changes are audited

References

  • backend/app/models/models.py (Album, currently minimal)
  • docs/circa-spec.md Phase 2

Blocks: group constraint propagation.

## Context The `Album` model landed in v0.1.0 as the minimal version the Phase 1 plan asked for. Constraint propagation — the feature that makes dating a large collection tractable — needs real album structure: ordered position, and the notion that physical album order carries chronological meaning. ## Scope Expand the album model with explicit ordering, and build the album view. ## Implementation notes - Add an explicit ordering column on the photo/album relationship. Do not rely on the filename sequence number: rescans, insertions, and corrections all break it, and the ordering needs to survive them. - Use a scheme that supports insertion between two photos without renumbering the whole album — sparse integers or fractional ranks. - Album CRUD, plus assigning and reassigning photos between albums. - An album detail view showing photos in order with their dating status visible at a glance. - Reordering here is API-level only; drag-reorder UI is deliberately deferred to v0.5.0. - Ordering changes must invalidate any derived constraints computed from the old order — stale derived dates that silently outlive the ordering they came from would be worse than no derived dates at all. ## Done when - [ ] Photos have a stable, explicit order within an album - [ ] A photo can be inserted mid-album without renumbering siblings - [ ] The album view renders photos in order with status visible - [ ] Reordering invalidates dependent derived constraints - [ ] Order changes are audited ## References - `backend/app/models/models.py` (`Album`, currently minimal) - `docs/circa-spec.md` Phase 2 Blocks: group constraint propagation.
claude-bot added this to the v0.4.0 milestone 2026-07-28 04:55:04 +00:00
Sign in to join this conversation.
No description provided.