Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dashboard/graph/src/GraphCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ export default function GraphCanvas({

// Collapsed-neighbor badge: full degree minus visible edges.
const collapsed = Math.max(0, (node.degree || 0) - node.visibleDegree);
if (collapsed > 0 && camera.k > 0.35) {
const showCollapsedBadge =
collapsed > 0 &&
camera.k > 0.35 &&
(rect.width >= 560 || isSelected || isHovered || onPath);
if (showCollapsedBadge) {
const bx = node.x + node.radius * 0.85;
const by = node.y - node.radius * 0.85;
const br = Math.max(6.5, 8 / camera.k);
Expand Down
4 changes: 3 additions & 1 deletion dashboard/graph/src/labelLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const LABEL_PAD = 3;
* desktop canvas allows a few dozen and a narrow panel only a handful.
*/
export function labelCapForArea(width: number, height: number): number {
return Math.max(6, Math.floor((width * height) / 30_000));
const density = width < 520 ? 58_000 : 30_000;
const floor = width < 520 ? 4 : 6;
return Math.max(floor, Math.floor((width * height) / density));
}

function overlaps(a: LabelBox, b: LabelBox): boolean {
Expand Down
33 changes: 33 additions & 0 deletions dashboard/graph/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,19 @@
gap: 0.85rem;
}

.tsg-analytics-grid .ts-card {
min-height: 0;
}

.tsg-analytics-grid .ts-card-content {
min-height: 0;
}

.tsg-analytics-grid .tdp-bar-list {
max-height: none;
overflow: visible;
}

.tsg-chart {
display: block;
width: 100%;
Expand Down Expand Up @@ -553,13 +566,33 @@
}
}

@media (min-width: 1280px) {
.tsg-analytics-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}

@media (max-width: 860px) {
.tsg-toolbar {
grid-template-columns: 1fr;
gap: 0.7rem;
}

.tsg-toolbar-left {
justify-content: space-between;
}

.tsg-views {
flex: 1 1 auto;
}

.tsg-view-tab {
flex: 1 1 0;
}

.tsg-totals {
justify-content: flex-start;
flex-wrap: wrap;
}

.tsg-canvas,
Expand Down
18 changes: 6 additions & 12 deletions dashboard/hermes-wrapper/plugin_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
unpinned profile-scoped installs. Source-tree development falls back to the
Hermes process cwd when no deploy-time default has been baked in.

Legacy ``TOKENSAVE_*`` aliases remain accepted as fallbacks during the
TraceDecay rebrand; ``TRACEDECAY_*`` wins when both are present.
Use ``TRACEDECAY_*`` environment variables for runtime configuration.

Hermes-only extension: ``POST /curation/llm-plan`` layers LLM-based curation
(ported from the holographic_plus curator's one-shot review tier) on top of
Expand Down Expand Up @@ -90,8 +89,8 @@


def _env(name: str) -> str | None:
"""Read TRACEDECAY_<name>, falling back to legacy TOKENSAVE_<name>."""
return os.environ.get(f"TRACEDECAY_{name}") or os.environ.get(f"TOKENSAVE_{name}")
"""Read TRACEDECAY_<name>."""
return os.environ.get(f"TRACEDECAY_{name}")

_SPAWN_TIMEOUT_SECONDS = 30.0
_PROXY_TIMEOUT_SECONDS = 30.0
Expand Down Expand Up @@ -196,15 +195,11 @@ def _dashboard_env() -> dict[str, str]:
`subprocess.Popen` inherits by default, but constructing the child env
explicitly makes the Hermes profile contract visible and stable: the
spawned Rust server must resolve `HERMES_HOME` and any `TRACEDECAY_*`
/ legacy `TOKENSAVE_*` overrides exactly like the wrapper process did.
overrides exactly like the wrapper process did.
"""
env = os.environ.copy()
for key, value in os.environ.items():
if (
key == "HERMES_HOME"
or key.startswith("TRACEDECAY_")
or key.startswith("TOKENSAVE_")
):
if key == "HERMES_HOME" or key.startswith("TRACEDECAY_"):
env[key] = value
return env

Expand All @@ -217,8 +212,7 @@ def _spawn_dashboard() -> str:
status_code=503,
detail=(
"tracedecay binary not found. Install tracedecay or set "
"TRACEDECAY_BIN / TRACEDECAY_DASHBOARD_URL "
"(legacy TOKENSAVE_* aliases are also accepted)."
"TRACEDECAY_BIN / TRACEDECAY_DASHBOARD_URL."
),
)
project = _project_root()
Expand Down
2 changes: 1 addition & 1 deletion dashboard/holographic/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Holographic memory explorer + curation",
"provider": {
"kind": "memory",
"name": "holographic_plus"
"name": "tracedecay"
},
"tab": {
"path": "/holographic-memory",
Expand Down
2 changes: 1 addition & 1 deletion dashboard/holographic/src/AssociationGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ export default function AssociationGraph({
<CardTitle>Association Graph</CardTitle>
</CardHeader>
<CardContent>
<div className="flex h-[42rem] items-center justify-center border border-border bg-background/30 text-xs text-text-tertiary">
<div className="flex min-h-[12rem] items-center justify-center border border-border bg-background/30 px-4 text-center text-xs text-text-tertiary md:min-h-[18rem]">
No graph data.
</div>
</CardContent>
Expand Down
22 changes: 11 additions & 11 deletions dashboard/holographic/src/HolographicMemoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ function Stat({
}) {
return (
<div
className="border border-border bg-background/50 px-3 py-2"
className="hm-stat border border-border bg-background/50 px-3 py-2"
title={hint}
style={hint ? { cursor: "help" } : undefined}
>
<div className="font-mono-ui text-lg leading-none text-foreground">
<div className="hm-stat-value font-mono-ui text-lg leading-none text-foreground">
{value}
</div>
<div className="mt-1 text-xs tracking-[0.08em] text-text-tertiary">
<div className="hm-stat-label mt-1 text-xs tracking-[0.08em] text-text-tertiary">
{label}
</div>
</div>
Expand Down Expand Up @@ -159,7 +159,7 @@ function DataBars<T>({
<h3 className="mb-3 font-mondwest text-display text-xs tracking-[0.12em] text-text-secondary">
{title}
</h3>
{header && <div className="mb-3">{header}</div>}
{header && items.length > 0 && <div className="mb-3">{header}</div>}
<div className="flex flex-col gap-2">
{items.length === 0 ? (
<p className="text-xs text-text-tertiary">No data.</p>
Expand Down Expand Up @@ -214,7 +214,7 @@ function SystemStrip({
const db = data.holographic;

return (
<div className="grid gap-3 sm:grid-cols-[repeat(2,minmax(0,1fr))] xl:grid-cols-[repeat(7,minmax(0,1fr))]">
<div className="hm-system-strip grid gap-3 sm:grid-cols-[repeat(2,minmax(0,1fr))] xl:grid-cols-[repeat(7,minmax(0,1fr))]">
<Stat label="memory provider" value={activeMemory} />
<Stat label="context engine" value={provider.context_engine || "compressor"} />
<Stat label="context engine tools" value={pluginEngine?.tools?.length ?? 0} />
Expand All @@ -237,11 +237,11 @@ function SystemStrip({
}
/>
<Stat label="database" value={db.exists ? "ready" : "missing"} />
<div className="min-w-0 border border-border bg-background/50 px-3 py-2 sm:col-span-2 xl:col-span-1">
<div className="truncate font-mono-ui text-xs text-foreground">
<div className="hm-stat hm-path-stat min-w-0 border border-border bg-background/50 px-3 py-2 sm:col-span-2 xl:col-span-1">
<div className="hm-stat-value truncate font-mono-ui text-xs text-foreground">
{db.path}
</div>
<div className="mt-1 text-xs tracking-[0.08em] text-text-tertiary">
<div className="hm-stat-label mt-1 text-xs tracking-[0.08em] text-text-tertiary">
storage path
</div>
</div>
Expand Down Expand Up @@ -307,7 +307,7 @@ function MemoryHealthCard({
</div>
</CardHeader>
<CardContent className="flex flex-col gap-3">
<div className="grid min-w-0 gap-3 grid-cols-1 sm:grid-cols-2 xl:grid-cols-4">
<div className="grid min-w-0 gap-3 grid-cols-2 xl:grid-cols-4">
<Stat label="facts" value={memory.fact_count} />
<Stat label="entities" value={memory.entity_count} />
<Stat label="banks" value={memory.bank_count} />
Expand Down Expand Up @@ -354,7 +354,7 @@ function SearchBox({
setQuery: (value: string) => void;
}) {
return (
<div className="relative min-w-0 w-full sm:max-w-xl">
<div className="hm-searchbox relative min-w-0 w-full sm:max-w-xl">
{refreshing ? (
<Spinner className="absolute left-2.5 top-1/2 -translate-y-1/2 text-[0.875rem] text-primary" />
) : (
Expand Down Expand Up @@ -1126,7 +1126,7 @@ export default function HolographicMemoryPage() {
<div className="flex min-w-0 items-center gap-2">
<BrainCircuit className="h-4 w-4 text-text-tertiary" />
<h2 className="m-0 font-mondwest text-display text-xs tracking-[0.12em] text-text-tertiary">
Plugin Inspector
Holographic Memory
</h2>
</div>
<Button
Expand Down
106 changes: 106 additions & 0 deletions dashboard/holographic/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,30 @@ input[type="range"] {
letter-spacing: -0.01em;
}

.hm-stat {
display: grid;
gap: 0.35rem;
min-height: 4.1rem;
align-content: start;
border-radius: 14px;
background:
linear-gradient(180deg, color-mix(in srgb, var(--hm-text) 4%, transparent), transparent 42%),
color-mix(in srgb, var(--hm-bg) 48%, transparent);
}

.hm-stat-value {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
overflow-wrap: anywhere;
}

.hm-stat-label {
margin-top: 0;
line-height: 1.25;
text-transform: lowercase;
}

.ts-card-content p {
margin-top: 0;
margin-bottom: 0;
Expand Down Expand Up @@ -221,6 +245,43 @@ input[type="range"] {
[class*="grid-cols-[4.5rem_5.5rem"] {
grid-template-columns: 1fr;
}

.hv-viewswitch {
flex-wrap: nowrap;
max-width: 100%;
overflow-x: auto;
padding-bottom: 0.15rem;
scrollbar-width: none;
}

.hv-viewswitch::-webkit-scrollbar {
display: none;
}

.hm-system-strip {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.6rem;
}

.hm-system-strip .hm-stat {
min-height: 3.15rem;
padding: 0.55rem 0.65rem;
border-radius: 12px;
}

.hm-system-strip .hm-stat-value {
font-size: 0.95rem;
line-height: 1.1;
}

.hm-system-strip .hm-stat-label {
font-size: 0.66rem;
letter-spacing: 0.05em;
}

.hm-path-stat {
grid-column: 1 / -1;
}
}

/* ===================================================== hv-* chart system ===
Expand All @@ -247,6 +308,51 @@ input[type="range"] {
flex-wrap: wrap;
}

@media (max-width: 720px) {
.hv-viewswitch {
flex-wrap: nowrap;
}
}

.hm-searchbox {
position: relative;
}

.hm-searchbox > svg,
.hm-searchbox > span {
position: absolute;
left: 0.625rem;
top: 50%;
width: 0.875rem;
height: 0.875rem;
transform: translateY(-50%);
pointer-events: none;
}

.hm-searchbox .ts-input {
box-sizing: border-box;
width: 100%;
min-height: 2rem;
padding: 0.35rem 1.75rem 0.35rem 2rem;
font-size: 0.75rem;
line-height: 1rem;
}

.hm-searchbox .ts-button {
position: absolute;
right: 0.375rem;
top: 50%;
min-width: 1.5rem;
min-height: 1.5rem;
padding: 0;
transform: translateY(-50%);
}

.hm-searchbox .ts-button svg {
width: 0.875rem;
height: 0.875rem;
}

.hv-chart svg {
display: block;
}
Expand Down
Loading
Loading