Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ jobs:
app/tests/step-rows-layout.test.tsx
app/tests/stopped-command-layout.test.tsx
app/tests/stopped-turn-dismiss-browser.test.tsx
app/tests/stopped-turn-return-browser.test.tsx
app/tests/strip-version-layout.test.tsx
app/tests/table-export-browser.test.tsx
app/tests/team-connections-directory-layout.test.tsx
Expand Down
39 changes: 38 additions & 1 deletion app/src/components/channels/channel-chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ export function ChannelChat({
*/
const failed = joined === "connected" ? story().failure() : null;
if (failed !== null && current && turnsRef.current === 0) {
const code = lastRun.failureCode();
const code = story().failureCode();
setRunError(
(shown) => shown ?? { message: failed, ...(code ? { code } : {}) },
);
Expand Down Expand Up @@ -1410,6 +1410,43 @@ export function ChannelChat({
openJoinGate.current();
}
if (askAgain && current) pullHistoryRef.current?.({ opening: true });
/*
* A FAILURE THIS PAGE HEARD ITSELF IS NOT FORGOTTEN BECAUSE THE JOIN WAS SLOW. FOUND ON OPENBOT
* CLOUD, 2026-12-04: a person left a conversation on his phone while its Bot worked, the
* Bot's model connection dropped two minutes in and the run ended in a RUN_ERROR, and he came
* back to the Bot's last line, "I'll check options for both days so the drafts are clear.",
* with no notice, no Carry on and nothing working. The agent kept for the conversation had
* heard that RUN_ERROR, but the join that resumed the thread took longer than its deadline,
* and a failure is said above only from a join that finished.
*
* So when the join did not finish and heard no run of its own, the last run the kept agent
* heard is asked about: said again if the server has no run going and says that run did not
* finish. Asked after the history is in, so the conversation is never held for it.
*/
const keptStory = heardRuns(agent);
const keptFailure = keptStory?.failure() ?? null;
const keptFailedRun = keptStory?.runId() ?? null;
if (
joined !== "connected" &&
lastRun.runId() === null &&
keptFailure !== null &&
keptFailedRun !== null &&
current &&
turnsRef.current === 0
) {
const going = await askRunGoing(channel.id);
const ended =
going.liveness === "over"
? await askRunEnding(channel.id, keptFailedRun)
: null;
if (ended === "stopped" && current && turnsRef.current === 0) {
const code = keptStory?.failureCode();
setRunError(
(shown) =>
shown ?? { message: keptFailure, ...(code ? { code } : {}) },
);
}
}
/*
* A TURN THE SERVER IS STILL CARRYING ON IS FOLLOWED FROM HERE. The join above streams the run
* going when the conversation opened, and ends with it; the server then carries the turn on in
Expand Down
Loading
Loading