From e233c0058c9c3e11b37e02b4a32b2cd34dfc612b Mon Sep 17 00:00:00 2001 From: CesarNML Date: Wed, 17 Jun 2026 10:00:32 +0700 Subject: [PATCH 1/7] refactor(P6.02): convert shared primitives to Svelte 5 runes [P6.02] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - export let → $props() on StatPanelItem, PageTransition - → {#snippet children} / {@render children?.()} on all wrappers - Add to all 9 files - Moon/Sun/System SVGs: runes directive only (no reactive state) --- src/lib/assets/svg/Moon.svelte | 2 ++ src/lib/assets/svg/Sun.svelte | 2 ++ src/lib/assets/svg/System.svelte | 2 ++ src/lib/components/ChartTitle.svelte | 10 +++++++++- src/lib/components/Container.svelte | 10 +++++++++- src/lib/components/PageTransition.svelte | 7 +++++-- src/lib/components/Stats/StatPanelItem.svelte | 15 +++++++++++---- .../components/common/BigChartContainer.svelte | 10 +++++++++- src/lib/components/common/ChartContainer.svelte | 10 +++++++++- 9 files changed, 58 insertions(+), 10 deletions(-) diff --git a/src/lib/assets/svg/Moon.svelte b/src/lib/assets/svg/Moon.svelte index 9c03ee90..0c137989 100644 --- a/src/lib/assets/svg/Moon.svelte +++ b/src/lib/assets/svg/Moon.svelte @@ -1,3 +1,5 @@ + + + + + + +
- + {@render children?.()}
diff --git a/src/lib/components/Container.svelte b/src/lib/components/Container.svelte index e6bb789f..1e5384a8 100644 --- a/src/lib/components/Container.svelte +++ b/src/lib/components/Container.svelte @@ -1,3 +1,11 @@ + + + +
- + {@render children?.()}
diff --git a/src/lib/components/PageTransition.svelte b/src/lib/components/PageTransition.svelte index b1662cd3..825cfc14 100644 --- a/src/lib/components/PageTransition.svelte +++ b/src/lib/components/PageTransition.svelte @@ -1,8 +1,11 @@ + + @@ -13,6 +16,6 @@ in:fade={{ duration, delay: duration, easing: cubicInOut }} out:fade={{ duration, easing: cubicInOut }} > - + {@render children?.()} {/key} diff --git a/src/lib/components/Stats/StatPanelItem.svelte b/src/lib/components/Stats/StatPanelItem.svelte index 943cba06..d5a4faac 100644 --- a/src/lib/components/Stats/StatPanelItem.svelte +++ b/src/lib/components/Stats/StatPanelItem.svelte @@ -1,7 +1,14 @@ + +
@@ -11,6 +18,6 @@
{title}
- + {@render children?.()}
diff --git a/src/lib/components/common/BigChartContainer.svelte b/src/lib/components/common/BigChartContainer.svelte index e1dcf004..093f30e0 100644 --- a/src/lib/components/common/BigChartContainer.svelte +++ b/src/lib/components/common/BigChartContainer.svelte @@ -1,3 +1,11 @@ + + + +
- + {@render children?.()}
diff --git a/src/lib/components/common/ChartContainer.svelte b/src/lib/components/common/ChartContainer.svelte index 16b26601..221b5f6d 100644 --- a/src/lib/components/common/ChartContainer.svelte +++ b/src/lib/components/common/ChartContainer.svelte @@ -1,3 +1,11 @@ + + + +
- + {@render children?.()}
From ea40e08cc4782cf61740b47d492b278825035514 Mon Sep 17 00:00:00 2001 From: CesarNML Date: Wed, 17 Jun 2026 10:02:29 +0700 Subject: [PATCH 2/7] chore(P6.02): record subagent adversarial review prompt --- .../reviews/P6.02-subagent-review.prompt.md | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 docs/product/delivery/phase-06/reviews/P6.02-subagent-review.prompt.md diff --git a/docs/product/delivery/phase-06/reviews/P6.02-subagent-review.prompt.md b/docs/product/delivery/phase-06/reviews/P6.02-subagent-review.prompt.md new file mode 100644 index 00000000..515321cb --- /dev/null +++ b/docs/product/delivery/phase-06/reviews/P6.02-subagent-review.prompt.md @@ -0,0 +1,138 @@ +You are conducting an adversarial review of a code change. +You may add extra attack surfaces when your independent repo read finds a plausible +ticket-relevant failure path. +Findings outside the three finding-discipline clauses belong in **Advisory Observations** — +anything off-scope but real is welcome there. +Your job is not a general code review — it is a targeted attack on the behavior this ticket is supposed to +protect. Start from the invariants and attack surfaces below, then independently inspect +the diff and directly related implementation code for missing ticket-relevant risks. You +are looking for paths where the ticket's intended behavior breaks, not for general +improvements. + +### Ticket scope + +**Outcome:** +- 9 files converted to Svelte 5 runes: `Container.svelte`, `ChartTitle.svelte`, `common/ChartContainer.svelte`, `common/BigChartContainer.svelte`, `Stats/StatPanelItem.svelte`, `PageTransition.svelte`, `assets/svg/{Moon,Sun,System}.svelte`. +- `` / named slots → snippets (`{@render children?.()}`); `export let` → `$props()`. +- Consumer call-sites that pass named slot content updated in this ticket (ripple owned here). No named slots existed — no consumer updates needed. +- Each converted file carries ``. +- `grep` for legacy idioms in these files returns zero. + +**Rationale notes:** +- Default `` → `{@render children?.()}` using optional chaining to allow childless rendering. +- No named slots existed across the 9 files, so no consumer call-site ripple was needed. +- Moon/Sun/System SVGs have no reactive state — `` added only. +- `PageTransition` transitions (`fade`, `cubicInOut`) are unchanged; `duration` is a non-reactive `const`. +- `Red: skip` — behavior-preserving conversion. + +### Files touched + +Implementation: +- `src/lib/components/Container.svelte` +- `src/lib/components/ChartTitle.svelte` +- `src/lib/components/common/BigChartContainer.svelte` +- `src/lib/components/common/ChartContainer.svelte` +- `src/lib/components/Stats/StatPanelItem.svelte` +- `src/lib/components/PageTransition.svelte` +- `src/lib/assets/svg/Moon.svelte` +- `src/lib/assets/svg/Sun.svelte` +- `src/lib/assets/svg/System.svelte` + +Tests: +- (none changed) + +### Invariants to hold + +1. Default-slot content passed to any of the 9 wrapper components must still render — `{@render children?.()}` must receive and render the `children` snippet from consumers. +2. `StatPanelItem` `title`, `icon`, and `label` props must remain required and accessible in the template — no prop is accidentally dropped or made optional. +3. `PageTransition` fade transitions must still fire on `pathname` key-change — the `in:fade` and `out:fade` directives and `{#key pathname}` block must be intact. + +### Attack surfaces to probe + +1. **`children` optional-chaining silent drop** — when `{@render children?.()}` is used, a consumer that always passes content will work, but if `children` is accidentally undefined (e.g. a misconfigured consumer), the slot silently renders nothing with no error. Probe whether any consumers of these wrappers pass no children when content is expected. +2. **StatPanelItem slot-for-value semantics** — the original `` was inside `.stat-value`, carrying the displayed stat number. Confirm the `{@render children?.()}` sits in the exact same DOM position and that `children?` optional chaining won't cause silent blank stat values in consuming callers. +3. **PageTransition transition directive survival** — the `in:fade` and `out:fade` attributes are template-side; verify they were not accidentally removed or altered during the slot→snippet conversion. Confirm the `{#key pathname}` block still wraps the transition div. +4. **SVG-only files runes mode compatibility** — `Moon/Sun/System.svelte` have no `