mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 11:07:40 +01:00
feat(control): first-time setup checklist replaces single-command nudge
Onboarding gap surfaced in a user conversation: a brand-new web user
who signs up on cockpitapp.vercel.app gets the life-OS surfaces
immediately, but the agent fleet (the headline /control feature) only
works after they install three pieces locally — none of which the UI
ever names. They discovered the requirement by hitting the wall: try
to dispatch, see DaemonStatusBanner pop up with a single "start the
daemon" command and no mention of Zellij or the agent CLIs.
Replaced the daemonNeverSeen branch of DaemonStatusBanner with a
three-step checklist that names every prerequisite up front:
1. Install Zellij (link to zellij.dev — the terminal multiplexer the
daemon injects prompts into).
2. Install at least one agent CLI of choice (Claude Code, Codex,
Gemini, openclaw) on $PATH.
3. Mint a daemon token at Settings → Agent tokens (deep-linked) and
run the daemon command shown.
The daemonOffline branch (returning user whose daemon dropped — they
already have everything installed) keeps its existing minimal restart
copy unchanged. That user doesn't need the install steps re-explained.
Title shifted from "Local daemon not connected" → "Finish setup to
dispatch agents" so the warning reads as a guided onboarding step
rather than a runtime error.
Side benefits:
• Deep-link to /settings#tokens makes the token flow discoverable.
• External Zellij link uses noopener+noreferrer (security default).
• Existing dismiss button still works — power users can hide it.
tsc + eslint + build clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 file changed
+49
-15
@@ -2,8 +2,9 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { X, Radio, WifiOff } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { timeAgo } from "@/lib/dates";
|
||||
import { APP_SLUG } from "@/config/brand";
|
||||
import { APP_NAME, APP_SLUG } from "@/config/brand";
|
||||
|
||||
type Props = {
|
||||
daemonNeverSeen: boolean;
|
||||
@@ -33,26 +34,59 @@ export function DaemonStatusBanner({ daemonNeverSeen, daemonOffline, daemonLastP
|
||||
<div className="min-w-0 flex-1 space-y-2">
|
||||
<div>
|
||||
<span className="font-medium text-text-primary">
|
||||
{daemonNeverSeen ? "Local daemon not connected" : "Local daemon offline"}
|
||||
{daemonNeverSeen ? `Finish setup to dispatch agents` : "Local daemon offline"}
|
||||
</span>
|
||||
{!daemonNeverSeen && lastSeen && (
|
||||
<span className="ml-2 text-xs text-text-tertiary">last seen {lastSeen}</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<p className="text-text-secondary leading-relaxed">
|
||||
{daemonNeverSeen
|
||||
? "Commands are queued and will run once the daemon connects. Start it on your local machine:"
|
||||
: "Commands will queue until the daemon reconnects. Restart it on your local machine:"}
|
||||
</p>
|
||||
|
||||
<code className="block rounded-lg bg-surface-overlay px-3 py-2 font-mono text-xs text-text-primary break-all">
|
||||
APP_DAEMON_TOKEN=<your-token> ./scripts/{APP_SLUG}-daemon.sh
|
||||
</code>
|
||||
|
||||
<p className="text-xs text-text-muted">
|
||||
The token is the value of <code className="text-text-tertiary">APP_DAEMON_TOKEN</code> (or legacy <code className="text-text-tertiary">COCKPIT_DAEMON_TOKEN</code>) in your local <code className="text-text-tertiary">.env.local</code>.
|
||||
</p>
|
||||
{daemonNeverSeen ? (
|
||||
// First-time setup. A new web user discovers the local-runtime
|
||||
// requirement here for the first time — the docs path was
|
||||
// previously a single "start the daemon" command with no mention
|
||||
// of the three prerequisites (daemon binary, Zellij, ≥1 agent
|
||||
// CLI). Spell them out so the user can install before hitting
|
||||
// the wall on first dispatch.
|
||||
<>
|
||||
<p className="text-text-secondary leading-relaxed">
|
||||
{APP_NAME} dispatches agents from your machine. Three pieces are needed:
|
||||
</p>
|
||||
<ol className="ml-4 list-decimal space-y-1.5 text-sm text-text-secondary">
|
||||
<li>
|
||||
Install <a href="https://zellij.dev/" target="_blank" rel="noopener noreferrer" className="text-accent-text underline-offset-2 hover:underline">Zellij</a> — the terminal multiplexer the daemon injects prompts into.
|
||||
</li>
|
||||
<li>
|
||||
Install at least one agent CLI you want to dispatch (Claude Code, Codex, Gemini, or openclaw) and confirm it's on your <code className="text-text-tertiary">$PATH</code>.
|
||||
</li>
|
||||
<li>
|
||||
Mint a daemon token in{" "}
|
||||
<Link href="/settings#tokens" className="text-accent-text underline-offset-2 hover:underline">Settings → Agent tokens</Link>
|
||||
{" "}and run:
|
||||
</li>
|
||||
</ol>
|
||||
<code className="block rounded-lg bg-surface-overlay px-3 py-2 font-mono text-xs text-text-primary break-all">
|
||||
APP_DAEMON_TOKEN=<your-token> ./scripts/{APP_SLUG}-daemon.sh
|
||||
</code>
|
||||
<p className="text-xs text-text-muted">
|
||||
Until the daemon connects, dispatches are queued and will fire once it pings in.
|
||||
</p>
|
||||
</>
|
||||
) : (
|
||||
// Returning user with a dropped daemon — they already have the
|
||||
// prerequisites; surface only the restart command.
|
||||
<>
|
||||
<p className="text-text-secondary leading-relaxed">
|
||||
Commands will queue until the daemon reconnects. Restart it on your local machine:
|
||||
</p>
|
||||
<code className="block rounded-lg bg-surface-overlay px-3 py-2 font-mono text-xs text-text-primary break-all">
|
||||
APP_DAEMON_TOKEN=<your-token> ./scripts/{APP_SLUG}-daemon.sh
|
||||
</code>
|
||||
<p className="text-xs text-text-muted">
|
||||
The token is the value of <code className="text-text-tertiary">APP_DAEMON_TOKEN</code> (or legacy <code className="text-text-tertiary">COCKPIT_DAEMON_TOKEN</code>) in your local <code className="text-text-tertiary">.env.local</code>.
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<button
|
||||
|
||||
Reference in new issue
Block a user