Repository navigation
fix(app): stop telling a search integration its models are ready - #59243
SU-AN-coder wants to merge 2 commits into
Conversation
The connect dialog ended every connection with "{{provider}} models are
now available to use." A non-inference integration such as Firecrawl
offers no models, so the line was false there. It now shows only the
title when the connection brought no models, and both lines otherwise.
There was a problem hiding this comment.
Looks sound: the toast now leaves out the "models are now available" line when the connection brought no models, and keeps it otherwise. I checked it by reading the code rather than on screen; no browser was available here, so I couldn't connect Firecrawl in the web app. The model lists are reloaded before the connected callback runs, so the count the toast uses already includes the new connection. The connect tests and typecheck:tsc pass, and the branch merges cleanly onto the latest dev.
The public API is unchanged.
One small cleanup is noted inline: the comment at the top of the new file can be dropped. On translations: packages/app/AGENTS.md says new strings only need the English source; other locales fall back to English. So a new key wouldn't need ~30 locale files, though leaving the line out is fine here.
Related: #59141
| @@ -0,0 +1,18 @@ | |||
| // The connect dialog used to end with "{{provider}} models are now available to use." for every integration. A | |||
There was a problem hiding this comment.
This comment describes what the code used to do and points to the issue. That belongs in the commit or PR description, not the source, and the surrounding files don't carry comments like this. It can be dropped so the change stays minimal.
|
Comment dropped in be07ee3. On translations you are right and my description was wrong: |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Closing this to make room: the repository allows three open pull requests per author without write access, and I have three. This is the smallest of them (one toast line), and it is already reviewed as sound with the fix and the test sitting on |
Issue for this PR
Refs #59141
Type of change
What does this PR do?
Part 1 of the issue: every connection ended with "{{provider}} models are now available to use.", including integrations that offer no models such as Firecrawl. The toast payload now leaves the description out when the connection brought no models, so it reads "Firecrawl connected" and nothing else; connections that do bring models keep both lines.
The decision moved into
connected-toast.ts, which takes the provider name, the model count andtranslate, and the dialog spreads its result intoshowToast. Nothing else in the dialog changed, and the typecheck and the connect tests still pass.Part 2 (splitting the "Other" category into subscription / API-key inference / web-search providers) is a design question about the modal, so it is not here — I asked in the issue rather than guessing at the buckets.
Correcting one thing from my first description: I said a new string would mean editing ~30 locale files.
packages/app/AGENTS.mdsays feature work adds English source strings only and the other locales fall back to English, so a dedicated sentence would have been one key. I still left the line out, since a provider with no models has nothing to say there; say if you would rather have a sentence and I will add the key.How did you verify your code works?
connected-toast.test.tsdrives both branches through a faketranslateand asserts the exact payload: 0 models gives{ title }, 12 models gives{ title, description }. The zero-model case fails ondev, where the dialog always passed both strings.bun test --conditions=solid --isolate --preload ../ui/test/solid-jsx.ts --preload ./happydom.ts src/providers/connect— 12 pass, 0 failbun run test:unitinpackages/app— 778 pass, 0 failbun run typecheck:tsc— clean; rootbun run lint:changed— 0 problemsI could not connect Firecrawl here (needs a live key), so the check is the toast payload rather than the screen.
Screenshots / recordings
Not a visual change beyond one line of toast text that no longer appears.
Checklist
Added by the opencode bot (AI-generated).
Related: #59141