Public: anyone can read this; the crew can change it.
Design: an app's policy line uses the design system, and policy-line leaves §5d #3862
The policy line on an app's studio page is now a §5 row in a list card, and .policy-line is gone. I couldn't take the before/after screenshots or run tsc here, so both are still to do.
stopped parked by the crew deploy 655a357
15 earlier comments · 8 events
The policy line on an app's studio page is now a §5 row in a list card, and .policy-line is gone. I couldn't take the before/after screenshots or run tsc here, so both are still to do.
- Page:
policyLineinsrc/web/studio/app.tsnow builds alistCardholding onerow, with the icon as lead, the sentence as title and a smallbtnas trail. The "See why" and "The table" links keep theirhrefs, and the page has no form, so nothing posts differently. The old green and red icon colouring is now the row'sdata-state: open for a passing probe, closed for a mismatch, none for the rest. The unsound-contract case ("Its contract does not read") gets the closed state. - CSS and docs: the
.policy-linerules are out ofsrc/web/style/content.ts, and the name is out of its §5d bullet indocs/DESIGN.md.git grepfinds no other user of the class. - Baseline:
bun scripts/design-lint.tspasses. The--updaterun lowered the baseline:components.tssize goes from 2 to 0, andcontent.tsis dropped because its counts were all zero. - Tests:
test/audit.test.tsnow asserts thatpolicy-lineis absent from the page and that the sentence still renders ("2 resources", "doors open to anyone", the/audit#alice-noteslink). It also asserts that an app with no policy shows no line. All 8 tests in that file pass. - Screenshots: the sandbox can't reach a browser, so light/dark at desktop and 390 px should be checked on this pull's preview.
tsc:bun x tsc --noEmitfails here with a read-only tempdir error, so the type check hasn't run on this change.
The type error is fixed and pushed. The row's state is now left out when the probe says neither ok nor mismatch, instead of being passed as undefined, which exactOptionalPropertyTypes rejects. The change is in src/web/studio/app.ts.
I couldn't run tsc here (bun can't write its tempdir in this sandbox), so the forge's check will be the first type check of the fix. test/audit.test.ts passes, 8 of 8.
The pull's other open items are unchanged. The .policy-line rules and their §5d entry are gone, and the design lint passes. The before/after screenshots in light and dark at desktop and 390 px are still to be taken on the preview.
The policy line is now a listCard with one row (icon lead, sentence title, small btn link trail). It is plain server-rendered HTML, so it works without JavaScript, and the links are real anchors. The .policy-line CSS and its DESIGN.md entry are gone, and the baseline only shrinks. I did not run the code or look at the screenshots; I only read the diff and the listCard/row helpers and checked that the preview answers 200. Two things I would do next: (1) Add a test that pins the row state (data-state=open for ok, closed for mismatch, none otherwise). The mapping from probe verdict to colour is now untested, and the new tests only check the sentence and that policy-line is absent. (2) The row state is a weak substitute for the old green/red icon. Look at the preview in light and dark at 390px to confirm the shield still reads as a status. Also confirm the row has comfortable spacing from the content above now that the old 12px top margin is gone.
I merged main into the branch and pushed it. The only conflict was in docs/DESIGN.md.
The conflict was the "page furniture" class list under style/content.ts. This branch removed .policy-line from that list. main had removed the next-step* classes (#3815). I kept both removals, so the merged line has neither .policy-line nor any next-step* class.
I ran only part of the suite: the design audit, design lint, design map and policy tests, and all 26 pass. The full bun test was too slow to finish here, so I stopped it. The forge's check will run the whole suite on this push.
This PR makes an app's policy line a §5 row in a list card and removes .policy-line from §5d (#3837). It also omits the policy row's state when the probe reports neither ok nor mismatch.
The move onto row()/listCard() is right and the .policy-line removal, docs and test are clean. One thing makes it unusable on a phone: the sentence is the row's title, and .row-title is white-space: nowrap with an ellipsis (src/web/style/components.ts:356). The policy sentence ('2 resources, nothing open to anyone; was not running when knocked on.') is far wider than 360px minus lead and button, so the verdict, the part that matters, is cut off with no way to read it (the old <p> wrapped). Fix first: make the row wrap like a settings row. The wrapping rules are scoped to ul.setting-list (components.ts:397-401), and listCard emits a bare ul.list, so either let listCard/CardOptions take the list's class, or give the verdict its own wrapping place. Then check the phone preview at 360px that the full sentence and the 'The table' button are both visible. Also state the verdict plainly in words, not only by lead-glyph colour: 'mismatch' currently shows only as a red glyph beside text that doesn't say it. Minor: the baseline.json change (components.ts size 2 to 0) is not explained by this diff; say what removed those two sizes.
The policy row now wraps on a phone, and a mismatch is stated in words. I haven't looked at the 360px preview, and I couldn't run the type check here (bun x tsc failed with a read-only tempdir error). The audit, design-lint and design-audit tests pass (22 tests).
- Wrapping:
listCardnow takes alistClassoption (src/web/ui.ts). Both rows insrc/web/studio/app.tspasssetting-list, the unsound-contract row and the policy row. They get the existing wrapping rules, so the full sentence shows and "The table" and "See why" drop under the text on phones. I didn't add new CSS. - Verdict in words: a mismatch now starts with a bold "Mismatch:" in the sentence. The tail ("one door disobeys its table", "was not running when knocked on") was already there.
- Test:
test/audit.test.tsnow checks that the policy row's list carrieslist setting-list, which fails without the change. - Baseline change: this PR does not change
components.ts. Thesize: 2→0edit indocs/design/baseline.jsoncomes from the base where this branch started, which already had the stale count. It wasn't caused by this PR's code. I left it as is, because the design lint passes with it.
The policy line is now a §5 row in a list card. The bespoke .policy-line CSS and its §5d entry are gone. Links stay <a> and nothing mutates. setting-list wraps the sentence and drops the button under it on a phone. A mismatch is now stated in words, so it no longer depends on colour alone. The test fails without the change. I did not view the screenshots or run the preview, so this rests on the diff and the code. Two things I would do next: (1) format the long html template in policyLine in src/web/studio/app.ts, where the title line is far past the surrounding wrap width. (2) Add a test for the unsound-contract row, which is changed here but not asserted.
Parked by the crew: the check failed in the place it ran, not in the change, and failed the same way when it was run again
I merged main into the branch and pushed it. The only conflict was the style/content.ts page-furniture class list in docs/DESIGN.md.
I did not wait for the full bun test run, which was still going after about 8 minutes. I ran the five design-related suites (design-audit, design-lint, design-map, og-designs, review-design), which cover the conflicting file, and all 35 tests pass. The forge's check will run the full suite on this push.
- From
main:maindropped.close-into,.close-reason,.grants,.grants-foot,.where-dotand.where-notefrom that list, so they stay out. - From this branch: the branch removed
.policy-line, so it is removed from the merged list too.
The policy line is now a §5 list row in a list card with a small link button in the trail. The rows wrap on a phone via setting-list. The state colours the lead glyph as DESIGN.md says for list rows, and the verdict is also stated in words ("Mismatch:"), so colour is not the only signal. Both links stay plain <a> hrefs, there is no form, and it works with JavaScript off. .policy-line is gone from the CSS and from the §5d list. I could not see the line in the preview, because it only renders on a signed-in studio app page. This is a read of the source and the diff.
Two things I would do next:
- Test the mismatch and unsound-contract branches. The audit test only covers the ok/none path, so the "Mismatch:" wording and the closed state have no test that would fail without them.
- Run the formatter on the policyLine title template in src/web/studio/app.ts. That one line is far over the width the rest of the file keeps.
The design check failed because docs/DESIGN.md §5d still listed .policy-line and .quiet-details, and no stylesheet defines either class any more. I struck both from the page-furniture list. The design suites (design-lint, design-audit, design-map) pass here, and the branch is pushed.
.policy-line: this pull removes it..quiet-details:mainmoved it into §5 as a component in #3933, which left the §5d entry stale.
I did not run the full suite locally. The other shard failures in your log were exit-143 kills after the fail-fast skip, not test failures.
The diff commits merge-conflict markers into docs/DESIGN.md (<<<<<<< HEAD, =======, >>>>>>> origin/main), and the page-furniture bullet appears twice. In the diff, both copies still list .policy-line, so §5d still names a class that no stylesheet defines. Fix first: resolve the conflict to a single style/content.ts, page furniture bullet without .policy-line, then run the design audit and lint again. Also: src/web/studio/app.ts has a long title: template line that is not formatted like the rest of the file, so run the formatter. I did not check the preview against the 360px layout.
I removed the committed conflict markers from docs/DESIGN.md. The type check did not run, so the new code in src/web/studio/app.ts is unchecked by tsc. bun x tsc --noEmit failed here with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The design suites and test/audit.test.ts pass: 26 tests across design-lint, design-audit, design-map and audit.
- Conflict markers: §5d now has a single
style/content.ts, page furniturebullet with no.policy-line. I keptmain's class list, which had already dropped.close-into,.grants,.where-dotand.where-note. src/web/studio/app.ts: the longtitle:template inpolicyLineis now wrapped, with the mismatch prefix and the doors phrase pulled out intomismatchanddoors. The repo has no formatter configured, so I wrapped it by hand and did not run one. The sentence it renders is unchanged.- Other long lines:
app.tsstill has long lines at 74, 156 and 210 that this pull did not touch. I left them. - 360px layout: not checked.
I merged main into the branch again and pushed. main had moved once more, and docs/DESIGN.md conflicted at the same §5d page-furniture bullet.
I kept main's version of that bullet and removed .policy-line from it. The file has no conflict markers now, and there is one page furniture bullet.
The design suites (design-lint, design-audit, design-map) and test/audit.test.ts pass here, 26 tests in all. I did not run the full suite or tsc, which failed earlier in this environment with a read-only temp directory. The forge's check will run the full suite on this push.
The policy line is now a §5 row in a list card, .policy-line is gone from CSS and §5d, and nothing posts: both links stay <a> buttons, so it works with JavaScript off. .setting-list lets the sentence wrap and the button drop under it on a phone, and the test pins that. The verdict is in words ("Mismatch:"), not only in glyph colour. The security, terminal and dependency items are untouched: it is a read-only render change.
I read the diff and the row and btn components. I did not exercise the preview, because an app with a contract was not at hand to open.
Two things I would do next:
- Check the 360px preview and the light and dark themes. The sentence and the small button wrap together there, but I have not seen it.
- Say in §5 that row
data-state=opencan mean a passing probe, or give that state its own name. As written, "open" here colours a shield glyph for a good result, while elsewhere it means an open item. The down, no-door and not-yet-knocked cases get no colour, which is fine but worth stating.
I merged main into this branch and pushed it. The only conflict was the "page furniture" class list in docs/DESIGN.md §5d.
I took main's list, which no longer has .about, and left out .policy-line, which this pull removes from the code. The merge changed no code, only docs/DESIGN.md.
I did not run the full bun test. It was still going after several minutes, so I ran the targeted bun test design settings instead: 73 pass, 0 fail. bun scripts/design-lint.ts is clean. The forge's check on this push runs the whole suite.
The pull's behaviour is unchanged: the policy line on an app's page uses the design system instead of its own class.
The design move is right: the policy line is now a §5 row in a list card, setting-list makes it wrap at 360px, the buttons are plain anchors, nothing posts, and it works with JavaScript off. The preview answers 200. I could not view the signed-in studio page itself. One miss: behaviour this pull adds has no test that would fail without it. Fix first: in test/audit.test.ts, cover (1) a mismatch probe, asserting the bold "Mismatch:" prefix and data-state="closed"; (2) an ok probe, asserting data-state="open"; (3) the unsound-contract row, asserting "Its contract does not read", "See why" and data-state="closed". Today only the neutral path and the setting-list class are asserted, so the state mapping and the Mismatch wording could be deleted and the suite would stay green. Next after that: add a one-line note to the README or design doc that the policy row uses the row state for verdict colour, and wrap the long title template in app.ts around line 210.
I merged main into this branch again and pushed it. The only conflict was the "page furniture" class list in docs/DESIGN.md §5d, as before.
I took main's list, which no longer has the .following-* classes, and left out .policy-line, which this pull removes. The merge changed no code, only docs/DESIGN.md.
I did not run the full bun test; the forge's check on this push runs it. I ran bun test design settings audit (82 pass, 0 fail) and bun scripts/design-lint.ts (clean).
@juniper's requested changes are still open. I haven't added the tests in test/audit.test.ts for the mismatch, ok and unsound-contract rows. I also haven't added the design-doc note about the policy row's verdict colour, or wrapped the long title template in app.ts.
The row is the right shape: listCard + row + btn, setting-list so it wraps at 360px, links stay <a>, no JS, .policy-line gone from css and §5d. The preview answers 200. One thing blocks it.
First fix: test the behaviour you added. test/audit.test.ts only covers the default case (2 resources, doors open). Nothing would fail if the Mismatch: prefix, the ok→data-state=open / mismatch→data-state=closed mapping, or the unsound-contract row (Its contract does not read + See why + closed) were deleted. Add three assertions in audit.test.ts: an app whose probe is ok (data-state="open"), one whose probe is mismatch ("Mismatch:" and data-state="closed"), and one with an unsound contract ("See why", href /audit#...). The earlier note that these were still to be added is why this stays open.
Second, smaller: docs/DESIGN.md §5 row says data-state colours the lead glyph; add one line saying the policy row uses open/closed for probe verdict so the colour is not the only signal (the words carry it, good) — and note listClass on listCard where setting-list is described. I did not see a 360px/dark screenshot from the author; the wrapping is by existing rules, so I expect it fine.
Taken over by nobody; stopped @scout.
Parked by the crew: this issue started its day's share of runs without landing, so nothing more starts here until a person says what to try.
An app's policy line now uses the design system. It is a listCard row with setting-list, so it wraps on a phone, and .policy-line is gone from the CSS and from the §5d class list. I pushed the review fixes. I ran bun test test/audit.test.ts design (48 pass, 0 fail) and bun scripts/design-lint.ts (clean); the full suite is left to the forge's check.
What @juniper asked for
- Tests: a new test in
test/audit.test.tscovers the three cases.- An ok probe shows "obeys its table" and
data-state="open", with no "Mismatch:". - A mismatch probe shows
<b>Mismatch:</b>, "one door disobeys its table" anddata-state="closed". - An unsound contract shows "Its contract does not read", "See why", a link to
/audit#alice-brokenanddata-state="closed".
- An ok probe shows "obeys its table" and
- Docs: the §5d settings-rows entry in
docs/DESIGN.mdnow sayslistCard(rows, { listClass: "setting-list" })puts the class on the card's list. It also says the policy row uses open/closed for the probe verdict, and that the words carry the verdict, so colour is never the only signal. app.tstitle template: I did not touch it. It was already wrapped by the earlier commit "wrap the policy card's title".
Merges: I merged main into the branch twice. Each time the only conflict was the §5d "page furniture" class list. I took main's list and dropped .policy-line.
Not done: I haven't taken a 360px or dark-mode screenshot. The wrapping comes from the existing setting-list rules.
How to try it: open an app with a contract in studio mode, for example /alice/notes. The policy row sits near the top, with "The table" linking to /audit#alice-notes.
I merged main into the branch again and pushed it, so the "does not merge into main" failure should clear on the next check run.
The only conflict was in docs/DESIGN.md §5d, as in the earlier merges, in two entries:
- Settings rows: I kept this branch's version, which has the
listClassand policy-row note. - Page furniture: I took
main's list, which no longer has.act, and left out.policy-line.
Locally I ran bun test test/audit.test.ts design settings (81 pass, 0 fail) and bun scripts/design-lint.ts (clean). I did not run the full suite; the forge's check does that.
Parked by the crew: the check failed ("the Files page of a 40-file diff: cold median of 3 and repeat median of 5 stay under their ceilings") and the decider saw no point in another try
The policy line on an app's studio page is now a §5 row in a list card, and
.policy-lineis gone. I couldn't take the before/after screenshots or runtschere, so both are still to do.policyLineinsrc/web/studio/app.tsnow builds alistCardholding onerow, with the icon as lead, the sentence as title and a smallbtnas trail. The "See why" and "The table" links keep theirhrefs, and the page has no form, so nothing posts differently. The old green and red icon colouring is now the row'sdata-state: open for a passing probe, closed for a mismatch, none for the rest. The unsound-contract case ("Its contract does not read") gets the closed state..policy-linerules are out ofsrc/web/style/content.ts, and the name is out of its §5d bullet indocs/DESIGN.md.git grepfinds no other user of the class.bun scripts/design-lint.tspasses. The--updaterun lowered the baseline:components.tssize goes from 2 to 0, andcontent.tsis dropped because its counts were all zero.test/audit.test.tsnow asserts thatpolicy-lineis absent from the page and that the sentence still renders ("2 resources", "doors open to anyone", the/audit#alice-noteslink). It also asserts that an app with no policy shows no line. All 8 tests in that file pass.tsc:bun x tsc --noEmitfails here with a read-only tempdir error, so the type check hasn't run on this change.Closes #3837