Repository navigation
Say a move or outage calmly, and only while it lasts, in the chat, home, the Bots panel and the audit filters - #2162
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 24, 2026 21:47
…more presses While OpenBot moves an organization, or its database is briefly out of reach, the server answers 503 with a sentence and Retry-After. A few places still treated that as a failure. Chat: a message sent during a move ended the turn saying "OpenBot couldn't reach its backend, so your message wasn't sent", in red, in a conversation and in the red band on a Bot's chat page. CopilotKit's runtime client (1.88.0, and still 1.90.2) throws the refusal as "REST run request failed: <body>", losing the status and the Retry-After, and AG-UI's HTTP agent keeps the status but not the header. The app already reads the Bot again through its own client when a run request is refused (to tell a Bot taken away from a backend that is down); that client keeps both, so a read refused with a hold now means the run was held too, and the server's sentence is said calmly: a muted notice with a clock in a conversation, a muted band on the Bot's page. A hold is not recorded as a failed run. A real failure is still red. Audit log filters: the Bot, Person, App, Tool and Rule menus showed "Loading..." while their choices were read, as a label outside a menu group, which Base UI refuses: when the read was held or failed, opening one took the page down to "Something went wrong". The label is in a group now, and a failed read says the server's sentence calmly for a hold and "Couldn't load the choices. Try again in a moment." in red otherwise. Opening a menu again asks again. Presses: saving a new credential, the AI connection dialog's Change, the usage-data switch, the connected-OpenBot dialogs, opening the log folder and onboarding's ask-first switch said their own sentence in red without asking the error. They go through loadFailure now. The guard test (failure-said.test.ts) now finds that last shape: a press's error answered with the screen's own words in a red element. A new real-browser test, organization-unavailable-chat.test.tsx (Chromium and WebKit, 1440 and 390, light and dark, API and runtime routed to the 503), sends a message in a conversation and on a Bot's page and opens the audit filters during a hold, and checks a real failure in each is still red. Against main it fails in all three places; with this change it passes. Added to the CI browser job.
…nce in the Bots panel The end-to-end test of database sharding found three more places that mishandled a move: - A conversation's turn and a Bot's chat page: the moving sentence (now calm, from the previous commit) stayed after the move ended. - Home's message box: the moving sentence stayed under it 30 seconds and more after the move. - The Bots panel: it said the sentence under every Bot. A hold is about now, so it now goes once the organization answers again. lib/held-ends.ts asks the organization again after the server's Retry-After, and again after each new one, with a small read (the person, /people/me), and clears the sentence on any answer that isn't a hold. The conversation, the Bot's chat page and home use it. The words sent stay in the box to send again. The Bots panel now says a hold once, above its Bots, with one Retry, and a Bot's row under it says nothing of its own. organization-unavailable-chat.test.tsx gains a test, in Chromium and WebKit at both widths and both themes: a message sent in a conversation, on a Bot's page and from home as a move begins shows the sentence calmly and keeps the message, and the sentence is gone once the move ends. The Bots panel, opened during a move with three Bots, says the sentence once.
davidmckayv
force-pushed
the
outage-leftovers
branch
from
November 24, 2026 22:37
78d85aa to
51024b9
Compare
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.
While OpenBot moves an organization, or its database is briefly out of reach, the server answers 503 with a sentence ("OpenBot is moving this organization. Try again in a moment." or "This organization is unavailable right now. Try again in a moment.") and Retry-After. Nothing has failed, so the app says it in calm, muted text. #2151 and a later end-to-end test of database sharding found a few places that still got it wrong. This fixes them.
What a person sees now during a move or outage:
/people/me). As soon as it answers with anything other than a hold, the sentence goes. The words that were sent stay in the box to send again.loadFailure), which shows the same words for a real failure and the server's sentence calmly during a hold.Why the chat lost the 503: CopilotKit's runtime client throws a refused run as
REST run request failed: <body>, without the status or the Retry-After header. That's true in 1.88.0, which we use, and still in 1.90.2, the latest 1.x release. AG-UI's HTTP agent keeps the status but drops the header. When a run request is refused, the app already reads the Bot again through its own API client, to tell a Bot taken away from a backend that is down. That client keeps the status and Retry-After, so if the read comes back held, the run was held too, and the app shows the server's sentence. This is app-side only, with no library change. A hold isn't recorded as a failed run in the troubleshooting log.Tests:
app/tests/organization-unavailable-chat.test.tsxruns in real Chromium and WebKit, at 1440 and 390 wide, in light and dark, with the API and the runtime routed to the 503. During a move it sends a message in a conversation and on a Bot's chat page, and opens the audit log's Bot filter. Each must show the server's sentence, with no red text, red box or red icon, and never "couldn't reach its backend". A second test checks that a real failure in each place is still red. Against main it fails in all three places: the chat says "couldn't reach its backend" twice, and the audit page falls to "Something went wrong". A third test sends a message in a conversation, on a Bot's chat page and from home as a move begins. It checks the sentence is calm and the message is kept, then ends the move and checks the sentence is gone. It also opens the Bots panel during a move with three Bots and checks the sentence appears once. Against main, every one of these tests fails. With this change, all 18 pass. It's added to the CI browser job.app/tests/failure-said.test.tsnow also catches a press whose error is answered with the screen's own words in a red element, without checking the error. Against main it flags all six places fixed here.