feat: show live worker status card to all users during debugging
Non-owners now see the same real-time status card as the owner, marked as another user's proposal, instead of a desensitized busy line. This is a debugging-phase relaxation; restore owner-only visibility for production.
This commit is contained in:
@@ -406,8 +406,9 @@ test("proposals are owned per chat+user: a second user in the same chat cannot c
|
||||
await harness.manager.prompt(request("hello again", "user-b"));
|
||||
const bPrompt = readLog(harness.logFile).find((entry) => entry.method === "session/prompt" && entry.text?.startsWith("[User message]\nhello again"));
|
||||
assert.ok(bPrompt?.text);
|
||||
assert.match(bPrompt.text!, /details hidden/);
|
||||
assert.doesNotMatch(bPrompt.text!, /Test proposal/);
|
||||
// Debugging phase: non-owners also see the live card, marked as another user's proposal.
|
||||
assert.match(bPrompt.text!, /Test proposal/);
|
||||
assert.match(bPrompt.text!, /another user's proposal/);
|
||||
|
||||
assert.equal(await harness.manager.stop("webhook", "chat-1", "user-b"), false);
|
||||
assert.equal(harness.proposals.get(proposal.id)!.status, "working");
|
||||
@@ -751,9 +752,9 @@ test("the owner sees a live worker activity card while others get only a sanitiz
|
||||
assert.match(ownerPrompt, /counts: read×2 execute×1/);
|
||||
assert.match(ownerPrompt, /real-time snapshot of the worker/);
|
||||
const otherPrompt = progressPrompts[1]!.text!;
|
||||
assert.match(otherPrompt, /details hidden/);
|
||||
assert.doesNotMatch(otherPrompt, /lastActivity=/);
|
||||
assert.doesNotMatch(otherPrompt, /Test proposal/);
|
||||
// Debugging phase: non-owners see the same live card, marked as foreign.
|
||||
assert.match(otherPrompt, /title="Test proposal" running=\d{2}:\d{2} phase=processing inFlight=true \(another user's proposal\)/);
|
||||
assert.match(otherPrompt, /lastActivity=execute \(\d+s ago\)/);
|
||||
|
||||
// Once the worker is no longer working, the card disappears.
|
||||
assert.equal(await harness.manager.stop("webhook", "chat-1", "user-a"), true);
|
||||
|
||||
Reference in New Issue
Block a user