Skip to content

feat(admin): enable 30 day default retention for chat history & remove warning #20853

Merged
skeshive merged 5 commits intomainfrom
rm-warning
Mar 2, 2026
Merged

feat(admin): enable 30 day default retention for chat history & remove warning #20853
skeshive merged 5 commits intomainfrom
rm-warning

Conversation

@skeshive
Copy link
Contributor

@skeshive skeshive commented Mar 2, 2026

@skeshive skeshive requested a review from a team as a code owner March 2, 2026 16:01
@gemini-cli
Copy link
Contributor

gemini-cli bot commented Mar 2, 2026

Hi @skeshive, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this.

We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines.

Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed.

Thank you for your understanding and for being a part of our community!

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request simplifies the chat history retention policy by establishing a default 30-day retention period and automatically enabling session cleanup. It removes the need for users to acknowledge a warning or manually enable this feature, integrating it seamlessly into the application's default behavior. The changes primarily involve updating configuration settings and removing UI elements and logic related to the old warning system.

Highlights

  • Default Chat History Retention: Chat history will now be retained for a default period of 30 days, with session cleanup automatically enabled.
  • Removal of Retention Warning: The previous warning mechanism and associated UI components for session retention have been removed, streamlining the user experience.
Changelog
  • packages/cli/src/config/settings.ts
    • Removed the 'warningAcknowledged' property from the 'SessionRetentionSettings' interface.
  • packages/cli/src/config/settingsSchema.ts
    • Updated the default value for 'Enable Session Cleanup' to 'true'.
    • Set the default 'Keep chat history' period to '30d'.
    • Removed the schema definition for 'warningAcknowledged'.
  • packages/cli/src/ui/AppContainer.tsx
    • Removed the import for 'useSessionRetentionCheck'.
    • Deleted the 'handleAutoEnableRetention' callback and the 'useSessionRetentionCheck' hook invocation.
    • Removed references to 'shouldShowRetentionWarning' and 'sessionsToDeleteCount' from UI state calculations.
  • packages/cli/src/ui/components/DialogManager.tsx
    • Removed the import for 'SessionRetentionWarningDialog'.
    • Deleted the 'handleKeep120Days' and 'handleKeep30Days' callbacks.
    • Removed the conditional rendering logic for 'SessionRetentionWarningDialog'.
  • packages/cli/src/ui/components/SessionRetentionWarningDialog.test.tsx
    • Removed the test file for 'SessionRetentionWarningDialog'.
  • packages/cli/src/ui/components/SessionRetentionWarningDialog.tsx
    • Removed the 'SessionRetentionWarningDialog' component file.
  • packages/cli/src/ui/components/snapshots/SessionRetentionWarningDialog.test.tsx.snap
    • Removed the snapshot test file for 'SessionRetentionWarningDialog'.
  • packages/cli/src/ui/contexts/UIStateContext.tsx
    • Removed 'shouldShowRetentionWarning' and 'sessionsToDeleteCount' properties from the 'UIState' interface.
  • packages/cli/src/ui/hooks/useSessionRetentionCheck.test.ts
    • Removed the test file for 'useSessionRetentionCheck'.
  • packages/cli/src/ui/hooks/useSessionRetentionCheck.ts
    • Removed the 'useSessionRetentionCheck' hook file.
Activity
  • No specific activity (comments, reviews, progress) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully implements the feature to enable a 30-day default retention for chat history and removes the associated warning mechanism. The changes are consistent across the settings interface, schema, UI components, and related hooks and tests. The removal of the warningAcknowledged property and the SessionRetentionWarningDialog component, along with setting general.sessionRetention.enabled to true and general.sessionRetention.maxAge to '30d' by default, aligns perfectly with the stated objective. The code is clean and well-structured, with all deprecated components and logic being appropriately removed.

@skeshive skeshive enabled auto-merge March 2, 2026 16:04
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Size Change: -6.53 kB (-0.03%)

Total Size: 25.8 MB

Filename Size Change
./bundle/gemini.js 25.3 MB -6.53 kB (-0.03%)
ℹ️ View Unchanged
Filename Size
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB
./bundle/sandbox-macos-strict-open.sb 4.82 kB
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB

compressed-size-action

@skeshive skeshive requested a review from a team as a code owner March 2, 2026 16:10
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Mar 2, 2026
@skeshive skeshive added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit 06ddfa5 Mar 2, 2026
26 of 27 checks passed
@skeshive skeshive deleted the rm-warning branch March 2, 2026 22:59
jerop added a commit that referenced this pull request Mar 3, 2026
Updates both automatic session retention and manual session deletion to
purge the entire session-specific directory (~/.gemini/tmp/<project>/<sessionId>/).
This ensures that implementation plans, tasks, and other session-specific
artifacts are cleaned up along with the session file.

- Update cleanupExpiredSessions to delete session directories.
- Update ChatRecordingService.deleteSession to purge directories and logs.
- Add regression tests for directory cleanup.
- Update documentation to clarify plan/task cleanup behavior.
- Document session retention defaults (30 days) and configuration as a
  follow up to #20853.
- Clarify that manual deletion also removes plans and tasks.

Fixes #17793

This update follows up on the session retention implementation in
#20853
jerop added a commit that referenced this pull request Mar 3, 2026
Updates both automatic session retention and manual session deletion to
purge the entire session-specific directory (~/.gemini/tmp/<project>/<sessionId>/).
This ensures that implementation plans, tasks, and other session-specific
artifacts are cleaned up along with the session file.

- Update cleanupExpiredSessions to delete session directories.
- Update ChatRecordingService.deleteSession to purge directories and logs.
- Add regression tests for directory cleanup.
- Update documentation to clarify plan/task cleanup behavior.
- Document session retention defaults (30 days) and configuration as a
  follow up to #20853.
- Clarify that manual deletion also removes plans and tasks.

Fixes #17793

This update follows up on the session retention implementation in
#20853
BryanBradfo pushed a commit to BryanBradfo/gemini-cli that referenced this pull request Mar 5, 2026
struckoff pushed a commit to struckoff/gemini-cli that referenced this pull request Mar 6, 2026
akubiusa added a commit to akubiusa/dotfiles that referenced this pull request Mar 8, 2026
## 原因

Gemini CLI が過去のバージョンでセッション保持警告の確認フラグとして
warningAcknowledged を設定ファイルに書き込んでいた。
PR google-gemini/gemini-cli#20853 でその警告機能ごと削除されたが、
dotfiles に書き込まれたフィールドがそのまま残っていた。

公式スキーマの sessionRetention には warningAcknowledged が定義されておらず、
additionalProperties: false のため CI バリデーションが失敗していた。

## 対策

- dot_gemini/settings.json: warningAcknowledged フィールドを削除
- tests/syntax/test_json_schema.sh: general セクション以下の
  additionalProperties 制約を再帰的に除去するよう修正
  (Gemini CLI 書き込みフィールドをネストした階層も許容するため)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
book000 pushed a commit to book000/dotfiles that referenced this pull request Mar 8, 2026
* feat: PR ヘルスモニターを追加する

- skills/pr-workflow/pr-health-monitor.md を追加
  - PR 作成後の CI 確認・Copilot 待機・コードレビュー・コンフリクト確認・PR 本文更新を Task で並列実行するスキル
- commands/handle-pr-reviews.md を追加
  - Copilot レビュー検出時に自動実行されるコマンド
  - 全未解決スレッドを取得しコード修正・返信・resolve・CI 確認を体系的に処理する
- wait-for-copilot-review.sh の tmux 通知をコマンド形式に変更
  - 成功時: 自然言語の代わりに `/handle-pr-reviews URL` を tmux に送信
  - Claude Code がコマンドを受け取り自動で対応できるようにする
  - タイムアウト時は手動確認を促す自然言語のまま維持

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: wait-for-copilot-review.sh の実行権限を修正する

chezmoi re-add により executable_ プレフィックス付きにリネームし、
ファイルに実行権限(chmod +x)を付与する

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: Gemini CLI settings.json の CI バリデーションエラーを修正する

## 原因

Gemini CLI が過去のバージョンでセッション保持警告の確認フラグとして
warningAcknowledged を設定ファイルに書き込んでいた。
PR google-gemini/gemini-cli#20853 でその警告機能ごと削除されたが、
dotfiles に書き込まれたフィールドがそのまま残っていた。

公式スキーマの sessionRetention には warningAcknowledged が定義されておらず、
additionalProperties: false のため CI バリデーションが失敗していた。

## 対策

- dot_gemini/settings.json: warningAcknowledged フィールドを削除
- tests/syntax/test_json_schema.sh: general セクション以下の
  additionalProperties 制約を再帰的に除去するよう修正
  (Gemini CLI 書き込みフィールドをネストした階層も許容するため)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: Copilot レビューコメントへの対応

- `CI確認` を `CI 確認`、`PR作成後` を `PR 作成後`、`Copilotレビュー` を `Copilot レビュー` に修正(日本語・英数字間のスペースルール)
- `.comments.nodes[0]` を `.comments.nodes | last` に変更し、最新コメントを参照するよう修正
- `reviewThreads(first: 100)` の上限とページネーション必要性をコメントで明記
- `pr-health-monitor.md` の Step 0 URL パース例を `grep -oP` キャプチャグループ方式から個別抽出方式に修正
- `<PR番号またはURL>` を `<PR 番号または URL>` に修正

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: akubiusa <222856114+akubiusa@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
liamhelmer pushed a commit to badal-io/gemini-cli that referenced this pull request Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants