Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

Captcha card: "turn ended, continues by itself" instead of "stopped waiting"

Pixel (kwant bot)d0803768cc07
diff --git a/frontend/src/components/HumanStepCard.tsx b/frontend/src/components/HumanStepCard.tsx
index 9eb0c74c..3012d614 100644
--- a/frontend/src/components/HumanStepCard.tsx
+++ b/frontend/src/components/HumanStepCard.tsx
@@ -73,6 +73,11 @@ export const HumanStepCard: React.FC<HumanStepCardProps> = ({ meta, messageId, k
<span className="inline-flex items-center gap-1.5 text-amber-300">
<Clock size={13} aria-hidden="true" /> {kwantName} is paused and waiting for you.
</span>
+ ) : captcha ? (
+ // The turn ended, but the step's watcher still resumes the bot once the puzzle clears.
+ <span className="inline-flex items-center gap-1.5 text-zinc-400">
+ <Clock size={13} aria-hidden="true" /> {kwantName}’s turn ended. It continues by itself once the puzzle is solved.
+ </span>
) : (
<span className="inline-flex items-center gap-1.5 text-zinc-400">
<Clock size={13} aria-hidden="true" /> {kwantName} stopped waiting. Press Done any time and it picks up in a new reply.
diff --git a/frontend/tests/humanSteps.test.mjs b/frontend/tests/humanSteps.test.mjs
index 3df3d28c..503850a9 100644
--- a/frontend/tests/humanSteps.test.mjs
+++ b/frontend/tests/humanSteps.test.mjs
@@ -78,6 +78,14 @@ test('closed and stale cards', () => {
assert.match(ui.render(props({ meta: h.parseHumanStepMeta(meta({ source: 'auto' })) })), /spotted automatically/);
});
+test('captcha card after the turn ended: continues by itself, not "stopped waiting"', () => {
+ const html = ui.render(props({ waiting: false, meta: h.parseHumanStepMeta(meta({ step_kind: 'captcha' })) }));
+ assert.match(html, /Pixel’s turn ended\. It continues by itself once the puzzle is solved\./);
+ assert.doesNotMatch(html, /stopped waiting|instantly/);
+ // Other kinds keep the pick-it-up-later copy
+ assert.match(ui.render(props({ waiting: false, meta: h.parseHumanStepMeta(meta({ step_kind: 'sign_in' })) })), /stopped waiting\. Press Done any time/);
+});
+
test('captcha target: finite box only, kind defaults to puzzle', () => {
assert.deepEqual(h.parseCaptchaTarget({ x: 460, y: 180, width: 360, height: 380 }), { kind: 'puzzle', x: 460, y: 180, width: 360, height: 380 });
assert.equal(h.parseCaptchaTarget({ x: 1, y: 1, width: 0, height: 5 }), null);