2026-08-22 02:18:27 +03:00
|
|
|
import { Home } from "@/components/home";
|
2026-09-28 23:30:11 +03:00
|
|
|
import { readSettingsRecord } from "@/src/server";
|
2026-10-06 08:26:55 +03:00
|
|
|
import { resolveSettings, slotsConfigured } from "@/src/core";
|
2026-09-18 09:37:20 +03:00
|
|
|
|
2026-09-28 23:30:11 +03:00
|
|
|
// Dynamic: the configured state is server-rendered into the page (the
|
|
|
|
|
// setup CTA's truth on the first frame), and every navigation re-reads
|
|
|
|
|
// the record (dynamic routes aren't cached client-side).
|
2026-09-18 09:37:20 +03:00
|
|
|
export const dynamic = "force-dynamic";
|
2026-08-22 02:18:27 +03:00
|
|
|
|
|
|
|
|
export default function HomePage() {
|
2026-09-22 13:54:28 +03:00
|
|
|
// First-run gate (model-slots wave): chats cannot start until the user
|
|
|
|
|
// has picked all three slots — the dock shows the CTA while the raw
|
|
|
|
|
// record's models section lacks any slot pin.
|
|
|
|
|
const record = readSettingsRecord();
|
2026-10-06 08:26:55 +03:00
|
|
|
// GRAPH RENDERING (owner, 2026-10-06): off = the home's main view is
|
|
|
|
|
// the chains view. Resolved through the one core resolver (missing
|
|
|
|
|
// section / absent key → factory default on); re-read per navigation.
|
|
|
|
|
const rendering = resolveSettings(record ?? null).graph.rendering;
|
2026-09-22 13:54:28 +03:00
|
|
|
return (
|
2026-10-06 08:26:55 +03:00
|
|
|
<Home initialConfigured={slotsConfigured(record?.models)} rendering={rendering} />
|
2026-09-22 13:54:28 +03:00
|
|
|
);
|
2026-08-22 02:18:27 +03:00
|
|
|
}
|