feat(frontend): dashboard & channels constellation scenes — publish bridge + floating overlays

This commit is contained in:
asepharyana
2026-08-24 15:22:27 +07:00
parent 1fafebb16d
commit 60ae1fb5c3
7 changed files with 423 additions and 330 deletions
@@ -2,7 +2,11 @@
* Constellation graph model — pure data, no React/DOM.
* Builders convert existing API payloads into star-graph structures.
*/
import type { DashboardChannel, DashboardStats } from "@/lib/types";
import type {
ChannelCultureRow,
DashboardChannel,
DashboardStats,
} from "@/lib/types";
export type NodeKind =
| "guild"
@@ -94,3 +98,18 @@ export function channelsToGraph(
}));
return { nodes, edges: [] };
}
/** Channels scene variant fed by culture-knowledge rows. */
export function culturesToGraph(rows: ChannelCultureRow[]): ConstellationGraph {
const nodes: GraphNode[] = rows.map((r, i) => ({
id: `channel:${r.channel_id}`,
label: r.channel_name || r.channel_id,
kind: "channel",
value: r.culture_summary ? 0.4 + (i % 5) * 0.12 : 0.2,
meta: {
culture_summary: r.culture_summary,
last_analyzed_at: r.last_analyzed_at,
},
}));
return { nodes, edges: [] };
}