Skip to content

Make the login form explain itself, and correct release claims in the audit - #97

Merged
IanMayo merged 2 commits into
mainfrom
claude/dormant-project-consolidation-q5qpr9
Sep 5, 2026
Merged

IanMayo merged 2 commits into
mainfrom
claude/dormant-project-consolidation-q5qpr9

Conversation

@IanMayo

@IanMayo IanMayo commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Three changes. The first two came from a report that the gh-pages demo showed login controls but the Login button could not be enabled.

The Login button gave no reason for being disabled

The form was not broken. The button is disabled until name, service ID and a 4-digit PIN are all valid. The PIN is easy to miss: a narrow box whose placeholder said only "PIN", while the other two fields carry worked examples like "Name (J Smith)".

The real problem was silence. Validation messages exist, but they only run on submit, and submit is unreachable precisely because the button is disabled. Pressing Enter does not help either, since a disabled submit button blocks implicit submission.

Verified in a browser against the deployed content. In every one of these states the button stayed disabled and nothing at all was displayed:

Input Button Message shown
Name + Service ID, no PIN disabled none
3-digit PIN disabled none
Service ID containing a space disabled none
Service ID over 10 characters disabled none

The form now shows the first outstanding validation message live, so "PIN required" and "PIN must be exactly 4 digits" appear as you type. A pristine form stays quiet rather than scolding someone before they have typed anything. The PIN field also gains a title tooltip alongside its existing aria-label.

Deliberately not done: widening the PIN field. I proposed a "PIN (4 digits)" placeholder, then measured it. The header bar has roughly 4px of slack at 1280px: a 45px field fits on one row, 50px pushes the Instructor button onto a second row. Widening it regressed the header from 81px to 105px tall. The hint carries the rule instead, and the header is exactly the height it was.

Closes #91

The login help popup said "Provide a new PIN" without stating the length, while the field's aria-label and the validation error both say "4-digit". Now the guidance agrees with them.

Corrects a factual error in the consolidation audit

docs/PROJECT_STATE.md claimed the release workflow had never run and that no tag had ever been pushed. That is false. Tag v0.2.0 and a GitHub Release, with sonar-quiz.iife.js and its source map attached, were published by that workflow on 2025-11-29.

The error came from reading git tag in a clone whose fetch refspec is +refs/heads/*:refs/remotes/origin/* — heads only, no tags — and concluding from the empty local list that no releases existed, without checking the remote.

Rather than edit it away silently, the report carries a correction notice recording the mistake and how to verify properly. Backlog item 17 is withdrawn rather than marked done, because its premise was wrong. This nearly caused a bad action: the next planned step was to tag v0.2.0 on main, which would have collided with an existing tag that has a published release attached.

What remains on releases: package.json still says 0.2.0, the version already released in November, so all the consolidation work is unreleased. Publishing it needs a version bump, and the number is the owner's call.

Verification

Check Result
typecheck, lint, format pass
unit + coverage 883 tests, thresholds pass
integration + coverage 84 tests, thresholds pass
E2E default 105 passed, 6 skipped, 0 failed
E2E ENCRYPT_STORAGE=true 110 passed, 1 skipped, 0 failed
Storybook build pass
bundle size 39.36 KB gzip, limit 40 KB
header layout at 1280px 81px tall, unchanged from before

Headroom is down to 0.64 KB. That is the constraint to watch on the next change.

🤖 Generated with Claude Code

https://claude.ai/code/session_015u1mfVebscuZA3YDc6hc87

…claims

Closes #91: the login help popup said "Provide a new PIN" without giving
the length, while the input's aria-label and the validation error both
say "4-digit". Only the guidance was inconsistent.

Also corrects a factual error in docs/PROJECT_STATE.md. The report
claimed the release workflow had never run and no tag had ever been
pushed. Tag v0.2.0 and a GitHub Release with both bundle assets were
published by that workflow on 2025-11-29. The error came from reading
`git tag` in a clone whose fetch refspec covers refs/heads only, so no
tags were present locally, and concluding from that empty list that no
releases existed. A correction notice at the top of the report records
the mistake and how to check properly (git ls-remote --tags, or the
Releases API). Backlog item 17 is withdrawn rather than marked done,
since its premise was wrong; what remains is a version bump for the
unreleased work, which is the owner's decision.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015u1mfVebscuZA3YDc6hc87
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

🚀 PR Preview Deployment

✅ Your changes are being built and deployed to a preview environment.

📋 Live PR Preview Links:

ℹ️ About PR Previews:

📦 Production Demo (main branch):

🧪 Testing Locally:

npm install
npm run build
# Open demo/quiz-index.html in your browser (use file:// or http-server)

This comment will be automatically updated when you push new commits.

github-actions Bot added a commit that referenced this pull request Sep 5, 2026
Reported from the gh-pages demo: the login controls were visible but the
Login button could not be enabled.

The form was not broken. The button is disabled until name, service ID
and a 4-digit PIN are all valid, and the PIN is easy to miss: it is a
narrow unlabelled box whose placeholder said only "PIN", while the other
two fields carry worked examples. Worse, an invalid form gave no
feedback at all. The validation messages exist but only run on submit,
and submit is unreachable precisely because the button is disabled;
pressing Enter does not help either, since a disabled submit button
blocks implicit submission. Verified in a browser: with no PIN, a
3-digit PIN, a service ID containing a space, or a service ID over ten
characters, the button stayed disabled and nothing was displayed.

The form now shows the first outstanding validation message live, so
"PIN required" and "PIN must be exactly 4 digits" appear as the user
types. A pristine form stays quiet rather than scolding someone before
they have typed anything. The PIN field also gains a title tooltip to
go with its existing aria-label.

Not done, deliberately: widening the PIN field to fit a "PIN (4 digits)"
placeholder. Measured in a browser, the header bar has about 4px of
slack at 1280px, so 45px of field width fits on one row and 50px pushes
the Instructor button onto a second row. The hint carries the rule
instead, and the header layout is byte-for-byte the height it was.

Bundle 39.36 KB gzip against the 40 KB limit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015u1mfVebscuZA3YDc6hc87
@IanMayo IanMayo changed the title Specify 4-digit PIN in login guidance, correct release claims in the audit Make the login form explain itself, and correct release claims in the audit Sep 5, 2026
github-actions Bot added a commit that referenced this pull request Sep 5, 2026
@IanMayo
IanMayo merged commit 70fa999 into main Sep 5, 2026
9 checks passed
@IanMayo
IanMayo deleted the claude/dormant-project-consolidation-q5qpr9 branch September 5, 2026 15:16
github-actions Bot added a commit that referenced this pull request Sep 5, 2026
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.

Guidance needs to specify 4-digit PIN

2 participants