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

Design: a pull's merge box uses §5's card and buttons, and the merge-* classes leave §5d #3894

Parked opened this
Closed without merging

The merge box on the pull page, the browse view and the studio's change page is now §5's card and row, and the four merge- classes are gone. Screenshots, the type check and the full suite are not done. Tests pass for pulls, studio, browse and web-browse, and bun scripts/design-lint.ts passes with --update run once.

Notes

stopped parked by the crew deploy 9b284fd

opened this

The merge box on the pull page, the browse view and the studio's change page is now §5's card and row, and the four merge-* classes are gone. Screenshots, the type check and the full suite are not done. Tests pass for pulls, studio, browse and web-browse, and bun scripts/design-lint.ts passes with --update run once.

I could not run bun x tsc --noEmit because bun install fails in this sandbox ("unable to write files to tempdir"). The forge's check will be the first type check of this change.

What changed

  • A new module, src/web/merge-card.ts, holds mergeCard(). It draws a card holding a <ul class="list setting-list"> with one row. The row's lead is the verdict glyph, its title the headline, its meta the sentence plus the review and check chips, and its trail the controls. setting-list makes the sentence wrap and puts the controls on their own line under 640px.
  • All seven states in src/web/pages/pull.ts, mergeElsewhere in src/web/pages/browse.ts and wallCard in src/web/studio/change.ts now use it.
  • The Ship form still posts strategy (a merge-commit or squash select) to ${thread}/merge. The disabled merge buttons and the Reopen form are unchanged.
  • In src/web/style/content.ts the .merge-* rules are deleted. The existing .row-trail form rule gained align-items: center; gap: 8px so the select and button sit apart.
  • In docs/DESIGN.md the four names are gone from the §5d bullet, and its prose no longer lists "the merge box". docs/design/baseline.json was updated.
  • test/pulls.test.ts asserts that the four old class names are absent from both the ready-to-merge page and the conflict page.

Not done

  • Screenshots: the before/after set in light and dark, at desktop and 390 px, has not been taken. It needs the preview and a person to run it.
  • Pull page tests: the pull-page test fetches without a session, so it sees "You need write access to merge" rather than the Ship form. The form's action and the strategy field are covered by the existing test/studio.test.ts and the merge posts in test/pulls.test.ts, not by a new assertion.

Look at

  • Lead glyph colour: it is no longer tone-coloured, except green-purple for merged. The card's data-tone border still carries the verdict.
  • Titles: they now go through the row's title slot, so a plain string is escaped. I kept "Can't merge." and "This pull's contract does not read." as html so the apostrophe stays as it was.
  • Borrowed classes: no other page used any of the four names, so none was kept. .wall-cells stays.

To try it, open any pull and look at the box under the header. /<owner>/<repo>/pulls/<n> shows the ready, conflict, review-gated and merged states.

Closes #3867

10 earlier comments · 7 events
commented

The merge box on the pull page, the browse view and the studio's change page is now §5's card and row, and the four merge-* classes are gone. Screenshots, the type check and the full suite are not done. Tests pass for pulls, studio, browse and web-browse, and bun scripts/design-lint.ts passes with --update run once.

I could not run bun x tsc --noEmit because bun install fails in this sandbox ("unable to write files to tempdir"). The forge's check will be the first type check of this change.

What changed

  • A new module, src/web/merge-card.ts, holds mergeCard(). It draws a card holding a <ul class="list setting-list"> with one row. The row's lead is the verdict glyph, its title the headline, its meta the sentence plus the review and check chips, and its trail the controls. setting-list makes the sentence wrap and puts the controls on their own line under 640px.
  • All seven states in src/web/pages/pull.ts, mergeElsewhere in src/web/pages/browse.ts and wallCard in src/web/studio/change.ts now use it.
  • The Ship form still posts strategy (a merge-commit or squash select) to ${thread}/merge. The disabled merge buttons and the Reopen form are unchanged.
  • In src/web/style/content.ts the .merge-* rules are deleted. The existing .row-trail form rule gained align-items: center; gap: 8px so the select and button sit apart.
  • In docs/DESIGN.md the four names are gone from the §5d bullet, and its prose no longer lists "the merge box". docs/design/baseline.json was updated.
  • test/pulls.test.ts asserts that the four old class names are absent from both the ready-to-merge page and the conflict page.

Not done

  • Screenshots: the before/after set in light and dark, at desktop and 390 px, has not been taken. It needs the preview and a person to run it.
  • Pull page tests: the pull-page test fetches without a session, so it sees "You need write access to merge" rather than the Ship form. The form's action and the strategy field are covered by the existing test/studio.test.ts and the merge posts in test/pulls.test.ts, not by a new assertion.

Look at

  • Lead glyph colour: it is no longer tone-coloured, except green-purple for merged. The card's data-tone border still carries the verdict.
  • Titles: they now go through the row's title slot, so a plain string is escaped. I kept "Can't merge." and "This pull's contract does not read." as html so the apostrophe stays as it was.
  • Borrowed classes: no other page used any of the four names, so none was kept. .wall-cells stays.

To try it, open any pull and look at the box under the header. /<owner>/<repo>/pulls/<n> shows the ready, conflict, review-gated and merged states.

commented

I fixed the type errors and pushed, but I couldn't run tsc here, so the forge's check is the first real type check of the fix. bun can't write to its temp directory in this sandbox. The pull, studio and browse tests pass.

The failures came from exactOptionalPropertyTypes. mergeCard passed undefined for optional meta, trail, state and tone into row and card, which don't accept it. In src/web/merge-card.ts the options now allow | undefined, and mergeCard only forwards the ones that are set. The callers in pull.ts and browse.ts are unchanged.

The pull description from my first message still holds: it describes the merge box now drawn from §5's card and row, and the four merge-* classes gone. The before/after screenshots in light and dark, at desktop and 390 px, are still not taken.

Changes requested — before the latest push

Direction is right (merge box becomes §5 card + row, merge-* classes gone, DESIGN.md and baseline updated). Two things to fix before it lands.

  1. (first) wallCard puts a <ul class="wall-cells"> inside meta, and row() wraps meta in <span class="row-meta">. A list inside a span is invalid HTML and the wall-cells list now inherits row-meta type and wrapping. Render the cells as the row's own content another way: e.g. join them as sentences in the meta, or put the list in the card body after the row instead of inside it.
  2. The one state with a form a person submits (Ship: strategy select + Merge) has no assertion; the test fetches without a session and only sees "You need write access". Add a signed-in writer fetch in test/pulls.test.ts asserting action=".../merge" and name="strategy", so a regression to the trail form fails. The absence-only assertions on the old class names would not catch a broken form.

Also look at: on 360px the trail goes to its own line (good), but the select and the primary button no longer fill the width where the thumb is, as the removed CSS did; give .setting-list .row-trail form a wrap/flex rule under 640px. The verdict glyph is no longer green/red, so success vs. neutral rests on the border alone; check contrast in dark. Screenshots were not taken and tsc was not run locally; I have not seen them.

commented

I've pushed fixes for both requested changes and the two "also look at" points. I still couldn't run tsc or take screenshots here, so the forge's check and a look at the preview are the first real checks of the type fix and the layout. The pull, studio and web-browse tests and bun scripts/design-lint.ts pass.

  • Wall cells: mergeCard has a new after option that renders content in a card-body under the row. wallCard now puts its <ul class="wall-cells"> there, so the list is no longer inside the row's meta <span>. The meta holds only the one-line sentence.
  • Ship form test: test/pulls.test.ts now fetches the Files tab with the admin cookie. It asserts the <form method="post" action="/dev/app/pulls/1/merge"> containing name="strategy", value="squash" and "Merge pull request". A regression to the trail form fails it.
  • Phone width: under 640px, .setting-list .row-trail form now takes the full line and wraps. The select grows from 140px and the button from 180px, as the removed .merge-form rules did. The rule is in src/web/style/components.ts.
  • Glyph colour: mergeCard now maps the tone to the row's own state colours: success is green, danger is red and merged is purple. Success and blocked no longer rest on the border alone.

I haven't checked dark-mode contrast of the glyphs visually. They use the same --success, --danger and --merged tokens as the pull list rows.

Changes requested — before the latest push

The merge box now uses §5 card and row, the merge-* classes are gone, and the structure is clean. One visible regression blocks it: the verdict headline is greyed out.

Fix first: mergeCard sets the row data-state to closed or merged for the danger and merged tones. components.ts:407 colours .row-title var(--muted-fg) for those two states. So "Can't merge." and "Merged." now render as muted grey, and the red "Can't merge" verdict reads like a dimmed, closed list row. The old .merge-headline was full-weight foreground. Colour only the lead glyph, for example with a scoped rule such as .card .row[data-state] .row-title { color: var(--fg); } in components.ts, or a glyph-colour hook that does not reuse the list-row state.

Also: the .row-trail form rule in content.ts now applies gap and align-items to every row trail form site-wide. Check that the other pages (settings, people, flags) are not shifted. The amber attn states (waiting on review or checks, merge elsewhere) get no coloured glyph, only the card border. I could not verify dark-mode contrast or the 360px layout from the code alone. Please add screenshots of both.

commented

I've pushed a fix for the greyed-out headline, but I couldn't take screenshots here, so the 360px and dark-mode checks you asked for are still open. The pull, studio and web-browse tests pass. bun scripts/design-lint.ts passes, and --update still wrote the baseline once. I couldn't run tsc locally, so the forge's check will be the first type check of this push. The --attn token used for the amber glyph is defined and already used in components.ts.

  • Greyed headline: mergeCard no longer sets the row's data-state for the danger and merged tones, which was what muted the title. "Can't merge." and "Merged." are back to full-weight foreground.
  • Glyph colour: src/web/style/components.ts now has scoped rules that tint only the lead glyph. They key off the card's tone: green for success, red for danger, purple for merged and amber for attn. The amber waiting-on-review, waiting-on-checks and merge-elsewhere states therefore get a coloured glyph too. The rules apply only to cards carrying a new data-verdict marker, which mergeCard sets. Because of the marker, no other page's rows are touched.
  • Site-wide form rule: I reverted my change to .row-trail form in content.ts. The gap and alignment, and the phone-width rules from the last round, now apply only to .card[data-verdict] .row-trail form. Settings, people and flags are not affected.

Screenshots in light and dark, at desktop and 390 px, still need a person with the preview.

Approved — before the latest push

The merge box in all its states (pull, browse mergeElsewhere, studio wallCard) is now §5 card + row via one small module, the four merge-* classes are gone from CSS and the DESIGN.md inventory, mutations stay a POST form, links stay <a>, and it works without JS. The tests assert the old classes are gone and that the Ship form (action, strategy select, squash option, button) renders for a writer. Output is escaped through html/row. The 640px rule puts the form on its own line with the primary button growing. Two things I would do next: (1) take the light/dark screenshots at 360px that the builder says are still missing, and check the amber/green glyph contrast in dark; (2) add a test for the empty-trail case (a guest on a ready pull sees the muted write-access line) so the row trail guard cannot silently drop it.

commented

I merged main into the branch and pushed it. The only conflict was the style/content.ts page-furniture line in docs/DESIGN.md.

  • Resolution: I kept this pull's version of that line, which no longer lists the merge-* classes, because the merge box now uses §5's card and row. I also dropped .everyday-ask, which main removed and which no code in src uses any more.
  • Tests: the design suites (design-audit, design-lint, design-map) and pull-mergeable pass, 21 tests. I did not wait for a full bun test. It ran past 10 minutes and I moved it to the background without reading its result. The forge's check runs the whole suite on this push.
Approved — before the latest push

The merge box in all its states (pull.ts, browse mergeElsewhere, studio wallCard) now comes from one small module, merge-card.ts, built on §5's card and row. The four merge-* classes are gone from content.ts and from DESIGN.md §5d. Mutations are still POST forms: Ship, with strategy and merge, and Reopen. Navigation is still <a>: Open on the origin. It works with JavaScript off. Titles and meta go through html/row(), so they are escaped. The glyph and phone rules are scoped to .card[data-verdict], so settings, people and flags rows are untouched. The tests cover the Ship form for a writer and the absence of the old classes. Nothing in this change touches identity, request bodies or the terminal, and there is no security finding.

One thing is left. Two rounds of changes are spent, so I filed it as #4021 rather than block on it. ${checks} goes into the row's <span class="row-meta">. That is a <p class="checks-line">, which can contain the Check again <form>, followed by the spec findings <details><ul>. That is block content in a span, the same problem the after option fixed for wall-cells. Pass checks as after in the four states that show it.

The preview at this head has no repositories, so I could not see the box rendered there. This verdict rests on the code and the tests.

commented

I merged main into the branch and pushed it. The merge conflicted only in docs/DESIGN.md, in the §5d list of page-furniture classes. I ran only the three design test files (design-audit, design-lint, design-map). A full bun test was started but never reported a result before I stopped waiting, so the rest of the suite hasn't been run here. The forge will run the whole check on this push.

  • Conflict: the two sides had each dropped different classes from that list. Keeping both sides' lines left the design lint failing, because it flags any class listed in the doc that no stylesheet defines. I took the union of the two lists, then removed the eight classes that no stylesheet defines any more: .merge-box, .merge-form, .merge-headline, .merge-sub, .close-into, .close-reason, .grants and .grants-foot. I also dropped "the merge box" from that bullet's description, since the card now replaces it.
  • Tests: the three design files pass, including the lint that had failed.
Approved — before the latest push

The merge box in all its states (pull, browse mergeElsewhere, studio wallCard) now comes from one module, merge-card.ts, built on §5 card and row. The four merge-* classes are gone from the CSS and from DESIGN.md §5d. Mutations are still POST forms (Ship with strategy, Reopen). Navigation is still an <a> (Open on the origin). Nothing needs JavaScript. The phone rules are scoped to .card[data-verdict], so settings and people rows are untouched. Tests cover the Ship form for a writer and the absence of the old classes. I did not see the box rendered: I read the code and the tests, and the sentinel found no repositories on the preview. No security finding.

Two things I would do next:

  1. Pass checks as after in the four states that show it (tracked in #4021). It is a block (<p>, the Check again form, a <details> list) and currently sits inside the row-meta <span>.
  2. Take the before/after screenshots in light and dark at 390px and desktop, and check the amber and green glyph contrast in dark mode. Nobody has done this yet.
commented

I merged main into the branch and pushed it. The only conflict was in docs/DESIGN.md, the one line in §5d that lists the page-furniture classes.

  • Merge box classes: .merge-box, .merge-form, .merge-headline and .merge-sub are no longer in the stylesheet, so they stay out of that line. This is the stylesheet removal this pull already made.
  • Where classes: I also struck .where-dot and .where-note. main had already removed them from the stylesheet, and the design-lint test fails while the doc still lists them.

I ran the design tests (design-audit, design-lint, design-map) and they pass. pull-mergeable passed on its first run, before the strike. I did not rerun it afterwards. I also started the whole bun test suite, but it was still running after about 8 minutes, so I never saw a result and didn't wait for it. I left the full run to the forge's check on this push.

commented

I merged main into the branch again and pushed it. Only docs/DESIGN.md conflicted, on the §5d page-furniture class list.

  • Merge box classes: .merge-box, .merge-form, .merge-headline and .merge-sub stay out of the list, as before. None of them is in src any more.
  • .quiet-details: I struck it. main removed it from the stylesheet, and the design-lint test fails while the doc still lists a class no stylesheet defines.

I ran design-audit, design-lint, design-map and web-apps. All 39 tests pass. web-apps holds the earlier check failure, "the app strip says how long the first preview took". It passes here. That failure looks unrelated to this pull, but I didn't investigate it. I did not run the whole suite, so I'm leaving that to the forge's check on this push.

Approved — before the latest push

Approved. The merge box in all its states now comes from one module, src/web/merge-card.ts, built on §5 card and row. The four merge-* classes are gone from the stylesheet and from DESIGN.md §5d. Mutations stay POST forms (Ship, Reopen) and navigation stays an <a>, so it works with JavaScript off. Titles and meta go through html/row, so they are escaped. Glyph and phone rules are scoped to .card[data-verdict], so other lists are untouched. The tests cover the Ship form for a writer and the absence of the old classes. I read the code and tests; the preview has no repository with a pull to show the box rendered. Nothing here touches identity, bodies or the terminal.

Next, in order:

  1. Move ${checks} (a <p>, possibly with the Check again form and a findings <details><ul>) out of the row meta span into the new after option in the four states that show it. Block content in a span is invalid HTML (tracked as #4021).
  2. Take the light/dark screenshots at 390px and desktop, which the builder said were never taken, and check the amber/green/red/purple glyph contrast in dark mode.
commented

I merged main into the branch a third time and pushed it. Again only docs/DESIGN.md conflicted, on the §5d page-furniture class list.

  • Merge box classes: .merge-box, .merge-form, .merge-headline and .merge-sub stay out of the list. None of them is in src.
  • .kv: I struck it. main removed it from the stylesheet, and the design-lint test fails while the doc lists a class no stylesheet defines.

The design tests (design-audit, design-lint, design-map) and web-apps pass: 39 tests, 0 failures. I did not run the whole suite, so I'm leaving that to the forge's check on this push.

Approved — before the latest push

Approved. The merge box in all its states (pull page, browse mergeElsewhere, studio wallCard) is now one small module built on §5 card and row. The four merge-* classes are gone from the stylesheet and from DESIGN.md. Mutations are still POST forms and navigation is still an <a>, so it works with JavaScript off. Titles and meta go through html/row, so they are escaped. The phone and glyph rules are scoped to .card[data-verdict], so settings rows are untouched. The tests assert the Ship form for a writer and the absence of the old classes. I read the code and the tests; I did not see the box rendered, because the preview has no repository to show it on.

Two things I would do next:

  1. Move ${checks} out of the row meta span into the new after slot in the four states that show it (#4021). The Check again form and the findings details are block content inside a span.
  2. Take the light and dark screenshots at desktop and 360px, and check the lead glyph contrast on the amber, green and purple tones. Nobody has looked at these yet.
commented

I merged main into this branch and pushed it. It had conflicts in docs/DESIGN.md and src/web/pages/pull.ts.

  • pull.ts: I kept both imports. This pull's mergeCard import stays, next to the route-timing and diff-cache imports that main added.
  • DESIGN.md: I took main's style/content.ts page-furniture list, which no longer has .about, .hero and .hero-terminal. From it I removed the four merge-box classes this pull retires: .merge-box, .merge-form, .merge-headline and .merge-sub. I also dropped "the merge box" from the sentence that introduces the list. No references to those classes remain in src or docs.

Checks: bun x tsc --noEmit is clean and design-lint printed only its all-clear line. In the full bun test run, crew-proposal.test.ts timed out at 5 s, and it passed on its own (14 of 14). I read only the tail of that run, so I haven't confirmed that was the only failure. Some suites were skipped for sandbox reasons (the ssh-keygen tests, the kernel-kill cgroup tests). The forge's check on this push will run those.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs