Skip to content

fix(settings): save the API key directly, with feedback at the field#11

Open
chris2k20 wants to merge 2 commits into
cmagnussen:mainfrom
immodigit:pr/apikey-error-placement
Open

fix(settings): save the API key directly, with feedback at the field#11
chris2k20 wants to merge 2 commits into
cmagnussen:mainfrom
immodigit:pr/apikey-error-placement

Conversation

@chris2k20

Copy link
Copy Markdown

Was dieser PR macht

Behebt zwei zusammenhängende UX-Probleme bei der OpenAI-API-Key-Eingabe in den Einstellungen.

1. Fehlermeldungen erscheinen jetzt am Feld, nicht am Speichern-Button.
Bisher landete jede key-bezogene Meldung (leerer Key, Speicherfehler, Zwischenablage-Validierung) ganz unten neben dem Speichern-Button. Wer oben „Einfuegen" klickte, sah den Fehler weit außerhalb des Sichtfelds. saveErrorTextapiKeyErrorText, direkt unter dem Feld gerendert.

2. Der Key wird direkt gespeichert — kein versteckter Speichern-Button mehr.
Der bisherige Speichern-Button ganz unten war leicht zu übersehen; Nutzer dachten, der eingefügte Key sei gespeichert, war er aber nicht. Jetzt Apple-typisch:

  • Enter im Feld speichert
  • Feld verlassen (Focus-Loss) speichert — leeres Feld wird still ignoriert
  • „Einfuegen" speichert direkt
  • Inline-Bestätigung „✓ Gespeichert" direkt am Feld
  • Formatvalidierung (sk-…) mit klarer Meldung
  • Direkter Link zum Erstellen eines Keys: platform.openai.com/api-keys

Getestet

macOS 26 (Apple Silicon), SPM-Build. Eingabe + Enter, Focus-Loss, Einfügen, ungültiges Format und „Aendern" durchgespielt.

🤖 Generated with Claude Code

chris2k20 and others added 2 commits June 15, 2026 10:57
…save button

Every saveErrorText message was about the OpenAI API key (empty key,
save failure, clipboard paste validation), but it rendered far down
next to the Save button. Clicking 'Einfuegen' next to the key field
surfaced the 'clipboard has no plausible key' error well below the
fold, where users miss it. Renamed to apiKeyErrorText and moved the
display directly beneath the key field.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…edback

Removes the hidden bottom Save button. The key now persists Apple-style
the moment you press Enter, leave the field, or use Einfuegen, with an
inline 'Gespeichert' confirmation. Adds format validation and a direct
link to create an OpenAI API key.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chris2k20 chris2k20 requested a review from cmagnussen as a code owner June 15, 2026 09:47
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.

1 participant