fix: nest the decision/finding fallback inside the carrier node#11
Merged
Conversation
Decisions and findings emitted their neutral fallback (details dropdown, notes/scope/evidence) as siblings of the heading carrier, so a rich theme overriding the carrier still rendered the fallback — every placed decision and finding showed twice. Wrap the whole fallback in a single div carrier bearing the <kind>-<id> identifier, the same pattern the output and prior-insight carriers follow. Tags move from the heading's data slot to the carrier's. Fixes #9 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
|
Verified end-to-end against astra-theme + the DESI DR1 BAO prototype (local
Theme follow-up is done in astra-theme (uncommitted working tree): renderers registered under a |
This was referenced Jul 5, 2026
EiffL
added a commit
that referenced
this pull request
Jul 5, 2026
…allback (#13) Closes the metric leftover from #10 (see also LightconeResearch/astra-theme#2, ecosystem notes). A produced metric embed (:::{astra} outputs.<id>) rendered as a collapsible key/value table on a 'details' carrier — a poor neutral fallback, and a node type rich themes can't sensibly key on, so the big-stat rendering never triggered even though the resolved store already carries the parsed metric. An unproduced output embed was worse: the pending admonition carried no identifier at all, so cross-references and store joins had nothing to land on. - A produced metric now renders as one div carrier (the #11 contract) bearing output-<id>, with a readable sentence fallback nested inside: "**<label>:** <value> ± <uncertainty> <unit>", built via readMetric. A JSON that isn't metric-shaped keeps the tabular fallback (wrapped in the same carrier). - An unproduced output embed (any type) wraps its Pending Output admonition in the identifier-bearing carrier div: anchors resolve and rich themes can join the store entry (label, description, provenance) before the artifact exists. - data / report types keep their current inline rendering. Tests: metric carrier test now pins the div + sentence + no-details shape; new unproduced-embed test pins the identifier + nested admonition (101/101 pass, tsc clean). Claude-Session: https://claude.ai/code/session_013EE6NiwH2UhVAUT6cdAQJ4 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.
Fixes #9.
For placed decisions and findings the plugin emitted the neutral fallback (the details/summary dropdown; the notes/scope paragraphs and evidence blocks) as siblings of the heading carrier. A rich theme overriding the carrier replaced only the heading, so the fallback still rendered and readers saw every decision and finding twice (see LightconeResearch/astra-theme#2, item 3).
Change
divcarrier bearing the<kind>-<id>identifier, with the entire neutral fallback nested as its children — the same pattern the output and prior-insight carriers already follow. A theme replacing the carrier replaces the fallback wholesale; nothing is left behind to double-render.divnode is the one the stock:::{div}directive emits, so neutral themes render the children exactly as before, and the identifier still anchors cross-references.data.tagsmoves from the heading to the carrier (the joinable node).carrierDiv()helper inast-helpers.ts; carrier tests updated to pin the nesting so the sibling shape can't regress.No changes needed in
index.ts: class stamping (tagComponent),:label:/:class:overrides, and registry rendering all locate the carrier by identifier and pick up the wrapper automatically.Theme follow-up (separate repo, deferred)
astra-theme registers
heading[class*="astra-decision"]/heading[class*="astra-finding"]; those selectors need to move to adivbucket once the theme builds against this version. The components need no logic changes — they join bynode.identifierand degrade vianode.children(the degrade path improves: children are now the full fallback rather than the bare title).Testing
npx vitest run— 94/94 pass, including the updated carrier-contract tests.npx tsc --noEmit— clean.🤖 Generated with Claude Code