Skip to content

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

Open
IamCoder18 wants to merge 1 commit into
Kilo-Org:mainfrom
IamCoder18:feat/privacy-mode-tui
Open

feat(cli): add privacy_mode for blurring PII in the TUI#12442
IamCoder18 wants to merge 1 commit 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: 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 claude-sonnet-5 · Input: 54 · Output: 15.3K · 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

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

1 participant