Skip to content

feat(sessions): inline delete in resume picker with confirm dialog - #25

Merged
MotionDevLab merged 2 commits into
mainfrom
feat/sessions-delete-ui
Oct 13, 2026
Merged

MotionDevLab merged 2 commits into
mainfrom
feat/sessions-delete-ui

Conversation

@MotionDevLab

Copy link
Copy Markdown
Owner

Summary

  • what changed: inline session deletion in the --resume picker — press Del on a focused session, confirm in a dialog, session file is deleted and the entry drops from the list with a bottom-placed notice; footer hints updated (Del to delete, y/n confirm hints). Safety guards block deleting the active session and sessions with live background runners (resumeDeleteGuards, unit-testable pure decisions). Commits bff8344d + 26eaf6b3 (rebased onto the Esc-exit fix below).
  • why it changed: previously the only way to remove old sessions was leaving the picker and deleting transcript files by hand.
  • dependency: stacked on fix(resume): clean terminal exit from session picker #24 (resume-picker Esc-exit fix) — merge after it. Was originally held pending that fix; now rebased onto it so delete-then-Esc exits cleanly through the same path.

Impact

  • user-facing impact: Del deletes the focused session after an explicit confirm; Esc cancels the dialog without side effects; active session and live background sessions are protected with an explanatory message.
  • developer/maintainer impact: new DeleteSessionConfirm component + resumeDeleteGuards seam; LogSelector gains delete-request wiring; ResumeConversation hosts deletion state. No changes to session-listing, resume, rename, or search semantics.

Testing

  • I ran the required local preflight (shared run at this HEAD — see results/notes below; full check could not complete on this machine).
  • exact commands and results:
    • bun install --frozen-lockfile — ok
    • bunx eslint on ResumeConversation.tsx, LogSelector.tsx, DeleteSessionConfirm.tsx — clean
    • bun run build — green (dist/cli.mjs, SDK bundle, externals valid)
    • bun run typecheck:type-tests — pass (10 files)
    • node bin/openclaude --version — 0.31.0 (OpenClaude); compile-cache-disabled launcher check — pass
    • bun run test:provider-recommendation — 165 pass / 0 fail
    • live test (built CLI, PTY): picker renders with the Del to delete footer; Esc exits via ?1049l with full mode cleanup and EXIT:1
    • interactive delete flow verified pre-rebase (Deleted … printed, entry removed); post-rebase verified render + Esc paths + build (rebase replayed cleanly with no conflicts; delete logic regions untouched by the rebase)
  • focused tests: reviewer is asked to delete one scratch session live (see Notes).
  • documented skipped checks, platform limitations, or verified pre-existing failures:
    • bun run check → test:full does not complete on this machine: process-spawning tests stall (5 s timeouts) — launcher compile-cache/heap suites and bughunter git-context tests. The launcher files (21 pass / 9 fail) were reproduced identically on a pristine origin/main worktree — not PR-owned (this PR touches no launcher/git/bughunter surface).
    • bun run typecheck — 12 errors, reproduced byte-identically on pristine origin/main (react-reconciler type skew in untouched src/ink/*; zero errors in changed files).
    • bun run test:provider — 1748 pass / 3 fail; all 3 network/timing environmental, none on the PR surface.
    • bun run security:pr-scan — 1 medium in scripts/prepare.mjs, a file this PR never touches (upstream churn; git log origin/main..HEAD -- scripts/prepare.mjs is empty).

Notes

  • provider/model path tested: local OpenCode Zen Router lane.
  • screenshots attached (if UI changed): picker screenshots with the delete footer are in the linked conversation.
  • follow-up work or known limitations: please delete one disposable session when reviewing to exercise the confirm path end-to-end post-rebase; test:full completion left to CI (clean runner).

Resume picker (ResumeConversation + LogSelector) gains Delete-key deletion with an explicit confirm step (DeleteSessionConfirm dialog), backed directly by the existing SDK deleteSession() primitive. Guards: active session file, live background sessions; optimistic list update; raced delete treated as success; filesystem errors surface verbatim and keep the row.

Tests: 12 new (resumeDeleteGuards 4, sessions.delete 5, DeleteSessionConfirm.render 3). Manual QA: delete/confirm, esc-cancel, search-filtered delete, cross-project delete all verified live; footer shows Del hint.

Plan: C:\Users\reini\Documents\Default Project\docs\openclaude\plans\2026-10-12-sessions-delete-easy-option-plan.md
Move the delete success/error banner below the session list so it stays visible when scrolled down (previously top-placed and scrolled out of view). Advertise the y/n keys in the confirm dialog guide (Enter/y to confirm, Esc/n to cancel).

Tests: DeleteSessionConfirm.render now covers n-cancel and guide text (5 tests). Live QA: scrolled delete shows bottom notice, remaining row stays focused, Esc exits cleanly.
@MotionDevLab
MotionDevLab force-pushed the feat/sessions-delete-ui branch from 26eaf6b to b04c774 Compare October 13, 2026 06:53
@MotionDevLab
MotionDevLab merged commit d7931fd into main Oct 13, 2026
5 checks passed
@MotionDevLab
MotionDevLab deleted the feat/sessions-delete-ui branch October 13, 2026 07:02
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.

1 participant