Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/assistant-resume-controls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sapiom/harness": patch
---

Check saved Assistant availability and resume the same conversation from session history.
7 changes: 7 additions & 0 deletions packages/harness/docs/assistant-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,10 @@ before and after IO. Missing native history never creates a replacement session;
missing retained context blocks execution while public history remains readable.
An empty saved conversation needs no invented context. Public attachments contain
only native identity, lease and lifecycle state, never saved system text.

History review offers an explicit availability check before Resume. Missing
native history and missing execution context remain distinct readable states.
Resume reuses an operation UUID after an uncertain response and reveals Assistant
only if the same account, navigation and foreground intent still own the result.
Newer bus state owns Terminal status. A restored Assistant stays paused until an
explicit message; existing live execution keeps its current state.
31 changes: 31 additions & 0 deletions packages/harness/web/e2e/assistant-end.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,34 @@ test("Terminal-only End keeps its existing confirmation and sibling selection",
await expect(page.locator(".harness-terminal")).toBeVisible();
expect(fixture.unexpected).toEqual([]);
});

test("late End cannot remove or select a row after an auth barrier", async ({
page,
}) => {
const fixture = await openStudio(page);
await project(page, 1, [lifecycle("sess-boot")]);
await openEnd(page);
await page.getByTestId("end-session-confirm-btn").click();
await expect.poll(() => fixture.requests.length).toBe(1);
await publish(page, {
type: "auth.changed",
authenticated: true,
organizationName: "Account B",
});
await publish(page, {
type: "session.status",
session: session("sess-boot", { title: "Current account session" }),
});
await fixture.settle(200);
await expect
.poll(() =>
page.evaluate(() => (window as any).__HARNESS_TEST__.killSessionCalls),
)
.toContain("sess-boot");
await expect(page.getByTestId("session-tab-sess-boot")).toContainText(
"Current account session",
);
await expect(selected(page)).toHaveAttribute("data-session-id", "sess-boot");
await expect(page.locator(".harness-terminal")).toBeVisible();
expect(fixture.unexpected).toEqual([]);
});
Loading
Loading