fix(chat): explicit lumis theme; element-less tool body; error-panel spacing - #689
Conversation
…panel spacing Three petal.build finds riding 4.15.1. Code blocks rendered structurally correct but colourless on the marketing site: the markdown pipeline passed a bare :html_inline formatter and lumis 0.6 defaulted a theme where lumis 0.7 does not - reproduced both ways, the onedark theme now travels explicitly and works on both generations. The lifecycle demo's error card carried an empty padded strip: HEEx counts the whitespace before a named slot as inner content, so the widget-body guard passed with nothing to render - an element-less body now hides itself (:not(:has(*))), the slot doc carries the wrap-bare-text rule, and panels that follow the error band directly bring their own top spacing. Invariants pin the theme tuple, the body guard and the spacing rule.
Greptile SummaryThis PR restores syntax highlighting by passing Lumis an explicit theme and refines tool-call layout for named-slot-only error cards.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness or security defects identified. The explicit formatter configuration and CSS changes align with the documented behavior, and the investigated compatibility concerns either predate this change or are explicitly covered by the updated component contract.
|
| Filename | Overview |
|---|---|
| lib/petal_components/chat.ex | Explicitly configures the syntax-highlighting theme and documents the element-wrapper requirement for tool body content. |
| assets/default.css | Hides element-less tool bodies and adds spacing where tool panels directly follow an error row. |
| test/petal/css_assets_test.exs | Adds source-level assertions covering the new CSS selectors and explicit Lumis formatter configuration. |
| CHANGELOG.md | Documents the syntax-highlighting and tool-card layout fixes. |
Reviews (1): Last reviewed commit: "fix(chat): explicit lumis theme; element..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #689 +/- ##
=======================================
Coverage 95.40% 95.40%
=======================================
Files 162 162
Lines 8045 8045
=======================================
Hits 7675 7675
Misses 370 370 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Three more petal.build finds from Nic, riding the unpublished 4.15.1:
formatter: :html_inlineand relied on lumis defaulting a theme. lumis 0.6 (playground) does; lumis 0.7 (marketing, resolved newer) does not - structure renders, tokens don't. Reproduced both ways in isolation;{:html_inline, theme: "onedark"}now travels explicitly and verifies on both lumis generations.<.tool_call>carrying only<:error_actions>renders a whitespace-only widget body past the@widget != []guard. An element-less body now hides itself via:not(:has(*)); the slot doc says bare-text widgets need a wrapper.pt-3separation, not red envelopment.Suite 1812/0 with three new invariants.
🤖 Generated with Claude Code