removeSelectorAt walked backward to find the rule prelude and stopped at
any '>', added so the walk would not escape past the <style> open tag.
That same character is the CSS child combinator, so pruning one unused
selector from a list like '.wrap > .orphan, .orphan' cut the prelude
mid-list; when every remaining fragment equaled the flagged selector, the
whole-rule branch then deleted from the cut point and left a dangling
'.wrap >' in source. A '>' now bounds the walk only when it actually
closes a <style ...> tag; combinators are walked through.
Regression tests cover a mid-list combinator prune and the dangling-
fragment shape (verified failing on the previous code).
AI-assisted (Claude Code).
Co-Authored-By: Claude Code <noreply@anthropic.com>
cursor[bot]:
- verifyAcceptedSource anchors its param patterns to the exact shapes
live mode writes (data-p-x= / [data-p-x] attributes, var(--p-x, ...)
references) instead of bare prefixes, shrinking the false-positive
class near the completion gate. Note: the reported examples (data-page,
var(--primary)) did not actually match the previous hyphenated
substrings; the tightening removes the residual class (e.g. a user's
own data-p-* attribute) regardless.
- With a non-root Vite base, the /@fs/ fallback is tried both under the
base and at the server root, covering Vite versions that serve @fs at
either location.
This work was produced with AI assistance (Claude Code).
Co-Authored-By: Claude Code <noreply@anthropic.com>
cursor[bot]:
- enqueueEvent dedupes variant_mount_failed per variant, so a second
broken variant is no longer swallowed while the first is queued.
- Every component (re)injection resets the mount-failure dedupe, so a
republish that is still broken at the same URL reports again instead
of silently convincing the agent the repair landed.
- Toggle baking now mirrors preview truth exactly: the runtime sets
data-p-<id>="on" or removes the attribute, so presence and "on" forms
survive only while on, and any other valued branch (never matched at
preview) is dropped in either state.
greptile-apps[bot] (both P1 repros):
- When several apps qualify at the same resolution tier (two live
servers, or two stopped apps with interrupted sessions), the choice
stays deterministic but is now loud: a stderr warning names the chosen
app, the alternatives, and how to target a specific app. Silent
wrong-app routing was the failure in both repro harnesses.
This work was produced with AI assistance (Claude Code).
Co-Authored-By: Claude Code <noreply@anthropic.com>
A ground-up hardening of live mode, driven by a production session in a
nested-app monorepo that hit six distinct failure classes. Full design
rationale in docs/LIVE-REWRITE-PLAN.md; every Codex-reported failure now
has a mechanical fix and a regression test.
Roots: live/roots.mjs resolves appRoot/repoRoot/contextRoot once at boot
(keyed on dev-server configs, not monorepo brand markers), persists a
manifest, and every live CLI re-anchors onto it at startup, so a helper
run from the wrong directory can no longer fork session state. Context
files are discovered upward to the git root.
Render truth: variant_mounted / variant_mount_failed events give the
journal per-variant mount state; failures reach the agent's poll queue,
raise a persistent error card with Retry (no more localStorage wipe), and
an attach probe names root/dev-server mismatches explicitly. The browser
rehydrates from the server when localStorage is gone.
Svelte: the scaffolder now parses with the app's own svelte 5 compiler.
Control flow survives (an each collection crosses the contract as one
structured prop), keyed each blocks hydrate synthetic keys, and anything
a detached preview cannot support falls back to source-preview instead of
shipping a wrong scaffold. Preview modules live in per-publish revision
directories, defeating stale transform caches.
Accept: CSS is reconciled, not appended. Matching selectors are replaced,
params bake from params.json kinds, the compiler's unused-selector pass
prunes superseded rules (pre-existing dead rules protected), a selector-
loss postcondition refuses any write that would drop hand-written rules,
and live-complete refuses to finish while live plumbing remains in source.
Also: framework registry (live/frameworks/) with a crash-safe injection
journal, session-store snapshot caching with read-only reads, protocol
enum consolidation, steer Send button, honest DESIGN-panel empty states.
Testing: new unit suites (roots, AST scaffolder, accept CSS, accept
pipeline, framework conformance); e2e now fails on preview-tree 404s,
proves computed-style mount for every variant, drives the Tune panel
through baked params, and injects failures (broken mounts, republish,
storage loss). New runtime fixtures: monorepo-nested-vite (repo root !=
app root) and vite8-sveltekit-stateful (each blocks + state). Nightly
full-matrix cron. An independent adversarial review pass preceded this
commit; its blocker and major findings are fixed and regression-tested.
This work was produced with AI assistance (Claude Code).
Co-Authored-By: Claude Code <noreply@anthropic.com>