Skip to content
pi-c Artifact [9a8b7c9ee8]
Login

Artifact [9a8b7c9ee8]

Artifact 9a8b7c9ee85312320b6a57935a6e9eb422acd38af2160bfbb7c825361e256e8f:

Wiki page [checkin/36c13f1654027961b35f4b5e03da1f23dd76fe33235b5892b195f68366e0648a] by dmestas on 2026-11-24 14:45:46.
D 2026-11-24T14:45:46.282
L checkin/36c13f1654027961b35f4b5e03da1f23dd76fe33235b5892b195f68366e0648a
N text/x-markdown
U dmestas
W 2217
# /auth step 3 (#72): the /auth screen

`/auth` lists every key and sign-in, grouped by provider with the model's provider first. Each row
shows its kind, what pic last learnt of it (credit left, refused, out of credit, limited), whether it
is the provider's (`*`) and whether the current model uses it (`<- this model`). A bad key is red,
with the provider's reason shown in full under the list. The line above the list names the model,
its key and whether the credential store has been opened yet. When the model's provider has no
key, it gets a row to add one, and the last row adds a key or signs in.

Keys, all plain, with no Alt or F-keys: Enter fixes the row (uses a healthy key, replaces a refused
one under its label, signs in again, or adds one), a adds (the providers, as /login shows them),
d removes after y, c runs every free check now, m opens the model picker, Esc closes.

- `/key` is the same command. `/logout` with no provider opens /auth. `/login` with no provider
  is /auth's add step (the provider picker), so existing /login flows are unchanged.
- `app.credential.select` (was Alt+K) now opens /auth and is bound to no key by default.
- The old /key overlay (OV_KEY, key_picker and its row builders) is gone.

## Reuse of the settings panel

/auth is drawn by panel.c, the same as /settings: a box in fullscreen, docked rows above the
footer in regular mode or a small window, and one line in a tiny one. tui_panel gains `title`,
`head` (a line in the filter's place, with no cursor) and `hint` (the keys line). A new row kind,
"info", shows its value as given (red when not valid) and the row's own keys under the
description. The settings panel draws exactly as before; test_tui covers the new form.

## Not in this step

- Expiry is step 5, so no dates are shown yet.
- "Models each serves" is the provider's models for the active key. Pattern rules come with
  step 4.
- The phone list is step 6.

## Tests

- New `test/tui/auth.sh` (dev only; needs PIC_TEST_PASSPHRASE).
- New `test_panel_skin` in test/tui/test_tui.c.
- keyprompt, keyprobe and tui.sh expectations moved from the /key overlay to /auth.

Tier: client (src/tui/), no new file. Clock: taste. Record: none new. Default: on.

Z cf50c76212a98a61ec671687ab734cad