Skip to content

Commit a49de31

Browse files
Merge pull request #116 from EmergentKnowledgeGroup/codex/glass-office-p5-setup
feat(glass): rehome Setup as the eighth Basement room
2 parents 3b4d594 + b5e644f commit a49de31

22 files changed

Lines changed: 2968 additions & 479 deletions

apps/mission-control/e2e/p5-connectors-slice.spec.ts

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ test("@core @p5-connectors connectors/setup room identity, pin-to-office, and th
5858

5959
await completeQuickstartLocalOnboarding(page);
6060

61-
// Neither room lamp exists until the Connectors page is enabled.
61+
// Setup is the recovery authority and remains available independently;
62+
// only the optional Connectors room waits for its feature switch.
6263
await expect(page.locator('button[title="BF · Connectors"]')).toHaveCount(0);
63-
await expect(page.locator('button[title="BF · Setup"]')).toHaveCount(0);
64+
await expect(page.locator('button[title="BF · Setup"]')).toHaveCount(1);
6465
await setConnectorsPage(page, true);
6566
await expect(page.locator('button[title="BF · Connectors"]')).toHaveCount(1);
6667
await expect(page.locator('button[title="BF · Setup"]')).toHaveCount(1);
@@ -76,26 +77,46 @@ test("@core @p5-connectors connectors/setup room identity, pin-to-office, and th
7677
"Installed registry",
7778
);
7879

79-
// The Setup room is its own stable identity and lands on Setup.
80+
// The Setup room is its own stable identity and lands on its distinct
81+
// product surface, not the connector tabs; it offers no Connectors pin —
82+
// one door must not ambiguously open both rooms.
8083
await page.locator('button[title="BF · Setup"]').click();
8184
await expect(activeRooms).toHaveCount(1);
8285
await expect(activeRooms).toHaveAttribute("title", "BF · Setup");
86+
await expect(page.getByTestId("setup-room-page")).toBeVisible();
87+
await expect(page.getByTestId("setup-room-page")).toContainText(
88+
"Gateway connection",
89+
);
90+
await expect(page.locator(".mc-connectors-tab-bar")).toHaveCount(0);
91+
await expect(
92+
page.getByRole("button", { name: "Pin Connectors to Office" }),
93+
).toHaveCount(0);
94+
95+
// Connector quick setup stays reachable inside the Connectors room, and
96+
// internal tab clicks never move the lamp.
97+
await page.locator('button[title="BF · Connectors"]').click();
98+
await expect(activeRooms).toHaveAttribute("title", "BF · Connectors");
99+
await expect(activeConnectorsTab(page)).toHaveText(/^Registry/);
100+
await page
101+
.locator(".mc-connectors-tab-bar")
102+
.getByRole("button", { name: "Setup", exact: true })
103+
.click();
83104
await expect(activeConnectorsTab(page)).toHaveText("Setup");
84105
await expect(page.getByTestId("connectors-page")).toContainText(
85106
"Quick Setup",
86107
);
87-
88-
// Internal tab clicks never move the lamp, and the Setup room offers no
89-
// Connectors pin — one door must not ambiguously open both rooms.
90-
await page.getByRole("button", { name: /^Catalog/ }).click();
108+
await expect(activeRooms).toHaveAttribute("title", "BF · Connectors");
109+
await page
110+
.locator(".mc-connectors-tab-bar")
111+
.getByRole("button", { name: /^Catalog/ })
112+
.click();
91113
await expect(activeConnectorsTab(page)).toHaveText(/^Catalog/);
92-
await expect(activeRooms).toHaveAttribute("title", "BF · Setup");
93-
await expect(
94-
page.getByRole("button", { name: "Pin Connectors to Office" }),
95-
).toHaveCount(0);
114+
await expect(activeRooms).toHaveAttribute("title", "BF · Connectors");
96115

97-
// Returning to the Connectors room is a real room change: it relands on
98-
// Registry and offers the pin.
116+
// Returning after visiting the Setup room is a real room change: it
117+
// relands on Registry and offers the pin.
118+
await page.locator('button[title="BF · Setup"]').click();
119+
await expect(page.getByTestId("setup-room-page")).toBeVisible();
99120
await page.locator('button[title="BF · Connectors"]').click();
100121
await expect(activeRooms).toHaveAttribute("title", "BF · Connectors");
101122
await expect(activeConnectorsTab(page)).toHaveText(/^Registry/);
@@ -233,12 +254,12 @@ test("@core @p5-connectors connectors/setup room identity, pin-to-office, and th
233254
await expect(activeRooms).toHaveAttribute("title", "BF · Connectors");
234255
await expect(activeConnectorsTab(page)).toHaveText(/^Registry/);
235256

236-
// Turning the Connectors page off removes both room lamps; the persisted
237-
// door stays visible but refuses honestly instead of dying silently.
257+
// Turning the Connectors page off removes only its lamp; Setup remains
258+
// available to restore it, while the persisted Connectors door refuses.
238259
await setConnectorsPage(page, false);
239260
await page.locator('[data-tour-id="nav-assistant"]').click();
240261
await expect(page.locator('button[title="BF · Connectors"]')).toHaveCount(0);
241-
await expect(page.locator('button[title="BF · Setup"]')).toHaveCount(0);
262+
await expect(page.locator('button[title="BF · Setup"]')).toHaveCount(1);
242263
await page
243264
.getByTestId("office-block-connectors")
244265
.getByRole("button", { name: "Open Connectors" })

apps/mission-control/e2e/p5-directory-slice.spec.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ test("@core @p5-directory directory room identity, Front Desk authority, Mail/Fi
270270
// Acknowledge drives the real seam; reopening the thread shows the new
271271
// authoritative ack state.
272272
await mailPage.getByRole("button", { name: "Acknowledge" }).click();
273-
await expect(page.locator(".mc-toast").first()).toContainText(
274-
"Message acknowledged.",
275-
);
273+
await expect(
274+
page.locator(".mc-toast").filter({ hasText: "Message acknowledged." }),
275+
).toBeVisible();
276276
await threadItems.filter({ hasText: "Front desk handoff 2" }).click();
277277
await threadItems.filter({ hasText: "Front desk handoff 1" }).click();
278278
await expect(mailPage).toContainText("1/1 acknowledged");
@@ -291,9 +291,9 @@ test("@core @p5-directory directory room identity, Front Desk authority, Mail/Fi
291291
await composeBody.fill("Fresh handoff note from the front desk");
292292
const mutationsBeforeSend = sensitiveMutations.length;
293293
await mailPage.getByRole("button", { name: "Send", exact: true }).click();
294-
await expect(page.locator(".mc-toast").first()).toContainText(
295-
"Message sent.",
296-
);
294+
await expect(
295+
page.locator(".mc-toast").filter({ hasText: "Message sent." }),
296+
).toBeVisible();
297297
await expect(composeBody).toHaveValue("");
298298
await expect(
299299
threadItems.filter({ hasText: "Front desk handoff 1" }),
@@ -317,9 +317,11 @@ test("@core @p5-directory directory room identity, Front Desk authority, Mail/Fi
317317
// request that could pretend success.
318318
await dismissVisibleToasts(page);
319319
await mailPage.getByRole("button", { name: "Send", exact: true }).click();
320-
await expect(page.locator(".mc-toast").first()).toContainText(
321-
"Message body cannot be empty.",
322-
);
320+
await expect(
321+
page
322+
.locator(".mc-toast")
323+
.filter({ hasText: "Message body cannot be empty." }),
324+
).toBeVisible();
323325
await dismissVisibleToasts(page);
324326

325327
// Search filters the authoritative list; the filtered empty state offers a
@@ -391,9 +393,9 @@ test("@core @p5-directory directory room identity, Front Desk authority, Mail/Fi
391393
await expect(releaseDialog).toContainText("src/area-7/**");
392394
const mutationsBeforeRelease = sensitiveMutations.length;
393395
await releaseDialog.getByRole("button", { name: "Release" }).click();
394-
await expect(page.locator(".mc-toast").first()).toContainText(
395-
"Lease released.",
396-
);
396+
await expect(
397+
page.locator(".mc-toast").filter({ hasText: "Lease released." }),
398+
).toBeVisible();
397399
// Live shrink to one page: the stored page clamps instead of lingering.
398400
await expect(mailPage).toContainText("6 active file lock(s)");
399401
await expect(leasePagination).toHaveCount(0);
@@ -421,9 +423,9 @@ test("@core @p5-directory directory room identity, Front Desk authority, Mail/Fi
421423
await leaseDialog
422424
.getByRole("button", { name: "Reserve file lock" })
423425
.click();
424-
await expect(page.locator(".mc-toast").first()).toContainText(
425-
"Lease created: docs/**/*",
426-
);
426+
await expect(
427+
page.locator(".mc-toast").filter({ hasText: "Lease created: docs/**/*" }),
428+
).toBeVisible();
427429
await expect(mailPage).toContainText("7 active file lock(s)");
428430
await expect(leasePagination.locator(".mc-pagination-info")).toHaveText(
429431
"1 / 2",

0 commit comments

Comments
 (0)