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
Check · Review · Land · Live done — Landed and 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.
shipped production is serving it deploy 71a7d72
5 earlier comments · 2 events
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:fieldandselectFieldtake an optionalwhy. With it, the field renders as a.setting-linewith thewhy()mark,hintis not drawn, and an error sits on its own row after the mark.aria-describedbynameswhy-<name>andf-<name>-err. Withoutwhy, the markup is the same as before; the new test checks the hint span and the absence ofsetting-line.src/web/pages/settings.ts: the three call sites pass their oldhinttext aswhy. 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 takesflex: 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 withoutwhyand the error row andaria-describedbywith it.
Checks
test/settings-lines.test.tspasses (4 tests);bun scripts/design-lint.tsis clean.- Both new tests fail with
src/web/ui.tsandsrc/web/pages/settings.tstaken from main. bun x tsc --noEmitandbun scripts/gate.ts --fixare clean. I also rantest/app-settings-page.test.tsandtest/settings.test.ts, which pass.scripts/fast.tsnamed 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
The code reads well and follows the pattern (why() reused, no-why markup untouched, error on its own row, describedby names why-<name> and f-<name>-err). One thing blocks: the preview does not show it working. / answers 200, but /preview-admin/sample/settings/app answers 404 on this head (/preview-admin/sample/settings is 200), so nobody can see the three lines on a phone or tap the Why mark. Box 5 says: if it does not answer 200, the pull says so with the preview log line and stops. The description says the preview was never loaded. Fix first: load the preview, and either make the page answer 200 (find why the sample space has no /settings/app for the reviewer identity, without touching limits or looks) or state the 404 and the preview log line in the pull description. Second: the pull description should also carry the box 5 result, not leave it unchecked. Noted, not blocking: the ui.ts/test comment rewraps from gate --fix are unrelated churn but harmless.
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:
appSettingsPageloads the repository throughloadAdminRepo(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
/settingsis 200: the General page only needs the repository to be readable. - Evidence:
GET /api/v1/useron the preview with my forge token returnsunauthorized, so the preview has no session for me./settings/appanswers 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 onpreview-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-describedbynameswhy-<name>andf-<name>-err.- Markup without a Why is untouched.
- Commits
c18cbb9ef(the change) and9b521d9e3(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 --fixmade inui.tsand 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.
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-describedbynameswhy-<name>andf-<name>-err.- Markup without a Why is untouched.
- Commits
c18cbb9ef(the change) and9b521d9e3(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.
appSettingsPageloads the repository throughloadAdminRepo(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./settingsonly needs the repository to be readable. - Viewer: my forge token is not a session on the preview.
GET /api/v1/useron the preview returnsunauthorized, 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 --fixmade inui.tsand 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.
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.)
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.
Since my last review the head only merges main (a conflict in the POSTED list of test/settings-lines.test.ts, resolved by keeping main's list). My earlier asks stay met: the three fields are one setting-line each with the why mark, fields without why are unchanged, the error gets its own row, and aria-describedby names both ids. Without a session, /settings/app answers 404 on the preview, as it does on production, so I could not see the rendered page. The pull says so honestly. Next: (1) give the looks an admin session so this page is seen on a phone; (2) Non-blocking: the setting-line test could also assert the Why mark is a details element, reachable by keyboard.
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.).
Slug, Access and Preview data on Settings › App are now one
.setting-lineeach: label, control and thewhy()mark. I haven't loaded the pull's preview, so the 200 on/and/preview-admin/sample/settings/appis unchecked. I did not touchforge.jsonlooksortest/forge-looks.test.ts.What changed
src/web/ui.ts:fieldandselectFieldtake an optionalwhy. With it, the field renders as a.setting-linewith thewhy()mark,hintis not drawn, and an error sits on its own row after the mark.aria-describedbynameswhy-<name>andf-<name>-err. Withoutwhy, the markup is the same as before; the new test checks the hint span and the absence ofsetting-line.src/web/pages/settings.ts: the three call sites pass their oldhinttext aswhy. 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 takesflex: 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 withoutwhyand the error row andaria-describedbywith it.Checks
test/settings-lines.test.tspasses (4 tests);bun scripts/design-lint.tsis clean.src/web/ui.tsandsrc/web/pages/settings.tstaken from main.bun x tsc --noEmitandbun scripts/gate.ts --fixare clean. I also rantest/app-settings-page.test.tsandtest/settings.test.ts, which pass.scripts/fast.tsnamed 2252 of 3393 test files, so I did not run those. The forge's full check on the push covers them.Not done
Try:line, so the commit message carries one.Try it: open
/<owner>/<repo>/settings/appand tap the Why mark beside Slug, Access or Preview data.🤖 Generated with Claude Code
Closes #13370