feat(chat): honor JSON and table response shapes end to end#573
Merged
Conversation
The last shape boundary left model-side falls. "as JSON" / "in a markdown table" are detected (anchored on request verbs so incidental mentions stay memos), instructed via the exhaustive switch, and deterministically enforced from the RAW model output — parseMemo is heading-driven and lossy, so the policy gains an optional rawText param. JSON: first balanced block via string-aware brace scan, fence-stripped, 20k-char bound, parse-validated, re-serialized deterministically. Table: longest consecutive |...| line run, header+separator minimum. Both fail closed with an honest retry message on non-compliance, and unsupported-run honesty surfaces as a risks row since a limitation cannot ride inside JSON without corrupting it. Both renderers show structured bodies in a bounded monospace block with its own horizontal scroll, via a shared isStructuredAnswer helper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
HomenShum
enabled auto-merge (squash)
July 17, 2026 20:17
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Dogfood Visual QA Gate: PASSED
ArtifactsDownload the Generated by Dogfood QA Gate |
|
Demo: walkthrough of the surfaces this PR changed is available as a workflow artifact ( |
HomenShum
added a commit
that referenced
this pull request
Jul 17, 2026
…, icons, row layout (#574) * fix(redesign): design nitpick pass 1 — honest dark captures, state copy, chip icons Four findings from the pixel review of the 4-variant dogfood captures: - The capture spec's setTheme wrote only the legacy cockpit keys; the redesign shell reads nodebench:redesign:theme, so every "dark" variant screenshot silently captured a light render — QA evidence claimed coverage it did not have. The spec now writes the shell's key. - The context-miss banner titled itself "Notebook context selected" while its body admitted the saved context was unavailable; the title now agrees with the state for the artifact and default branches. - The composer status row repeated the context title the chip below it already carries, which pushed the load-bearing "12 attached sources" count into ellipsis at 390px. The row now leads with the count. - Starter chips used platform emoji; they now use the inline stroke-SVG house style via a shared STARTER_ICONS set so the default and live chip sets cannot drift apart. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(redesign): let the run-scope summary size to content flex: 1 + max-width: 36ch reserved a title-sized column in the composer status row; with the title moved to the context chip, the short source count left dead space and "Review · no shared writes" floated mid-row on desktop. Content-sized now, with shrink + ellipsis kept for pressure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: seal design-nitpick lane entry, backfill #573 merge marker Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: hshum <hshum@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Closes the final response-shape boundary deliberately left model-side in #572's PR body: explicit "as JSON" / "in a markdown table" requests are now detected, instructed, deterministically enforced from raw model output, and rendered in a monospace block in both the live surface and the reproducible replay page.
isStructuredAnswerkeeps both renderers agreeing;.rd-answer-structuredmono block scrolls horizontally instead of stretching the columnVerification
npx tsc --noEmit— 0 errors🤖 Generated with Claude Code