jacquardSnapshot

← snapshot

2846 bytes
import { Time } from "@/components/time";
import { api } from "@/lib/api";

export const dynamic = "force-dynamic";

export default async function RegistryPage() {
  let publications: Awaited<ReturnType<typeof api.publications>> | null = null;
  let introductions: Awaited<ReturnType<typeof api.introductions>> | null = null;
  try {
    [publications, introductions] = await Promise.all([
      api.publications(),
      api.introductions(),
    ]);
  } catch {
    // server down; render the empty state below
  }

  return (
    <section className="jac-page">
      <p className="jac-eyebrow">rendezvous instead of rework</p>
      <h1 className="jac-h2">The registry board</h1>
      <p className="jac-lede">
        Everything the registry has ever held is on this page: org ids,
        64-integer sketches, timestamps. No file names, no source text, no
        decision prose. The registry crate cannot even <em>name</em> content
        types — the build proves it.
      </p>

      <p className="jac-eyebrow" style={{ marginTop: 36 }}>
        publications — what left each org, in its entirety
      </p>
      {!publications || publications.publications.length === 0 ? (
        <div className="jac-empty" style={{ marginTop: 16 }}>
          Nothing published yet. Sketches leave a repo only when someone
          publishes them — and only sketches can leave.
        </div>
      ) : (
        <ul className="jac-rows" style={{ marginTop: 16 }}>
          {publications.publications.map((p, i) => (
            <li key={`${p.org}-${p.at}-${i}`} className="jac-row">
              <span className="jac-pill">{p.org}</span>
              <span className="jac-tag">{p.kind} sketch</span>
              <span className="jac-small">64 u64 lane minima + a timestamp</span>
              <Time at={p.at} />
            </li>
          ))}
        </ul>
      )}

      <p className="jac-eyebrow" style={{ marginTop: 36 }}>
        introductions — a token, two names, nothing else
      </p>
      {!introductions || introductions.introductions.length === 0 ? (
        <div className="jac-empty" style={{ marginTop: 16 }}>
          None brokered yet. When two orgs&apos; sketches resemble each other,
          the registry introduces them — and the conversation happens between
          the humans, outside the system.
        </div>
      ) : (
        <ul className="jac-rows" style={{ marginTop: 16 }}>
          {introductions.introductions.map((intro) => (
            <li key={intro.token} className="jac-row">
              <span className="jac-pill">{intro.token}</span>
              <span className="jac-mono jac-small">
                {intro.parties[0]} ↔ {intro.parties[1]}
              </span>
              <Time at={intro.at} />
            </li>
          ))}
        </ul>
      )}
    </section>
  );
}