Skip to content

Resolve Clip Count Display Inaccuracy & Delete Clip Display - #14

Open
mfisher31 wants to merge 3 commits into
mieweb:mainfrom
mfisher31:housekeeping-00
Open

Resolve Clip Count Display Inaccuracy & Delete Clip Display#14
mfisher31 wants to merge 3 commits into
mieweb:mainfrom
mfisher31:housekeeping-00

Conversation

@mfisher31

Copy link
Copy Markdown

Fixes clip count drift and soft-delete persistence across refreshes, reconciles, and project changes.

Closes #5
Closes #4

Changes

  • Persist deleted and deletedAt on timeline entries in the Rust backend
  • Preserve soft-deleted entries when saving timelines from the filtered React clips state
  • Compute project video counts from active, non-deleted timeline entries instead of stale metadata
  • Initialize newly added and reconciled entries with non-deleted defaults
  • Refresh project counts after clip mutations without triggering a refresh loop

Result

  • Soft-deleted clips stay deleted after refresh or project switch
  • Reconcile no longer re-adds previously deleted clips as orphaned videos
  • Project counts stay aligned with the visible clips list

Validation

  • Deleted clips remained hidden after refresh
  • Project and clip counts stayed in sync across project changes and manual refresh
  • cargo check --manifest-path src-tauri/Cargo.toml passed

…on aliases.

fixes: clip-counter badge always displaying "0"
- Add deleted/deleted_at fields to TimelineEntry Rust struct so serde
  no longer silently drops them when round-tripping through save_project_timeline
- Fix saveTimeline in ClipsList to merge backend entries not present in
  current React state, preventing previously-deleted clips from being
  dropped and then re-added as orphans by reconcile
- Fix get_projects to count active (non-deleted) entries directly from
  timeline entries rather than trusting stale metadata.total_videos
- Pass refreshProjects as onClipsUpdate in ProjectPanel so badge updates
  after delete without triggering infinite reload loop
- Remove onClipsUpdate call from initial loadClips to prevent refresh
  cycle; callback now only fires after mutations (delete)
@mfisher31 mfisher31 changed the title Housekeeping 00 Resolve Clip Count Display Inaccuracy & Delete Clip Display Mar 31, 2026
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.

Project clip count shows 0 when projects exist Delete Confirmation Shows But Recordings Reappear After Refresh

1 participant