Skip to content

feat(cli): add privacy_mode for blurring PII in the TUI - #12442

Merged
johnnyeric merged 3 commits into
Kilo-Org:mainfrom
IamCoder18:feat/privacy-mode-tui
Aug 5, 2026
Merged

feat(cli): add privacy_mode for blurring PII in the TUI#12442
johnnyeric merged 3 commits into
Kilo-Org:mainfrom
IamCoder18:feat/privacy-mode-tui

Conversation

@IamCoder18

Copy link
Copy Markdown
Contributor

Issue

Closes #12441

Context

Add a privacy_mode config flag for the TUI that blurs always-visible personal information (balance, team name, Kilo Pass usage) and requires explicit confirmation before /profile reveals the full account details. The CLI kilo profile command is unaffected.

Implementation

The new privacy_mode boolean is a top-level ConfigV1.Info field and registered in the overlay field paths so it's editable from the settings surface.

  • Sidebar footer reads the flag and balance collapses to •••, team label collapses from "Acme Corp team" to "Team credits", and the Kilo Pass block is hidden.
  • pii.ts exports only the single REDACTED_BALANCE constant.
  • /profile shows a DialogConfirm before fetching when the flag is on.
  • New /privacy slash command toggles the flag.

Screenshots / Video

Redacted balance

privacy_balance_redacted

/profile command

privacy_profile_dialog

How to Test

Manual/local verification

Verified locally with /privacy, see screenshots.

Reviewer test steps

  1. Run /privacy or Enable privacy mode in the TUI's command picker.
  2. Verify the balance in the sidebar is redacted
  3. Verify /profile shows a confirm dialog

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Get in Touch

Discord: @IamCoder18

Add a `privacy_mode` config flag that masks personal/team
information in the always-visible sidebar footer and requires
explicit confirmation before `/profile` reveals the full
account details. The CLI `kilo profile` command is unaffected.

Always-visible sidebar:
- Personal/team balance renders as `•••` when the flag is on
- Team label collapses to "Team credits" instead of the org name
- Kilo Pass period usage, bonus, and renew date are hidden

`/profile` gate:
- Show a DialogConfirm (default: Cancel, action: Reveal) that
  warns email, name, balance, and team will be exposed before
  fetching the profile

`/privacy` command:
- Toggles `privacy_mode` in the global config and refreshes sync

Mechanism:
- New top-level `privacy_mode` boolean in ConfigV1.Info (kilocode_change)
- Registered in the overlay field paths so it's editable
- SDK regenerated for the new SdkConfig field
- DialogConfirm extended with optional `confirmLabel` and
  `defaultOption` props (kilocode_change) for the gate UX

All edits are isolated to kilocode paths or wrapped in
kilocode_change markers to keep the upstream diff minimal.
Comment thread packages/opencode/src/kilocode/kilo-commands.tsx
Comment thread packages/core/src/v1/config/config.ts
Comment thread packages/opencode/src/kilocode/plugins/sidebar-footer.tsx
@kilo-code-bot

kilo-code-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/kilocode/kilo-commands.tsx 143 DialogConfirm defaults to the "Reveal" action, not "Cancel" as the PR description claims — an accidental Enter reveals PII (author states this is intended)

SUGGESTION

File Line Issue
packages/opencode/src/kilocode/plugins/sidebar-footer.tsx 41 New masked parameter on creditLabel has no test coverage
Files Reviewed (11 files)
  • .changeset/privacy-mode-tui.md
  • packages/core/src/v1/config/config.ts
  • packages/opencode/src/kilocode/config/overlay.ts
  • packages/opencode/src/kilocode/kilo-commands.tsx - 1 issue
  • packages/opencode/src/kilocode/pii.ts
  • packages/opencode/src/kilocode/plugins/sidebar-footer.tsx - 1 issue
  • packages/opencode/test/fixture/tui-plugin.ts
  • packages/plugin/src/tui.ts
  • packages/sdk/js/src/v2/gen/types.gen.ts
  • packages/sdk/openapi.json
  • packages/tui/src/plugin/adapters.tsx

Fix these issues in Kilo Cloud

Previous Review Summary (commit 6b8c736)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 6b8c736)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/kilocode/kilo-commands.tsx 143 DialogConfirm defaults to the "Reveal" action, not "Cancel" as the PR description claims — an accidental Enter reveals PII

SUGGESTION

File Line Issue
packages/core/src/v1/config/config.ts 132 New privacy_mode field should be mirrored in the cloud config JSON Schema (apps/web/src/app/config.json/extras.ts)
packages/opencode/src/kilocode/plugins/sidebar-footer.tsx 41 New masked parameter on creditLabel has no test coverage
Files Reviewed (8 files)
  • .changeset/privacy-mode-tui.md
  • packages/core/src/v1/config/config.ts - 1 issue
  • packages/opencode/src/kilocode/config/overlay.ts
  • packages/opencode/src/kilocode/kilo-commands.tsx - 1 issue
  • packages/opencode/src/kilocode/pii.ts
  • packages/opencode/src/kilocode/plugins/sidebar-footer.tsx - 1 issue
  • packages/sdk/js/src/v2/gen/types.gen.ts
  • packages/sdk/openapi.json

Fix these issues in Kilo Cloud


Reviewed by kimi-k3 · Input: 235K · Output: 17.7K · Cached: 1.4M

Review guidance: REVIEW.md from base branch main

@IamCoder18

Copy link
Copy Markdown
Contributor Author

Cloud PR to add to the schema: Kilo-Org/cloud#4658

@IamCoder18

Copy link
Copy Markdown
Contributor Author

Ready to review

Comment thread packages/opencode/src/kilocode/kilo-commands.tsx
Comment thread packages/opencode/src/kilocode/plugins/sidebar-footer.tsx Outdated
…ndependent color

The /privacy command wrote only to global config but read the effective
config, so a project-level privacy_mode could shadow the global toggle
and the UI would not change even though the command reported success.
Since privacy mode is a personal preference, persist and read it only
from the global config.

The sidebar footer used tone() for both the bullet and masked balance,
so the bullet color still revealed whether the balance was low. Use
theme().textMuted for both while masked, retaining tone() only when
privacy mode is off.
@IamCoder18
IamCoder18 force-pushed the feat/privacy-mode-tui branch from 42d89f1 to 76f8967 Compare August 5, 2026 13:34
@IamCoder18

Copy link
Copy Markdown
Contributor Author

@johnnyeric

Addressed both review feedback. Thank you!

@johnnyeric
johnnyeric merged commit 6d84a21 into Kilo-Org:main Aug 5, 2026
40 of 44 checks passed
@johnnyeric

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Merged.

t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
feat(cli): add privacy_mode for blurring PII in the TUI
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.

[FEATURE]: Add privacy mode to blur PII in the CLI sidebar and gate /profile

2 participants