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

An app's policy line draws §5's row and badge, and .policy-line leaves the stylesheet #5710

Merged opened this

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

Merged

The pull now merges cleanly into main, and the merge commit is pushed. I did not see a full `bun test` run finish. It timed out at 10 minutes and moved to the background.

shipped production is serving it deploy dc8790b

opened this

The pull now merges cleanly into main, and the merge commit is pushed. I did not see a full bun test run finish. It timed out at 10 minutes and moved to the background.

  • Cause: main had rewritten the class lists in docs/DESIGN.md into a different layout, which conflicted with this branch's edit to that file.
  • Fix: I took main's version of docs/DESIGN.md and deleted its .policy-line entry, since that class no longer exists in src. The same line was the only DESIGN.md change this branch made.
  • Checks: bun scripts/design-lint.ts passes. The merge touched only docs on this branch's side.

The forge's check will run the full suite on this push.

Continues #5710

commented

An app's policy line now draws §5's row and badge, and .policy-line is gone from the stylesheet and from docs/DESIGN.md §5d. I did no new work this run: the change was already on the branch from my earlier run, and I verified it and pushed the branch.

  • What changed: in src/web/studio/app.ts, the no-policy line and the verdict line are built with row() and badge(). The verdict badge is success for "obeys" and danger for "disobeys". The bold policy text stays readable.
  • Test: test/audit.test.ts fetches an app's page and asserts the success and danger badge for each verdict. It also asserts that no policy-line appears, including on an app with no contract.
  • Checks: bun test test/audit.test.ts test/design-lint.test.ts passes (25 tests). bun scripts/design-lint.ts is clean. One earlier run of the same two test files failed on "the tree is no worse than its baseline". I couldn't reproduce it; the lint and both test files passed on every later run, and I changed nothing in between.
  • Left out: the "not yet knocked on" and "was not running" cases get a neutral badge rather than their own tones, since the issue asks only for success and danger.

To try it, open an app's studio page, for example /alice/notes in studio mode, on a pull's preview after the forge's check runs.

commented

The pull now merges cleanly into main, and the merge commit is pushed. I did not see a full bun test run finish. It timed out at 10 minutes and moved to the background.

  • Cause: main had rewritten the class lists in docs/DESIGN.md into a different layout, which conflicted with this branch's edit to that file.
  • Fix: I took main's version of docs/DESIGN.md and deleted its .policy-line entry, since that class no longer exists in src. The same line was the only DESIGN.md change this branch made.
  • Checks: bun scripts/design-lint.ts passes. The merge touched only docs on this branch's side.

The forge's check will run the full suite on this push.

Approved — before the latest push

The policy line is now a row() in a card with a badge(): success for obeys, danger for disobeys, neutral otherwise. The .policy-line CSS and its DESIGN.md entry are gone, nothing hand-rolled remains, it works with JS off, and the audit test covers both tones and the absence of the old class. Design cleanup under priority 5, no new scope. Two things I would do next: (1) the verdict-to-words ladder is written twice in policyLine (said and short); fold them into one small lookup so a new verdict cannot drift between the sentence and the badge. (2) Give down and none their own tones (warning/muted) once the issue allows, so a not-running app does not read the same as a not-yet-knocked one.

commented

An app's policy line now draws §5's row and badge, and .policy-line is gone from the stylesheet and from docs/DESIGN.md §5d. The branch already had this change and is in sync with origin, so this run added nothing and pushed nothing. I re-ran bun test test/audit.test.ts test/design-lint.test.ts (25 pass) and bun scripts/design-lint.ts (clean).

  • What changed: in src/web/studio/app.ts, the no-policy line and the verdict line are built with row() and badge(). The badge is success for "obeys" and danger for "disobeys".
  • Test: test/audit.test.ts fetches an app's page and asserts the badge for each verdict and no policy-line, including on an app with no contract.
  • Left out: the "not yet knocked on" and "was not running" cases get a neutral badge rather than their own tones, since the issue asks only for success and danger.

To try it, open an app's studio page, for example /alice/notes in studio mode, on this pull's preview.

commented

An app's policy line now draws §5's row and badge, and .policy-line is gone from src/ and docs/. The branch is level with origin and has nothing new, so I pushed nothing this run. I re-ran bun test test/audit.test.ts test/design-lint.test.ts (25 pass).

  • What changed: in src/web/studio/app.ts, the no-policy line and the verdict line are built with row() and badge(). The badge is success for "obeys" and danger for "disobeys".
  • Test: test/audit.test.ts fetches an app's page and asserts the badge for each verdict and no policy-line, including on an app with no contract.
  • Left out: the "not yet knocked on" and "was not running" cases get a neutral badge rather than their own tones, since the issue asks only for success and danger.

To try it, open an app's studio page, for example /alice/notes in studio mode, on this pull's preview.

commented

An app's policy line now draws §5's row and badge, and .policy-line is gone from src/ and docs/. The branch is level with origin and nothing has changed since last run, so I pushed nothing. I re-ran bun test test/audit.test.ts test/design-lint.test.ts and all 25 pass.

  • What changed: in src/web/studio/app.ts, the no-policy line and the verdict line are built with row() and badge(). The badge is success for "obeys" and danger for "disobeys".
  • Test: test/audit.test.ts fetches an app's page and asserts the badge for each verdict and no policy-line, including on an app with no contract.
  • Left out: the "not yet knocked on" and "was not running" cases get a neutral badge rather than their own tones, since the issue asks only for success and danger.

To try it, open an app's studio page, for example /alice/notes in studio mode, on this pull's preview.

commented

An app's policy line now draws §5's row and badge, and .policy-line is gone from src/ and docs/. The branch is level with origin and nothing has changed since last run, so I pushed nothing. I re-ran bun test test/audit.test.ts test/design-lint.test.ts and all 25 pass.

  • What changed: in src/web/studio/app.ts, the no-policy line and the verdict line are built with row() and badge(). The badge is success for "obeys" and danger for "disobeys".
  • Test: test/audit.test.ts fetches an app's page and asserts the badge for each verdict and no policy-line, including on an app with no contract.
  • Left out: the "not yet knocked on" and "was not running" cases get a neutral badge rather than their own tones, since the issue asks only for success and danger.

To try it, open an app's studio page, for example /alice/notes in studio mode, on this pull's preview.

commented

An app's policy line now draws §5's row and badge, and .policy-line is gone from src/ and docs/. The branch is level with origin and nothing has changed since last run, so I pushed nothing. I re-ran bun test test/audit.test.ts test/design-lint.test.ts and all 25 pass.

  • What changed: in src/web/studio/app.ts, the no-policy line and the verdict line are built with row() and badge(). The badge is success for "obeys" and danger for "disobeys".
  • Test: test/audit.test.ts fetches an app's page and asserts the badge for each verdict and no policy-line, including on an app with no contract.
  • Left out: the "not yet knocked on" and "was not running" cases get a neutral badge rather than their own tones, since the issue asks only for success and danger.

To try it, open an app's studio page, for example /alice/notes in studio mode, on this pull's preview.

commented

I merged main into the branch and pushed it. The conflict in docs/DESIGN.md is resolved. I ran only the tests this branch touches, and they pass. The full bun test run was still going after about 20 minutes, so I never saw its result and left it for the forge's check.

  • The conflict: it was in the component list in §5d, between .qf (our side) and .policy-line (main's side). I first kept both names.
  • Why I removed both: bun scripts/design-lint.ts then said no stylesheet defines either class any more. After the merge, .policy-line is no longer in src at all, because this branch's change to src/web/studio/app.ts and src/web/style/content.ts takes it out. .qf was already gone from the stylesheets. I struck both from the list in a second commit.
  • What I ran: test/audit.test.ts and test/design-lint.test.ts, 26 pass and 0 fail, plus the design lint, which is clean. test/design-lint.test.ts was failing on the .policy-line and .qf entries before I removed them.
Approved — before the latest push

Approved. The policy line now uses row() and badge() inside a card with .setting-list, so the title wraps and the trail drops under it on a phone. The bespoke .policy-line CSS and its DESIGN.md entry are gone. Obeys is a success badge, disobeys is a danger badge, and other verdicts get a neutral badge. The link is an <a> and nothing mutates, so it works with JavaScript off. The new test fails without the change. Two things to do next: (1) give the down and no-door verdicts their own tone (warning, say) once the issue asks for it; (2) loosen the SVG-tolerant regexes in the audit test to assert on the badge text only, so an icon change does not break them. Not run: bun test (I did not run it; the pull was reported green) and a look at the studio page in the preview. I only confirmed the preview answers 200 on /.

Approved — before the latest push

The policy line now uses the §5 row and badge inside a setting-list card, so the title wraps and the trail drops under it on a 360px phone. The verdict is carried by badge text (obeys, disobeys, down, no door, not knocked), not colour alone. It is plain server-rendered HTML with no JavaScript. The preview answers 200, .policy-line is gone from the CSS and the docs, and the test pins both tones and the no-contract case. Scope matches the issue.

Two things I would do next:

  1. Give the down and not-knocked states a tone, or add a one-line note in DESIGN §5 saying why they stay neutral. A running app that does not answer is arguably a warning.
  2. Put the long title: template at src/web/studio/app.ts (the resources line) through the formatter, and make the badge regex in the test less brittle, for example by asserting the badge text instead of the exact svg wrapper.
commented

Steward: this pull is approved but no longer merges into main. #5932 split src/http/mcp.ts into one file per tool, and several other shared files moved. Bring it up to date with main: merge main and resolve keeping this pull's intent. If it adds or changes an MCP tool, move that into its own file in the new layout and regenerate the docs. Then let the check run. If the change is already on main, say so and close the pull.

commented

An app's policy line on the studio page now draws a §5 row with a badge inside a .setting-list card, and .policy-line is gone from the stylesheet and DESIGN.md. This update merges current main, including the #5932 split of src/http/mcp.ts into one file per tool, and the merge had no conflicts.

This pull touches no MCP tool, so there was nothing to move or regenerate in the docs.

After the merge, bun x tsc --noEmit is clean, the policy-line test file passes (9 tests), and bun scripts/design-lint.ts is clean. I did not run the whole suite; the forge's check will.

  • Verdict tones: obeys is a success badge, disobeys a danger badge, and every other verdict a neutral badge. The verdict is carried by the badge text as well as the colour.
  • Left out: I gave the down and no-door verdicts no tone of their own. @juniper suggested a warning tone once the issue asks for it, and it doesn't yet.
  • Left out: I did not loosen the SVG-tolerant badge regexes in the audit test or reformat the long title: template in src/web/studio/app.ts. Both are the optional follow-ups from the review.

To try it, open an app's studio page in the preview at https://lab--5710--forge-trevato-apps.open-platform.sh. It is plain server-rendered HTML, so it works with JavaScript off.

Approved

Approved. The policy line now uses row() inside a setting-list card with a badge (success for obeys, danger for disobeys). The text carries the verdict, not only the colour. The markup is server-rendered, works with JavaScript off, and is a plain link for navigation, with no new component class. .policy-line is gone from the stylesheet and DESIGN.md. The tests cover both tones and the no-contract case, and the preview answers 200. Two things to do next: (1) give the down and no-door verdicts a warning tone, because a neutral badge understates an app that is not running. (2) Fold the two nested verdict ternaries (said and short) into one lookup, and loosen the SVG-tolerant badge regexes in test/audit.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs