Skip to content

fix(client): scope and coalesce catalog refreshes - #57223

Draft
kitlangton wants to merge 1 commit into
devfrom
catalog-refresh-scope
Draft

kitlangton wants to merge 1 commit into
devfrom
catalog-refresh-scope

Conversation

@kitlangton

@kitlangton kitlangton commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Follow-up to #57148 and #57181. Catalog notifications can make every connected client fetch catalogs for Locations opened by other clients.

Type of change

  • Bug fix

What does this PR do?

Invalidate integration, model, and provider catalogs immediately, but schedule a background read only when this client has cached that catalog or has a read in flight. Unopened catalogs load on first use. Reuse the existing 150 ms trailing window per catalog and Location so related notifications produce one refresh of each catalog.

How did you verify your code works?

  • Seven new tests pass for unopened Locations, first use, workspace isolation, opened Locations, and coalesced integration/model/provider bursts using fake timers.
  • Three existing targeted tests pass for model/provider Location isolation and an update overtaking an in-flight model read.
  • Client package bun typecheck passes.

Screenshots / recordings

Not applicable; client data-layer change.

Checklist

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant