Skip to content

feat(website): give each solutions page real code, and split the duplicated proof point - #830

Open
blove wants to merge 2 commits into
mainfrom
blove/solutions-code-and-proof-points
Open

feat(website): give each solutions page real code, and split the duplicated proof point#830
blove wants to merge 2 commits into
mainfrom
blove/solutions-code-and-proof-points

Conversation

@blove

@blove blove commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Closes the second half of the /about + solutions follow-ups from #826.

The guardrail asked for something the data model couldn't hold

solutions-data.ts opens with a rule that every entry must carry "a real problem we have seen, a real architecture, real code." But SolutionConfig had no code field, the page component rendered none, and the live pages contain zero <code> or <pre> elements. The clause was unfulfillable, not merely unmet.

code is now a required field, with a snippet per entry written against the published API:

Entry Snippet shows
compliance agent.history() / agent.langGraphHistory() — replaying the thread record
customer-support agent.interrupt() / submit({ resume }) — approval with a named approver
analytics defineAngularRegistry() + <render-spec> — the agent-emitted spec

Each is grounded in existing docs, not invented: the interrupt and history APIs come from docs/langgraph/guides/interrupts and time-travel, the registry from docs/render/getting-started/introduction.

Highlighting uses Shiki directly rather than rehype-pretty-code, which only runs over MDX — same tokyo-night theme as MdxRenderer, so a snippet here reads like one in the docs. It's an async Server Component, so highlighting happens at build time and ships nothing to the browser. The wrapper uses overflow: hidden rather than auto: Shiki's <pre> already scrolls, and nesting a second scroll container can produce two scrollbars.

The overlap was narrower than reported

I measured before rewriting:

Comparison Vocabulary overlap
compliance ↔ customer-support 26%
compliance ↔ analytics (control) 20%
customer-support ↔ analytics (control) 20%

Six points above control. Pain points, titles, subtitles and CTAs are all genuinely distinct, and the closing architecture layer — reported as duplicated — is the least similar of the three at 18%.

The real duplicate was one proof point: both entries used the marker Required for a human-approval claim differing only in synonyms. Both are rewritten to their own half — compliance to the audit record (Evidenced), support to approver identity (Named).

The test earned its place

solutions-data.spec.ts now enforces mechanically what the header asks in prose: unique markers, real code, and no two entries exercising the same API.

That last check rejected my first draft — compliance and customer-support both called interrupt(), which is exactly the find-and-replace the guardrail exists to prevent. It's why the compliance snippet became the audit read path instead. Mutation-tested: re-pointing support's snippet at history() fails the suite.

Framework entry points (injectAgent, computed) are excluded, since they appear in any Angular snippet and say nothing about which part of the stack is shown. The exclusion list is commented so it can't be quietly widened to hide a real clone.

Verification

  • npx vitest run --config vite.config.mts from apps/website: 319 passed, 5 failed — the same pre-existing failures in thanks/page.spec.tsx, PostCard.spec.tsx, Differentiator.spec.tsx, untouched here (314 before; 5 added tests account for the delta)
  • nx lint website: 0 errors, 29 warnings (unchanged)
  • nx build website --configuration=production: succeeds — and its type checker caught an invented tokens.colors.border (the real token is tokens.surfaces.border)
  • Built HTML: each of the three pages carries exactly one <pre class="shiki tokyo-night"> with its intended first line
  • Dev server: one scroll container, radius clipping correctly

🤖 Generated with Claude Code

blove and others added 2 commits August 24, 2026 17:39
`sameAs` is how a Person node resolves to a real-world identity, and answer
engines lean on it for entity disambiguation — the reason /about carries a
Person node at all. It listed only GitHub, so the strongest disambiguating
signals were missing.

Add the two profiles Brian already links publicly from brianflove.com, verified
against that page's raw HTML rather than a summary. (LinkedIn answers 999 to
automated requests; that is its anti-bot response, not a dead link.)

Keep the existing invariant intact: `sameAs` states only profiles the author
record actually names. Each handle is its own opt-in field, so one is never
synthesized from another — an author with a GitHub handle does not acquire an
invented X URL — and `personProfiles()` emits them in a stable order so the
JSON-LD does not churn between builds. A test covers exactly that case.

`twitter` was already declared on the Author interface and read by nothing;
populating it now feeds only `sameAs`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…icated proof point

Two findings from auditing `solutions-data.ts` against its own guardrail.

The guardrail demanded "real code" the data model could not hold. `SolutionConfig`
had no code field, the page rendered none, and the live pages contained zero
`<code>` or `<pre>` elements — the clause was unfulfillable, not merely unmet.
Add a required `code` field and a snippet per entry, each written against the
published API: `agent.history()`/`langGraphHistory()` for compliance,
`agent.interrupt()`/`submit({ resume })` for customer support,
`defineAngularRegistry()` + `<render-spec>` for analytics.

Highlighting uses Shiki directly rather than `rehype-pretty-code`, which only
runs over MDX; the theme matches `MdxRenderer` so a snippet here reads like one
in the docs. It runs in an async Server Component, so it costs the browser
nothing. The wrapper uses `overflow: hidden`, not `auto` — Shiki's `<pre>`
already scrolls, and nesting a second scroll container can show two scrollbars.

The overlap between `compliance` and `customer-support` was narrower than
reported: vocabulary overlap is 26% against a 20% control, and pain points,
titles, and CTAs are all distinct. The genuine duplicate was one proof point —
both used the marker `Required` for a human-approval claim that differed only in
synonyms. Both are rewritten to their own half: compliance to the audit record,
support to approver identity.

`solutions-data.spec.ts` now enforces mechanically what the header asks for in
prose: unique proof-point markers, real code, and — the important one — that no
two entries' snippets exercise the same API. That test earned its place: it
rejected the first draft of these snippets, where compliance and support both
called `interrupt()`, which is precisely the find-and-replace the guardrail
exists to prevent. Framework entry points (`injectAgent`, `computed`) are
excluded because they appear in any Angular snippet and say nothing about which
part of the stack is on show; the exclusion list is commented so it cannot be
quietly widened to hide a real clone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview Aug 25, 2026 5:51pm

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant