Skip to content

feat: undo discard and abandon from toast actions - #294

Merged
Ziinc merged 9 commits into
mainfrom
cursor/undo-discard-abandon-e294
Aug 15, 2026
Merged

feat: undo discard and abandon from toast actions#294
Ziinc merged 9 commits into
mainfrom
cursor/undo-discard-abandon-e294

Conversation

@Ziinc

@Ziinc Ziinc commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Combines #100 (Git reflog Learn articles) with toast Undo for discard/abandon. Rebased on current main.

Product

  • Discard (file, discard-all, tentative Delete changes): snapshot WC, then Undo on the success toast restores it.
  • Abandon commit: toast Undo restores that Jujutsu operation if it is still HEAD.
  • Action toasts stay 12s. Confirmation copy no longer says the action cannot be undone.

Docs

Treq how-tos use toast Undo, not git checkout / git reflog. The Git reflog concept page and deleted-branch how-to stay as Git-native recovery and point Treq discards back at the product Undo path.

Tests

  • Rust: undo abandon + stale-op rejection
  • Integration: abandon undo, tentative discard undo
  • Screenshot: commits-abandon-undo.spec.tsx, review-discard-undo.spec.tsx, discard-all-confirmation.spec.tsx
Open in Web Open in Cursor 

@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

@cursor cursor Bot changed the title Undo discard and abandon from toast actions Undo discard/abandon from toasts, and Git reflog docs Aug 15, 2026
cursoragent and others added 9 commits August 15, 2026 18:10
Restore discarded working-copy snapshots and abandoned commits from
the success toast. Undo uses Jujutsu operations, not Git reflog.
Docs now describe Treq undo instead of git checkout/reflog.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Clear the hide-after-animation timeout when Undo runs so a restored
commit is not immediately filtered out of the Commits list.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Rewrite the reflog overview in house voice as a learn concepts
page, wire it into the Git index, and link it from version control.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Explain that branch deletion drops the ref while commits remain, walk
through HEAD reflog recovery, and document when local recovery cannot work.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Fix the broken discarding-changes link, add in-body links so the
recovery how-to is no longer thin, and point sibling reflog mentions
at the new concept page.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Keep toast Undo as the Treq path. Link the Git reflog concept and
deleted-branch how-to as Git-native recovery, not as a substitute
for discard or abandon in a colocated workspace.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Extract toast dismiss helper to drop nested callbacks. Use findByText
for the abandon success toast. Restore the discarding-changes next-step
link on the Git reflog article.

Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/undo-discard-abandon-e294 branch from 933b646 to d347103 Compare August 15, 2026 18:10
@cursor cursor Bot changed the title Undo discard/abandon from toasts, and Git reflog docs feat: undo discard and abandon from toast actions Aug 15, 2026
@Ziinc
Ziinc marked this pull request as ready for review August 15, 2026 18:37
@Ziinc
Ziinc merged commit a1b342d into main Aug 15, 2026
18 checks passed
@Ziinc
Ziinc deleted the cursor/undo-discard-abandon-e294 branch August 15, 2026 18:37
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.

2 participants