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

The new issue and new pull forms speak the home page's language #9724

Merged opened this

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

Merged

The new issue and new pull forms now follow the home page's design principles, with one primary action on each.

shipped production is serving it deploy ef71500

opened this

The new issue and new pull forms now follow the home page's design principles, with one primary action on each.

What changed

  • New pull form (src/web/pages/pulls.ts): I removed the "Branches" card and its decorative merge icon. Base and Compare are now two plain fields in a wrapping row, above the title and description. The "Publish this branch anyway" confirmation for sealed fixes is unchanged.
  • New issue form (src/web/pages/issues.ts): the sealed-report checkbox text is now small and muted, like the other quiet text on the home page.
  • Cancel on both forms is now a small muted link instead of a ghost button, so "Create" is the only button.
  • Tests: test/issues-fit.test.ts and test/pulls-fit.test.ts each gain a compose-form check at 390 px. It fails if the form ships a fixed width over 390 px or a card. The tests don't render the page at 390 px, so they check the markup for fixed widths rather than measuring sideways scroll.

Checks: bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts pass. test/issues*.test.ts, test/pulls*.test.ts and the two fit files pass (57 and 10 tests).

Left alone

  • Fields, names, prefill from C, labels, sealed reports, guest refusals, the title and body limits and the cross-repository base/head choice are unchanged, so everything still works with JavaScript off.
  • The words come from the existing sources, so no wording was copied.
  • I added no CSS classes, so there is nothing new for the area docs.
  • I did not touch the page headings or the "Proposing X → Y" line on the pull form.
  • I did not update docs/design/areas/forms.md: it still lists the new-pull form among the users of .field-row, which is still true.
  • I did not keep the plan on the issue: no keep_plan tool was available in this session.

Try it: open /<owner>/<repo>/issues/new and /<owner>/<repo>/pulls/new on a repository with two branches, at phone width.

🤖 Generated with Claude Code

Closes #9719

commented

The new issue and new pull forms now follow the home page's design principles, with one primary action on each.

What changed

  • New pull form (src/web/pages/pulls.ts): I removed the "Branches" card and its decorative merge icon. Base and Compare are now two plain fields in a wrapping row, above the title and description. The "Publish this branch anyway" confirmation for sealed fixes is unchanged.
  • New issue form (src/web/pages/issues.ts): the sealed-report checkbox text is now small and muted, like the other quiet text on the home page.
  • Cancel on both forms is now a small muted link instead of a ghost button, so "Create" is the only button.
  • Tests: test/issues-fit.test.ts and test/pulls-fit.test.ts each gain a compose-form check at 390 px. It fails if the form ships a fixed width over 390 px or a card. The tests don't render the page at 390 px, so they check the markup for fixed widths rather than measuring sideways scroll.

Checks: bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts pass. test/issues*.test.ts, test/pulls*.test.ts and the two fit files pass (57 and 10 tests).

Left alone

  • Fields, names, prefill from C, labels, sealed reports, guest refusals, the title and body limits and the cross-repository base/head choice are unchanged, so everything still works with JavaScript off.
  • The words come from the existing sources, so no wording was copied.
  • I added no CSS classes, so there is nothing new for the area docs.
  • I did not touch the page headings or the "Proposing X → Y" line on the pull form.
  • I did not update docs/design/areas/forms.md: it still lists the new-pull form among the users of .field-row, which is still true.
  • I did not keep the plan on the issue: no keep_plan tool was available in this session.

Try it: open /<owner>/<repo>/issues/new and /<owner>/<repo>/pulls/new on a repository with two branches, at phone width.

🤖 Generated with Claude Code

commented

The preview deploy didn't fail on my change, and I've pushed nothing new for it.

The log you pasted ends with ready: https://lab--9724--forge-trevato-apps.open-platform.sh, then serving … and done: …. The app booted, reconciled, seeded the preview admin and is serving. The only thing that looks like a failure is the note "no tests declared, none run". That's accurate: forge.json has no top-level test command. Tests run through the check block, which is how the repo has always been set up. I didn't touch forge.json.

My branch is clean and already pushed. Locally, bun x tsc --noEmit, bun scripts/gate.ts, bun scripts/design-lint.ts, test/issues*.test.ts, test/pulls*.test.ts and the two new fit tests all pass.

If a real failure is hiding behind that note, the check's log on this push is what will show it. If it fails, send me that log and I'll fix the cause.

commented

The new issue and new pull forms now use the home page's language. The earlier check failed only because no commit message had a "Try:" line, and the gate rule requires one when src/web/pages/issues.ts or src/web/pages/pulls.ts changes.

I added an empty commit with that line and pushed it. A force push is refused, so I couldn't amend the original commit instead. The line says to open /trevato/forge/issues/new and /trevato/forge/pulls/new on the preview and check the form reads like the home page.

bun scripts/gate.ts now exits 0 locally. I did not re-run bun x tsc --noEmit or the tests, since no code changed. The forge's check will run again on this push.

To try it, open those two paths on https://lab--9724--forge-trevato-apps.open-platform.sh.

Changes requested — before the latest push

The markup change is sound and keeps the fields, names and no-JS posting. The tests do not prove the 390 px claim, and one is vacuous. Fix these in one round.

  1. test/issues-fit.test.ts (new compose-form test): it would pass without this change. The base issue form never rendered a card, so not.toContain("class=\"card") and the width checks assert nothing new. Every behaviour added needs a test that fails without it. Assert what changed: Cancel is an <a class="small muted"> and the form holds exactly one <button. Do the same on the pulls form.
  2. Issue box 3 says the tests fail if the forms scroll sideways. A regex over markup cannot do that. Either measure it as the repo does elsewhere in the fit tests, or assert the structure that guarantees fit (the field-row wraps, nothing sets a width) and say honestly in the test name what it holds. The inline-width regex only catches style= attributes.
  3. src/web/pages/pulls.ts: the mb wrapper on .field-row plus mt on the next block is hand-spaced. Use one rhythm, as formField does for the other fields, so spacing comes from the design system and not from stacked utility classes. Also confirm field-row still stacks to one column at 390 px, since box 1 asks for one column. The test must check that.
  4. Cancel as a bare <a class="small muted"> is hand-rolled markup repeated in two files. If DESIGN.md has a named quiet-link component or btn variant, use it. If not, say in the pull why none fits and add the class to docs/design/areas/forms.md.
  5. Design principle 1 and 8: the issue form keeps the narrow-wide mt wrapper plus an h1 and a repo header. Say which sentence the page now speaks, or confirm the page heading is the only explanation.

Ticks and lefts below follow from these.

commented

I've addressed all five points and pushed. The gate and tsc are clean. The fit tests, design lint and design tests pass. I did not run the rest of the suite.

  1. Vacuous test replaced. The compose-form test in both test/issues-fit.test.ts and test/pulls-fit.test.ts now checks what changed. It selects the compose form by its action (the first <form> on the page is the topbar search). It asserts exactly one <button in that form and that Cancel is an <a data-variant="link">. The old not.toContain('class="card') check is gone.
  2. Test name now says what it holds. The test no longer claims to measure 390 px. It asserts the structure that guarantees fit: no field-row and no inline width in the form. A real measurement would need a browser, which the fit tests here don't use, so that part is not covered.
  3. Spacing and column.

- Spacing: The mb/mt wrappers are removed from src/web/pages/pulls.ts. Spacing now comes from .field's own margin, the same as formField. - Column: At 390 px field-row would not have stacked: two 160 px minimum-width fields plus the gap fit in about 358 px. So Base and Compare are now plain stacked .fields, one column at any width, and the test checks that field-row is absent. The merge arrow between them is gone with it. I updated docs/design/areas/forms.md to match.

  1. Cancel. DESIGN has a btn variant for this, variant: "link", so both forms use btn("Cancel", { href, variant: "link" }) and the hand-rolled <a class="small muted"> is gone. No new class is needed.
  2. Issue form heading. I left the narrow-wide mt wrapper and h1 as they were. The page heading is the only explanation: it is New issue (or the sealed-report variant), and the page adds no second sentence. The pull form likewise has no intro text.

The new commit has a Try: line for the gate: open /trevato/forge/pulls/new on the preview at 390 px.

Changes requested — before the latest push

The form change is sound: one column, no Branches card, one primary button, Cancel as the link variant, and the fields, names and no-JS posting are unchanged. Two things to fix, in one round.

  1. (Fix first) Box 3 is not met. Both new tests read the markup for field-row and style="width". They do not measure a 390 px viewport, so they would not fail if the form scrolled sideways. The test name now says so, which is honest, but the box asks for tests that fail on sideways scroll. Measure it the way the repo measures elsewhere, or assert a bound on the real CSS: the .input and select width rules, and that .field is a block with no min-width above 390. Say in the pull which one you chose.
  2. Principle 3: pulls.ts now has two bare <div> wrappers around the fields. They carry no class and do nothing. Drop them and let .field carry the rhythm.
  3. Principle 3: the mt and mb utility classes on the narrow-wide wrappers and the Proposing paragraph still space things by hand. It is a small point, so leave it if the other forms do the same, but do not add more.
  4. Principle 4: the sealed-report line is now small muted. That line is the consent for a security choice, so muting it hurts its contrast. Keep it at normal size and colour and mute only a second hint line, if one is needed.

I could not load the preview's compose pages. The preview is the app itself and has no trevato/forge repository, so /trevato/forge/issues/new returns 404. I read the served markup through the source and the tests instead.

commented

The new issue and new pull forms now match the home page: the "Branches" card is gone, the fields sit in one column, each form has one primary button, and Cancel is the link variant of btn. Field names and posting without JavaScript are unchanged.

How the 390 px fit is tested. The test runs have no layout engine, so test/compose-fit.test.ts checks the CSS the page actually ships instead of measuring a viewport. It takes every rule in the stylesheets and the page's <style> blocks that targets a class or tag used in the form. It fails if any of those rules sets a width or min-width over 390 px, or if the form has an inline width. It also checks three things:

  • .input is width: 100% and .field is a block.
  • Every select, textarea and text input in the form uses .input.
  • The form has no field-row.

I checked it against a bad change: adding min-width: 420px to .field makes the test fail on both forms. The same file also asserts that each form has exactly one <button> and that Cancel is an <a data-variant="link">; both are false on main. These tests replace the markup-only ones that were in test/issues-fit.test.ts and test/pulls-fit.test.ts.

Other changes:

  • pulls.ts: Base and Compare are plain .fields with no wrapper <div>s, so the spacing comes from .field itself.
  • issues.ts: the sealed-report consent line is back at normal size and colour.
  • docs/design/areas/forms.md no longer lists the new-pull form as a field-row user.

Left alone: the mt/mb on the narrow-wide wrappers and on the "Proposing" paragraph were already there on main and match the other forms. This pull adds no new spacing utilities.

Try it: on the preview, open /<owner>/<repo>/issues/new and /<owner>/<repo>/pulls/new (a repo with two branches) at 390 px. The fields should stack in one column with no sideways scroll.

🤖 Generated with Claude Code

Approved

Earlier asks, all met: (1) the fit test now reads the real shipped CSS (base, components, content and page style blocks) and fails on any width/min-width over 390 px reaching the form, and asserts .input is 100% wide and .field a block; (2) the bare divs in pulls.ts are gone; (3) no new mt/mb added; (4) issues.ts only changes Cancel to the link variant, so the consent line is at normal size and colour. Base and Compare now stack as plain fields, forms.md is updated, one primary button, Cancel is an a with the link variant, no JS needed, no security surface changed. Non-blocking: box 3 names issues-fit/pulls-fit; the coverage lives in test/compose-fit.test.ts instead, which is fine.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs