Repository navigation
Storage: Save & delete a worktree - #60
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l only missing identity Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r can't be saved git quotes non-ASCII paths by default, so café/.env reached the name check as .env" and was committed. Use -z, and refuse when the listing fails. Drop the unneeded edit to the upstream permission test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
The Storage page's Delete dialog gets a third button when a worktree has uncommitted files and a branch:
The save is a commit on the worktree's own branch, on that machine only, and never pushed. That was the owner's pick on 2026-11-06 ("just go w ur pick"). When he next messages the thread, T3 rebuilds the folder from that branch, so the work comes back.
Different builds on different machines: the overview now reports
canSaveChanges, and the button shows only for machines that report it. An older server would drop the unknownsaveChangeskey and force-delete instead, so the button stays hidden for it.savedCommitis optional, so a plain Delete against an older server still decodes.Everything lives in the feature's own files, plus one line in the fork's own permission test inside
RpcAuthorization.test.ts. There are no new upstream seams.Evidence
After: I ran it live on a dev server with a throwaway T3 home. The demo worktree had a tracked edit and a new
notes/folder holding 2 files.Saved before deleting the worktree, holdingnotes/plan.md,notes/todo.mdandreadme.md.git show t3/5e6f7a8b:notes/plan.mdprinted the saved content.StorageOverview.test.tsandRpcAuthorization.test.ts. The new tests:.env.localis refused, nothing stays staged, and the folder is kept;tscis clean (server, web). Lint and knip are clean.768564ef8.How I proved it: a live click-through on a dev server, then reading the commit back out of git, plus real-git server tests.
Thermo review (4 axes + Opus merge): 1 blocker. Git quotes non-ASCII paths, so
café/.envslipped past the .env guard. Fixed in763a16a0e(diff --cached --name-only -z, and refuse when the listing fails). A new test fails without-zand passes with it; 30/30 pass. The re-check found 0 new blockers. The edit to the upstream permission test was dropped, so this PR touches only the feature's own files and CUSTOM.md.Merge Danger
Door: two-way for the code. Each save adds a commit to a branch, which you can undo with
git reseton that branch.Blast Radius: contained
Only the Storage page's Delete dialog changes. The save commits every non-ignored file except
.envfiles, so stray build output or other secrets in non-ignored files would land on the thread's branch and could be pushed later with it.--no-verifyskips pre-commit hooks, but a post-commit hook still runs.🤖 Generated with Claude Code