AstrBot-Desktop/src
YokiiroBW 79dbb40a25 feat(profiles): reduce the connection form to what a connection needs
Adding an AstrBot connection asked for eleven fields. Three of them
reach nothing: the SSE URL has no consumer anywhere in networking (the
desktop transport builds its own endpoint and AstrBot never reads it),
the certificate fingerprint is stored but TLS pinning is not
implemented, and the role only decides a word in the profile list.

The form is now the four things an activation actually requires — server
address, adapter id, API key, slot — with everything else behind a
collapsed advanced section.

The adapter id is the remote username. It was previously entered twice,
once in the profile form and again in the credential card, and it is
what keeps two slots on one server from sharing a conversation, so the
field now says that.

Three values are derived rather than asked for. The display name falls
back to identity@host. The role follows the chosen slot. The insecure
HTTP approval appears only for an http:// address and is required there,
because normalize_url rejects such an address without it — showing it
unconditionally invited enabling it for an https:// endpoint that never
needed it.

Choosing a slot now does the whole job: it assigns the slot, sets the
role, and points startup auto-connect at it, replacing a separate slot
card interaction and a separate auto-connect slot dropdown that could
disagree with each other. The API key is enrolled in the same submit.
Both steps need the profile to exist, so they run after the save and
report their own failures rather than failing the save.

Verified in a browser against the real stylesheet: four fields plus a
collapsed advanced section, the insecure checkbox appears only for
http:// and carries required, and the display name placeholder resolves
to identity@host.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 01:41:42 +08:00
..
features feat(profiles): reduce the connection form to what a connection needs 2026-07-27 01:41:42 +08:00
lib fix(tauri): grant the window controls the permissions they call 2026-07-27 01:19:42 +08:00
pages refactor(ui): share ipc error formatting 2026-07-26 22:31:16 +08:00
test fix(ui): release tauri event listeners on unmount 2026-07-27 00:23:42 +08:00
types feat(desktop): complete Q9 chat and stability increment 2026-07-21 14:43:14 +08:00
App.test.tsx feat(profiles): reduce the connection form to what a connection needs 2026-07-27 01:41:42 +08:00
App.tsx fix(tauri): grant the window controls the permissions they call 2026-07-27 01:19:42 +08:00
main.tsx feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
styles.css feat(profiles): reduce the connection form to what a connection needs 2026-07-27 01:41:42 +08:00
vite-env.d.ts feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00