Skip to content

Commit 3246f8f

Browse files
committed
sync(bfmono): refactor(gambit): move simulator chats onto transcript entries (+19 more) (bfmono@6a65d8e08)
This PR is an automated gambitmono sync of bfmono Gambit packages. - Source: `packages/gambit/` - Core: `packages/gambit/packages/gambit-core/` - bfmono rev: 6a65d8e08 Changes: - 8b0bb6555 refactor(gambit): move simulator chats onto transcript entries - 518646809 docs(initiatives): migrate legacy cross-company initiatives - b13651c28 chore(gambit): cut 0.8.6-rc.4 release - 45487928e refactor(gambit): normalize scenario service Maybe types - 19f30c290 test(gambit): verify graphql-owned test feedback refresh - 122b7edc5 feat(simulator-ui): move test feedback authority into isograph - 75187e0de feat(gambit): add graphql test feedback persistence - e42279f65 docs(gambit): add test feedback graphql authority intent - dceb56711 feat(simulator-ui): add deterministic test-tab openresponses demo - c08bebaae test(gambit): verify scenario openresponses projection for chat providers - 7ab54c79e fix(gambit): synthesize scenario openresponses messages from state - fad6ece51 test(gambit): add feedback refresh repro to isograph test demo - f40526fa0 refactor(gambit): split simulator server into workspace modules - 55ba88bf1 refactor(gambit): extract simulator response and ui handlers - 09b63324c refactor(gambit): quarantine legacy api routes - 410dc8573 fix(gambit): persist workspace deck state in sqlite - 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 Do not edit this repo directly; make changes in bfmono and re-run the sync.
1 parent 1a3fd4b commit 3246f8f

111 files changed

Lines changed: 9374 additions & 6911 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

simulator-ui/__demos__/run-build-tab-demo.ts

Lines changed: 30 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,33 @@ async function main(): Promise<void> {
3030
const gambitCliPath = path.join(gambitPackageRoot, "src", "cli.ts");
3131

3232
await runWithTempServeRoot(async (serveRoot) => {
33-
const fixture = await createTestTabDemoFixture(serveRoot);
33+
const fixture = await createTestTabDemoFixture(serveRoot, {
34+
includeBrokenScenario: false,
35+
});
3436
await runE2e(
3537
"gambit build tab demo",
3638
async ({ demoTarget, screenshot, wait }) => {
39+
const sendBuildPrompt = async (
40+
prompt: string,
41+
userBubbleText = prompt,
42+
): Promise<void> => {
43+
await demoTarget.locator('[data-testid="build-chat-input"]').fill(
44+
prompt,
45+
);
46+
const sendButton = demoTarget.locator(
47+
'[data-testid="build-send"]:not([disabled])',
48+
).first();
49+
await sendButton.waitFor({
50+
timeout: 120_000,
51+
});
52+
await sendButton.click();
53+
await demoTarget.locator('.imessage-bubble[title="user"]', {
54+
hasText: userBubbleText,
55+
}).waitFor({
56+
timeout: 20_000,
57+
});
58+
};
59+
3760
const normalizeWorkspacePath = (pathname: string): string => {
3861
return pathname.startsWith("/isograph/")
3962
? pathname.slice("/isograph".length)
@@ -110,38 +133,14 @@ async function main(): Promise<void> {
110133
const updateModelPrompt =
111134
"please update the root PROMPT.md model to openai/gpt-5.1-chat";
112135
const followupPrompt = `demo build-tab send ${Date.now()}`;
113-
await demoTarget.locator('[data-testid="build-chat-input"]').fill(
114-
chatPrompt,
115-
);
116-
await demoTarget.locator('[data-testid="build-send"]').click();
117-
await demoTarget.locator('.imessage-bubble[title="user"]', {
118-
hasText: chatPrompt,
119-
}).waitFor({
120-
timeout: 5_000,
121-
});
136+
await sendBuildPrompt(chatPrompt);
122137
await demoTarget.locator(".workbench-accordion-title .badge", {
123138
hasText: "Running",
124139
}).waitFor({
125140
timeout: 5_000,
126141
});
127-
await demoTarget.locator('[data-testid="build-chat-input"]').fill(
128-
workspacePrompt,
129-
);
130-
await demoTarget.locator('[data-testid="build-send"]').click();
131-
await demoTarget.locator('.imessage-bubble[title="user"]', {
132-
hasText: workspacePrompt,
133-
}).waitFor({
134-
timeout: 5_000,
135-
});
136-
await demoTarget.locator('[data-testid="build-chat-input"]').fill(
137-
promptMdPrompt,
138-
);
139-
await demoTarget.locator('[data-testid="build-send"]').click();
140-
await demoTarget.locator('.imessage-bubble[title="user"]', {
141-
hasText: promptMdPrompt,
142-
}).waitFor({
143-
timeout: 5_000,
144-
});
142+
await sendBuildPrompt(workspacePrompt);
143+
await sendBuildPrompt(promptMdPrompt);
145144
await demoTarget.locator(
146145
".build-files-preview-selector .gds-listbox-trigger",
147146
).click();
@@ -157,15 +156,10 @@ async function main(): Promise<void> {
157156
timeout: 5_000,
158157
});
159158
const refreshMarker = `refresh-marker-${Date.now()}`;
160-
await demoTarget.locator('[data-testid="build-chat-input"]').fill(
159+
await sendBuildPrompt(
161160
`${updateModelPrompt} and include a single line "${refreshMarker}"`,
161+
"please update the root PROMPT.md model",
162162
);
163-
await demoTarget.locator('[data-testid="build-send"]').click();
164-
await demoTarget.locator('.imessage-bubble[title="user"]', {
165-
hasText: "please update the root PROMPT.md model",
166-
}).waitFor({
167-
timeout: 5_000,
168-
});
169163
await demoTarget.locator(".build-file-preview", {
170164
hasText: "openai/gpt-5.1-chat",
171165
}).waitFor({
@@ -176,15 +170,7 @@ async function main(): Promise<void> {
176170
}).waitFor({
177171
timeout: 120_000,
178172
});
179-
await demoTarget.locator('[data-testid="build-chat-input"]').fill(
180-
followupPrompt,
181-
);
182-
await demoTarget.locator('[data-testid="build-send"]').click();
183-
await demoTarget.locator('.imessage-bubble[title="user"]', {
184-
hasText: followupPrompt,
185-
}).waitFor({
186-
timeout: 5_000,
187-
});
173+
await sendBuildPrompt(followupPrompt);
188174
await demoTarget.locator('.imessage-bubble[title="assistant"]').first()
189175
.waitFor({
190176
timeout: 20_000,

0 commit comments

Comments
 (0)