Skip to content

Feature/your popup - #42

Merged
codepurse merged 4 commits into
mainfrom
feature/your-popup
Nov 1, 2026
Merged

codepurse merged 4 commits into
mainfrom
feature/your-popup

Conversation

@codepurse

Copy link
Copy Markdown
Owner

Summary

Four Supporter changes. Every protection stays free and works the same; nothing here touches blocking.

Your popup (Supporter)

  • Supporters choose what the popup's top band leads with: Tonight, a streak, money kept, this month, their own words, or just the name, with an option to put the Seal first while one runs.
  • They can also choose what sits under it, reorder the popup's sections, tuck sections away, and leave individual Filters switches out.
  • This repo applies the arrangement (popup/popup.js) and adds the settings markup and styles. The logic and the editor live in the private repo; pro/popup.js here is an empty stand-in.
  • Without a licence, the popup looks exactly as it did before.

Hardening

  • build-pro.mjs minifies every Supporter file in builds that carry it (esbuild).
  • build-firefox.ps1 -Zip also writes dist/sieve-firefox-source.zip for Firefox Add-ons reviewers. Upload it with the package; never publish it.
  • A licence opens Supporter only if Polar actually confirmed it. It needs checkedAt, a check no more than a day in the future, and the live benefit id. A licence typed into storage by hand is checked with Polar at once.

The Supporter plate in the sidebar

  • The sidebar's Supporter entry is now a pine plate.
  • Before buying, it reads "Stay stopped." with the price. After buying, it reads "Thank you." with a supporter number taken from the end of the key.
  • It folds into a pine tab on narrow windows.

Refunds stick

  • Before this, the weekly licence check ran only while Settings was open, and an unanswered check kept Supporter on forever. A refunded buyer who never reopened Settings, or who blocked api.polar.sh, kept Supporter.
  • Now, as in BlockNSFW, a key Polar hasn't confirmed in 30 days pauses Supporter until Polar answers again. Nothing is lost, and the heads-up follows the same rule.
  • background/licence-check.js repeats the check on a 6-hour timer. It never runs from the popup or the block page, because its timing would tell Polar what someone was doing.
  • A paused key is never offered for sale. Settings shows a "Paused" badge with a reason and a Check again button, which also handles Firefox permission that was taken back. The plate, the group notes, the popup and Your progress all say "paused".
  • PRIVACY.md now describes when the check runs and the 30-day pause (updated October 31).

Merge order

Merge codepurse/Sieve-pro feature/your-popup first, the same day. It has the real pro/popup.js that the stand-in here expects.

Testing

  • npm test: 902 pass.
  • npm run test:pro: 70 pass.
  • Checked in headless Edge with a dev build:
    • Your popup's leads, drag and keyboard reordering, and tucking.
    • The plate before buying, after buying, on its page, in dark mode, and narrow.
    • Forged licences refused.
    • With api.polar.sh blocked: paused everywhere, nothing offered for sale.
    • With Polar reachable: the timer fired and the live Polar refused a made-up key.
  • CI still builds with -OpenSource, so it never needs or minifies Supporter.

codepurse and others added 4 commits October 31, 2026 12:03
With Sieve Supporter, the toolbar popup's band can lead with tonight, a
streak, money kept, the month, your own words or just the name, and the
parts below it come in your own order. A part set aside is never gone: it
waits under "Tucked away" at the foot of the popup, with a count when it
catches something, and a switch left out of Filters waits behind "N more
switches". Nothing here weakens a protection, so none of it is gated.

popup.js applies the arrangement and keeps drawing Tonight and the Seal;
the leads, the model and the settings are Pro (pro/popup.js, a stand-in
here). Without Supporter, or in a build without it, the popup is as
popup.html writes it. popup.html?preview is the live frame in Settings:
it speaks about the web page used last and tells the frame its height.

Settings › Supporter › Your popup holds the editor, with the preview in
the margin column, widened to the popup's 340px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A store package is a zip anyone can open, and a licence is a line in
storage anyone can write. Neither can be closed on the device, but both
were easier than they needed to be.

build-pro.mjs minifies every Pro file on its way into a build (esbuild,
property names kept, each checked to still parse), so the packages carry
what Pro does and not how. The Chrome Web Store allows minified code.
Firefox Add-ons asks for its source, so build-firefox.ps1 -Zip now also
writes dist/sieve-firefox-source.zip for its reviewers: the tracked files
of both repositories, less store-assets and models, with how to build.
Upload it with the package; never publish it.

isProState opens Pro only for a licence Polar answered for: it needs the
time of that answer (no more than a day ahead of this clock) and a benefit
this store sells. One that lacks either, such as the line someone might
paste into a console, stays shut, the settings page checks it at once and
says it is waiting for that, and Polar's answer settles it. The heads-up's
copy of the test asks for the time too. Keys activated as before are
untouched: activate() has always written both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The last entry in the settings index is now a small bookplate in the
popup's own pine, with Warden's brass for the price. Until Supporter is
yours it says what it is for ("Stay stopped.", the launch price); then it
thanks you and carries the end of your key as a supporter number. It
switches as soon as a licence is confirmed, with no reload. On a narrow
window it folds into a pine tab at the end of the strip.

It replaces the plain "Supporter" group and link. renderPlate in setupPro
decides whether it shows and which face, and the licence listener now
hands it the raw licence. theme-test checks its two dark palettes match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The weekly licence check ran only while Settings was open, and no answer
from Polar kept the last one for ever. So a refunded buyer who never
opened Settings again, or who blocked api.polar.sh, kept Supporter.

Now, as BlockNSFW's supporter.js does:
- A key Polar has not confirmed in 30 days pauses Supporter
  (isProState false, the new isPaused true) until Polar answers again,
  with nothing lost. The heads-up applies the same rule.
- background/licence-check.js repeats the check on a timer, so it no
  longer waits for Settings. It never runs from the popup or the block
  page: from there its timing would tell Polar what someone was doing.
  common/pro.js loads in the service worker for it.
- A paused key is never offered for sale. Settings says paused and why,
  with Check again (Firefox's consent is asked from that click if it was
  taken back); the sidebar plate, the groups' notes, the popup and Your
  progress say paused instead of selling Supporter.

PRIVACY.md says when the check runs now, and about the pause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codepurse
codepurse merged commit a309dd5 into main Nov 1, 2026
1 check passed
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