fix: address second round of PR review bot findings

cursor[bot]:
- style: directives with dynamic values now fall back to source-preview
  instead of being scaffolded as boolean condition props that falsified
  the style in the detached preview.
- class: directives carry a className probe, so v2 hydration answers the
  condition from the live DOM instead of always defaulting to false.
- The existing-wrapper remount path now checks the mount result; a failed
  remount keeps the error card instead of advancing to a CYCLING bar over
  a page where nothing rendered.

greptile-apps[bot]:
- The repo-root live pointer records every booted app (most recent
  first) and resolution prefers the app whose helper server is alive, so
  a helper run from the repo root of a two-app monorepo can no longer be
  redirected onto the wrong app's session store by the last boot. Legacy
  single-value pointers still read.

This work was produced with AI assistance (Claude Code).

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-07-27 15:34:57 -07:00
co-authored by Claude Code
parent 2d66c9acf1
commit a6f965e8bf
5 changed files with 145 additions and 12 deletions
+15 -1
View File
@@ -5453,6 +5453,13 @@
if (entry.probe && entry.probe.tag) {
const selector = entry.probe.tag + (entry.probe.classes || []).map((c) => '.' + cssEscapeIdent(c)).join('');
try { values[entry.prop] = !!liveEl.querySelector(selector); } catch { /* keep default */ }
} else if (entry.probe && entry.probe.className) {
// class:name directive: the live DOM answers directly, either on
// the picked element itself or on a descendant carrying the class.
try {
values[entry.prop] = liveEl.classList.contains(entry.probe.className)
|| !!liveEl.querySelector('.' + cssEscapeIdent(entry.probe.className));
} catch { /* keep default */ }
}
}
}
@@ -5731,7 +5738,14 @@
arrivedVariants = availableVariants;
expectedVariants = Number(manifest.count) || expectedVariants || arrivedVariants;
visibleVariant = visibleVariant > 0 && visibleVariant <= arrivedVariants ? visibleVariant : 1;
await mountSvelteComponentVariant(visibleVariant || 1);
const remounted = await mountSvelteComponentVariant(visibleVariant || 1);
if (!remounted) {
// The mount already reported the failure and raised the card.
// Advancing to CYCLING here would show a bar claiming variants are
// ready over a page where nothing rendered.
saveSession();
return;
}
setLiveState('CYCLING');
showOrUpdateCyclingBar();
saveSession();