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

Editing a config file as a form speaks the home page's language #9989

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The config form and its review step now use `settings-block` sections instead of boxed cards, and the branch is pushed.

shipped production is serving it deploy 9e8c29c

opened this

The config form and its review step now use settings-block sections instead of boxed cards, and the branch is pushed.

I ran test/config-language.test.ts, test/config-form.test.ts and test/config-yaml-toml.test.ts. All 53 pass. bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts are clean. I did not run the full bun test; the forge's check runs it on the push.

What changed

  • Form (src/web/pages/config.ts): GET /:owner/:name/config/:ref/*path and the form that comes back after an op are one settings-block titled "Settings". The review button keeps its place at the top and in form-actions. All op buttons keep their names and order.
  • Review step (src/web/pages/config.ts): two blocks, "The change" and "Commit message". The diff keeps its mono config-diff lines without a box.
  • List items (src/web/render/config-form.ts): items are config-card rows with a top rule instead of card config-card. The read-only blob view uses the same rows, but its outer card config-form wrapper is unchanged.
  • Styles (src/web/style/content.ts): .config-card and .config-diff lose their padding and margin.
  • New test (test/config-language.test.ts): asserts no class="card in <main> on the form, on the form after an add op, and on the review step. It also checks that add still produces a third item. Run against the old code, all three tests fail.

I edited two assertions in test/config-form.test.ts, because the old ones required the card markup this issue removes:

  • List-item class: class="card config-card" is now class="config-card".
  • Form tag: <form … class="card config-form"> is now <form … class="config-form">.

Left out: the read-only blob view still has its card, because the issue covers only the edit form, and I did not add a docs/design/areas entry since no new component class was named.

Closes #9970

commented

The config form and its review step now use settings-block sections instead of boxed cards, and the branch is pushed.

I ran test/config-language.test.ts, test/config-form.test.ts and test/config-yaml-toml.test.ts. All 53 pass. bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts are clean. I did not run the full bun test; the forge's check runs it on the push.

What changed

  • Form (src/web/pages/config.ts): GET /:owner/:name/config/:ref/*path and the form that comes back after an op are one settings-block titled "Settings". The review button keeps its place at the top and in form-actions. All op buttons keep their names and order.
  • Review step (src/web/pages/config.ts): two blocks, "The change" and "Commit message". The diff keeps its mono config-diff lines without a box.
  • List items (src/web/render/config-form.ts): items are config-card rows with a top rule instead of card config-card. The read-only blob view uses the same rows, but its outer card config-form wrapper is unchanged.
  • Styles (src/web/style/content.ts): .config-card and .config-diff lose their padding and margin.
  • New test (test/config-language.test.ts): asserts no class="card in <main> on the form, on the form after an add op, and on the review step. It also checks that add still produces a third item. Run against the old code, all three tests fail.

I edited two assertions in test/config-form.test.ts, because the old ones required the card markup this issue removes:

  • List-item class: class="card config-card" is now class="config-card".
  • Form tag: <form … class="card config-form"> is now <form … class="config-form">.

Left out: the read-only blob view still has its card, because the issue covers only the edit form, and I did not add a docs/design/areas entry since no new component class was named.

commented

The gate failed because no commit message had a "Try:" line, and I've fixed that. I pushed an empty commit whose message has one: "Try: open /alice/lamp/config/main/settings.json on the preview, add a list item, then Review changes".

bun scripts/gate.ts now passes locally. I didn't re-run the tests, since no code changed since the earlier green run. The forge will run the check again on this push.

To try the change, open /alice/lamp/config/main/settings.json on the preview. Add a list item, then choose Review changes. You'll see "Settings" first, then "The change" and "Commit message" as plain sections with no boxes.

commented

I couldn't reproduce the failing test, so I made no code change. I merged main into the branch and pushed it so the check runs again.

  • The failure: the check failed on one test, "the cause and last act show on the boards panel… (#8015)" in test/flow-keeper.test.ts. It's about the throughput keeper on the boards page, which this pull doesn't touch.
  • Local runs: that file passes 15 of 15 on the branch, and I ran it three times to be sure.
  • My guess: it's a flake when the check host is loaded. In the check log it was the only failure, in one of 71 shards, out of about 12,500 tests. I haven't confirmed that.
  • The merge: it brought in main's two newer commits (#9985, #9986). After it, the config-language, config-form and flow-keeper tests pass (44 of 44) and bun scripts/gate.ts is clean. The merge commit message carries the "Try:" line.

If the test fails again on this push, it needs looking at on its own, since it doesn't depend on this change.

Approved

Clean. The form and review step are settings-blocks with h2s, list items are hairline-separated rows, the diff has no box, and the new test asserts no card in main on the form, the form after an op, and the review. No security surface changed: output is still escaped through html, and the POST path is untouched. Minor nit, not blocking: the review page section indentation in config.ts is uneven.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs