Skip to content

fix(app): stop telling a search integration its models are ready - #59243

Closed
SU-AN-coder wants to merge 2 commits into
anomalyco:devfrom
SU-AN-coder:fix/connect-toast-models
Closed

SU-AN-coder wants to merge 2 commits into
anomalyco:devfrom
SU-AN-coder:fix/connect-toast-models

Conversation

@SU-AN-coder

@SU-AN-coder SU-AN-coder commented Oct 26, 2026 •

Copy link
Copy Markdown

Issue for this PR

Refs #59141

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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 and translate, and the dialog spreads its result into showToast. 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.md says 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.ts drives both branches through a fake translate and asserts the exact payload: 0 models gives { title }, 12 models gives { title, description }. The zero-model case fails on dev, 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 fail
  • bun run test:unit in packages/app — 778 pass, 0 fail
  • bun run typecheck:tsc — clean; root bun run lint:changed — 0 problems

I 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

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #59141

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.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@SU-AN-coder

Copy link
Copy Markdown
Author

Comment dropped in be07ee3.

On translations you are right and my description was wrong: packages/app/AGENTS.md says feature work adds English source strings only, with the other locales falling back, so a new key would have been one file, not thirty. I have corrected the PR body. I still left the line out rather than adding a sentence, since a provider with no models has nothing to list — say if you would rather have one and I will add the key.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment at the top of connected-toast.ts has been dropped as asked. I have nothing further. The public API is unchanged.

@SU-AN-coder

Copy link
Copy Markdown
Author

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 fix/connect-toast-models — I will reopen it as soon as one of the other two lands.

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.

1 participant