Skip to content

fix: keep the provider search focused when accounts load - #208780

Merged
daniel-lxs merged 2 commits into
mainfrom
fix-ui-preserve-provider-search
Nov 30, 2026
Merged

daniel-lxs merged 2 commits into
mainfrom
fix-ui-preserve-provider-search

Conversation

@daniel-lxs

@daniel-lxs daniel-lxs commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Typing in the Models provider catalog can lose the search and its matching result when account data arrives. A user who already entered a provider name has to type it again. Related Models form behavior in #147586

User Impact

The entered text, matching provider and keyboard focus survive the catalog moving below configured providers. The initial section order and the behavior of an untouched provider link stay the same.

Why This Change Was Made

Models renders the catalog and account sections once and reorders them as data arrives. The search field keeps a local edit until the route names a different provider. Both the provider list and the catalog can still use the incoming link to select their initial filter. Catalog ordering in #203485 · Provider recovery links in #208560

The real-Gateway regression uses a local provider account for Settings and leaves the agent without a selected model. It checks the account label and the agent received by the OAuth endpoint from all five navigation paths. Fixture change #208781

Evidence

  • On 13e45fa8113d and 937f28142b0c, a regression that types “Anthropic” over an OpenAI provider link and then delivers the first account loses the search. At 19631ab9c4ab, the same check retains both the text and keyboard focus. All 73 tests in the Models view and page suites passed (5.34s including setup). Failing AWS run · Passing AWS run
  • The existing Chromium test for a link to OpenAI’s profile-order control passed after the delayed Settings data arrived. The real-Gateway run exercised provider search, agent handoff and first-model sign-in. The head at db632c39ed31 has the same Git tree as the clean real-Gateway run on 63175b136be4. The screenshots show the same synthetic Research agent at 1280 × 900. Real-Gateway verification
  • The production UI build, production and test typechecks, targeted lint, formatting and Control UI controller guard passed. Independent autoreview of 19631ab9c4ab reported no findings at P2 or higher.

Before

The search clears and the unfiltered catalog returns

After

The search retains the fixture provider and its matching result

Clean captures

Provider search before the repair

Provider search after the repair

@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Pull request received.

ClawSweeper review superseded

ClawSweeper finished reviewing an earlier revision. A newer revision superseded that attempt.

View the superseded run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. labels Nov 30, 2026
@daniel-lxs
daniel-lxs force-pushed the fix-ui-preserve-provider-search branch from b898dba to 19631ab Compare November 30, 2026 04:05
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 30, 2026
@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

Preserve provider search text and focus when arriving account data reorders the Models page.

Example: Open Models with provider=openai, type Anthropic, then receive the first configured account.

  • Before: The catalog remounts, clearing the search and losing keyboard focus.
  • After: The same catalog retains Anthropic and keyboard focus below the account section.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, coherent repair with inspected visual evidence, a focused regression, and passing exact-head CI.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Control UI screenshots show the retained search and matching fixture provider; the reported isolated real-Gateway run uses a verified identical tree, while focus preservation is supported by the focused regression rather than demonstrated by static images.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Typing a provider name is interrupted when account data arrives, forcing the user to repeat the search.
Reason: This focused repair preserves unfinished user input and the existing product design; the maintainer-authored direction requires no additional product decision.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

This PR fixes a source-confirmed search reset still present on current main; no actionable defects remain, and exact-head CI passed.

Reviewed head: db632c39ed31cebe39318b0b7fda65182907a84a

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Models page combines route intent, provider catalogs, and asynchronous account data into provider search and connection controls.

flowchart TD
  A[Provider route link] --> C[Models page]
  B[Account data] --> C
  C --> D[Stable section ordering]
  D --> E[Provider catalog and local draft]
  E --> F[Filtered provider connection actions]
Loading

Technical review

Best possible solution:

Retain one catalog instance while reordering sections, with local edits reset only by a different provider link.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the remount when the first usable account arrives, and the PR reports a failing baseline regression; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The change repairs component lifetime at the existing rendering owner and preserves route filtering, section order, and connection behavior without adding another state owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 743f83aa4c22.

Provenance checked

  • Catalog placement and search initialization keeps the original intent (31fe57d: Lead new users with provider discovery while keeping configured accounts and defaults ahead of the catalog for returning users.)
  • Provider search draft reset policy keeps the original intent (f6f59b1: Allow local filtering without page updates and preserve edits across equal route revalidation.)
  • Real-Gateway model setup fixture keeps the original intent (ad0ab68: Verify that model setup retains the intended agent through navigation and provider authorization.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 31fe57d adds ui/src/pages/model-providers/view.tsx:154 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 31fe57d22000; files: ui/src/pages/model-providers/view.tsx)

PR surface

Source +9, Tests +18. Total +27 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 36 27 +9
Tests 2 18 0 +18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 54 27 +27

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-30T04:20:42.347Z sha 19631ab :: passed. :: none

Reviewed November 30, 2026, 12:19 AM ET / 05:19 UTC (Revision 2).

Use the first-run fixture to show the selected agent’s accounts while the composer still requires browser sign-in.
@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@daniel-lxs
daniel-lxs merged commit e628034 into main Nov 30, 2026
89 checks passed
@daniel-lxs
daniel-lxs deleted the fix-ui-preserve-provider-search branch November 30, 2026 05:21
vincentkoc added a commit that referenced this pull request Nov 30, 2026
* commit 'b21f557c8fa038ebc1842e204e356eb063aea4c6': (46 commits)
  test(ui): keep real exports in the channel settings distribution mock (#208855)
  test(normalization): preserve inline code in quoted previews (#208857)
  fix(ci): restore adaptive priors across large repository trees (#208838)
  test(agents): cover typography preservation in patch updates (#208851)
  fix(ci): wait for selected agent during model setup proof (#208847)
  fix: keep Telegram topic messages out of Home’s chat history (#208778)
  fix(worktrees): name the session to restore and say agents can't (#208828)
  fix: tell an idle parent when a child result couldn't reach its chat (#208772)
  fix: keep the provider search focused when accounts load (#208780)
  fix(clawrouter): respect permitted speeds on model fallback (#208830)
  fix(ui): show provider rejection details without Markdown escapes (#208829)
  fix: make the cloud worker deletion test reliable across reconnects (#208812)
  fix(update): preserve preparation lock ownership (#207139)
  chore(release): update appcast for 2026.11.12 (#208820)
  fix(android): Talk does nothing when mic access is permanently denied (#206609)
  test(config): preserve media model primaries across repeated edits (#208837)
  fix(browser): use the mock keychain for new headed macOS profiles (#208814)
  fix: start source workers without synchronous filesystem reads in the caller (#208789)
  refactor(ios): stop loading retired Overview data (#208795)
  perf(knowledge): stop repeating write-input schemas in batch and correct tools (#208617)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant