feat(ai-settings): in-field Clear for API key (replaces useless eye) #6

Closed
Ghost wants to merge 2 commits from feat/ai-key-clear-in-place into develop

Implements docs/backlog/api-key-field-clear-in-place-of-eye.md.

What

The API-key PasswordInput is write-only — the saved key never loads back, so the built-in visibility toggle (eye) reveals nothing. When a key is saved and the buffer is empty, the field's rightSection now shows a red Clear (X) ActionIcon (which suppresses the Mantine eye). While typing a new key (buffer non-empty) the default eye returns. Applied to all three AI endpoint cards (Chat/LLM, Embeddings, Voice/STT). Clear handlers and buildPayload are unchanged.

Verification

  • pnpm --filter client build clean (tsc+vite).
  • Browser (headless Chromium): saved a Chat key via the real UI → after reload the field shows the Clear (X), eye suppressed; typing a char brings the eye back, clearing returns the X; clicking Clear resets the saved-key state. No app console/page errors. Screenshot captured.

🤖 Generated with Claude Code

Implements `docs/backlog/api-key-field-clear-in-place-of-eye.md`. ## What The API-key `PasswordInput` is write-only — the saved key never loads back, so the built-in visibility toggle (eye) reveals nothing. When a key is saved **and** the buffer is empty, the field's `rightSection` now shows a red **Clear** (X) `ActionIcon` (which suppresses the Mantine eye). While typing a new key (buffer non-empty) the default eye returns. Applied to all three AI endpoint cards (Chat/LLM, Embeddings, Voice/STT). Clear handlers and `buildPayload` are unchanged. ## Verification - `pnpm --filter client build` clean (tsc+vite). - Browser (headless Chromium): saved a Chat key via the real UI → after reload the field shows the Clear (X), eye suppressed; typing a char brings the eye back, clearing returns the X; clicking Clear resets the saved-key state. No app console/page errors. Screenshot captured. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Ghost added 2 commits 2026-06-20 05:05:55 +03:00
The API-key PasswordInput is a write-only buffer — the saved key never
loads back, so the built-in visibility toggle reveals nothing. When a key
is saved and the buffer is empty, render a red Clear (X) ActionIcon in the
field's rightSection (which suppresses the Mantine eye); while typing a new
key the default eye returns. Applied to all three AI endpoints (Chat,
Embeddings, Voice/STT). Handlers and payload logic unchanged.

Implements docs/backlog/api-key-field-clear-in-place-of-eye.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ghost closed this pull request 2026-06-20 22:26:28 +03:00

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vvzvlad/gitmost#6