Skip to content

Empty the signup header's status message 5 seconds after it's said - #731

Merged
richshaw merged 2 commits into
mainfrom
claude/issue-655-clear-header-status
Oct 31, 2026
Merged

richshaw merged 2 commits into
mainfrom
claude/issue-655-clear-header-status

Conversation

@richshaw

@richshaw richshaw commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Fixes #655.

The problem

The signup header has one hidden live region (HeaderAnnouncer) that says "Closed. People can’t sign up now.", "Reopened. People can sign up again.", "Published. Anyone with the link can sign up now." and "Publish and share when you’re ready." Nothing ever cleared it, so a screen reader read the message as it arrived, and someone then reading the page line by line met it a second time.

The fix

  • src/components/signup/HeaderAnnouncer.tsx: an effect on the region's state starts a timer whenever it holds a message, and empties the text SAID_FOR_MS (5,000 ms) later. A new message changes the state, so the old timer is cleared and the wait starts again. Unmounting clears it too.
  • Emptying keeps the counter, and saying something adds one, so the span's key still changes for each message: the same words said twice are a new node and are read again.
  • It covers all four messages, since they share the one region, as the issue chose.
  • CHANGELOG line under Unreleased › Changed.

No help page quotes these messages (checked src/help), and nothing on screen changes.

Tests

  • HeaderAnnouncer.test.tsx, with fake timers: the region still holds a message at 4,999 ms and is empty at 5,000 ms; Close signup's message empties the same way; a second message 4 s after the first restarts the wait; the same words said after the region emptied are a new node; and unmounting leaves no timer behind. With the clearing stubbed out, the first three fail.
  • The e2e checks in organizer.spec.ts and help/create-and-publish-a-signup.spec.ts read the region as soon as the change lands, well inside 5 s; CI runs them.
  • Ran pnpm lint && pnpm typecheck && pnpm knip && pnpm test: all pass (160 files, 2,026 tests).

🤖 Generated with Claude Code

https://claude.ai/code/session_016YZ9SToFLoLxxqWuuu9dzf

The header's hidden live region kept its last message until the next one
replaced it, so a screen reader user reading the page line by line met
"Closed. People can't sign up now." and the like a second time. Each
message now empties the region 5 seconds later; a new message restarts
the wait, and the counter in the span's key still makes the same words
said twice a new node.

Fixes #655.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SToFLoLxxqWuuu9dzf
@richshaw richshaw added pipeline:ux Changes what a person using OpenSignup sees or does pipeline:working A session is working on it right now labels Oct 30, 2026 — with Claude
@richshaw
richshaw requested a balanced review from Copilot October 30, 2026 14:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@richshaw richshaw added pipeline:tophat pipeline:working A session is working on it right now and removed pipeline:working A session is working on it right now labels Oct 30, 2026 — with Claude

Copy link
Copy Markdown
Owner Author

Tophat: passed

I ran 38dd7a9 locally with pnpm dev, Postgres 16, and Chromium at 1280×900 and 390×844. I didn't run the worker, because nothing here touches jobs or email. For "before" I ran the PR's base, main at 4020778, on the same database. All data was made up: pat@example.com owns "Snack duty — Spring season" with one slot, "Fruit and water", 2 spots.

The region is screen-reader only, so I read it in the page. A MutationObserver on the header's p[role=status] logged each change to its text with a performance.now() timestamp.

Check Result What I saw
Before (main): Reopen signup, then Close signup, desktop ✅ bug reproduced "Reopened. People can sign up again." was still in the region 8 s later. After Close, "Closed. People can’t sign up now." was still there 8 s later. Nothing emptied it (731-before-desktop-reopened)
After: Publish and share, desktop ✅ "Published. Anyone with the link can sign up now." was there as the share panel opened, still there about 3 s later, and empty about 6 s later (731-after-desktop-published)
After: Close signup, desktop ✅ "Closed. People can’t sign up now." at 2014 ms, empty at 7015 ms: 5.0 s (731-after-desktop-closed)
After: a second message inside the 5 s ✅ Reopen at 8610 ms, then Close at 10695 ms, about 2 s later. The region didn't empty at 13610 ms, Reopen's deadline. It emptied at 15700 ms, 5.0 s after the Close message
Phone, 390×844: Reopen and Close in the ⋯ sheet ✅ "Reopened…" at 2045 ms, empty at 7046 ms. "Closed…" at 8489 ms, empty at 13490 ms. Page width is 390, so nothing scrolls sideways (731-after-phone-reopened)
Neighbours: the closed box, pills, Reopen beside Preview ✅ unchanged The Signup closed box, the open/closed pill and Reopen signup behaved as before on both widths. The screen looks the same as on main
Unit tests, console, server log ✅ pnpm test src/components/signup: 10 files, 125 tests pass. No browser console errors. The only server-log errors are the health check's pgboss.job probe, because no worker was running

I didn't check "Publish and share when you’re ready." by hand. It goes through the same say and region, and the unit tests cover the timer for any message. I didn't test with a real screen reader. The e2e checks that read the region right after a change are green in CI on this head.

For the owner (UX): nothing on screen changes. For screen-reader users, the hidden status message that says "Closed…", "Reopened…" or "Published…" now empties 5 seconds after it's said, so someone reading the page line by line afterwards doesn't hear it again. A new message restarts the 5 seconds. There are no before/after screenshots to compare, because the region is never visible. The timings in the table are the evidence.

Screenshots are in https://claude.ai/code/session_016YZ9SVxHrBKSFp3E4KHL3q.


Generated by Claude Code

@richshaw richshaw added pipeline:review pipeline:working A session is working on it right now and removed pipeline:tophat pipeline:working A session is working on it right now labels Oct 30, 2026 — with Claude

@richshaw richshaw left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: passed (round 1)

The signup header's hidden live region now empties 5 seconds after each message. The change is one effect in HeaderAnnouncer: whenever said holds text, it starts a SAID_FOR_MS timer that sets the text to '' and keeps the counter. Each say() makes a new said tuple, so the effect's cleanup clears the old timer and a new message restarts the wait. Emptying returns early, so it doesn't schedule another timer, and unmounting clears the pending one. Because emptying keeps the counter and say() adds one, the span's key still changes for every message, so the same words said after the region emptied are a new node and get read again. All four messages go through the same say: Close and Reopen through the status effect, Published through ShareScope, and "Publish and share when you’re ready." through PublishButton. So one timer covers every message, as the issue chose. Every "Done when" item in #655 is met. The new fake-timer tests check 4,999 ms against 5,000 ms, Close signup's message, the restart, the same words said twice as a new node, and that no timer is left after unmount. The e2e checks that read the region are green in CI. CHANGELOG has a line under Unreleased › Changed.

Blocking (0)
Optional (0)
Earlier threads: none. Copilot couldn't review (quota).
Checks: CI is green on 38dd7a9 (lint-type-test, e2e, CodeQL). The tophat passed on 38dd7a9, the current head, so no runtime code has changed since. Locally I read the diff against the whole of HeaderAnnouncer.tsx and its two useAnnounce callers. I searched src/help, tests and docs for the four messages: only organizer.spec.ts and the close-or-reopen walkthrough read them, and both read the region right after the change. I also went through the repo checklist. None of it applies beyond the component: no schema, no policy, no new public-page JS.

Gate: owner (UX). Nothing on screen changes. For screen-reader users, the hidden "Closed…", "Reopened…", "Published…" and "Publish and share…" messages now empty after 5 seconds. Since the region is invisible, there are no before/after screenshots. The tophat's timing table is the evidence.

Session: https://claude.ai/code/session_016YZ9SSNrsRZZrFDwaYDcQc


Generated by Claude Code

@richshaw richshaw added pipeline:owner Passed; waits for the owner (UX or high-risk) and removed pipeline:review pipeline:working A session is working on it right now labels Oct 30, 2026 — with Claude
@richshaw richshaw added pipeline:merge and removed pipeline:owner Passed; waits for the owner (UX or high-risk) labels Oct 30, 2026
@richshaw richshaw added the pipeline:working A session is working on it right now label Oct 30, 2026 — with Claude

Copy link
Copy Markdown
Owner Author

Approved by the owner at 38dd7a9.

Session: https://claude.ai/code/session_016YZ9SThuP4f9EqPuXJxbzJ


Generated by Claude Code

@richshaw richshaw added pipeline:fix and removed pipeline:merge pipeline:working A session is working on it right now labels Oct 30, 2026 — with Claude

Copy link
Copy Markdown
Owner Author

Not merged. One gate failed at 38dd7a9:

  • Merge conflict: mergeable_state is dirty against current main.

Everything else passed: main green, CI green on 38dd7a9, review and tophat passed on this head, no open threads. Moved to pipeline:fix. The owner approval above carries over if the fix is only a merge from main.

Session: https://claude.ai/code/session_016YZ9SThuP4f9EqPuXJxbzJ


Generated by Claude Code

@richshaw richshaw added the pipeline:working A session is working on it right now label Oct 31, 2026 — with Claude
Resolves the CHANGELOG conflict by keeping both sides' entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SSQfXAGhADZNvVZqib

Copy link
Copy Markdown
Owner Author

Merged main into the branch in df44e07 to clear the merge conflict.

When CI is green on df44e07, this goes to pipeline:merge.

Session: https://claude.ai/code/session_016YZ9SSQfXAGhADZNvVZqib


Generated by Claude Code

@richshaw richshaw removed pipeline:fix pipeline:working A session is working on it right now labels Oct 31, 2026 — with Claude
@richshaw richshaw added pipeline:merge pipeline:working A session is working on it right now labels Oct 31, 2026 — with Claude

Copy link
Copy Markdown
Owner Author

Approved by the owner at df44e07 (carried over from 38dd7a9: the only change since is a merge from main).

Session: https://claude.ai/code/session_016YZ9SWMjmNQ6yBQBRQ7xLD


Generated by Claude Code

@richshaw
richshaw merged commit fe1c456 into main Oct 31, 2026
5 checks passed
@richshaw
richshaw deleted the claude/issue-655-clear-header-status branch October 31, 2026 01:24
@richshaw richshaw removed pipeline:merge pipeline:ux Changes what a person using OpenSignup sees or does pipeline:working A session is working on it right now labels Oct 31, 2026 — with Claude
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.

The signup header's status message stays on the page after it's read out

3 participants