Skip to content

feat(history): add persisted capture toggle to Customize - #1475

Merged
Alan-TheGentleman merged 1 commit into
mainfrom
feat/history-customize-toggle
Sep 26, 2026
Merged

Alan-TheGentleman merged 1 commit into
mainfrom
feat/history-customize-toggle

Conversation

@Alan-TheGentleman

@Alan-TheGentleman Alan-TheGentleman commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1474

Summary

  • Adds a persisted Prompt history capture control in Gentle → Customize → History, so enabling history no longer needs an environment variable.
  • Precedence: explicit GENTLE_PI_HISTORY_CAPTURE value → saved preference → off. Invalid or unreadable preference files fail closed.
  • The check runs per prompt, per selector open and per shutdown GC, so changes apply live; turning capture off never deletes history.

Changes

File Change
lib/history-capture-policy.ts New policy: <configHome>/history-capture.json, strict validation, atomic write, env precedence.
extensions/history/index.ts HistoryDeps.gentlePiConfigHome seam; every gate uses the shared policy; disabled notice points to Customize or the env override.
extensions/gentle-shell.ts, lib/visual-customize-view.ts New History category with enable/disable rows, current/override markers and a preference-vs-effective preview.
docs/prompt-history.md, README.md Enable/disable steps, precedence table, file format, override and malformed-file behavior.
tests/… Policy, precedence, live toggle, fail-closed and Customize row coverage; harnesses isolated from the real config home.

Test plan

  • node --experimental-strip-types --test tests/*.test.ts → 3814 pass, 0 fail, 43 skipped.
  • node scripts/check-types.mjs → no regressions against the recorded baseline.
  • Native review approved.

Summary by CodeRabbit

  • New Features
    • Added a History category in Customize to turn prompt-history capture on or off. Changes apply from the next prompt, and existing history is retained when capture is disabled.
    • Environment settings can override the saved preference; Customize shows the effective setting and any override.
  • Documentation
    • Clarified how saved preferences, environment overrides, and default-off behavior work, including how malformed preference files are handled.

@Alan-TheGentleman Alan-TheGentleman added the type:feature New feature label Sep 26, 2026
@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 1b84067f-66f9-4b19-bdea-c9d403ef6faf

📥 Commits

Reviewing files that changed from the base of the PR and between 45240bc and 9eaa2ea.

📒 Files selected for processing (13)
  • README.md
  • docs/prompt-history.md
  • extensions/gentle-shell.ts
  • extensions/history/index.ts
  • lib/history-capture-policy.ts
  • lib/visual-customize-view.ts
  • odd/tasks/history-followups.md
  • tests/gentle-shell.test.ts
  • tests/history-capture-policy.test.ts
  • tests/history-command-registration.test.ts
  • tests/history-delete-confirm.test.ts
  • tests/history-off-path.test.ts
  • tests/history-session-writer.test.ts
 ______________________________________
< I am an equal opportunity nitpicker. >
 --------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Alan-TheGentleman
Alan-TheGentleman merged commit d615b2e into main Sep 26, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(history): persisted capture toggle in Customize

1 participant