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.

Approvals off: every hover hint says payments still ask

Pixel (kwant bot)a2d464ed3b6d
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index d785b628..f84c24a5 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -2532,7 +2532,7 @@ export const SpaceApp: React.FC<SpaceAppProps> = ({
const pendingSkillCounts = pendingByKwant(pendingSkills);
const pendingHere = currentKwant ? pendingSkillCounts[currentKwant.id] ?? 0 : 0;
const approvalsBadge = approvalsOff(currentKwant) ? (
- <ApprovalsOffBadge onClick={() => currentKwant && openAgentSettings(currentKwant)} title={`${currentKwant?.name} runs commands, file writes and tools without asking. Open its settings to change it.`} />
+ <ApprovalsOffBadge onClick={() => currentKwant && openAgentSettings(currentKwant)} title={`${currentKwant?.name} acts without asking, including deletions, publishing and sign-ins. Payments still ask you. Open its settings to change it.`} />
) : null;
const skillsBadge =
currentKwant && pendingHere > 0 ? (
diff --git a/frontend/src/components/ApprovalsSetting.tsx b/frontend/src/components/ApprovalsSetting.tsx
index 638364f2..a7e8b16c 100644
--- a/frontend/src/components/ApprovalsSetting.tsx
+++ b/frontend/src/components/ApprovalsSetting.tsx
@@ -198,7 +198,7 @@ export const SpaceApprovalsSetting: React.FC<{
<p className="flex items-center gap-2 text-xs font-medium text-zinc-200">
{current === 'off' ? <ShieldOff size={14} className="text-amber-300" aria-hidden="true" /> : <ShieldCheck size={14} className="text-zinc-400" aria-hidden="true" />}
Approvals
- {current === 'off' && <ApprovalsOffBadge title={`Approvals are off in ${spaceName}.`} />}
+ {current === 'off' && <ApprovalsOffBadge title={`Approvals are off in ${spaceName}. Payments still ask you.`} />}
</p>
<ExposedBanner
store={passwords}
diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx
index 02f5ed52..db4e0c74 100644
--- a/frontend/src/components/Sidebar.tsx
+++ b/frontend/src/components/Sidebar.tsx
@@ -274,7 +274,7 @@ export const Sidebar: React.FC<SidebarProps> = ({
<button
type="button"
onClick={onOpenSpaceSettings}
- title="Bots here run commands, file writes and tools without asking. Change it in Space settings."
+ title="Bots here act without asking, including deletions, publishing and sign-ins. Payments still ask you. Change it in Space settings."
className="mt-1 w-full flex items-center gap-1.5 px-2 py-1 rounded-md border border-amber-500/30 bg-amber-500/10 text-[11px] font-medium text-amber-200 hover:bg-amber-500/20 focus-visible:outline focus-visible:outline-2 focus-visible:outline-amber-400"
>
<ShieldOff size={12} aria-hidden="true" className="shrink-0" />
@@ -722,7 +722,7 @@ export const Sidebar: React.FC<SidebarProps> = ({
Needs you{needsYou[k.id] > 1 ? ` · ${needsYou[k.id]}` : ''}
</span>
)}
- {approvalsOff(k) && <ApprovalsOffBadge compact title={`${k.name} runs commands, file writes and tools without asking.`} />}
+ {approvalsOff(k) && <ApprovalsOffBadge compact title={`${k.name} acts without asking. Payments still ask you.`} />}
{onEditKwant && !phone && (
<button
type="button"
diff --git a/frontend/tests/approvalsOff.test.mjs b/frontend/tests/approvalsOff.test.mjs
index 6565214e..84e15a52 100644
--- a/frontend/tests/approvalsOff.test.mjs
+++ b/frontend/tests/approvalsOff.test.mjs
@@ -231,3 +231,18 @@ test('sidebar: space off shows the header line; nothing at all while every bot a
const older = m.sidebar({ space: space(undefined), kwants: [bot('k1', 'Dev', undefined, undefined)] });
assert.doesNotMatch(text(older), /Approvals off/);
});
+
+test('every approvals-off hover hint says payments still ask: badge, sidebar rows and header, chat header', async () => {
+ assert.match(m.badge({}), /title="[^"]*Payments still ask you\.[^"]*"/);
+ const html = m.sidebar({ space: space('off'), kwants: [bot('k1', 'Dev', 'inherit', 'off')] });
+ const tips = [...html.matchAll(/title="([^"]*without asking[^"]*)"/g)].map((x) => x[1]);
+ assert.equal(tips.length, 2, 'the space header line and the bot row');
+ for (const t of tips) assert.match(t, /Payments still ask you\./);
+ assert.match(m.spaceSetting({ value: 'off' }), /title="Approvals are off in Work\. Payments still ask you\."/);
+ // The chat header badge lives in App.tsx, which doesn't render here: check every title passed to the marker.
+ const { readFile } = await import('node:fs/promises');
+ for (const f of ['src/App.tsx', 'src/components/Sidebar.tsx', 'src/components/ApprovalsSetting.tsx']) {
+ const src = await readFile(new URL(`../${f}`, import.meta.url), 'utf8');
+ for (const [, tip] of src.matchAll(/<ApprovalsOffBadge[^>]*\btitle=\{`([^`]*)`\}/g)) assert.match(tip, /Payments still ask you\./, `${f}: ${tip}`);
+ }
+});