skill-v3.0.5
pbakaus/impeccableskill-v3.0.5Apr 29, 2026by pbakaus
AI Summary
Fixes critical TSX round-trip issues for Vite and Next.js projects, resolves ambiguity when wrapping elements with identical classes, and fixes CSP-meta whitespace preservation.
Key Highlights
- TSX round-trip fixes for Vite/Next.js
- Wrap disambiguation using text content
- CSP-meta whitespace preservation
- Updated `live.md` spec guidance
New Features
- TSX compatibility fixes
- Element wrapping disambiguation
- CSP tag fixes
Full Release Notes
- **Live mode lands valid TSX through the wrap → preview → accept → carbonize loop on Vite/Next React/TSX projects.** The wrapper now keeps a single JSX-slot child instead of three adjacent siblings, so it round-trips cleanly inside `return (...)`, array `.map(...)`, and `asChild` parents like Radix's `<DialogPrimitive.Title>`. Carbonize stopped double-wrapping CSS in nested template literals on TSX targets, accept and discard restore the picked element at its original indent (with relative depth between lines preserved), and the screenshot overlay no longer flashes solid black on default-background pages. Closes [#114](https://github.com/pbakaus/impeccable/issues/114), with thanks again to [@dergachoff](https://github.com/dergachoff) for the detailed bug report.
- **Wrap correctly disambiguates repeated identical-class siblings.** A list of `<Card className="card">` rendered three times with the same classes used to land on the first one regardless of which the user picked. `live-wrap.mjs` now accepts `--text TEXT` (the picked element's `textContent`) and narrows candidates accordingly, falling back to first-match when the text is too short or doesn't appear literally in source (data-driven children like `{title}`), and erroring with `element_ambiguous` when multiple branches still match equally.
- **`live-inject` CSP-meta unwrap now byte-for-byte preserves self-closing tag whitespace.** The patch+revert cycle on a `<meta http-equiv="Content-Security-Policy" ... />` tag was eating the space before `/>` via a double-space artifact in the marker insertion path; common Vite shapes that ship a CSP meta now round-trip cleanly.
- **`live.md` spec gained explicit guidance for three real authoring traps.** Variant CSS must use a descendant combinator (`:scope > .card`, not bare `:scope`) or it lands on the wrapper instead of the picked element. JSX `<style>` bodies need `{`...`}` template-literal wrapping. Aborting an in-flight session uses `live-poll --reply EVENT_ID error "msg"`, not `live-accept --discard`; the latter only mutates source while the bar stays stuck on GENERATING dots forever.