Skip to content

Preserve prompt drafts and protect workspace data - #13

Merged
tanRdev merged 1 commit into
mainfrom
fix/codex-audit-foundations
Nov 8, 2026
Merged

tanRdev merged 1 commit into
mainfrom
fix/codex-audit-foundations

Conversation

@tanRdev

@tanRdev tanRdev commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Pi Desktop could erase drafts typed during a run, restore the wrong thread's draft, strip prompt formatting, and force-delete dirty worktrees. This change preserves user input and checkout files, and makes fallback file search honor the query.

  • Persist drafts in the workspace controller, independent of composer visibility. Keep completion scoped to the submitted context and draft revision.
  • Derive attachment previews from retained file mentions. Preserve previews on failure and reject picker results after thread changes or unmount.
  • Preserve prompt indentation and newlines through routing and submission.
  • Refuse ordinary removal of dirty worktrees, retain catalog records when Git removal fails, and detach repositories without deleting secondary checkouts.
  • Reject missing explicit base branches. Match fallback search queries before applying limits, prune exclusions, and support root/nested recursive globs.
  • Record the prioritized follow-up roadmap in docs/IMPROVEMENTS.md.

Validation: 303 test files passed, 2,077 tests passed, 2 existing skips. Typechecks, lint, contract coverage, import boundaries, and file-size checks passed. Independent standards/spec reviews found no remaining defects. React Doctor reported no issues in the changed code.

Closes #6
Closes #7
Refs #8

@tanRdev
tanRdev merged commit 43c639d into main Nov 8, 2026
1 check passed
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.

P1: Protect worktree data and honor starting branches P1: Preserve prompt formatting and per-thread drafts

1 participant