Repository navigation
Custom data: edit an upload with a reviewed diff, Add data dialog, dataset notes (re-land of #74) - #76
Merged
Conversation
…fter its changes are reviewed Saved work → Custom data gains "Edit / replace…" on each upload the reader may edit. It opens the latest version as editable text (or takes a replacement file), matched against that dataset's own studies, and saving adds the next version; earlier versions and analyses pinned to them are untouched. Before any save that adds a version — this one, or an Explore upload whose name is already stored, which used to become a new version silently — the page shows what changes from the latest version (lib/custom-data-diff.ts): cases removed and added, columns removed, added and retyped, per column the values changed, cleared and filled in with examples, studies gained or lost, a rename; and every change as a downloadable TSV. Numbers compare as numbers and row order does not matter, so an export re-uploaded is "no changes" and cannot be saved. A change that removes or overwrites anything needs a confirming tick; additions alone do not. The server holds the same line: a new version names the version it was compared against (baseVersion) and is refused (409) when that is no longer the latest, so a version saved by someone else in between is never replaced unseen, and refused when it is the same data again. Verified: unit tests for the diff; store contracts (stale base, same data, shared editors) on PGlite; in a browser, a 200-patient upload edited (one patient removed, one value changed, one cleared, a column added) showed exactly those changes, blocked the save until ticked, and listed v2; unchanged text reported no changes with saving disabled; no console errors. Gate passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GhQZmcBkFwS6zSB7KbapX
…edits and a dataset note - Edit… opens a full-screen editor: change values in a table or merge a file or pasted table, then review every change before saving it as the next version. Cancel at every step; the review is the confirmation. - An edit only adds or updates: rows whose id matches show what changes, new ids are added, nothing is removed. The server refuses a version that drops a row or column. - Add data is a primary button under Uploads and opens a dialog for the upload steps. - A dataset has a note (migration 0008), set when it is added and shown in the list. Changing only the note saves it without a new version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015GhQZmcBkFwS6zSB7KbapX
|
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.
Re-lands #74, which never reached master. #74 was stacked on #72, and it was merged into
session/saved-managerafter #72 had already merged. GitHub doesn't retarget a PR whose base branch still exists, so these commits stayed on that branch.These are the same two commits, rebased onto master. The only conflict was the migration list in
test/postgres.db-test.ts, which now holds both0008_custom_dataset_note.sqland0009_app_role.sql.What changes (as in #74)
Database
Testing
npm test: 1656 pass.npm run test:db: 66 pass. tsc and eslint are clean.🤖 Generated with Claude Code
https://claude.ai/code/session_015GhQZmcBkFwS6zSB7KbapX