github / github/copilot-cli

Add a way to un-archive a session that was marked as Done

Aperta
#4,502 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

area:sessions
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

Describe the feature or problem you'd like to solve

Marking a session as Done archives it, and there is no way to reverse that from the UI. An accidental click permanently removes an active, in-progress session from the sessions list — even though none of the session's data is actually gone.

This is especially easy to trigger by mis-click: when a session is waiting on a tool permission prompt, the Allow button pops up very close to the Done checkbox in the sessions view on the left-hand side. Reaching for Allow and hitting Done instead archives the session you were actively working in. The two controls being adjacent means the mistake happens precisely in the moment you are trying to move a session forward.

Proposed solution
  1. An un-archive / "mark as not done" action on archived sessions.
  2. A visible way to list/filter archived sessions in the UI so a mis-archived session can be found again.
  3. Ideally, more spacing (or a confirmation) between the Allow button and the Done checkbox, since that adjacency is what makes the mis-click likely in the first place.

Since the underlying data is fully preserved, un-archiving should be a cheap, purely-presentational change — the information needed to restore the session is all still there.

Example prompts or workflows
  • "I accidentally marked an agent as done. Can I recover it?" — the case that prompted this request.
  • Reaching for Allow on a permission prompt, hitting Done, and needing to put the session straight back.
  • Marking a session Done, then discovering the PR needs follow-up work and wanting to resume the original session with its full context rather than starting fresh.
  • Reviewing archived sessions to find one worth reopening.
Additional context

Observed while recovering an accidentally-archived session (Copilot CLI runtime in VS Code):

  • No data is lost on archive. The transcript turns in session-store.db, the events.jsonl event log, the git worktree, the branch, and uncommitted changes were all fully intact.
  • list_sessions reports the session as status: "idle,archived", so the state is clearly tracked and reversible in principle.
  • Sending a new message to the session does not clear the archived flag — the session stays archived even once it becomes active again.
  • The archived flag does not appear in session-store.db or the session-state folder, so there is no supported way to undo it outside the UI.
  • A session can be archived while mid-turn and blocked on a pending permission prompt. In that state the turn is still unfinished, which makes the accidental archive both easy to do and easy to miss.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla vista delle sessioni e dallo stato di list_sessions, in particolare dallo stato idle,archived; esamina session-store.db ed events.jsonl per confermare quali dati vengono conservati. Il lavoro è completato quando una sessione archiviata può essere trovata e contrassegnata come non completata dalla UI, rendendo più sicuri i controlli Allow e Done se questo rientra ancora nell’ambito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
shell, vscode
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.