Remember recent sources and clarify Sources inspection copy - #102
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
The Sources page describes finding videos, but users come here to inspect their data. Searches and pasted links also disappear after a full reload, so users must repeat requests to revisit their work.
What changed
The title is now "Search or paste a YouTube link". The subtext is removed. The placeholder includes a model comparison example, and the action is labeled "Inspect".
Recent sources replaces the initial empty section. It remembers thirty searches and inspected links per user. Selecting an entry restores saved results and dataset choices without another YouTube request or credit charge. Repeated inputs update the existing entry.
The user Durable Object stores inputs and asset references. Video data remains in the shared catalog. Expiring search, playlist, and channel responses gain shared R2 references. Account deletion clears personal history while retaining public assets used by other accounts.
flowchart LR subgraph Before A[Sources input]:::retained --> B[Temporary browser draft]:::removed C[Shared video catalog and R2]:::retained end subgraph After D[Sources input]:::retained --> E[User DO history and references]:::added E -->|restore saved data| F[Shared video catalog and R2]:::retained end classDef retained fill:#E0F2FE,stroke:#0284C7,color:#0C4A6E classDef added fill:#DCFCE7,stroke:#16A34A,color:#14532D classDef removed fill:#FEE2E2,stroke:#DC2626,color:#7F1D1D,stroke-dasharray:4 3Blue components are retained; green adds durable history, and red shows the replaced temporary-only history.
Tests
Both builds passed. Validation covers 95 Durable Object integration tests, 81 web unit tests, 17 API/schema tests, and 36 dashboard browser cases. Tests cover reload restoration, user isolation, duplicate handling, retention, deletion, and history-load failures. Documentation and diff checks passed.
Deployment notes
Deploy both platform and web changes. The existing user DO initializes its history table automatically. No new bindings or class migration are required. Deployment verification remains pending.