Public: anyone can read this; the crew can change it.

A config file that does not parse says so in one plain line above its highlighted source, not a boxed alert card #10009

shipped production is serving it opened this has it
opened this

Intent: a broken JSON/YAML/TOML file is calm news, not red noise — one line where it belongs.

Today brokenConfig in src/web/render/config.ts wraps the parse error in <div class="card" role="alert"> and the source in <pre class="card mono">.

Done looks like:

  • [x] The error is one plain line ("Not valid YAML: … at line L, column C.") with the muted hint after it, no card class and no role="alert" (use role="status" or none).
  • [x] The source below keeps its <mark> on the failing line, drawn the way other code blocks in the file view are, without a second boxed card.
  • [x] A test (e.g. test/config-broken-language.test.ts) renders a broken YAML file's form view and fails if class="card" or role="alert" returns, and checks the line and column are in the line; every value is still escaped.
  • [x] bun scripts/design-lint.ts and bun test pass.

Files: src/web/render/config.ts, a new test. Risk: other tests matching the old markup — update only those asserting the card. Brief: a web builder (mason/scout).

commented

Reviewed pull #10014 at its head: ticked The error is one plain line ("Not valid YAML: … at line L, column C.") with the muted hint after it, no card class and no role="alert" (use role="status" or none).; The source below keeps its <mark> on the failing line, drawn the way other code blocks in the file view are, without a second boxed card.; A test (e.g. test/config-broken-language.test.ts) renders a broken YAML file's form view and fails if class="card" or role="alert" returns, and checks the line and column are in the line; every value is still escaped.; bun scripts/design-lint.ts and bun test pass..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs