github / github/copilot-cli

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

Đang mở
#4,502 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

area:sessions
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với chế độ xem phiên và trạng thái list_sessions, đặc biệt là trạng thái idle,archived; xem lại session-store.db và events.jsonl để xác nhận dữ liệu nào được giữ lại. Hoàn thành nghĩa là có thể tìm thấy một phiên đã lưu trữ và đánh dấu phiên đó là chưa hoàn thành từ UI, đồng thời làm cho các điều khiển Allow và Done an toàn hơn nếu việc này vẫn nằm trong phạm vi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
shell, vscode
Lĩnh vực
cli
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.