Skip to content

feat(debug): autosave debug bundles + harden feed debug persistence - #36

Merged
Juliusolsson05 merged 2 commits into
mainfrom
debug-bundle-autosave
Apr 29, 2026
Merged

Juliusolsson05 merged 2 commits into
mainfrom
debug-bundle-autosave

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Summary

Two debug-tooling commits that were sitting on a stale local branch (`debug-bundle-autosave`, last touched 2026-04-28). Rebased onto `main` with conflict resolution against the dictation work that landed in PRs #31 and #32.

`feat(debug): autosave debug bundles`

Adds an opt-in periodic + last-chance debug bundle dump for active agents. Includes a new `aggressiveDebugPersistence` setting (off by default — bundles can be large), a command-palette entry to trigger a save manually, and integration in App.tsx for unload-time persistence. Touches:

  • `src/main/storage/debugBundle.ts`
  • `src/renderer/src/features/debug/saveDebugBundle.ts`
  • `src/renderer/src/app-state/settings/{types,persistence}.ts` — new `aggressiveDebugPersistence: boolean`
  • `src/renderer/src/features/{command-palette,settings}/...`
  • `src/renderer/src/app/App.tsx`

`fix(debug): harden feed debug persistence`

Tightens `feedDebugLog.ts` write-path so a partial / interrupted write doesn't corrupt the file on next read.

Conflict resolution

Two settings files conflicted with the dictation feature additions on `main`:

  • `settings/types.ts` — combined: kept `dictationEnabled` / `dictationProvider` / `dictationShortcut` AND added `aggressiveDebugPersistence`.
  • `settings/persistence.ts` — combined the same way in `coerceSettings` and `DEFAULT_SETTINGS`.

Test plan

  • Reviewer: enable `aggressiveDebugPersistence` in Settings, run an agent, confirm bundles drop into `~/.config/cc-shell/debug-bundles/` on the configured cadence and on quit.
  • Reviewer: confirm dictation still works (the conflict resolution in `settings/persistence.ts` and `settings/types.ts` preserves all dictation fields).

🤖 Generated with Claude Code

@Juliusolsson05
Juliusolsson05 merged commit fc4f668 into main Apr 29, 2026
@Juliusolsson05
Juliusolsson05 deleted the debug-bundle-autosave branch July 7, 2026 21:51
Juliusolsson05 added a commit that referenced this pull request Sep 23, 2026
…ackages

- packages/pi-terminal-headless -> 5a00520 (PR #1 merged, with the five
  Astra package fixes), packages/agent-transcript-parser -> 4ad8d9c (PR #36
  merged).
- catalog.test.ts: main's 126 + the two generated Pi splits = 128.
- hook/index.ts: main's BuiltInMcpDefaultsInput import alongside Pi's
  effectiveProviderRuntime / providerChoiceLabel imports.
- #1143's per-provider built-in MCP defaults: Pi entries in two fixtures
  (the product map is generated from AGENT_PROVIDER_KINDS).
- initialHistory: the superseded-load guard now compares the id the load
  READ with the pane's id, and no longer the window generation, which threw
  away OpenCode Terminal's startup load and rehydrate/recovery loads that
  bind their id mid-flight.
- piTranscript: a file whose header names another session is no longer
  this session (the package now discovers by header, like pi), so it reads
  as empty rather than being refused after a by-name match.

Refs #1132

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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