Personalization Copy Test
This page exercises personalization placeholders inside code blocks. The bug: clicking the copy button puts the un-substituted source (e.g. literal{user.firstName}) on the clipboard instead of the rendered value the user
sees on screen.
When logged out, user is an empty object — placeholders render as empty
strings. When logged in (via JWT) with content.firstName etc. populated,
the rendered text shows real values; copy should match.
Canary: CANARY-PERSONALIZATION-COPY-01
Plain MDX text (control)
This paragraph references the user variable directly in MDX: hello, ! Your plan is and your API key is . If this paragraph renders the substituted values (or empty strings when logged out), the MDX runtime is wiring upuser. If it renders the literal text
{user.firstName}, scope is not connecting and the rest of the test won’t
diagnose anything useful.
Standalone code block
Hello
With API key
Code group (multiple tabs)
Verification
The JWT server (jwt-server/server.js) signs tokens with the following
content and apiPlaygroundInputs:
content.firstName = "Jane"content.company = "Acme Corp"content.plan = "Enterprise"content.apiKey = "sk-test-canary-12345"apiPlaygroundInputs.header.Authorization = "Bearer sk-test-canary-12345"
jwt-server and logging in via any preset:
- The control paragraph should read: “hello, Jane! Your plan is Enterprise and your API key is sk-test-canary-12345.”
- Click each copy button under “Standalone code block” and paste. Note
whether the clipboard contains literal
{user.firstName}/{user.apiKey}or the substituted values that are visible on screen. - If the visible text in the fenced code blocks still reads
{user.x}even when authenticated, MDX is not evaluating expressions inside fences and Dean’s bug needs the API Playground path instead (separate setup).