feat(website): give each solutions page real code, and split the duplicated proof point - #830
Open
blove wants to merge 2 commits into
Open
feat(website): give each solutions page real code, and split the duplicated proof point#830blove wants to merge 2 commits into
blove wants to merge 2 commits into
Conversation
`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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsopens with a rule that every entry must carry "a real problem we have seen, a real architecture, real code." ButSolutionConfighad 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.codeis now a required field, with a snippet per entry written against the published API:agent.history()/agent.langGraphHistory()— replaying the thread recordagent.interrupt()/submit({ resume })— approval with a named approverdefineAngularRegistry()+<render-spec>— the agent-emitted specEach is grounded in existing docs, not invented: the interrupt and history APIs come from
docs/langgraph/guides/interruptsandtime-travel, the registry fromdocs/render/getting-started/introduction.Highlighting uses Shiki directly rather than
rehype-pretty-code, which only runs over MDX — sametokyo-nighttheme asMdxRenderer, 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 usesoverflow: hiddenrather thanauto: 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:
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
Requiredfor 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.tsnow 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 athistory()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.mtsfromapps/website: 319 passed, 5 failed — the same pre-existing failures inthanks/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 inventedtokens.colors.border(the real token istokens.surfaces.border)<pre class="shiki tokyo-night">with its intended first line🤖 Generated with Claude Code