fix(app): keep cached workspace header visible while reconnecting

Checkout refresh was replacing known workspace identity with a skeleton. Keep persisted identity visible until fresh checkout details arrive.
This commit is contained in:
Mohamed Boudra
2026-07-20 22:41:54 +02:00
parent 4bda2dfea9
commit 345d8e5240
2 changed files with 9 additions and 6 deletions
@@ -54,10 +54,6 @@ export function resolveWorkspaceHeaderRenderState(input: {
return { kind: "skeleton" };
}
if (input.checkoutState.kind === "pending" && input.workspace.projectKind === "git") {
return { kind: "skeleton" };
}
const header = resolveWorkspaceHeader({ workspace: input.workspace });
const checkout = input.checkoutState.kind === "ready" ? input.checkoutState.checkout : null;
const currentBranchName =
@@ -95,13 +95,20 @@ describe("workspace source of truth consumption", () => {
).toEqual({ kind: "skeleton" });
});
it("keeps git workspace headers skeletoned until checkout status resolves", () => {
it("keeps cached git workspace identity visible while checkout status refreshes", () => {
expect(
resolveWorkspaceHeaderRenderState({
workspace: createWorkspaceDescriptor({ projectKind: "git" }),
checkoutState: { kind: "pending" },
}),
).toEqual({ kind: "skeleton" });
).toEqual({
kind: "ready",
title: "feat/workspace-sot",
subtitle: "getpaseo/paseo",
shouldShowSubtitle: true,
isGitCheckout: false,
currentBranchName: null,
});
});
it("renders known non-git workspace identity while checkout status is pending", () => {