Skip to content

Fix deleted photos persisting in the home feed and skewing pagination #17

Description

@rioredwards

Summary

Deleting a photo from the home page does not remove server-rendered initial cards from the visible feed. The code currently accepts this limitation, which leaves stale UI until refresh and can skew offset-based pagination after deletions.

Why this matters

  • Users see photos that were already deleted
  • The feed becomes inconsistent until a manual reload
  • Offset pagination can skip or duplicate records after items are removed

Evidence

  • components/home-page-client.tsx:97-105
  • components/home-page-client.tsx:222-223
  • components/home-page-client.tsx:113-118

Suggested fix

Move the full feed into client state after hydration, or keep a hidden-deleted-ID set that filters the rendered initial cards as soon as deletion succeeds. Revisit pagination so it is resilient to mutation, ideally with cursor-based paging instead of count offsets.

Acceptance criteria

  • A deleted photo disappears immediately from the home feed without a refresh
  • Infinite scroll does not skip or repeat items after deletions
  • Deletion behavior is consistent for uploaded, initial, and paged-in cards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions