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
7 earlier comments · 3 events
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