Skip to content

Say what the login form layout does, not what it replaced - #41

Merged
JeroenDeDauw merged 1 commit into
masterfrom
simplify/code-login-primary
Sep 3, 2026
Merged

JeroenDeDauw merged 1 commit into
masterfrom
simplify/code-login-primary

Conversation

@JeroenDeDauw

Copy link
Copy Markdown
Member

Follows-up to #40

Three comments and a test name described the login form as it was before that pull request rather
than as it is: the watermark "led the form while nothing was described below zero", core's button
had to be demoted "now that" the form recommends the member route, and a test was named for that
button no longer being primary. A reader of master cannot check any of it, and the mechanism that
makes the code necessary — an unweighted field sinks under a section weighted below zero — was left
implied. Each now states that mechanism in the present tense.

Two smaller ones. PASSWORD_FIELD and PASSWORD_LOGIN_BUTTON shared one gloss though they answer
different questions, and they disagree on a wiki whose only other route is single sign-on, where the
divider is suppressed while the demotion still fires. And LoginCodeRequest asserts that the form's
first button names no route without pointing at what makes that true.

Comments only: the code tokens of both source files are unchanged and the stylesheet is untouched,
so the rendered form cannot differ.

Considered, omitted:

  • Deleting testDefaultButtonIsLeftOutOfTheTabOrder, which no mutation reddens on its own. It names
    a promise a reader would look for, and dropping a test to save three lines is a poor trade.
  • Folding the mfLogo re-weight into CAPTCHA_WEIGHTS, or a shared helper for the two: two call
    sites with different guards and different reasons.
  • Reusing fallbackLine() for the hidden submit field: would add a parameter for one caller and
    rename the concept.
  • Renaming testMobileWatermarkGoesOnLeadingTheForm: "goes on" reads as the invariant the handler
    preserves, matching testCollectedFieldStaysBelowTheButtonThatEntersTheCode beside it.
  • The five negative weight constants, the single-assignment private method, and the field-name
    constants: each follows a convention the class already had.

AI-authored — Claude Code, Opus 5 (max); simplify skill run on a detailed brief from @JeroenDeDauw, no course corrections; diff not yet human-reviewed; review run as four subagents, the change proven comment-only by comparing PHP code tokens, phpcs, phpstan and PHPUnit green locally, and the renamed test checked against a mutation of the code it covers.

Follows-up to #40

Three comments and a test name described the login form as it was before that pull request rather
than as it is: the watermark "led the form while nothing was described below zero", core's button
had to be demoted "now that" the form recommends the member route, and a test was named for that
button no longer being primary. A reader of master cannot check any of it, and the mechanism that
makes the code necessary — an unweighted field sinks under a section weighted below zero — was left
implied. Each now states that mechanism in the present tense.

Two smaller ones. `PASSWORD_FIELD` and `PASSWORD_LOGIN_BUTTON` shared one gloss though they answer
different questions, and they disagree on a wiki whose only other route is single sign-on, where the
divider is suppressed while the demotion still fires. And `LoginCodeRequest` asserts that the form's
first button names no route without pointing at what makes that true.

Comments only: the code tokens of both source files are unchanged and the stylesheet is untouched,
so the rendered form cannot differ.

Considered, omitted:

* Deleting `testDefaultButtonIsLeftOutOfTheTabOrder`, which no mutation reddens on its own. It names
  a promise a reader would look for, and dropping a test to save three lines is a poor trade.
* Folding the `mfLogo` re-weight into `CAPTCHA_WEIGHTS`, or a shared helper for the two: two call
  sites with different guards and different reasons.
* Reusing `fallbackLine()` for the hidden submit field: would add a parameter for one caller and
  rename the concept.
* Renaming `testMobileWatermarkGoesOnLeadingTheForm`: "goes on" reads as the invariant the handler
  preserves, matching `testCollectedFieldStaysBelowTheButtonThatEntersTheCode` beside it.
* The five negative weight constants, the single-assignment private method, and the field-name
  constants: each follows a convention the class already had.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.71%. Comparing base (e53204d) to head (9772a66).

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #41   +/-   ##
=========================================
  Coverage     87.71%   87.71%           
  Complexity      634      634           
=========================================
  Files            71       71           
  Lines          2239     2239           
=========================================
  Hits           1964     1964           
  Misses          275      275           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JeroenDeDauw
JeroenDeDauw marked this pull request as ready for review September 3, 2026 23:59
@JeroenDeDauw
JeroenDeDauw merged commit 1206ad7 into master Sep 3, 2026
6 checks passed
@JeroenDeDauw
JeroenDeDauw deleted the simplify/code-login-primary branch September 3, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants