Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

fix(kits): the page was styled against a design system it is not part of

richard-epsilla0f3ac70df047
diff --git a/gateway/app.py b/gateway/app.py
index a6ac5f21..d663d9a8 100644
--- a/gateway/app.py
+++ b/gateway/app.py
@@ -7106,6 +7106,9 @@ async def list_kits(request: Request) -> dict:
"route": (kit.get("app") or {}).get("route") or "",
"launched": bool(h),
"harnessId": (h or {}).get("id") or None,
+ # What the kit actually installs, from its own config — so the card can say
+ # what you get instead of asking you to take it on trust.
+ "skills": [str(n) for n in ((kit.get("harness") or {}).get("skills") or [])],
# What to run it on: this kit's own recommended pairings, each marked with
# whether the caller's integrations can serve it. The launch dialog renders
# these directly and preselects the one flagged `recommended`.
diff --git a/ui/src/app/(app)/kits/page.tsx b/ui/src/app/(app)/kits/page.tsx
index 0f596c46..352fe1a4 100644
--- a/ui/src/app/(app)/kits/page.tsx
+++ b/ui/src/app/(app)/kits/page.tsx
@@ -25,11 +25,17 @@ interface Kit {
id: string; title: string; tagline: string; description: string;
icon: string; accent: string; route: string;
launched: boolean; harnessId: string | null;
+ skills: string[];
choices: Choice[];
}
interface BaseModel { id: string; available: boolean }
interface Base { id: string; label: string; models: BaseModel[] }
+/** The pairing this kit will actually run on, or null when nothing here can serve it. */
+function runtimeOf(kit: Kit): Choice | null {
+ return kit.choices?.find((c) => c.recommended) || null;
+}
+
export default function KitsPage() {
const [kits, setKits] = useState<Kit[] | null>(null);
const [bases, setBases] = useState<Base[]>([]);
@@ -55,7 +61,16 @@ export default function KitsPage() {
.catch(() => {});
}, []);
+ /** A kit app runs outside this Next app, so it gets its own tab. */
+ function openApp(route: string) {
+ window.open(route, '_blank', 'noopener,noreferrer');
+ }
+
async function launch(kit: Kit, base?: string, model?: string) {
+ // Open the tab NOW, on the click, and navigate it when the launch returns. Opening it after
+ // the await is a popup the browser is entitled to block, because by then it is no longer a
+ // user gesture.
+ const tab = window.open('', '_blank', 'noopener,noreferrer');
setBusy(kit.id); setErr('');
try {
const r = await harnessFetch(`/api/harness/v1/kits/${kit.id}/launch`, {
@@ -65,28 +80,34 @@ export default function KitsPage() {
});
if (!r.ok) throw new Error((await r.json().catch(() => null))?.detail || `${r.status}`);
const { route } = await r.json();
- // Hard navigation: the kit app is served outside this Next app, from the image.
- window.location.href = route || `/kits/${kit.id}`;
+ const url = route || `/kits/${kit.id}`;
+ if (tab) tab.location.href = url; else openApp(url);
+ setPicking(null); setBusy('');
+ reload();
} catch (e) {
+ tab?.close();
setErr(e instanceof Error ? e.message : 'launch failed');
setBusy(''); setPicking(null);
}
}
return (
- <section className="view is-active"><div className="page">
- <header className="page-head">
+ // Same chrome as every other collection page (Harnesses, Integrations, Keys…). This page
+ // used `page-head`, which is styled nowhere — that is why its heading and spacing did not
+ // match the rest of the console.
+ <section className="view is-active collection-view" id="view-kits"><div className="page">
+ <div className="page-header">
<div>
<h1>Starter Kits</h1>
<p>A working product in one click: each kit provisions the Harness it needs and opens
its own app, with everything it uses included.</p>
</div>
- </header>
+ </div>
{err && <div className="hr-error" role="alert">{err}</div>}
{kits === null && !err && <div className="kit-grid">
- {[0, 1].map((i) => <div key={i} className="kit-card"><span className="sk" style={{ height: 132 }} /></div>)}
+ {[0, 1].map((i) => <div key={i} className="kit-card"><span className="sk" style={{ height: 236 }} /></div>)}
</div>}
{kits !== null && kits.length === 0 && (
@@ -98,24 +119,63 @@ export default function KitsPage() {
{kits !== null && kits.length > 0 && (
<div className="kit-grid">
- {kits.map((k) => (
- <article key={k.id} className="kit-card">
- <span className="kit-icon" style={k.accent ? { background: k.accent } : undefined}>
- <iconify-icon icon={k.icon || 'tabler:box'}></iconify-icon>
- </span>
- <div className="kit-copy">
- <h2>{k.title}</h2>
- <p className="kit-tagline">{k.tagline}</p>
+ {kits.map((k) => {
+ const run = runtimeOf(k);
+ return (
+ <article key={k.id} className="kit-card">
+ {/* A wash of the kit's own accent, so a card reads as the product it opens. */}
+ <span className="kit-wash" style={k.accent ? { background: k.accent } : undefined} />
+
+ <header className="kit-head">
+ <span className="kit-icon" style={k.accent ? { background: k.accent } : undefined}>
+ <iconify-icon icon={k.icon || 'tabler:box'}></iconify-icon>
+ </span>
+ <div className="kit-titles">
+ <h2>{k.title}</h2>
+ <p className="kit-tagline">{k.tagline}</p>
+ </div>
+ {k.launched && <span className="kit-live" title="This kit is already running">Running</span>}
+ </header>
+
<p className="kit-desc">{k.description}</p>
- </div>
- <div className="kit-actions">
- <button className="button primary" type="button" disabled={busy === k.id}
- onClick={() => (k.launched ? void launch(k) : setPicking(k))}>
- {busy === k.id ? 'Opening…' : k.launched ? 'Open' : 'Launch'}
- </button>
- </div>
- </article>
- ))}
+
+ {/* Everything here is a fact from the kit's own config or the server's view of
+ this org's integrations — never a guess about what the kit might do. */}
+ <ul className="kit-facts">
+ {run && (
+ <li>
+ <iconify-icon icon="tabler:cpu"></iconify-icon>
+ Runs on {run.baseLabel}<span className="kit-fact-dim"> · {run.model}</span>
+ </li>
+ )}
+ {!run && (
+ <li className="kit-fact-warn">
+ <iconify-icon icon="tabler:plug-connected-x"></iconify-icon>
+ No connected provider can run this yet
+ </li>
+ )}
+ {k.skills.length > 0 && (
+ <li>
+ <iconify-icon icon="tabler:sparkles"></iconify-icon>
+ Installs {k.skills.join(', ')}
+ </li>
+ )}
+ </ul>
+
+ <footer className="kit-actions">
+ {k.launched && k.harnessId && (
+ <a className="kit-link" href={`/harnesses/${k.harnessId}`}>Harness settings</a>
+ )}
+ <span className="kit-actions-spacer" />
+ <button className="button primary" type="button" disabled={busy === k.id}
+ onClick={() => (k.launched ? openApp(k.route || `/kits/${k.id}`) : setPicking(k))}>
+ {busy === k.id ? 'Launching…' : k.launched ? 'Open' : 'Launch'}
+ <iconify-icon icon={k.launched ? 'tabler:external-link' : 'tabler:arrow-right'}></iconify-icon>
+ </button>
+ </footer>
+ </article>
+ );
+ })}
</div>
)}
diff --git a/ui/src/app/hr.css b/ui/src/app/hr.css
index d203ced4..9308275f 100644
--- a/ui/src/app/hr.css
+++ b/ui/src/app/hr.css
@@ -788,54 +788,109 @@ body.hr-resizing iframe { pointer-events: none; }
/* ── Starter Kits ───────────────────────────────────────────────────────────────────────── */
-.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
-.kit-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--surface);
- border: 1px solid var(--line); border-radius: 14px; }
-.kit-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
- border-radius: 10px; background: var(--brand); color: #fff; font-size: 20px; flex: 0 0 auto; }
-.kit-copy { flex: 1; min-width: 0; }
-.kit-copy h2 { font-size: 16px; font-weight: 700; margin: 0 0 2px; color: var(--ink); }
-.kit-tagline { font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
-.kit-desc { font-size: 12.5px; line-height: 1.5; color: var(--mute); margin: 0; }
-.kit-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px;
- padding-top: 4px; border-top: 1px solid var(--line); margin-top: 2px; }
-.kit-actions { justify-content: flex-end; }
+.kit-grid {
+ display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
+ gap: 16px; align-items: start;
+}
+/* A single kit must not stretch to the width of a 27" display and look lost. */
+@media (min-width: 1100px) { .kit-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 420px)); } }
+
+.kit-card {
+ position: relative; display: flex; flex-direction: column; gap: 12px;
+ padding: 20px; background: var(--surface); border: 1px solid var(--line);
+ border-radius: 14px; overflow: hidden;
+ transition: border-color .14s ease, box-shadow .14s ease;
+}
+.kit-card:hover { border-color: var(--line-strong); box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .35); }
+/* A hairline of the kit's own accent, so a card reads as the product it opens. */
+.kit-wash { position: absolute; inset: 0 0 auto 0; height: 3px; opacity: .9; }
+
+.kit-head { display: flex; align-items: flex-start; gap: 12px; }
+.kit-icon {
+ display: inline-flex; align-items: center; justify-content: center;
+ width: 40px; height: 40px; border-radius: 11px; background: var(--accent);
+ color: #fff; font-size: 21px; flex: 0 0 auto;
+}
+.kit-titles { flex: 1; min-width: 0; }
+.kit-titles h2 { margin: 0; font-size: 16px; font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
+.kit-tagline { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
+.kit-live {
+ flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
+ font-size: 11px; font-weight: 650; letter-spacing: .02em; color: var(--green);
+ background: color-mix(in srgb, var(--green) 10%, transparent);
+ border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
+ padding: 3px 9px; border-radius: 999px;
+}
+.kit-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
+
+.kit-desc { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
+
+.kit-facts { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
+.kit-facts li {
+ display: flex; align-items: center; gap: 8px; min-width: 0;
+ font-size: 12.5px; color: var(--ink);
+}
+.kit-facts iconify-icon { font-size: 15px; color: var(--muted); flex: 0 0 auto; }
+.kit-fact-dim { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
+.kit-fact-warn { color: var(--amber); }
+.kit-fact-warn iconify-icon { color: var(--amber); }
+
+.kit-actions {
+ display: flex; align-items: center; gap: 10px;
+ margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line);
+}
+.kit-actions-spacer { flex: 1; }
+.kit-link { font-size: 12.5px; color: var(--muted); text-decoration: none; }
+.kit-link:hover { color: var(--ink); text-decoration: underline; }
+.kit-actions .button { display: inline-flex; align-items: center; gap: 7px; }
+.kit-actions .button iconify-icon { font-size: 15px; }
/* ── Launch dialog: pick the agent + model before provisioning ─────────────────────── */
-.kit-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
+.kit-overlay {
+ position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
padding: 24px; background: rgba(16, 18, 26, .5);
- backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
-.kit-dialog { position: relative; width: min(100%, 460px); max-height: calc(100vh - 48px);
+ backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
+}
+.kit-dialog {
+ position: relative; width: min(100%, 460px); max-height: calc(100vh - 48px);
overflow: auto; padding: 26px; background: var(--surface); border: 1px solid var(--line);
- border-radius: 16px; box-shadow: 0 30px 60px -18px rgba(30, 50, 120, .34); }
-.kit-dialog h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--ink); }
-.kit-dialog-sub { margin: 0 0 18px; font-size: 12.5px; line-height: 1.5; color: var(--mute); }
-.kit-dialog-x { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; display: grid;
- place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--mute);
- cursor: pointer; }
+ border-radius: 16px; box-shadow: 0 30px 60px -18px rgba(15, 23, 42, .34);
+}
+.kit-dialog h2 { margin: 0 0 4px; font-size: 18px; font-weight: 650; color: var(--ink); }
+.kit-dialog-sub { margin: 0 0 18px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
+.kit-dialog-x {
+ position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; display: grid;
+ place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
+ cursor: pointer;
+}
.kit-dialog-x:hover { background: var(--surface-subtle); color: var(--ink); }
.kit-choices { display: flex; flex-direction: column; gap: 8px; }
-.kit-choice { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--line);
- border-radius: 11px; cursor: pointer; transition: border-color .12s, background .12s; }
-.kit-choice:hover:not(.is-off) { border-color: var(--brand); background: var(--surface-subtle); }
-.kit-choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
+.kit-choice {
+ display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--line);
+ border-radius: 11px; cursor: pointer; transition: border-color .12s, background .12s;
+}
+.kit-choice:hover:not(.is-off) { border-color: var(--accent); background: var(--surface-subtle); }
+.kit-choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* Still readable, still explains itself — just not selectable. */
.kit-choice.is-off { opacity: .55; cursor: default; }
-.kit-choice input { margin-top: 3px; accent-color: var(--brand); }
+.kit-choice input { margin-top: 3px; accent-color: var(--accent); }
.kit-choice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kit-choice-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); }
-.kit-choice-model { font-size: 12px; color: var(--mute); font-family: var(--mono, monospace); }
-.kit-choice-why { font-size: 11.5px; line-height: 1.45; color: var(--mute); margin: 4px 0 0; }
-.kit-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
- color: var(--brand); background: var(--brand-50, var(--surface-subtle)); padding: 2px 7px;
- border-radius: 999px; }
+.kit-choice-model { font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
+.kit-choice-why { font-size: 11.5px; line-height: 1.45; color: var(--muted); margin: 4px 0 0; }
+.kit-badge {
+ font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
+ color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 999px;
+}
.kit-custom { display: flex; flex-direction: column; gap: 12px; }
.kit-field { display: flex; flex-direction: column; gap: 5px; }
-.kit-field > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
-.kit-field select { width: 100%; padding: 9px 11px; font: inherit; font-size: 13px; color: var(--ink);
- background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
+.kit-field > span { font-size: 12px; font-weight: 600; color: var(--ink); }
+.kit-field select {
+ width: 100%; padding: 9px 11px; font: inherit; font-size: 13px; color: var(--ink);
+ background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
+}
.kit-dialog-actions { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.kit-dialog-spacer { flex: 1; }
@@ -848,3 +903,4 @@ body.hr-resizing iframe { pointer-events: none; }
.kit-dialog-spacer { display: none; }
.kit-dialog-actions .button { flex: 1 1 auto; justify-content: center; }
}
+