fix(web): preserve composer draft during worktree setup - #9197
Merged
maria-rcks merged 1 commit intoSep 2, 2026
Merged
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped web bug fix that moves composer state from a promoted draft ID to the existing canonical scoped thread key, preserving text entered during worktree setup. The accompanying test covers the promotion-time edit scenario, with no schema, configuration, security, billing, or deployment impact. You can add or adjust custom eligibility rules. Learn more. |
github-actions Bot
added a commit
to omarcresp/t3code-flake
that referenced
this pull request
Sep 2, 2026
## What's Changed * feat(updates): continue active threads across server restarts by @maria-rcks in pingdotgg/t3code#9167 * fix(mobile): prevent message and composer overlap by @juliusmarminge in pingdotgg/t3code#9195 * fix(web): preserve composer draft during worktree setup by @maria-rcks in pingdotgg/t3code#9197 * fix(web): prevent two-digit list markers from being clipped by @G-R3 in pingdotgg/t3code#9101 ## New Contributors * @G-R3 made their first contribution in pingdotgg/t3code#9101 **Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260902.1256...v0.0.39-nightly.20260902.1257 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260902.1257
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.
Note
Written by
gpt-5.6-solon behalf of MariaDraft promotion deleted composer state when setup completed, so follow-up text typed while a remote worktree action was running disappeared. This moves the draft to the canonical scoped thread key when promotion finalizes and covers edits made during promotion in the existing store tests.
Verification: 101 focused store tests, web typecheck, targeted lint, and a real app flow with an eight-second worktree setup passed. Real T3 Code verification video.
Implemented with
gpt-5.6-solin the Codex harness.Note
Medium Risk
Touches composer draft lifecycle during promotion finalization; wrong key handling could duplicate or leak drafts, but scope is limited to the promoting-draft cleanup path with added test coverage.
Overview
Fixes composer text disappearing when a draft thread finishes promoting (for example while a remote worktree setup is still running). Finalizing promotion used to drop the draft’s composer state when cleaning up draft-thread mappings; it now relocates that state onto the canonical scoped thread key from
promotedToinstead of revoking attachments and deleting the draft entry.removeDraftThreadReferencesaccepts an optional destination ref for that move.finalizePromotedDraftThreadonly runs when a promoting draft exists and passespromotedTothrough. Store tests now assert prompts survive on the real thread after finalize, including text typed on the draft id aftermarkPromotedDraftThread.Reviewed by Cursor Bugbot for commit b080411. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix
finalizePromotedDraftThreadto preserve composer data on canonical threadremoveDraftThreadReferencesnow accepts an optional canonical destination; when supplied, it re-keys the draft's composer data to the canonical thread instead of revoking preview URLs.finalizePromotedDraftThreadpasses the promoted destination to the helper so the composer data survives cleanup.Macroscope summarized b080411.