web: finish L6 after merging R10's live-run work

Integration fixes found by the full suite:
- drop the dead 1 Hz run poll helpers still referencing R10-removed state (they
  threw on every route apply, so the first connection never rendered a list);
- keep this tab's ephemeral verification chats across a reload (sessionStorage),
  so a chat the server intentionally hides stays usable in the tab that made it;
- the smoke marks only the throwaway ephemeral, clears the marker after /new, and
  tolerates a stale page banner plus a re-rendered row menu;
- the nav no longer claims a false Pipelines (0) before that list has loaded, and
  the Runs destination preloads it once per connection.
Full suite: 580 unit tests green, UI SMOKE PASS.
This commit is contained in:
2026-10-19 15:58:40 +01:00
parent 046f20db0b
commit fe9dadd2c7
2 changed files with 74 additions and 38 deletions
+26 -5
View File
@@ -259,11 +259,20 @@ async function cancelLiveRun(id) {
// Open one chat row's Chat actions menu (the row's management items live behind
// it since C13: Rename… / Close chat… or Reopen / Hide on this device).
async function openChatRowMenu(sessionId) {
await page.click(`#chatRows .chat-row[data-session="${sessionId}"] .chat-menu-button`);
await page.waitForSelector(
`#chatRows .chat-row[data-session="${sessionId}"] .chat-menu-panel`,
{ timeout: 10000 },
);
// The row can be re-rendered by a just-finished create/refresh right under the
// click, which closes the menu again; retry once before failing.
for (let attempt = 0; attempt < 2; attempt += 1) {
await page.click(`#chatRows .chat-row[data-session="${sessionId}"] .chat-menu-button`);
const opened = await eventually(
() =>
page.evaluate(
`!!document.querySelector('#chatRows .chat-row[data-session="${sessionId}"] .chat-menu-panel')`,
),
{ timeout: attempt === 0 ? 3000 : 10000, what: "the Chat actions menu" },
).catch(() => false);
if (opened) return;
}
throw new Error(`the Chat actions menu did not open for ${sessionId}`);
}
// --- P5: create a pipeline from a template (scratch server only) -----------
@@ -4154,6 +4163,9 @@ try {
if (!startedNotice.startsWith("Started a new session “")) {
throw new Error(`/new notice: ${startedNotice}`);
}
// Only the throwaway is a verification chat: clear the marker so C2's own
// create (which must appear in the list as its acceptance) is a normal chat.
await page.evaluate(`window.__pipelinesEphemeralChat = false`);
console.log(` /new opened throwaway session ${throwawayId} ("${throwawayTitle}") — ${startedNotice}`);
await showComposer();
await shot("62-chat-new-session.png");
@@ -5141,6 +5153,15 @@ try {
// F2: the header URL field and the Settings field are one draft, mirrored in
// place, so they cannot show different endpoints while typing.
const goodUrl = await page.evaluate(`document.querySelector("#settingsServerUrl")?.value ?? ""`);
// An earlier section can leave a page banner behind; the assertion below is
// about where THIS refusal is surfaced, so clear any stale one with the page's
// own path (re-selecting the active destination) before triggering it.
await page.evaluate(`(() => {
if (!document.querySelector("#content .banner.error")) return true;
const tab = [...document.querySelectorAll("nav.tabs button.tab")].find((b) => b.classList.contains("active"));
if (tab) tab.click();
return !document.querySelector("#content .banner.error");
})()`);
await page.fill("#settingsServerUrl", "not a url");
await page.click("#settingsSecondary");
const urlErrorState = await eventually(