Skip to content

Fix project source saving, restoration, and exports - #106

Merged
devhims merged 9 commits into
mainfrom
fix/project-source-linking
Sep 28, 2026
Merged

devhims merged 9 commits into
mainfrom
fix/project-source-linking

Conversation

@devhims

@devhims devhims commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

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 save
Loading

The 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.

@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
video2ctx-web Ready Ready Preview Sep 28, 2026 5:25pm UTC

@devhims
devhims marked this pull request as ready for review September 28, 2026 17:10
Base automatically changed from feat/sidebar-sources-agent-trends to main September 28, 2026 17:15
@devhims devhims changed the title Fix project source saving and restore Fix project source saving, restoration, and exports Sep 28, 2026
@devhims
devhims merged commit 8031d66 into main Sep 28, 2026
11 checks passed
@devhims
devhims deleted the fix/project-source-linking branch September 28, 2026 17:27

This branch was successfully deployed

1 active deployment
Preview — a658e02d Deployed Sep 28, 2026 by vercel[bot]
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.

1 participant