Repository navigation
feat(desktop): keep provider status in the app server and simplify downtime notice - #101
Merged
Merged
Conversation
…wntime notice The app server now checks the servers at launch, on an interval (300s by default, set in Settings > Providers > Advanced, 0 turns it off), after any change made in the app, and when a call to the default server fails. It also watches the default server's process every 5s, so a server started or stopped outside the app shows within seconds. The status is pushed to the app over `servers.watch`, so the sidebar, composer and settings all read one state and never disagree. The sidebar and composer replace the server-down blocks and notices with a single "Open Provider Settings" button; queries that failed while the server was down load again once it is back. The splash stays over the mounted app until the first status arrives, then fades. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
One status, kept by the app server. A new
Healthservice checks the servers:It also checks the default server's process every 5s with no RPC and no shell, so a server started or stopped outside the app shows within seconds. The status is pushed over a new
servers.watchstream, which replacesservers.list.Simpler downtime UI, like t3code.
Settings › Providers › Advanced gets a "Health check interval" row: reset to default, −/+ in 30s steps, and 0 to disable.
Splash: it stays over the mounted app until the first status arrives (2s at most), then fades.
Testing
vp checkandvp run typecheckpass.apps/server/test/health.test.ts. It starts the real app server, and its default server goes Stopped → Unreachable → Stopped as a registration appears and goes. The interval setting saves. The result is written to__artifacts__/health.json.vp run dev:desktop:codework service stop/startfrom a terminal (shown in 2s and 4s);