Show the autoclicker daemon's status in the page capture card
The daemon indicator sat in the firm tab row, which put it next to the firm tabs it has nothing to do with. It belongs with the page capture switch: both describe whether the moving parts outside the browser are alive. The row now carries host, pid and version while the daemon is up, and the start command while it is not, so a stopped daemon says what to run rather than only that something is wrong. The dry-run and out-of-date states move here as chips beside the status dot. The warning banners stay above the automation buttons — those are actionable next to the thing they block. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
36c5b69550
commit
a2066fbf04
+33
-17
@@ -248,9 +248,9 @@ export default function AutoBuyer() {
|
||||
<div className="max-w-7xl mx-auto">
|
||||
<h1 className="text-2xl font-bold text-slate-900 mb-6">AutoBuyer</h1>
|
||||
|
||||
{/* ── Capture switch ── */}
|
||||
{/* ── Capture switch and daemon status ── */}
|
||||
<div className="bg-white border border-slate-200 rounded-xl shadow-sm mb-6">
|
||||
<div className="flex items-center justify-between px-4 py-3">
|
||||
<div className="flex items-center justify-between px-4 py-3 border-b border-slate-100">
|
||||
<div>
|
||||
<p className="text-sm font-medium text-slate-800">Page capture</p>
|
||||
<p className="text-xs text-slate-400 mt-0.5">
|
||||
@@ -269,6 +269,37 @@ export default function AutoBuyer() {
|
||||
{busy ? '…' : enabled ? 'ON' : 'OFF'}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between px-4 py-3">
|
||||
<div>
|
||||
<p className="text-sm font-medium text-slate-800">Autoclicker daemon</p>
|
||||
<p className="text-xs text-slate-400 mt-0.5">
|
||||
{runner?.online
|
||||
? <>Executes queued runs · {runner.host ?? 'unknown host'} pid {runner.pid ?? '?'} · v{runner.version ?? '?'}</>
|
||||
: <>Not running — start it with <code className="font-mono text-slate-500">python clicker/runner.py</code></>}
|
||||
</p>
|
||||
</div>
|
||||
<span className="flex items-center gap-2 text-xs">
|
||||
{runner?.online && runner.dryRun && (
|
||||
<span className="px-1.5 py-0.5 rounded bg-amber-100 text-amber-700 font-medium">
|
||||
dry run
|
||||
</span>
|
||||
)}
|
||||
{runner?.online && runner.stale && (
|
||||
<span className="px-1.5 py-0.5 rounded bg-red-100 text-red-700 font-medium">
|
||||
out of date
|
||||
</span>
|
||||
)}
|
||||
<span className={`w-2 h-2 rounded-full ${
|
||||
runner?.online ? (runner.busy ? 'bg-blue-500 animate-pulse' : 'bg-green-500') : 'bg-slate-300'
|
||||
}`} />
|
||||
<span className={runner?.online ? 'text-slate-600 font-medium' : 'text-slate-400'}>
|
||||
{!runner?.online
|
||||
? 'Offline'
|
||||
: runner.busy ? 'Busy' : 'Online'}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{error && (
|
||||
@@ -292,21 +323,6 @@ export default function AutoBuyer() {
|
||||
{firm.label}
|
||||
</button>
|
||||
))}
|
||||
<span className="ml-auto flex items-center gap-1.5 text-xs pb-2">
|
||||
<span className={`w-2 h-2 rounded-full ${
|
||||
runner?.online ? (runner.busy ? 'bg-blue-500 animate-pulse' : 'bg-green-500') : 'bg-slate-300'
|
||||
}`} />
|
||||
<span className={runner?.online ? 'text-slate-500' : 'text-slate-400'}>
|
||||
{!runner?.online
|
||||
? 'Runner offline'
|
||||
: runner.busy ? 'Runner busy' : 'Runner online'}
|
||||
</span>
|
||||
{runner?.online && runner.dryRun && (
|
||||
<span className="ml-1 px-1.5 py-0.5 rounded bg-amber-100 text-amber-700 font-medium">
|
||||
dry run
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{!runner?.online && (
|
||||
|
||||
Reference in New Issue
Block a user