Fix project source saving, restoration, and exports - #106
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
devhims
marked this pull request as ready for review
September 28, 2026 17:10
This branch was successfully deployed
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.
Problem / Motivation
Adding sources from a project opened the generic Sources page, so successful searches and video inspections were missing from that project. Opening a result could also cancel a pending save. Saved project sources need to remain available after Recent sources rotates.
What changed
Add sources carries the selected project into Sources. A completed search or inspection saves its history entry and project reference in one user-storage transaction. Failed project writes roll back history changes, including pruning. Shared video assets remain in existing storage.
Project items restore their own saved snapshots without relinking or overwriting them. Refreshing Recent sources or saving the same input to another project leaves those snapshots unchanged. Failed saves retain separate retry actions and their original project destinations.
Project detail and exports use one reader for existing items and saved source references. Existing saved moments retain their timestamps. Returning to a project refreshes its saved items.
%%{init: {"theme":"base","themeVariables":{"actorBkg":"#e2e8f0","actorTextColor":"#0f172a","actorBorder":"#64748b","signalColor":"#334155","signalTextColor":"#64748b","sequenceNumberColor":"#ffffff","noteBkgColor":"#e2e8f0","noteTextColor":"#0f172a"}}}%% sequenceDiagram autonumber participant UI as Sources UI participant API as Platform participant DO as User storage Note over UI,DO: Before: separate browser writes, removed UI->>API: Save Recent source API->>DO: Write history UI->>API: Link source to project API->>DO: Write project reference Note over UI,DO: After: same storage retained, one transaction UI->>API: Save source with project ID API->>DO: Save history and project reference atomically DO-->>UI: Confirm saveThe separate browser link step is removed for newly completed sources; shared asset storage is retained.
Tests
Passed: 51 dashboard browser tests, 14 user-account integration tests, 819 platform unit tests, and 82 web unit tests. Platform type checking, the web production build, and generated documentation checks passed.
Regressions cover delayed saves, independent retries after switching projects, snapshot isolation, eviction, rollback, ownership, and exports.
Deployment
Deploy the platform before the web application. No new binding or class migration is required. Production verification remains after deployment.