Repository navigation
feat(sessions): Del-to-delete for in-REPL /resume and /replay pickers - #26
Merged
Merged
Conversation
Shared useSessionDelete hook serves only the two new consumers, reusing guards, delete API, confirm dialog, and analytics. ResumeConversation left untouched. Plan: docs/openclaude/plans/2026-10-13-resume-replay-delete-wiring.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--resume-CLI-only from feat(sessions): inline delete in resume picker with confirm dialog #25) is now wired into the two in-REPL pickers that mount the sameLogSelectorwithout delete wiring:/resume(src/commands/resume/resume.tsx) and/replay(src/commands/replay/replay.tsx). New shared hooksrc/hooks/useSessionDelete.ts(+useSessionDelete.test.tsx, 6 tests) serves only the two new consumers;ResumeConversation.tsxis deliberately untouched (byte-identical, zero regression surface on the proven path). Both pickers renderDeleteSessionConfirm+ error/notice banners inResumeConversation's relative positions and passonDeleteRequest+isInputDisabledtoLogSelector. Stale-selection guards included (selectedSession/sessionSummaryin/resume,selected/replayIndexin/replay).onDeleteRequest?.()with no prop) while the footer unconditionally advertisedDel to delete— misleading UI. Follow-up to fix(resume): clean terminal exit from session picker #24 (Esc/alt-screen fix) + feat(sessions): inline delete in resume picker with confirm dialog #25 (CLI delete).Impact
naborts; active session and live-background sessions blocked with explanatory messages). No Esc/exit, listing, resume/select, rename, search, preview, or cross-project behavior changed.useSessionDeletehook reusesgetDeleteBlockReason,deleteSession,DeleteSessionConfirm, andtengu_session_deleteanalytics verbatim — one shared implementation for the two new hosts. NoLogSelectorcontract changes.Testing
bun install --frozen-lockfile— clean (not shallow; 1 package).bun run lint:any-budget— ok (779 = baseline 779).bun run smoke— green (0.31.0 (OpenClaude), externals valid, SDK declarations in sync).bun run deadcode(knip) — exit 0, configuration hints only.bunx eslinton all 4 touched files, run twice — clean both passes.bun run typecheck, run twice — only the 12 known pre-existing ink-reconciler errors (ink.tsx/reconciler.ts/render-to-screen.ts, identical on pristinemain); zero in touched files.bun run typecheck:type-tests— passed (10 files checked).node bin/openclaude --version—0.31.0 (OpenClaude); compile-cache-disabled launcher check —LAUNCHER_OK.bun test src/hooks/useSessionDelete.test.tsx— 6 pass, 0 fail.bun test src/screens/resumeDeleteGuards.test.ts src/components/DeleteSessionConfirm.render.test.tsx— green (pre-existing suites).bun run test:provider— 1748 pass / 3 fail; rerun showed 2 fail (count varies run to run). All observed failures are timing-sensitive provider internals (Claude stream watchdog … never settles,native Anthropic client validates and clamps API_TIMEOUT_MS) — none touch sessions/resume/replay/hooks.npm run test:provider-recommendation— 165 pass, 0 fail.git fetch https://github.com/Gitlawb/openclaude.git main+bun run security:pr-scan -- --base FETCH_HEAD --head HEAD— 1 medium in untouchedscripts/prepare.mjs(same pre-existing finding as fix(resume): clean terminal exit from session picker #24/feat(sessions): inline delete in resume picker with confirm dialog #25).node dist/cli.mjssession): Del → confirm →Deleted …notice + entry dropped in both/resumeand/replay; dialog-cancel/Esc aborts cleanly; active-session block verified; Esc-at-picker unchanged; resume/select + replay-load regressions pass;--resumeCLI delete flow unchanged. Disk-level verification: deleted session.jsonlfiles confirmed gone from~/.openclaude/projects/, no orphaned sidecars.src/hooks/useSessionDelete.test.tsx(open-pending, confirm-deletes+notice, cancel-no-op, active-blocked, bg-running-blocked, already-deleted notice).bun test(test:full) is known to hang/stall on this Windows box for spawn-heavy suites (same as fix(resume): clean terminal exit from session picker #24/feat(sessions): inline delete in resume picker with confirm dialog #25: launcher heap/compile-cache + bughunter timeouts reproduced 21/9 on a pristineorigin/mainworktree); not re-chased here — CI is authoritative. The 3 (rerun: 2)test:providertiming flakes and the 12 tsc ink-reconciler errors are likewise pre-existing/environmental and outside this PR's surface.mindmodel_lookupunavailable in the agent toolset during this work (no.mindmodel/in repo).Notes
ResumeConversationonto the shared hook is an optional, explicitly out-of-scope follow-up (de-risking decision: keeps the proven path byte-identical)./replayremains repo-scoped with no all-projects toggle (pre-existing, unchanged). Laya advisory gate: approve 0.81, complete 0.83.