Skip to content

fix: provider UX — add-key focus, shared model label, matching load states (#283) - #285

Merged
tuckcode merged 8 commits into
mainfrom
dank/provider-ux-283
Nov 1, 2026
Merged

tuckcode merged 8 commits into
mainfrom
dank/provider-ux-283

Conversation

@tuckcode

@tuckcode tuckcode commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add key from the model picker opens Settings → AI Agents scrolled to that provider's key field (expand, focus, highlight) without racing the section scroll.
  • Chat and Settings share the same Provider · model display label via formatChatModelLabel / rhizomeChatModelTriggerLabel; raw model id stays in the tooltip.
  • After a key save, Settings Connected summary and the model picker use the same empty vs error copy: No models found (ai.composer.noModelsFound) vs Couldn't load models + Retry (ai.composer.couldntLoadModels / settings.connected.loadFailed), driven by probe empty → no_models and timeout → load_failed.

Fixes #283

Notes

Test plan

  • pnpm lint / pnpm typecheck / full vitest
  • Local pre-push (serial): frontend + playwright smoke
  • CI green
  • Manual: Add key from picker → Settings focuses provider key field
  • Manual: Chip and Settings row show same Provider · model label
  • Manual: Empty catalog vs probe timeout show matching empty/error strings in Settings and picker

Out of scope here (Critiquito #283 P1s)

…tates (#283)

- Add key from the picker scrolls/focuses the Connected key field and briefly highlights the row (past the AI section start scroll race).
- Chip and Settings share the "Provider · model" trigger label; raw target id stays in the tooltip.
- Empty vs timeout probes now map to distinct no_models / load_failed states with matching copy via existing i18n keys (en.json untouched; held by #284).
@codacy-production

codacy-production Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 47 complexity · 0 duplication

Metric Results
Complexity 47
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@tuckcode
tuckcode marked this pull request as ready for review November 1, 2026 06:24
Split the chip label so the provider truncates first and the model
stays visible. Replace the 120ms Add key focus delay with rAF retry
up to ~1s, and only consume the focus request after focus or the cap.
Skip trigger refocus on Add key/open-settings close; format unmatched
ids as Provider · model from providers; prefer model ellipsis after
provider shrink on the chip.
Skip Settings open autofocus and AI section jump while Add key owns focus.
Format unlisted chat models via catalog/title-case when providers are empty.
Prefer shrinking the chip provider span; reset skipCloseAutoFocusRef on open.
Add Playwright smoke covering the real browser flows.
@tuckcode
tuckcode merged commit a0ba25b into main Nov 1, 2026
@tuckcode
tuckcode deleted the dank/provider-ux-283 branch November 1, 2026 09:14
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.

Model provider UX: Add key doesn't reach the key field, Settings shows raw model ID, mismatched empty-state copy

1 participant