Skip to content

Commit 02643cf

Browse files
committed
sync(bfmono): fix(simulator-ui): preserve isograph routes without blanking (+19 more) (bfmono@91f6c41de)
This PR is an automated gambitmono sync of bfmono Gambit packages. - Source: `packages/gambit/` - Core: `packages/gambit/packages/gambit-core/` - bfmono rev: 91f6c41de Changes: - 91f6c41de fix(simulator-ui): preserve isograph routes without blanking - d43aa6c8c chore(nix): update flake lock files - be85dffd4 chore(gambit): cut 0.8.6-rc.3 release - bc863eeda docs(gambit): align package README and examples paths - 13974eff1 fix(simulator-ui): restore isograph drawer controls and docs-first nav - 88441ad8c fix(simulator-ui): restore workbench chat controls and enforce non-null output fields - 67b932323 fix(gambit-simulator-ui): switch workspace delete to Isograph mutation - 59fc0f177 fix(simulator-ui): restore isograph docs nav and drawer behavior - 87f077565 fix(simulator-ui): align isograph navbar title centering with legacy layout - 30527713d GBENG-89 fix - 8da9d1153 fix(gambit-ci): avoid publish dry-run type skew false positives - 3a3341592 fix(gambit): scope run-event idempotency and return committed sequences - 567f5934f fix(gambit): harden response trace persistence and replay test stability - fa68df891 fix(gambit): prevent response replay duplication and idempotency collisions - fcff57520 fix(gambit): project response.reasoning events into output reasoning items - 697d79956 fix(gambit): enforce canonical sqlite openresponses projections - e22cde8be fix(gambit/providers): normalize codex and claude stream events for core - 138bb9ad7 fix(gambit-graphql): remove stray braces after output-item materializer removal - 6c696341a test(gambit): cover build/scenario openresponses run-id isolation - b4fd65bb1 fix(gambit): isolate build runtime authority from scenario state Do not edit this repo directly; make changes in bfmono and re-run the sync.
1 parent 1e9de21 commit 02643cf

5 files changed

Lines changed: 22 additions & 10 deletions

File tree

simulator-ui/isograph/entrypoints/EntrypointSimulatorWorkspaceShell.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import entrypointSimulatorVerifyPage from "@iso-gambit-sim/Query/EntrypointSimul
66
import { parseWorkspaceRoute } from "../../../src/workspace_routes.ts";
77
import { AppIsoMinimal } from "../../src/AppIsoMinimal.tsx";
88
import { useRouter } from "../../src/RouterContext.tsx";
9+
import Panel from "../../src/gds/Panel.tsx";
910

1011
function isThenable(value: unknown): value is Promise<unknown> {
1112
return !!value &&
@@ -41,6 +42,11 @@ function WorkspaceMainPane(props: { workspaceId: string }) {
4142
key={`workspace-main:${props.workspaceId}:${tab}`}
4243
entrypoint={entrypoint}
4344
params={{ workspaceId: props.workspaceId }}
45+
fallback={
46+
<Panel>
47+
<div className="editor-status">Loading workspace tab…</div>
48+
</Panel>
49+
}
4450
/>
4551
);
4652
}

simulator-ui/src/AppIsoMinimal.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,22 @@ export function AppIsoMinimal(props: {
131131
entrypoint: any;
132132
params?: Record<string, string>;
133133
onNavigate?: (nextPath: string) => void;
134+
fallback?: React.ReactNode;
135+
rendererKey?: string;
134136
}) {
135137
const {
136138
entrypoint,
137139
params = {},
138140
onNavigate,
141+
fallback = null,
142+
rendererKey,
139143
} = props;
140144

141145
return (
142146
<IsoErrorBoundary>
143-
<Suspense fallback={<div>Loading Isograph entrypoint...</div>}>
147+
<Suspense fallback={fallback}>
144148
<IsoMinimalRenderer
149+
key={rendererKey}
145150
entrypoint={entrypoint}
146151
params={params}
147152
onNavigate={onNavigate}

simulator-ui/src/AppShell.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Suspense, useCallback, useMemo, useState } from "react";
1+
import { useCallback, useMemo, useState } from "react";
22
import {
33
buildWorkspacePath,
44
parseWorkspaceRoute,
@@ -375,11 +375,7 @@ export function AppShell(props: {
375375
</Button>
376376
</div>
377377
)}
378-
<Suspense
379-
fallback={<div style={{ padding: "12px 16px" }}>Loading...</div>}
380-
>
381-
{isDocsPath ? <DocsPage /> : props.children}
382-
</Suspense>
378+
{isDocsPath ? <DocsPage /> : props.children}
383379
</main>
384380
<Workbench open={workbenchVisible} />
385381
</div>

simulator-ui/src/MinimalRouterRoot.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ export function MinimalRouterRoot() {
4040
: `${pattern}|${currentPath}`;
4141
return (
4242
<AppIsoMinimal
43-
key={routeInstanceKey}
4443
// deno-lint-ignore no-explicit-any
4544
entrypoint={entrypoint as any}
4645
params={params}
4746
onNavigate={navigate}
47+
rendererKey={routeInstanceKey}
4848
/>
4949
);
5050
}

simulator-ui/src/RouterContext.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
createContext,
33
type ReactNode,
4+
startTransition,
45
useCallback,
56
useContext,
67
useEffect,
@@ -72,10 +73,12 @@ export function RouterProvider({
7273
}, [currentPath]);
7374

7475
const navigate = useCallback((path: string) => {
75-
setCurrentPath(path);
7676
if (hasDom) {
7777
globalThis.history.pushState({}, "", path);
7878
}
79+
startTransition(() => {
80+
setCurrentPath(path);
81+
});
7982
}, [hasDom]);
8083

8184
// deno-lint-ignore gambit/no-useeffect-setstate gambit/no-useeffect-setstate
@@ -92,7 +95,9 @@ export function RouterProvider({
9295
`${normalizedWithSearch}${hash ?? ""}`,
9396
);
9497
}
95-
setCurrentPath(normalizedWithSearch);
98+
startTransition(() => {
99+
setCurrentPath(normalizedWithSearch);
100+
});
96101
};
97102

98103
globalThis.addEventListener("popstate", handlePopState);

0 commit comments

Comments
 (0)