Skip to content

J3: agent window demo and partner block in the challenge schema - #291

Merged
wab merged 1 commit into
mainfrom
claude/j3-230-challenge-schema-3a3964
Oct 22, 2026
Merged

wab merged 1 commit into
mainfrom
claude/j3-230-challenge-schema-3a3964

Conversation

@wab

@wab wab commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Closes #230

What changes

  • app/modules/challenge-schema.ts gains aiBridge.demo (optional) and partner (optional). Both mirror the merged posts schema (Agent window demo in the challenge schema posts#114 for the agent window, Partner block in the challenge schema posts#113 for the partner block): same field names, caps, counts, enums and error messages.
  • app/test/fixtures/content/challenges/fr/ is recopied from the posts golden fixtures at posts main b34a449. Five fixtures now carry an agent window, and Sales Compensation carries the partner block.
  • app/modules/challenge-schema.test.ts covers the acceptance criteria: a fifth element fails, an overlong text fails (frame, every element type, partner), the partner block fails with 1 or 3 metrics or without source, and every posts fixture validates. The other posts cases are ported too (element types, time format, missing fields, unknown keys).

Differences between the issue text and the posts schema

The website follows the posts schema, not the issue wording.

  • The frame has opening: { kind: question | statement, text }, not a question field. Three of the five mockups open on a statement.
  • The frame has an optional note shown under the window.
  • Partner metrics are { before, after, label }. The issue only says "two metrics".
  • buttons takes one or two labels. progress takes percent and an optional target, integers from 0 to 100.
  • time is a quoted HH:MM string.

Parsing difference to know

The website parses YAML with js-yaml 4 and the core schema, so an unquoted time: 14:32 stays the string "14:32" and passes. The posts repo (js-yaml 3) reads it as 872 and rejects it. The website still accepts every file posts accepts. A test documents both behaviours.

Release order

Deploy this PR before merging posts content that uses partner or aiBridge.demo: the current website schema rejects both as unknown keys, and a list fetch fails on the first rejected file.

Not in scope

  • No rendering: the challenge page (J4) and the agent window and partner components consume these fields later.
  • The posts repo checks that partner.tool names a Tool file. The website does no cross-reference check.
  • docs/api/data-models.md does not describe the challenge schema, so it is unchanged.

Checks

pnpm check, pnpm typecheck, pnpm test:run (829 tests) green. A code review of the diff confirmed exact parity with the posts schema; its findings (two missing posts cases, a misplaced comment, an unused type export, the YAML parsing test) are fixed.

Mirror posts#113 (partner block, posts#97) and posts#114 (agent window,
posts#96) in app/modules/challenge-schema.ts: same names, caps, counts
and messages. Recopy the posts golden fixtures, which now carry both
blocks, and extend the schema tests.

Refs #230
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
website Ready Ready Preview Oct 22, 2026 2:16pm UTC

Request Review

@wab
wab merged commit 3516fbf into main Oct 22, 2026
6 checks passed
@wab
wab deleted the claude/j3-230-challenge-schema-3a3964 branch October 22, 2026 14:32

This branch was successfully deployed

1 active deployment
Preview — 8e1c7c1b Deployed Oct 22, 2026 by vercel[bot]
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.

J3: agent window demo and partner block in the challenge schema

1 participant