Skip to content

Add saved exports with Room DB, export hub, and thumbnails#39

Merged
LukeNeedham merged 10 commits into
mainfrom
claude/top-todo-ef4y8i
Jun 24, 2026
Merged

Add saved exports with Room DB, export hub, and thumbnails#39
LukeNeedham merged 10 commits into
mainfrom
claude/top-todo-ef4y8i

Conversation

@LukeNeedham

@LukeNeedham LukeNeedham commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Users can name an export during creation to save it in the app for later viewing
  • New Export Hub page (accessible from calendar side menu) shows a "Create new export" button and all saved exports
  • Saved export metadata stored in Room database; video files stored in saved_exports/ directory
  • Saved export list items display thumbnail previews from the diary videos included in the export
  • Delete confirmation dialog before removing a saved export
  • Empty state message shown when no saved exports exist yet

Changes

New files:

  • data/persistence/room/AppDatabase.kt — Room database with migration support
  • data/persistence/room/SavedExportEntity.kt — Room entity for saved exports (including thumbnail file names)
  • data/persistence/room/SavedExportRoomDao.kt — Room DAO with Flow-based queries
  • data/persistence/SavedExportsDao.kt — wraps Room DAO + manages video/thumbnail file storage
  • domain/model/SavedExport.kt — domain model with video file, thumbnails, date range
  • ui/feature/exportdiary/hub/ — Export Hub page (Page, PageContent, ViewModel)
  • ui/feature/exportdiary/hub/ExportDeleteConfirmDialog.kt — confirmation dialog for delete

Modified files:

  • ExportDiaryCreateViewModel / ExportDiaryCreatePageReady — added export name field; auto-saves when name is provided
  • NormalPage / NormalRouter — added ExportHub destination, updated navigation flow
  • CalendarSideMenu / CalendarPage / CalendarPageContent — single "Export" menu item opens hub
  • KoinModule — registered Room database, SavedExportsDao, ExportHubViewModel
  • build.gradle.kts / buildSrc/deps.kt — added Room + KSP dependencies

Test plan

  • Create an export with a name, verify it appears in the Export Hub with thumbnails
  • Create an export without a name, verify it exports but is not saved
  • Open Export Hub from calendar side menu, verify saved exports are listed
  • Tap a saved export to view/play it
  • Tap delete on a saved export, verify confirmation dialog appears
  • Confirm delete, verify export is removed from the list
  • Verify empty state text shows when no exports are saved
  • Verify thumbnail strip displays correctly on saved export items

🤖 Generated with Claude Code

https://claude.ai/code/session_01TTpPGgNZYY1GpmLtnU5APU

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

App apk at:
https://github.com/LukeNeedham/VideoDiary/releases/download/claude-top-todo-ef4y8i-108-1/app-debug.apk

  • Triggered by: PR Commit 425c142f1f5fe89eb4300d077ef3379a93f09f59
  • Built at: 24/06/2026 12:32:23

@LukeNeedham LukeNeedham changed the title Add export catalogue: save and browse named exports Add saved exports with Room DB, export hub, and thumbnails Jun 24, 2026
mkdirs()
}

private val thumbnailsDir = File(context.filesDir, "thumbnails")

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

This shouldnt be here, this is internal implementation detail for thumbnails

val startDate: LocalDate,
val endDate: LocalDate,
val dayVideoCount: Int,
val thumbnailFiles: List<File> = emptyList(),

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Remove default value

import androidx.compose.ui.window.Dialog

@Composable
fun ExportDeleteConfirmDialog(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Extract a common "confirm delete dialog" composable and use it for both this use-case and for deleting a day video

}

@Composable
private fun SavedExportItem(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Extract to own file

Column(
modifier = Modifier.weight(1f)
) {
Text(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Show this name at the top, then the range of dates, then the thumbnails

claude added 10 commits June 24, 2026 10:28
After exporting a video, users can now name and save it via a new Save
button on the export view page. A new "Saved exports" entry in the
calendar side menu opens the export catalogue, listing all saved exports
with the ability to view or delete them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTpPGgNZYY1GpmLtnU5APU
- Replace file-based metadata storage with Room SQL database; the
  saved_exports table is now the source of truth for whether a saved
  export exists.
- Add Export Hub page: single "Export" side menu entry opens a hub
  linking to "Create new export" and "Saved exports".
- Move export naming into the create export page with an optional
  name field and explanation text; filling it auto-saves on export.
- Remove the separate save page and the Save button from the video
  player view.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTpPGgNZYY1GpmLtnU5APU
Show the "Create new export" button at the top of the export hub,
with saved exports listed directly below it. Removes the separate
export catalogue page and its navigation entry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTpPGgNZYY1GpmLtnU5APU
- Show confirmation dialog before deleting a saved export
- Always show "Saved exports" header with empty state message when no exports exist
- Store and display thumbnail images in saved export list items
- Add Room migration (v1→v2) for thumbnailFileNames column

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTpPGgNZYY1GpmLtnU5APU
Replace videoFileName, startDate, endDate, dayVideoCount, and
thumbnailFileNames columns with a single includedDates CSV string.
Start date, end date, video count, and thumbnails are all derived
at read time from the dates list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTpPGgNZYY1GpmLtnU5APU
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTpPGgNZYY1GpmLtnU5APU
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTpPGgNZYY1GpmLtnU5APU
…bnails

- Extract common DeleteConfirmDialog to ui/feature/common/, used by both
  calendar and export hub
- Extract SavedExportItem to its own file
- Reorder SavedExportItem: name, then date range, then thumbnails
- Move thumbnail resolution from SavedExportsDao to ExportHubViewModel
  via VideosDao.getThumbnailFileIfExists()
- Replace thumbnailFiles with includedDates in SavedExport domain model
- Remove default value from SavedExport fields
- Add docs to SavedExportEntity.includedDates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTpPGgNZYY1GpmLtnU5APU
@LukeNeedham LukeNeedham force-pushed the claude/top-todo-ef4y8i branch from 5b9bf42 to 0e9245a Compare June 24, 2026 10:28
@LukeNeedham LukeNeedham merged commit 5ab78dd into main Jun 24, 2026
1 check passed
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.

2 participants