A failed delete keeps a resumed session stuck in Needs you as "Delete failed"

Open
#378 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
swift
Domain
cli, desktop

Research direction

Start with Attention.swift, which the issue names as the place that prioritizes failed removals, and trace how resume, unpause, messages, and sb undone update a session’s removal record. Compare that behavior with rm-keep to identify the expected clearing behavior. Check the Keep tooltip and the sb rm command path for the two related issues; done means a live session no longer appears as "Delete failed" and the Keep action and command clear the failed removal.

Written by the indexing model from the issue text.

Description

A failed delete stays attached to a session after the session comes back to life. The session then shows "Delete failed" in Needs you, with Keep and Retry buttons, while it is actually working.

What happened to account-move-session:

  1. The session was marked done, then paused.
  2. A bulk delete of done sessions included it. The delete failed because the worktree had 7 uncommitted files.
  3. A day later the user unpaused it. It resumed /go --yolo, committed its work, and opened a PR.
  4. The session's removal record still said state: failed, and Attention puts a failed removal ahead of everything else (Attention.swift, "Delete failed: …"). So the Inbox showed a live, working session as "Delete failed". The card's "Last reply" was the session's latest progress message, which had nothing to do with the failure.

Expected: when a session with a failed removal is resumed, unpaused, sent a message, or marked not done (sb undone), sbd drops the failed removal, as rm-keep does. The user didn't ask to delete a working session, and a stale failure should not hide its real state.

Two related problems:

  • The Keep button's tooltip says "Keep the session in Done". For a session that is no longer done, Keep only clears the failed delete, so the tooltip describes the wrong thing. It could say "Cancel the delete and keep the session".
  • sb has no command that does what Keep does. rm-keep is only reachable from the app and from inside sb rm --done, so a Manager or script can't clear a stuck failed delete. A command such as sb rm --keep <session> would cover it.
Dominant language
Swift
Stars
0
Forks
0
Avg merge
6h 15m
Merged PRs (30d)
308

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haacked/switchboard

All issues in haacked/switchboard

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.