Skip to content

Say when no new code went out - #229

Open
nursoda wants to merge 1 commit into
feature/name-the-masked-addressfrom
feature/say-when-no-new-code-went-out
Open

Say when no new code went out#229
nursoda wants to merge 1 commit into
feature/name-the-masked-addressfrom
feature/say-when-no-new-code-went-out

Conversation

@nursoda

@nursoda nursoda commented Aug 27, 2026

Copy link
Copy Markdown
Member

The challenge page sends a code only when none is stored, so a reload does not mail a
new one every time. What the page does not say is that this happened. It reads "Enter
the authentication code that was sent to a*@*.org:"
, which is true of a code from
several minutes ago just as much as of one sent a second ago — so someone whose mail is
slow, or who never received the earlier one, waits for a mail that is not coming.

One sentence appears now whenever no new code went out:

No new code was sent, because an earlier one is still valid. If it did not arrive, ask
for a new one.

The resend link right below it is what that last half refers to; while its cooldown runs,
the same line shows the countdown, so the way out is visible either way.

It is a sentence of its own rather than a longer version of the one above it. That one is
translated into twenty-odd languages, and rewording it would drop every one of those
translations back to English for a string that is not wrong — only incomplete.

Two things worth knowing

The sentence names the resend link by the words it carries, through a placeholder, so the
two cannot drift apart in a translation. During the cooldown that link is hidden and a
countdown stands in its place, so for up to a minute the sentence points at something not
yet on the page — the countdown right there says when it will be. Accepted rather than
worked around: hiding the explanation for that minute would leave the user with no reason
at all for the missing mail.

Once a resend succeeds the line is wrong — a new code just went out — so the click
handler removes it. A failed send leaves it standing, because then the earlier code is
still the only one. Both branches have a test.

Checked

  • shown against a real Nextcloud 34: the line appears on the second load of the challenge
    page and not on the first
  • stylelint and php-cs-fixer clean

Merge order

Based on #215, whose wording it extends, so that one goes first. The 3.3 counterpart is
a separate PR on #218; there the sentence matters more, because that line keeps the event
listener and cannot notice a changed notification address at all.

🤖 Generated with Claude Code, verified, tweaked and approved by @nursoda.

@nursoda nursoda added the php Pull requests that update php code label Aug 27, 2026
@nursoda nursoda self-assigned this Aug 27, 2026
@nursoda
nursoda requested a review from seyfahni August 27, 2026 23:51
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@nursoda
nursoda force-pushed the feature/say-when-no-new-code-went-out branch from a4ff408 to e137b87 Compare August 28, 2026 00:16
The challenge page sends a code only when none is stored, so a reload does not mail
a new one every time. It never said so. "Enter the authentication code that was sent
to a*@*.org" is true of a code from nine minutes ago just as much as of one sent a
second ago, so someone whose mail is slow, or who never received the earlier one,
waits for a mail that is not coming.

One sentence now appears whenever no new code went out, naming the reason and
pointing at the resend link below it. While that link's cooldown runs, the same line
shows a countdown, so the way out is visible either way.

It is a sentence of its own rather than a longer version of the one above. That one
is translated into twenty-odd languages, and rewording it would drop every one of
those translations back to English for a string that is not wrong, only incomplete.

The smoke test asks for both halves: the sentence is absent on the first load and
present on the reload, and the mail count right below shows the reload sent nothing.

Once a resend succeeds the line is wrong — a new code just went out — so the click
handler removes it, and only a fresh render can bring it back. A failed send leaves it
standing, because then the earlier code is still the only one. Both branches are
covered.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Olav Seyfarth <olav@seyfarth.de>
@nursoda
nursoda force-pushed the feature/say-when-no-new-code-went-out branch from e137b87 to 22b66ed Compare August 28, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

php Pull requests that update php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant