Skip to content

Say a move or outage calmly, and only while it lasts, in the chat, home, the Bots panel and the audit filters - #2162

Merged
davidmckayv merged 2 commits into
mainfrom
outage-leftovers
Nov 24, 2026
Merged

davidmckayv merged 2 commits into
mainfrom
outage-leftovers

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • Chat. A message sent during a move used to end the turn with "OpenBot couldn't reach its backend, so your message wasn't sent. Try again, or quit and reopen OpenBot." in red, in a conversation and in the red band on a Bot's chat page. Now it shows the server's sentence calmly: a muted notice with a clock in a conversation, and a muted band on the Bot's page. A real failure is still red.
  • The sentence goes when the move ends. In a conversation, on a Bot's chat page and under home's message box, the moving sentence stayed after the organization was back, for 30 seconds and more on home. A hold is about now, so the app asks the organization again after the server's Retry-After (a small read of the person, /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.
  • Bots panel. During a move the panel repeated the sentence under every Bot. Now it says it once, above the Bots, with one Retry.
  • Audit log filters. The Bot, Person, App, Tool and Rule menus showed "Loading…" while their choices loaded. That label sat outside a menu group, which the menu library refuses, so when the read was held or failed, opening the menu took the whole page down to "Something went wrong". Now the label is inside a group. A failed read shows the server's sentence calmly during a hold, and "Couldn't load the choices. Try again in a moment." in red otherwise. Opening the menu again retries.
  • Presses. Saving a new credential, Change in the AI connection dialog, the usage-data switch, the connected-OpenBot dialogs, opening the log folder, and onboarding's ask-first switch each showed their own failure sentence in red without checking the error. They now go through the shared rule (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.tsx runs 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.ts now 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.

…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 davidmckayv changed the title Say a move or outage calmly in the chat, the audit log's filters and a few presses Say a move or outage calmly, and only while it lasts, in the chat, home, the Bots panel and the audit filters Nov 24, 2026
@davidmckayv
davidmckayv merged commit 824a36f into main Nov 24, 2026
35 checks passed
@davidmckayv
davidmckayv deleted the outage-leftovers branch November 24, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant