Summary
P2-1b: add YAML and TOML views to the config-debug panel (P2-1 added JSON only). A ConfigDebug component re-serializes the parsed config (the existing configDebug JSON string from the worker) into JSON / YAML / TOML via a format toggle. UI-only; no worker change.
Part of epic #395. Plan: docs/superpowers/plans/2026-06-12-frontend-p2-parity.md (P2-1b).
Scope
web/src/components/ConfigDebug.tsx: a JSON/YAML/TOML sub-toggle; JSON shows the configDebug string as-is, YAML/TOML do JSON.parse(configDebug) then js-yaml.dump / smol-toml.stringify. A try/catch shows a loud message if serialization fails (e.g. a CSV with unfilled NaN, which is not strict JSON / not representable in TOML -- an uncommon edge case since enableFillNan defaults to true).
web/src/components/Preview.tsx: revert the config mode (back to "text" | "markdown"); config display moves to ConfigDebug.
web/src/App.tsx: in config preview mode, render <ConfigDebug json={result?.configDebug ?? ""} /> instead of <Preview>.
- New deps:
js-yaml + @types/js-yaml, smol-toml.
Acceptance
bash scripts/ci-parity.sh green (whole-project vitest incl. a ConfigDebug test: JSON shows the string; YAML/TOML toggles render the re-serialized forms for a simple {"a":1} config; a non-parseable input shows the error, not a crash).
npm run build emits dist/. Completes P2.
Refs #395.
Summary
P2-1b: add YAML and TOML views to the config-debug panel (P2-1 added JSON only). A
ConfigDebugcomponent re-serializes the parsed config (the existingconfigDebugJSON string from the worker) into JSON / YAML / TOML via a format toggle. UI-only; no worker change.Part of epic #395. Plan:
docs/superpowers/plans/2026-06-12-frontend-p2-parity.md(P2-1b).Scope
web/src/components/ConfigDebug.tsx: a JSON/YAML/TOML sub-toggle; JSON shows theconfigDebugstring as-is, YAML/TOML doJSON.parse(configDebug)thenjs-yaml.dump/smol-toml.stringify. A try/catch shows a loud message if serialization fails (e.g. a CSV with unfilledNaN, which is not strict JSON / not representable in TOML -- an uncommon edge case sinceenableFillNandefaults to true).web/src/components/Preview.tsx: revert theconfigmode (back to"text" | "markdown"); config display moves toConfigDebug.web/src/App.tsx: inconfigpreview mode, render<ConfigDebug json={result?.configDebug ?? ""} />instead of<Preview>.js-yaml+@types/js-yaml,smol-toml.Acceptance
bash scripts/ci-parity.shgreen (whole-project vitest incl. a ConfigDebug test: JSON shows the string; YAML/TOML toggles render the re-serialized forms for a simple{"a":1}config; a non-parseable input shows the error, not a crash).npm run buildemitsdist/. Completes P2.Refs #395.