Repository navigation
Conversation
…ute provider - web interface fixes across session, home, timeline, composer, and shared ui - session header toolbar (files, tasks, progress, terminal, review) like Devin web - Settings > General > Advanced toggles for each new session tool - OmniRoute (9router) in Popular Providers: endpoint + api key connect, auto-discovers models from OpenAI-compatible /models endpoint (30s timeout) - theme/language command palette unit tests - i18n keys for new copy across all locales Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
The model selector rendered every model unvirtualized; providers like OmniRoute expose ~8k models which froze the tab on open. Cap rendered items at 200 in both the v1 model list (List limit prop) and the v2 popover, with a 'keep typing to filter' hint for the remainder. Adds List.limit to @opencode-ai/ui plus limitGroups unit tests, and dialog.model.more / ui.list.more i18n keys across all locales. Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
This PR consolidates a set of web UI fixes for
packages/app/packages/session-ui/packages/ui/packages/weband adds two related features: a Devin-style action toolbar on the session header and an OmniRoute/9router provider entry with automatic model discovery for config-defined OpenAI-compatible providers.Type of change
What does this PR do?
This PR does three things on the web app (
packages/app,packages/session-ui,packages/ui,packages/web):{baseURL}/modelsfor config-defined OpenAI-compatible providers.It also fixes a scalability bug found while E2E-testing that feature: the model pickers rendered every model unvirtualized, which froze the tab with a ~8k-model gateway; rendering is now capped at 200 items with a "keep typing to filter" hint.
1. Consolidated web UI fixes
Small, targeted fixes across the web app surface:
packages/app/src/components/dialog-connect-provider.tsx— improved provider connect dialog behavior.packages/app/src/components/session/session-header.tsx— right-side header actions refactored into a generic tool list (see below); also switches path copy to the sharedcopyTexthelper.packages/app/src/components/session/open-in-app.tsx,terminal.tsx,pages/home.tsx,pages/home/home-sessions*.tsx,pages/layout(-new).tsx,pages/session/composer/session-permission-dock.tsx,pages/session/timeline/message-timeline.tsx,utils/draft-store.ts— assorted UI correctness fixes.packages/session-ui—markdown.tsx,message-part.tsx,tool-error-card.tsx, v2prompt-input/attachments.tsrendering fixes.packages/ui—text-field.tsxfix; new sharedclipboard.tsx(copyText) anddigest.tsxcomponents.packages/web/src/components/share/content-markdown.tsx— share-page markdown fix.packages/opencode/src/server/shared/ui.ts,src/tool/code-mode.ts— minor supporting fixes.packages/app/src/pages/layout/theme-language-commands.tswith unit tests.2. Session header action toolbar
The session header previously exposed a single review toggle (
#opencode-v2-icon-sidebar-right,tooltip-v2-trigger). It now renders a tool list — Files, Tasks, Progress (context), Terminal, Review — modeled on Devin-style workbench actions:tabs().open(SESSION_OPEN_FILE_TAB)/"context"for Files/Progress,terminaltoggle,reviewPanel.toggle(),todoCollapsedfor Tasks (disabled when the session has no todos).showSessionReview,showSessionFiles,showSessionTerminal,showSessionTasks,showSessionProgress; all default on) let users hide tools they don't use. Desktop-only, preserving previous visibility behavior.3. OmniRoute / 9router provider + auto model discovery
settings-v2/providers.tsx) with a dedicated connect dialog (dialog-omniroute-provider.tsx) that takes only a Base URL and API key, then writesprovider.omniroute(npm: "@ai-sdk/openai-compatible") to config and stores the key in the auth store.packages/opencode/src/provider/provider.ts: config-defined OpenAI-compatible providers with no declaredmodelsare now auto-populated by fetching{baseURL}/modelsonce at provider-list build time. Guarded so it only applies tosource: "config"providers withnpmunset-or-@ai-sdk/openai-compatibleand abaseURL; failures return empty and the provider is dropped as before. Timeout is 30s — real gateways (e.g. OmniRoute serving ~8k models) answer in ~9s, so a tighter bound produced silent empty results.4. Model picker scalability fix (found during E2E)
packages/ui: newListlimitprop backed by exportedlimitGroups(list-limit.ts) with unit tests;Listrenders alist-morerow when truncated.packages/app/src/components/dialog-select-model.tsx:ModelListpasseslimit; the v2 popover controller slices results and exposeshiddenfor the hint row.dialog.model.more/ui.list.morein all locales.How did you verify your code works?
bun run test:unitinpackages/app— 728 tests pass, including newtheme-language-commands.test.ts.bun test test/provider/ test/tool/inpackages/opencode— 1086 tests pass, including a newopenai-compatible-discovery.test.ts(discovers models, keeps declared models, skips non-openai-compatible npm, drops unreachable endpoints).bun turbo typecheck— all 30 packages pass.Screenshots / recordings
Checklist