The queue (COMMENT_REQUEST_DELAY=1000ms) was causing all comment loads to
wait 1 second regardless of context. Comments are always user-triggered
(toggle click, modal open, post submit) so batching was pointless overhead.
- loadComments() now does a direct async fetch — no queue, no delay
- submitComment() optimistically renders the new comment instantly (faded)
then replaces with real server data once the POST confirms
- Remove batchLoadComments, queueCommentLoad, updateCommentCount, and all
queue machinery (commentRequestQueue, commentRequestTimeout, etc.)
- Toggle arrow direction preserved during count updates
- All containers updated via querySelectorAll (feed card + modal)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove custom-copy-button (relied on missing image file) and share-img-btn
(emoji clashed with monospace aesthetic). Replace both with .card-action-btn
text buttons: 'share ↗' and 'card ↗' — monospace, grey, pink on hover,
consistent with the rest of the card UI.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SVG: clean two-zone layout — dark header with RADICAL wordmark + PETITION
badge, full-width text area with left accent bar and large quote mark,
footer band with signature count, author, date and CTA. Proper word-wrap
centred in the card. Looks like a real share card now.
Remove flag button and handleFlag from proposal cards entirely.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- commentRequestTimeout never reset to null — comments only loaded once ever
- querySelector missed modal containers when same proposal was in feed + modal
- Switch to querySelectorAll so feed card and modal both update simultaneously
- Toggle count now updates on load (not just after posting)
- Remove two duplicate loadComments and submitComment definitions
- Simplify loadModalComments to delegate to loadComments
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The 🔐 emoji was rendering taller than surrounding text causing the
link to appear oversized. Removed emoji and login-link class entirely;
.footer-links a already handles all the needed styling.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace email-only capture with full AEC membership modal (name, DOB,
address, suburb, state, postcode, email, phone, electoral roll consent)
- Trigger modal on first upvote (petition signature) OR after 3rd vote
- Modal posts to /api/join and emails details to party contact
- localStorage 'radical_member_joined' tracks completion/dismiss per device
- Shrink .login-link to match other footer links (was pink button, now text)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces dead 'About Us' footer link with a real section explaining RADICAL's
single goal: pass one law so 100k signatures forces a binding referendum.
Includes Switzerland comparison (working since 1891), four-step plan, and
styled to match the rest of the site.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add /api/join worker endpoint that emails membership details to party contact
- Register /api/login route (was missing — emoji login was broken)
- Add full AEC-compliant member registration form in index.html (#join section)
- Update copyright year to 2026 in index.html and login.html
- Fix dictator/target image URLs: radical.omar-c29.workers.dev → theradicalparty.com
- Add onerror handlers to all login page images for graceful degradation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
safeFetch already returns parsed JSON and throws on non-2xx — callers were
treating the result as a Response object and checking .ok / .json(), which
made votes, comment votes, and comment posts silently fail every time.
Also: fetchProposals was missing cache:'no-store' so newly posted proposals
were invisible until the 24hr browser cache expired; getProposals was sending
24hr Cache-Control so Cloudflare CDN served stale data; getShareableImageUrl
had a double slash (/api//petition-svg); wrangler.toml had an invalid [pages]
stanza that caused a warning on every deploy.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>