Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client): recover cached threads when an environment is offline #22768

Closedjuliusmarmingewants to merge 1 commit intomain fromfix/issue-4852opened View on GitHub

Showing 3 changed files with 81 additions and 1 deletion.

x
0 of 3 viewed, 3 left
17 additions and 0 deletionsapps/mobile/src/features/threads/threadListV2.test.tsModified
View file
@@ -99,6 +99,23 @@
);
});
​
+ it("shows cached work from an unavailable environment as Offline, not Working", () => {
+ const running = presentThreadShell(
+ environmentId,
+ decodeThreadShell(
+ makeRawThreadShell({
+ status: "running",
+ activeRunId: RunId.make("run-offline"),
+ latestRunId: RunId.make("run-offline"),
+ }),
+ ),
+ );
+ expect(resolveThreadListV2Status({ ...running, environmentUnavailable: true })).toBe("offline");
+ expect(resolveThreadListV2Status({ ...running, environmentUnavailable: false })).toBe(
+ "working",
+ );
+ });
+​
it.each([
{ kind: "command", status: "ready" },
{ kind: "monitor", status: "waiting" },
9 additions and 0 deletionsapps/web/src/components/Sidebar.logic.test.tsModified
View file
@@ -271,6 +271,15 @@
).toBe("approval");