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

small: /settings/app shows Slug, Access and Preview data as one line each, with the reason behind a Why mark, seen on a live preview #13371

opened this

Merged 19d 21h ago, live in production

Slug, Access and Preview data on Settings › App are now one .setting-line each: label, control and the why() mark. I haven't loaded the pull's preview, so the 200 on / and /preview-admin/sample/settings/app is unchecked. I did not touch forge.json looks or test/forge-looks.test.ts.

Notes

opened this

Slug, Access and Preview data on Settings › App are now one .setting-line each: label, control and the why() mark. I haven't loaded the pull's preview, so the 200 on / and /preview-admin/sample/settings/app is unchecked. I did not touch forge.json looks or test/forge-looks.test.ts.

What changed

  • src/web/ui.ts: field and selectField take an optional why. With it, the field renders as a .setting-line with the why() mark, hint is not drawn, and an error sits on its own row after the mark. aria-describedby names why-<name> and f-<name>-err. Without why, the markup is the same as before; the new test checks the hint span and the absence of setting-line.
  • src/web/pages/settings.ts: the three call sites pass their old hint text as why. No reason text was deleted, and the <span class="hint" id="f-…-hint"> is gone for all three.
  • src/web/style/components.ts: the line's text input takes flex: 1 1 14rem; min-width: 0, and the error takes a full row.
  • test/settings-lines.test.ts: two tests added. One covers the three boxes on /settings/app. The other covers the unchanged markup without why and the error row and aria-describedby with it.

Checks

  • test/settings-lines.test.ts passes (4 tests); bun scripts/design-lint.ts is clean.
  • Both new tests fail with src/web/ui.ts and src/web/pages/settings.ts taken from main.
  • bun x tsc --noEmit and bun scripts/gate.ts --fix are clean. I also ran test/app-settings-page.test.ts and test/settings.test.ts, which pass.
  • scripts/fast.ts named 2252 of 3393 test files, so I did not run those. The forge's full check on the push covers them.

Not done

  • The pre-push hook refused the first push for lack of a Try: line, so the commit message carries one.

Try it: open /<owner>/<repo>/settings/app and tap the Why mark beside Slug, Access or Preview data.

🤖 Generated with Claude Code

Closes #13370

5 earlier comments
commented

Slug, Access and Preview data on Settings › App are now one .setting-line each: label, control and the why() mark. I haven't loaded the pull's preview, so the 200 on / and /preview-admin/sample/settings/app is unchecked. I did not touch forge.json looks or test/forge-looks.test.ts.

What changed

  • src/web/ui.ts: field and selectField take an optional why. With it, the field renders as a .setting-line with the why() mark, hint is not drawn, and an error sits on its own row after the mark. aria-describedby names why-<name> and f-<name>-err. Without why, the markup is the same as before; the new test checks the hint span and the absence of setting-line.
  • src/web/pages/settings.ts: the three call sites pass their old hint text as why. No reason text was deleted, and the <span class="hint" id="f-…-hint"> is gone for all three.
  • src/web/style/components.ts: the line's text input takes flex: 1 1 14rem; min-width: 0, and the error takes a full row.
  • test/settings-lines.test.ts: two tests added. One covers the three boxes on /settings/app. The other covers the unchanged markup without why and the error row and aria-describedby with it.

Checks

  • test/settings-lines.test.ts passes (4 tests); bun scripts/design-lint.ts is clean.
  • Both new tests fail with src/web/ui.ts and src/web/pages/settings.ts taken from main.
  • bun x tsc --noEmit and bun scripts/gate.ts --fix are clean. I also ran test/app-settings-page.test.ts and test/settings.test.ts, which pass.
  • scripts/fast.ts named 2252 of 3393 test files, so I did not run those. The forge's full check on the push covers them.

Not done

  • The pre-push hook refused the first push for lack of a Try: line, so the commit message carries one.

Try it: open /<owner>/<repo>/settings/app and tap the Why mark beside Slug, Access or Preview data.

🤖 Generated with Claude Code

commented

The pull has no code change this round: /preview-admin/sample/settings/app answers 404 on this preview, and I can't make it answer 200. My token is not a session on the preview, so the preview treats me as anonymous.

  • Cause: appSettingsPage loads the repository through loadAdminRepo (src/web/admin_form.ts). That returns nothing unless the viewer can administer the repository, and the page then answers 404 so the page's existence isn't revealed.
  • Why /settings is 200: the General page only needs the repository to be readable.
  • Evidence: GET /api/v1/user on the preview with my forge token returns unauthorized, so the preview has no session for me. /settings/app answers the same 404 on production and on the previews of #13368 and #13377, so this head did not cause it.
  • Preview log line: I could not read the preview's log from the sandbox. The 404 is the "Not found · forge" page, served in about 6 ms (server-timing: app;dur=5.9).
  • Preview check: / answers 200, and the new App page has not been seen rendered on the preview. Any look that opens it would need an admin session on preview-admin/sample; that changes the seeded looks, and you told me to leave looks alone, so I did not.

Small: Settings › App shows Slug, Access and Preview data as one line each, with the reason behind a Why mark (#13370)

What changed

  • On /:owner/:name/settings/app, Slug, Access and Preview data are each one setting-line.
  • The reason for each sits behind a Why mark, reusing why().
  • A line's error goes on its own row.
  • aria-describedby names why-<name> and f-<name>-err.
  • Markup without a Why is untouched.
  • Commits c18cbb9ef (the change) and 9b521d9e3 (gate lines).
  • Not changed in this round: the code is unchanged since 9b521d9e3.

Box 5 (the preview shows it working)

Not met. The App page answers 404 for the anonymous preview viewer, as described above. The three lines are covered by the existing tests, not seen live.

What I chose not to do

  • I did not change limits or looks to open the page to the reviewer identity.
  • I did not revert the comment rewraps gate --fix made in ui.ts and the test. @juniper called them harmless churn.

How to try it

Sign in as the admin of a repository and open /<owner>/<name>/settings/app. Locally, run bun test on the settings test files.

commented

Small: Settings › App shows Slug, Access and Preview data as one line each, with the reason behind a Why mark (#13370)

What changed

  • On /:owner/:name/settings/app, Slug, Access and Preview data are each one setting-line.
  • The reason for each sits behind a Why mark, reusing why().
  • A line's error goes on its own row.
  • aria-describedby names why-<name> and f-<name>-err.
  • Markup without a Why is untouched.
  • Commits c18cbb9ef (the change) and 9b521d9e3 (gate lines).
  • The head is unchanged this round: the branch matches origin, so there was nothing to push.

Box 5 (the preview shows it working): not met

I loaded the preview. / answers 200, but /preview-admin/sample/settings/app answers 404, while /preview-admin/sample/settings answers 200.

  • Cause: the 404 is not a missing route. appSettingsPage loads the repository through loadAdminRepo (src/web/admin_form.ts). That returns nothing unless the viewer can administer the repository, and the page then answers 404 so its existence isn't revealed. /settings only needs the repository to be readable.
  • Viewer: my forge token is not a session on the preview. GET /api/v1/user on the preview returns unauthorized, so the viewer is anonymous. The same 404 appears on production and on the previews of #13368 and #13377, so this change did not cause it.
  • Preview log line: I could not read it from the sandbox. The 404 is the "Not found · forge" page, served in about 6 ms (server-timing: app;dur=5.9).
  • Why I stopped: making the page answer 200 means giving the preview viewer an admin session on preview-admin/sample. That changes the preview's seeded looks, which the review said to leave alone.
  • What is covered: the three lines are covered by the tests in this pull but have not been seen live. Nobody has tapped the Why mark on a phone.

What I chose not to do

  • Change limits, looks or the seed to open the admin page to the reviewer identity.
  • Revert the comment rewraps gate --fix made in ui.ts and the test. @juniper called them harmless churn.

How to try it

Sign in as the admin of a repository and open /<owner>/<name>/settings/app. Locally, run bun test on the settings test files.

commented

Handed to a person by the crew: two follow-up runs on the review's changes ended without a push, so no more start here until you say what to try. (The forge posts this under the reviewer's name; the reviewer did not write it.)

commented

I merged main into the branch and pushed it. The only conflict was in test/settings-lines.test.ts.

main had added a crewHere field (with crewHereShown) to the settings form, which my branch didn't know about. I kept main's POSTED list, so it includes crewHere and crewHereShown. I also kept the rewrapped comment above it that this branch carries.

I ran bun scripts/gate.ts --fix and bun x tsc --noEmit, and both were clean. bun test test/settings-lines.test.ts passed all 4 tests. I did not run the full suite; the forge runs it on the push.

commented

Left #13370 open: 1 unticked item remain (The pull's preview answers 200 on / and /preview-admin/sample/settings/app. If it does not, the pull says so with the preview's log line and stops; it does not change limits or looks.).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs