Skip to content

feat(site): Redirect old links, flag offline forms, credit partners - #13

Merged
WillieCubed merged 3 commits into
mainfrom
feat/lvwwd-backlog-launch
Sep 24, 2026
Merged

WillieCubed merged 3 commits into
mainfrom
feat/lvwwd-backlog-launch

Conversation

@WillieCubed

Copy link
Copy Markdown
Contributor

TL;DR

Old lvwwd.org links now land on the right page instead of a 404, forms tell a rider on a bus with no
signal that nothing was sent, and a partner's sign-up is now credited to the link that brought it,
with one tablet able to sign up person after person.

Overview of Changes

Old links keep working

The campaign was shared as lvwwd.org/wwd, www.lvwwd.org and section links of the old one-page site,
such as lvwwd.org/#giveaway. The Worker now sends /wwd and /wwd/ to Home with one permanent redirect,
and any page address that ends in a slash to the address without it, keeping the query string, so
/giveaway/?ref=x becomes /giveaway?ref=x. A request never takes more than one redirect. The API and
admin views keep their own addresses, and a form being submitted is never redirected. Since browsers
never send the part of a URL after #, a small script in Home's head sends the four old section
links (giveaway, resources, partners, take part) to their new pages, replacing the address so Back
returns to where the visitor came from.

Forms say plainly when there's no connection

On a bus the signal comes and goes. Before this, tapping "Sign up" or sending a trip with no
connection did nothing visible, and a screen reader said nothing, so a person could believe they
were signed up or counted when they were not. A small shared script now watches the phone's online
status on Sign up, My week and Get my link. While offline, each form that needs a connection shows a
notice above its buttons and dims them with aria-disabled; a tap sends nothing and the notice is
read again, but what the visitor typed, picked or attached stays in place. When the connection
returns, the notice goes and screen readers hear "You're back online." A personal link opened
offline gets the saved offline page, which now says to open the link again and retries by itself
once the phone reconnects.

Partner credit and one tablet, many sign-ups

Partner groups reach people LVBT can't, and their volunteers sign people up in person at libraries,
meetings and campus tables. A partner's link or QR code adds ?ref=<short name> to any page; the
header script keeps it for that browser tab, the last one opened wins, and the sign-up form sends it
along. The Worker matches it against the partner roster, ignoring capital letters, and saves it on
the new sign-up — a name that matches no partner is dropped, and nothing on the page names the
partner. The credit never changes afterward: editing details, a later partner link, or signing up
again with the same contact leaves it as it was. The admin page lists every roster partner with its
count of sign-ups.

A signed-in tablet at a table now offers "Sign up someone else" on the sign-up page and at the foot
of My week. It signs the device out, clears the last person's bingo card from it, and shows the
empty form with "Ready for the next person. The last sign-up is saved," moving focus there so a
screen reader announces it. Without a connection the tablet stays signed in and reports that it
couldn't reach the server. Sign-ups made this way are marked as from a shared device, for the
newsletter sign-up to record later, and the button disappears once sign-up closes.

Because one Wi-Fi address at a library table now sends many sign-ups, the rate limit changed from 5
an hour to 20 tries a minute per connection, with "Too many tries. Wait a minute, then try again."
Migration 0005 adds the two new columns; the Worker writes them after the sign-up and never lets
them block it, so lvwwd.org keeps taking sign-ups until the migration is applied. The Privacy page
now lists both fields and what the browser tab keeps.

Follow-ups

None.

🤖 Generated with Claude Code

WillieCubed and others added 3 commits September 23, 2026 18:52
The campaign was shared as lvwwd.org/wwd, www.lvwwd.org and section
links of the old one-page site, such as lvwwd.org/#giveaway. Those
would now show the page-not-found page or the wrong page.

The Worker answers /wwd and /wwd/ with one permanent redirect to Home,
and any page address that ends in a slash with one to the address
without it, keeping the query, so /giveaway/?ref=x becomes
/giveaway?ref=x. www.lvwwd.org already went to the apex; a request now
gets at most one redirect, so www.lvwwd.org/wwd/ lands on Home in one
step. The API and the admin views keep their own addresses, and a form
being sent is never redirected.

Browsers never send the part after #, so a small script in the head of
Home sends the four old section links to Take part, Win prizes,
Resources and Partners. It replaces the address, so Back returns to
where the visitor came from. Other section links, or none, stay on
Home, and without JavaScript Home opens as before.

The API preview Worker now sees every request first, as lvwwd.org does,
so the redirects can be tried there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a bus the signal comes and goes. Before this, tapping "Sign up" or
sending a trip with no connection did nothing visible, and a screen
reader said nothing, so a person could think they were signed up or
counted when they were not.

A small shared script now watches the phone's online status on Sign up,
My week and Get my link. While the phone is offline, each form that
needs a connection shows a short notice directly above its buttons, and
those buttons are dimmed with aria-disabled: they can still be reached
with Tab, but a tap sends nothing and the notice is read again. What the
visitor typed, picked or attached stays as it is. When the connection
returns, the notices go and screen readers hear "You're back online."

The notices cover the sign-up form, editing details, today's trip, the
reminder choices, "Send my link again" and Get my link. They stop once
sign-up and trips end on October 9, and reminders on October 8 at 8 am.
A personal "Open my week" link opened offline gets the saved offline
page, which now says to open the link again and tries it by itself once
the phone is back online.

The script is about 1 KB gzipped and makes no requests, so the Content
Security Policy is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Partner groups reach people LVBT can't, and their volunteers sign people
up in person at libraries, meetings and campus tables. This credits each
sign-up to the partner whose link brought it, and lets a volunteer sign
up one person after another on one tablet.

Partner credit. A partner's link or QR code adds ?ref=<short name> to
any page. The header script keeps it for that browser tab only, the last
one opened wins, and the sign-up form sends it along. The Worker matches
it against the partner roster, ignoring capital letters, and saves it on
the new sign-up; a name that matches no partner is dropped, and nothing
on the page mentions the partner. The credit never changes: editing
details, a later partner link, or signing up again with the same contact
leaves it as it was. The admin page lists every partner on the roster
with its count of sign-ups.

Sign up someone else. A signed-in phone sees "You're signed up, <first
name>." on the sign-up page, then "Signing up someone else?" and a
"Sign up someone else" button; the same button sits at the foot of My
week. It signs the device out, clears the last person's bingo card from
it, and shows the empty form with "Ready for the next person. The last
sign-up is saved." The focus moves to that line, so screen readers read
it and the next Tab reaches First name. Without a connection the tablet
stays signed in and says it couldn't reach the server. Sign-ups made
after the first tap in that tab are marked as from a shared device, for
the newsletter sign-up to record. The button goes when sign-up closes.

A table on a library's Wi-Fi sends many sign-ups from one address, so
sign-up now allows 20 tries a minute from one connection instead of 5
an hour, and says "Too many tries. Wait a minute, then try again."
Rate-limit windows now count minutes, so the daily cleanup drops old
windows of every length with one comparison.

Migration 0005 adds the two columns. The Worker writes them after the
sign-up and never lets them block it, and the admin page reads the
partner counts on their own, so lvwwd.org keeps taking sign-ups until
the migration is applied. The Privacy page now lists both, and says what
the browser tab keeps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@WillieCubed
WillieCubed merged commit f644252 into main Sep 24, 2026
1 check passed
@WillieCubed
WillieCubed deleted the feat/lvwwd-backlog-launch branch September 28, 2026 03:32
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.

1 participant