Add saved exports with Room DB, export hub, and thumbnails#39
Merged
Conversation
|
App apk at:
|
LukeNeedham
commented
Jun 24, 2026
| mkdirs() | ||
| } | ||
|
|
||
| private val thumbnailsDir = File(context.filesDir, "thumbnails") |
Owner
Author
There was a problem hiding this comment.
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(), |
| import androidx.compose.ui.window.Dialog | ||
|
|
||
| @Composable | ||
| fun ExportDeleteConfirmDialog( |
Owner
Author
There was a problem hiding this comment.
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( |
| Column( | ||
| modifier = Modifier.weight(1f) | ||
| ) { | ||
| Text( |
Owner
Author
There was a problem hiding this comment.
Show this name at the top, then the range of dates, then the thumbnails
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
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
5b9bf42 to
0e9245a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
saved_exports/directoryChanges
New files:
data/persistence/room/AppDatabase.kt— Room database with migration supportdata/persistence/room/SavedExportEntity.kt— Room entity for saved exports (including thumbnail file names)data/persistence/room/SavedExportRoomDao.kt— Room DAO with Flow-based queriesdata/persistence/SavedExportsDao.kt— wraps Room DAO + manages video/thumbnail file storagedomain/model/SavedExport.kt— domain model with video file, thumbnails, date rangeui/feature/exportdiary/hub/— Export Hub page (Page, PageContent, ViewModel)ui/feature/exportdiary/hub/ExportDeleteConfirmDialog.kt— confirmation dialog for deleteModified files:
ExportDiaryCreateViewModel/ExportDiaryCreatePageReady— added export name field; auto-saves when name is providedNormalPage/NormalRouter— added ExportHub destination, updated navigation flowCalendarSideMenu/CalendarPage/CalendarPageContent— single "Export" menu item opens hubKoinModule— registered Room database, SavedExportsDao, ExportHubViewModelbuild.gradle.kts/buildSrc/deps.kt— added Room + KSP dependenciesTest plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01TTpPGgNZYY1GpmLtnU5APU