GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(session): models that load after the first read show up without reopening by rekram1-node · Pull Request #78 · anomalyco/opencode-android

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Nov 14, 2026

Copy link
Copy Markdown
Member

The server changes its model, provider and agent lists after the app reads them. Plugins finish loading after a cold start, and config edits, plugin installs and logins change the lists too. The server announces each change on the event stream (model.updated, provider.updated, agent.updated), but the app dropped those events. A session screen read its model list once and only read it again after a failure or when it was empty.

Before: a model from a plugin that finished loading late never appeared in the model picker until the session was reopened. Even then, the 30 s catalog cache could return the partial list.

After: the open session screen reads the model list again when the server says it changed. A partial list is replaced by the full one, without reopening anything.

What changed

  • model.updated and provider.updated decode to OpenCodeServerEvent.ModelsChanged, and agent.updated decodes to AgentsChanged. The payloads aren't read.
  • A ModelsChanged clears that server's cached model lists (OpenCodeReadCache.forgetModelCatalogs) before the event reaches the reducers, so the next read goes to the server.
  • Home forwards both events to every open session screen. ModelsChanged rereads the list through the existing reloadModels, which cancels a read in flight, so a burst of events while plugins load leaves one read standing. AgentsChanged lists the agents again while Agent Selection is on.
  • The parity rows in docs/parity/server.md, session.md and drawer.md note that this differs from iOS on purpose.

This pairs with anomalyco/opencode#63814, where the server stops waiting for plugins before answering /api/model. After that change, the first read on a cold server can return a partial list. That PR should merge after this one ships.

Verified

  • scripts/check.sh :server :feature:session :feature:drawer (assembleDebug, lintDebug, testDebugUnitTest) passes: 337 server tests (2 skipped live checks), 812 session tests, 558 drawer tests.
  • New tests:
    • OpenCodeEventDecodingTests.catalogUpdatesDecodeAsCatalogChanges: the three events decode, with or without location and data. This replaces the old check that model.updated and provider.updated decode to null.
    • OpenCodeClientDecodingTests.forgettingModelCatalogsDropsOnlyThatServersCatalogs
    • ModelPickerTests.aCatalogChangeRereadsModelsAndReplacesAPartialList: a second change cancels the hung first read, and the answer replaces the partial list.
    • SessionFeatureTestsAgentSelection.anAgentsChangeListsAgentsAgain
  • Not checked on the emulator.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rekram1-node
fix(session): models that load after the first read show up without r…
5ce0e28
…eopening

The server changes its model, provider and agent catalogs after the app
reads them: plugins finish loading after a cold start, and config edits,
plugin installs and logins change them too. It announces each change with
`model.updated`, `provider.updated` or `agent.updated`, but the app
dropped those events, and a session screen read its model catalog once.
A model from a plugin that loaded late never appeared in the picker until
the session was reopened, and the 30 s catalog cache could hand back the
partial list even then.

Now `model.updated` and `provider.updated` decode to `ModelsChanged`,
which forgets the server's cached model catalogs and makes every open
session screen reread its catalog through `reloadModels` (cancelling a
read in flight, so a burst leaves one read standing). `agent.updated`
decodes to `AgentsChanged`, which lists the agents again while Agent
Selection is on. The parity rows note the difference from iOS.

Verified: scripts/check.sh :server :feature:session :feature:drawer
(assembleDebug, lintDebug, testDebugUnitTest) passes; new tests cover the
decoding, the cache, the model reread replacing a partial list after a
cancelled read, and the agents relist.
@rekram1-node
rekram1-node temporarily deployed to release November 14, 2026 17:47 — with GitHub Actions Inactive
@Tarquinen
Tarquinen merged commit a59a8c6 into dev Nov 14, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Tarquinen Tarquinen mentioned this pull request Nov 15, 2026
Merge dev into main #69
Merged

This branch was previously deployed

1 inactive deployment
release — 5ce0e28f Deployed Nov 14, 2026 by rekram1-node via check #228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@rekram1-node @Tarquinen
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.