Render Discovery/Decomposition + generic JSON fallback in ArtifactInspector#28
Merged
Extentsoftware merged 1 commit intomainfrom May 10, 2026
Merged
Conversation
…factInspector The per-kind Content renderer fell through to a raw <pre> blob whenever the body didn't match the renderer's expected schema. In practice this hit two real shapes — DiscoveryObject stored as Criteria, and DecompositionProposal stored as Risks — leaving users staring at raw JSON. Add explicit renderers for those two shapes, plus a depth-capped generic JSON view for anything else that parses as JSON but matches no known schema. The fallback also probes Criteria and Risks shapes, so a body that happens to match those still renders properly regardless of the declared kind. When the artifact's declared kind has a known schema but the content didn't match, a small muted note flags the drift. Co-Authored-By: Claude Opus 4.7 (1M context) <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
DiscoveryObject({title, intent, outcomes, hypotheses, open_questions, stakeholders}) andDecompositionProposal({children: [...]}) shapes — both were being stored underCriteria/Risksartifact kinds and falling through to raw JSON in the inspector.<ul>for string arrays,ws-tablefor object arrays) as the final fallback.ArtifactKindhas a known schema but the content didn't match it, a small muted note flags the drift: "Content didn't match expected schema for {Kind} — rendering generically."All changes are in
src/Loom.Web/Components/Pages/ArtifactInspector.razor. No new projects, no new packages.Test plan
Risks-kind artifact carrying decomposition data — should now render as a Slug/Title/Type/Parent/Intent table with the muted mismatch note.Criteria-kind artifact carrying discovery data — should render the discovery view (outcomes list, hypotheses + stakeholders tables, open-questions list) with the mismatch note.<pre>, no warning.🤖 Generated with Claude Code