From aebb1b4f017b784054fac658b28d113ce5e201a1 Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 10:51:12 -0600 Subject: [PATCH 01/12] Replace the Plan nav item and the menu's Delete account with an Account page The main nav had a Plan item that sat oddly beside Push and Links, and the menu had a bare "Delete account" item. Both now live on one `Account` page, which the menu opens: the signed-in email, the plan in a line with a link to its page, the "Encrypted" line with this device's id (moved from Plan), and a link to delete the account. It is one page with links out, not a settings layout with tabs, because neither destination can move. `/delete-account` is public, as the deletion page Google Play was given, and `/plan` is where Stripe's checkout and portal send people back to. The nav's slider now shrinks away on a page with no nav item, rather than staying lit on the page left behind. The Support, Security and Delete account pages, and the docs, say where things are now. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/App.tsx | 2 + apps/web/src/Layout.tsx | 7 +- apps/web/src/components/Nav.tsx | 11 +-- apps/web/src/config/plan.ts | 2 +- apps/web/src/pages/Account.module.css | 38 ++++++++ apps/web/src/pages/Account.tsx | 119 ++++++++++++++++++++++++++ apps/web/src/pages/DeleteAccount.tsx | 4 +- apps/web/src/pages/Plan.module.css | 11 +-- apps/web/src/pages/Plan.tsx | 51 +++-------- apps/web/src/pages/Security.tsx | 10 +-- apps/web/src/pages/Support.tsx | 4 +- docs/account-deletion.md | 2 +- docs/e2ee.md | 2 +- 13 files changed, 195 insertions(+), 68 deletions(-) create mode 100644 apps/web/src/pages/Account.module.css create mode 100644 apps/web/src/pages/Account.tsx diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 2738dd9..a6d401e 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -7,6 +7,7 @@ import { useAuth } from './contexts/AuthContext'; import { AuthProvider } from './contexts/AuthProvider'; import { KeysProvider } from './contexts/KeysContext'; import { ThemeProvider } from './contexts/ThemeContext'; +import { Account } from './pages/Account'; import { IndexPage } from './pages/Index'; import Links from './pages/Links'; import Login from './pages/Login'; @@ -75,6 +76,7 @@ function App() { }> } /> } /> + } /> } /> } /> diff --git a/apps/web/src/Layout.tsx b/apps/web/src/Layout.tsx index 2e88360..bf5efe9 100644 --- a/apps/web/src/Layout.tsx +++ b/apps/web/src/Layout.tsx @@ -56,9 +56,10 @@ export default function Layout({ children }: LayoutProps) { {isMenuOpen && (
- {/* Above Logout, where the Android, iOS and macOS menus have it. It leads to the - public page, which asks for the password before anything goes. */} - + {/* The plan, the device id and deleting the account are all on the Account page, + so the menu has one way in rather than an item for each. Deleting is a link + from there to the public page, which asks for the password before anything goes. */} +
)} diff --git a/apps/web/src/components/Nav.tsx b/apps/web/src/components/Nav.tsx index c14e0e9..cb4a494 100644 --- a/apps/web/src/components/Nav.tsx +++ b/apps/web/src/components/Nav.tsx @@ -1,8 +1,6 @@ import { useEffect, useRef, useState } from 'react'; import { Link, useLocation } from 'react-router'; -import { PLAN_PAGE_LINKED } from '@/config/plan'; - import styles from './Nav.module.css'; export default function Nav() { @@ -19,6 +17,10 @@ export default function Nav() { width: offsetWidth, left: offsetLeft, }); + } else { + // A page with no item here (Account, Plan, the static pages while signed in): the + // slider shrinks away where it stood, rather than staying lit on the page left behind. + setSliderStyle((was) => ({ width: 0, left: was.left + was.width / 2 })); } }, [currentPath]); @@ -37,11 +39,6 @@ export default function Nav() { Links - {PLAN_PAGE_LINKED && ( - - Plan - - )} ); } diff --git a/apps/web/src/config/plan.ts b/apps/web/src/config/plan.ts index bac856a..a1244d8 100644 --- a/apps/web/src/config/plan.ts +++ b/apps/web/src/config/plan.ts @@ -24,7 +24,7 @@ export const LIMITS: Record<'free' | 'pro', TierLimits> = { }; /** - * Whether the Plan page is reachable from the navigation. On since launch (2026-10-25), + * Whether the Account page shows the plan and links to the Plan page. On since launch (2026-10-25), * when production moved to the live Stripe account. Turn it off only together with a * move back to sandbox keys: on sandbox keys, anyone who reached the page could * subscribe with a test card and get Pro. The route exists either way. diff --git a/apps/web/src/pages/Account.module.css b/apps/web/src/pages/Account.module.css new file mode 100644 index 0000000..4d75fa4 --- /dev/null +++ b/apps/web/src/pages/Account.module.css @@ -0,0 +1,38 @@ +.page { + max-width: 560px; +} + +.section { + margin: 2rem 0; + display: flex; + flex-direction: column; + gap: 0.75rem; +} + +/* The gap spaces a section's contents; the global margins on p and h2 would add to it */ +.section > * { + margin: 0; +} + +.section h2 { + font-size: 1.25rem; +} + +.muted { + opacity: 0.7; + font-size: 0.9rem; +} + +.error { + color: var(--color-error); +} + +.danger { + color: var(--color-error); +} + +/* An email address has no spaces to break at, and a long one would push a narrow screen sideways */ +.email, +.deviceId { + overflow-wrap: anywhere; +} diff --git a/apps/web/src/pages/Account.tsx b/apps/web/src/pages/Account.tsx new file mode 100644 index 0000000..120d532 --- /dev/null +++ b/apps/web/src/pages/Account.tsx @@ -0,0 +1,119 @@ +import { useEffect, useState } from 'react'; +import { Helmet } from 'react-helmet'; +import { Link } from 'react-router'; + +import { PLAN_PAGE_LINKED } from '@/config/plan'; +import { useAuth } from '@/contexts/AuthContext'; +import { usePlan } from '@/hooks/usePlan'; +import { deviceId } from '@/services/keyStore'; + +import { describePlan } from './Plan'; + +import styles from './Account.module.css'; + +/** + * Account, `/account`: the menu's way into everything about the account. Who is signed + * in, the plan in a line with the way to its own page, the "Encrypted" line, and the way + * to delete the account. + * + * One page with links out, rather than a settings layout with the plan and deletion as + * tabs inside it, because neither of those can move: `/delete-account` is public (it is the + * address given to Google Play, read by people with no account) and `/plan` is where + * Stripe's checkout and portal send people back to. A settings layout would have had to + * leave itself for both. + */ +export function Account() { + const { user } = useAuth(); + + return ( +
+ + Account + +

Account

+ +
+

Email

+

{user?.email}

+
+ + {PLAN_PAGE_LINKED && } + + + +
+

Delete account

+

+ Deletes the account and everything pushed from it, at once and for good. The next page says exactly what goes + and asks for your password first. +

+

+ + Delete account + +

+
+
+ ); +} + +/** The plan as the Plan page heads it, in one line. The usage and the billing stay on that page. */ +function PlanSummary() { + const { plan, error } = usePlan(); + const summary = plan && describePlan(plan); + + return ( +
+

Plan

+ {summary ? ( +

+ {summary.title}. {summary.sentence} +

+ ) : error ? ( +

+ {error} +

+ ) : ( +

Reading your plan…

+ )} +

+ Usage and billing +

+
+ ); +} + +/** + * The "Encrypted" line (docs/e2ee.md, Saying so): that the pushes are encrypted, this + * device's id, and where to read what that means. The id is what this install puts on its + * pushes in place of the device's model name, so showing it lets someone see all the + * server is told about the device. IndexedDB can refuse (a private window in some + * browsers), and the line then goes without the id rather than not at all. + */ +function Encrypted() { + const [id, setId] = useState(null); + useEffect(() => { + let current = true; + deviceId() + .then((made) => current && setId(made)) + .catch((error) => console.error('Could not read the device id:', error)); + return () => { + current = false; + }; + }, []); + + return ( +
+

Encrypted

+

+ Your pushes are encrypted on your devices with a key made from your password, and only they can read them.{' '} + How it works. +

+ {id && ( +

+ This device: {id} +

+ )} +
+ ); +} diff --git a/apps/web/src/pages/DeleteAccount.tsx b/apps/web/src/pages/DeleteAccount.tsx index 6e1ce98..9b8e6cf 100644 --- a/apps/web/src/pages/DeleteAccount.tsx +++ b/apps/web/src/pages/DeleteAccount.tsx @@ -81,8 +81,8 @@ export function DeleteAccount() { extension.
  • - Choose Delete account. On the website and in the extension this opens this page: use the{' '} - form below. + Choose Delete account. On the website and in the extension it is on the{' '} + Account page, and it opens this page: use the form below.
  • In the Android, iPhone and Mac apps, enter your password to confirm, and press Delete account diff --git a/apps/web/src/pages/Plan.module.css b/apps/web/src/pages/Plan.module.css index ecbd029..e27367b 100644 --- a/apps/web/src/pages/Plan.module.css +++ b/apps/web/src/pages/Plan.module.css @@ -2,6 +2,12 @@ max-width: 560px; } +.back { + display: inline-block; + margin-top: 1rem; + font-size: 0.9rem; +} + .section { margin: 2rem 0; display: flex; @@ -75,8 +81,3 @@ .meterFillFull { background: var(--color-error); } - -/* A device id is 22 characters with no spaces, which would otherwise push a narrow screen sideways */ -.deviceId { - overflow-wrap: anywhere; -} diff --git a/apps/web/src/pages/Plan.tsx b/apps/web/src/pages/Plan.tsx index 4a818d4..4b9b8eb 100644 --- a/apps/web/src/pages/Plan.tsx +++ b/apps/web/src/pages/Plan.tsx @@ -6,7 +6,6 @@ import Button from '@/components/Button'; import { LIMITS, formatMb } from '@/config/plan'; import { usePlan } from '@/hooks/usePlan'; import { errorText } from '@/services/callable'; -import { deviceId } from '@/services/keyStore'; import { PlanReport, planApi } from '@/services/plan'; import styles from './Plan.module.css'; @@ -69,8 +68,10 @@ export function describePlan(plan: PlanReport): { title: string; sentence: strin * and the plan is then read back from Stripe at once rather than waiting on the * webhook, so the page says "Pro" on arrival. * - * Not linked from the navigation until launch (`PLAN_PAGE_LINKED`): production runs on - * the Stripe sandbox's keys until then, and a test card here would give anyone Pro. + * Reached from the Account page, and only while `PLAN_PAGE_LINKED` is on: production ran + * on the Stripe sandbox's keys until launch, and a test card here would give anyone Pro. + * It keeps its own address, rather than becoming a section of Account, because Stripe's + * checkout and portal send people back to `/plan` (docs/billing.md). */ export default function Plan() { const { plan, error: readError, refresh, setPlan } = usePlan(); @@ -183,6 +184,7 @@ export default function Plan() { Plan +

    Plan

    {readError ? (

    @@ -196,10 +198,6 @@ export default function Plan() { ) : (

    Reading your plan…

    )} - {/* Nothing in it depends on the plan, so it shows while the plan is read or cannot be. - Keyed, so that React keeps the one section when the plan arrives rather than - mounting another, which would read the device id again and blink its line. */} - ); } @@ -218,6 +216,7 @@ export default function Plan() { Plan +

    Plan

    @@ -298,45 +297,15 @@ export default function Plan() {

    )} - - ); } -/** - * The "Encrypted" line (docs/e2ee.md, Saying so): that the pushes are encrypted, this - * device's id, and where to read what that means. On the Plan page because the web app has - * no settings page and this is the page about the account. The id is what this install - * puts on its pushes in place of the device's model name, so showing it lets someone see - * all the server is told about the device. IndexedDB can refuse (a private window in - * some browsers), and the line then goes without the id rather than not at all. - */ -function Encrypted() { - const [id, setId] = useState(null); - useEffect(() => { - let current = true; - deviceId() - .then((made) => current && setId(made)) - .catch((error) => console.error('Could not read the device id:', error)); - return () => { - current = false; - }; - }, []); - +function BackToAccount() { return ( -
    -

    Encrypted

    -

    - Your pushes are encrypted on your devices with a key made from your password, and only they can read them.{' '} - How it works. -

    - {id && ( -

    - This device: {id} -

    - )} -
    + + ← Account + ); } diff --git a/apps/web/src/pages/Security.tsx b/apps/web/src/pages/Security.tsx index 96e55a6..5a81a69 100644 --- a/apps/web/src/pages/Security.tsx +++ b/apps/web/src/pages/Security.tsx @@ -9,7 +9,7 @@ import { LIMITS, SUPPORT_EMAIL } from '@/config/plan'; * Security, `/security`: the gist of docs/e2ee.md for the people it protects. What is * encrypted, what is not, what a lost password costs, and the recovery key. Public, like * Support, since the front page and Support link here and the reader may not have an - * account yet; the Plan page links here too. + * account yet; the Account page links here too. * * It says what is not protected as plainly as what is: the reason for a key made from the * password is that the user can see what it does, and a page that only listed the @@ -134,10 +134,10 @@ export function Security() {
    YOUR DEVICE ID

    - Each install of PushThat makes a random device ID, which the web app shows on the Plan{' '} - page. It goes with every push so that the device that sent one does not notify itself, and it says nothing about - the device: it replaced the device’s name (the one you gave it, its model name, or the browser’s - user agent), which pushes used to carry. + Each install of PushThat makes a random device ID, which the web app shows on the{' '} + Account page. It goes with every push so that the device that sent one does not + notify itself, and it says nothing about the device: it replaced the device’s name (the one you gave it, + its model name, or the browser’s user agent), which pushes used to carry.

    QUESTIONS
    diff --git a/apps/web/src/pages/Support.tsx b/apps/web/src/pages/Support.tsx index 42d291e..a1d8a04 100644 --- a/apps/web/src/pages/Support.tsx +++ b/apps/web/src/pages/Support.tsx @@ -34,8 +34,8 @@ export default function Support() {

    To change your card, download an invoice or cancel, open{' '} - {PLAN_PAGE_LINKED ? Plan : 'Plan'} in the web app and choose Manage billing. Cancelling - stops the next renewal and keeps Pro until the year already paid for ends. + {PLAN_PAGE_LINKED ? Plan : 'Plan'} in the web app (under Account in its menu) and choose + Manage billing. Cancelling stops the next renewal and keeps Pro until the year already paid for ends.

    diff --git a/docs/account-deletion.md b/docs/account-deletion.md index a0f7f4c..d11d0e6 100644 --- a/docs/account-deletion.md +++ b/docs/account-deletion.md @@ -173,5 +173,5 @@ the call (`services/account.ts` says why), so it works the same signed in or out who has forgotten their password resets it first; someone who cannot sign in at all writes to support. -The website's and the extension's menu item leads to this page. The Android, iOS and macOS +The website's and the extension's Account page (from the menu) links to this page. The Android, iOS and macOS apps ask for the password in a dialog of their own and call the function directly. diff --git a/docs/e2ee.md b/docs/e2ee.md index 7a8583b..a30de6a 100644 --- a/docs/e2ee.md +++ b/docs/e2ee.md @@ -249,7 +249,7 @@ Existing accounts have the raw password as their Firebase password and plaintext The reason for a password-derived key is that the user can see it. The surfaces: - **Sign-up:** "Your password is the key to your pushes, and we cannot reset it for you. Save your recovery key." The recovery key is shown there and then. -- **Settings and the Plan page:** an "Encrypted" line with the device's `deviceId` and a link to the security page. +- **Settings, and the web app's Account page:** an "Encrypted" line with the device's `deviceId` and a link to the security page. - **Password reset:** the recovery key prompt and, without it, the sentence that the old pushes are gone, before anything is deleted. - **The site:** a `/security` page with the gist of this document: what is encrypted, what is not, what a lost password costs. From d3d0f88979cae41f89bcac699446302c72930523 Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:04:23 -0600 Subject: [PATCH 02/12] Move the plan onto the Account page and redirect /plan there The Account page was four short sections, one of them a line linking to the Plan page where the substance was: a click that bought nothing. The plan is now the first section of Account, since it is what most people open that page for, with its status, billing buttons, this month's usage and, on Free, what Pro adds. Stripe's checkout and portal still return to `/plan`, so that address redirects to `/account` with its query, and `?checkout=complete` is still read to confirm a subscription on arrival. The return URLs can move to `/account` later without anything breaking in between. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/App.tsx | 17 +- .../PlanSection.module.css} | 17 +- .../Plan.tsx => components/PlanSection.tsx} | 165 ++++++++---------- apps/web/src/config/plan.ts | 8 +- apps/web/src/pages/Account.tsx | 51 ++---- apps/web/src/pages/Support.tsx | 4 +- docs/billing.md | 6 +- 7 files changed, 115 insertions(+), 153 deletions(-) rename apps/web/src/{pages/Plan.module.css => components/PlanSection.module.css} (81%) rename apps/web/src/{pages/Plan.tsx => components/PlanSection.tsx} (71%) diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index a6d401e..94432a8 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -1,4 +1,4 @@ -import { Navigate, Outlet, Route, Routes, useSearchParams } from 'react-router'; +import { Navigate, Outlet, Route, Routes, useLocation, useSearchParams } from 'react-router'; import Layout from './Layout'; import ProtectedRoute from './components/ProtectedRoute'; @@ -12,7 +12,6 @@ import { IndexPage } from './pages/Index'; import Links from './pages/Links'; import Login from './pages/Login'; import NotFound from './pages/NotFound'; -import Plan from './pages/Plan'; import Push from './pages/Push'; import { ResetPassword } from './pages/ResetPassword'; import { ViewPush } from './pages/ViewPush'; @@ -51,6 +50,18 @@ function ImagePageOrHome() { ); } +/** + * `/plan`, the Plan page's address before it became the first section of Account. Stripe's + * checkout returns here with `?checkout=complete` and its portal returns here + * (functions/src/stripe-functions.ts, `planPageUrl`, and the portal's configuration), so the + * query goes along: the plan section reads it to confirm a subscription on arrival. Kept + * for old bookmarks once those point at `/account` too. + */ +function PlanRedirect() { + const { search } = useLocation(); + return ; +} + function App() { return ( @@ -77,7 +88,7 @@ function App() { } /> } /> } /> - } /> + } /> } /> diff --git a/apps/web/src/pages/Plan.module.css b/apps/web/src/components/PlanSection.module.css similarity index 81% rename from apps/web/src/pages/Plan.module.css rename to apps/web/src/components/PlanSection.module.css index e27367b..9c9a2d3 100644 --- a/apps/web/src/pages/Plan.module.css +++ b/apps/web/src/components/PlanSection.module.css @@ -1,13 +1,3 @@ -.page { - max-width: 560px; -} - -.back { - display: inline-block; - margin-top: 1rem; - font-size: 0.9rem; -} - .section { margin: 2rem 0; display: flex; @@ -24,6 +14,13 @@ font-size: 1.25rem; } +/* This month and Pro are parts of the plan, under its heading, so they sit a step down and + a little apart from what comes before them rather than starting sections of their own. */ +.section h3 { + font-size: 1rem; + margin-top: 0.75rem; +} + .row { display: flex; flex-wrap: wrap; diff --git a/apps/web/src/pages/Plan.tsx b/apps/web/src/components/PlanSection.tsx similarity index 71% rename from apps/web/src/pages/Plan.tsx rename to apps/web/src/components/PlanSection.tsx index 4b9b8eb..c82b73d 100644 --- a/apps/web/src/pages/Plan.tsx +++ b/apps/web/src/components/PlanSection.tsx @@ -1,5 +1,4 @@ import { useEffect, useRef, useState } from 'react'; -import { Helmet } from 'react-helmet'; import { Link, useNavigate, useSearchParams } from 'react-router'; import Button from '@/components/Button'; @@ -8,7 +7,7 @@ import { usePlan } from '@/hooks/usePlan'; import { errorText } from '@/services/callable'; import { PlanReport, planApi } from '@/services/plan'; -import styles from './Plan.module.css'; +import styles from './PlanSection.module.css'; /** How often, and how many times, the plan is read back from Stripe after a checkout; see `settleCheckout`. */ const CHECKOUT_SETTLE_WAIT_MS = 1500; @@ -61,19 +60,21 @@ export function describePlan(plan: PlanReport): { title: string; sentence: strin } /** - * The account's plan: where it stands, this month's usage against its limits, and the - * two things that change it: subscribing, and managing the subscription in Stripe's - * portal. The checkout is Stripe's own page, reached by redirect from a session the - * server made; Stripe sends the person back here with `?checkout=complete` once paid, - * and the plan is then read back from Stripe at once rather than waiting on the - * webhook, so the page says "Pro" on arrival. + * The account's plan, as the first section of the Account page: where it stands, this + * month's usage against its limits, and the two things that change it: subscribing, and + * managing the subscription in Stripe's portal. The checkout is Stripe's own page, reached + * by redirect from a session the server made; Stripe sends the person back with + * `?checkout=complete` once paid, and the plan is then read back from Stripe at once + * rather than waiting on the webhook, so the page says "Pro" on arrival. * - * Reached from the Account page, and only while `PLAN_PAGE_LINKED` is on: production ran - * on the Stripe sandbox's keys until launch, and a test card here would give anyone Pro. - * It keeps its own address, rather than becoming a section of Account, because Stripe's - * checkout and portal send people back to `/plan` (docs/billing.md). + * Stripe still sends people back to `/plan`, which was this section's own page before it + * moved here; that address now redirects to `/account` with its query (App.tsx), so the + * checkout's return lands here either way. + * + * Shown only while `PLAN_PAGE_LINKED` is on: production ran on the Stripe sandbox's keys + * until launch, and a test card here would give anyone Pro. */ -export default function Plan() { +export function PlanSection() { const { plan, error: readError, refresh, setPlan } = usePlan(); const [busy, setBusy] = useState<'checkout' | 'settling' | 'portal' | 'payment' | null>(null); const [error, setError] = useState(null); @@ -96,7 +97,7 @@ export default function Plan() { useEffect(() => { if (settled.current || params.get('checkout') !== 'complete') return; settled.current = true; - void navigate('/plan', { replace: true }); + void navigate('/account', { replace: true }); setBusy('settling'); void settleCheckout() .then((found) => @@ -180,12 +181,8 @@ export default function Plan() { if (!plan) { return ( -

    - - Plan - - -

    Plan

    +
    +

    Plan

    {readError ? (

    @@ -198,7 +195,7 @@ export default function Plan() { ) : (

    Reading your plan…

    )} -
    + ); } @@ -212,71 +209,63 @@ export default function Plan() { const limits = plan.limits; return ( -
    - - Plan - - -

    Plan

    - -
    -

    {title}

    -

    {sentence}

    - {canSubscribe && ( -
    - - Before tax, charged by Stripe. Cancel any time. -
    - )} - {hasCustomer && ( -
    - + Before tax, charged by Stripe. Cancel any time. +
    + )} + {hasCustomer && ( +
    + + {pastDue && ( + - {pastDue && ( - - )} - - {canSubscribe - ? 'Past invoices, in Stripe’s billing portal.' - : 'Invoices, the card, and cancelling, in Stripe’s billing portal.'} - -
    - )} - {error && ( -

    - {error} -

    - )} - {notice && ( -

    - {notice} -

    - )} -
    - -
    -

    This month

    - - -

    - Files up to {formatMb(limits.fileBytes)}, kept for {limits.keepDays} days from the moment they are pushed; a - file already pushed keeps the retention it was pushed with. The month starts on the day you{' '} - {plan.tier === 'pro' ? 'subscribed' : 'signed up'}. + )} + + {canSubscribe + ? 'Past invoices, in Stripe’s billing portal.' + : 'Invoices, the card, and cancelling, in Stripe’s billing portal.'} + +

    + )} + {error && ( +

    + {error}

    - + )} + {notice && ( +

    + {notice} +

    + )} + +

    This month

    + + +

    + Files up to {formatMb(limits.fileBytes)}, kept for {limits.keepDays} days from the moment they are pushed; a + file already pushed keeps the retention it was pushed with. The month starts on the day you{' '} + {plan.tier === 'pro' ? 'subscribed' : 'signed up'}. +

    {plan.tier === 'free' && ( -
    -

    Pro

    + <> +

    Pro

    • {LIMITS.pro.url.toLocaleString()} URL pushes a month, up from {LIMITS.free.url} @@ -295,17 +284,9 @@ export default function Plan() { ${plan.priceUsd} a year. Refunds, cancelling and receipts are explained on the{' '} support page.

      -
    + )} - - ); -} - -function BackToAccount() { - return ( - - ← Account - + ); } diff --git a/apps/web/src/config/plan.ts b/apps/web/src/config/plan.ts index a1244d8..132c389 100644 --- a/apps/web/src/config/plan.ts +++ b/apps/web/src/config/plan.ts @@ -2,7 +2,7 @@ * The plan, as the pages describe it (docs/billing.md at the repository root). The * numbers the functions enforce and report are in `functions/src/plan.ts` and * the rules carry them too; these are what the front page quotes before anyone has - * signed in, and the Plan page reads its own from `getPlan`. The copies are changed + * signed in, and the Account page's plan reads its own from `getPlan`. The copies are changed * together. */ @@ -24,10 +24,10 @@ export const LIMITS: Record<'free' | 'pro', TierLimits> = { }; /** - * Whether the Account page shows the plan and links to the Plan page. On since launch (2026-10-25), + * Whether the Account page shows the plan. On since launch (2026-10-25), * when production moved to the live Stripe account. Turn it off only together with a - * move back to sandbox keys: on sandbox keys, anyone who reached the page could - * subscribe with a test card and get Pro. The route exists either way. + * move back to sandbox keys: on sandbox keys, anyone who saw the plan there could + * subscribe with a test card and get Pro. The rest of the Account page shows either way. */ export const PLAN_PAGE_LINKED = true; diff --git a/apps/web/src/pages/Account.tsx b/apps/web/src/pages/Account.tsx index 120d532..57b67ec 100644 --- a/apps/web/src/pages/Account.tsx +++ b/apps/web/src/pages/Account.tsx @@ -2,25 +2,24 @@ import { useEffect, useState } from 'react'; import { Helmet } from 'react-helmet'; import { Link } from 'react-router'; +import { PlanSection } from '@/components/PlanSection'; import { PLAN_PAGE_LINKED } from '@/config/plan'; import { useAuth } from '@/contexts/AuthContext'; -import { usePlan } from '@/hooks/usePlan'; import { deviceId } from '@/services/keyStore'; -import { describePlan } from './Plan'; - import styles from './Account.module.css'; /** - * Account, `/account`: the menu's way into everything about the account. Who is signed - * in, the plan in a line with the way to its own page, the "Encrypted" line, and the way - * to delete the account. + * Account, `/account`: the menu's way into everything about the account. The plan, who is + * signed in, the "Encrypted" line, and the way to delete the account. + * + * The plan comes first because it is what most people open this page for, and it is all + * here rather than a line linking to a page of its own: Account was four short sections, one + * of them a link to the page with the substance, which was a click that bought nothing. * - * One page with links out, rather than a settings layout with the plan and deletion as - * tabs inside it, because neither of those can move: `/delete-account` is public (it is the - * address given to Google Play, read by people with no account) and `/plan` is where - * Stripe's checkout and portal send people back to. A settings layout would have had to - * leave itself for both. + * One page, rather than a settings layout with the plan and deletion as tabs, because + * deletion cannot move into one: `/delete-account` is public (it is the address given to + * Google Play, read by people with no account), so this page links out to it. */ export function Account() { const { user } = useAuth(); @@ -32,13 +31,13 @@ export function Account() {

    Account

    + {PLAN_PAGE_LINKED && } +

    Email

    {user?.email}

    - {PLAN_PAGE_LINKED && } -
    @@ -57,32 +56,6 @@ export function Account() { ); } -/** The plan as the Plan page heads it, in one line. The usage and the billing stay on that page. */ -function PlanSummary() { - const { plan, error } = usePlan(); - const summary = plan && describePlan(plan); - - return ( -
    -

    Plan

    - {summary ? ( -

    - {summary.title}. {summary.sentence} -

    - ) : error ? ( -

    - {error} -

    - ) : ( -

    Reading your plan…

    - )} -

    - Usage and billing -

    -
    - ); -} - /** * The "Encrypted" line (docs/e2ee.md, Saying so): that the pushes are encrypted, this * device's id, and where to read what that means. The id is what this install puts on its diff --git a/apps/web/src/pages/Support.tsx b/apps/web/src/pages/Support.tsx index a1d8a04..d4de96d 100644 --- a/apps/web/src/pages/Support.tsx +++ b/apps/web/src/pages/Support.tsx @@ -34,8 +34,8 @@ export default function Support() {

    To change your card, download an invoice or cancel, open{' '} - {PLAN_PAGE_LINKED ? Plan : 'Plan'} in the web app (under Account in its menu) and choose - Manage billing. Cancelling stops the next renewal and keeps Pro until the year already paid for ends. + {PLAN_PAGE_LINKED ? Account : 'Account'} from the web app’s menu and choose Manage + billing. Cancelling stops the next renewal and keeps Pro until the year already paid for ends.

    diff --git a/docs/billing.md b/docs/billing.md index b8ad453..2ad8537 100644 --- a/docs/billing.md +++ b/docs/billing.md @@ -13,7 +13,7 @@ Checkout happens on the web app only. The Android, iOS and macOS apps show the p | File size | 25 MB | 100 MB | | Files kept | 7 days | 30 days | -A file's retention is decided when it is pushed, from the tier at that moment, and nothing moves it afterwards: subscribing does not extend files already pushed, and a lapse does not shorten them. The Plan page says so. Re-stamping on a tier change would need a composite index on `userId` and `expiresAt`, and was not worth it for a push that is a hand-off, not storage. +A file's retention is decided when it is pushed, from the tier at that moment, and nothing moves it afterwards: subscribing does not extend files already pushed, and a lapse does not shorten them. The plan section of the Account page says so. Re-stamping on a tier change would need a composite index on `userId` and `expiresAt`, and was not worth it for a push that is a hand-off, not storage. Decided 2026-10-25. A URL push costs about $0.00002 to serve, so the URL limits are abuse caps. Files cost through download egress ($0.12 per GB past the project's free 100 GB a month) and storage; a Pro account at every limit at once is 10 GB a month, $1.50 to $2.70, against $22.16 kept after Stripe's fees (about 6.4% + 30 cents). That worst case was accepted knowingly; real use is far below it. Billing is yearly only because the fixed 30 cents takes a fifth of a $2 monthly charge. @@ -30,12 +30,12 @@ Set up on 2026-10-25. - **Product:** PushThat Pro, `prod_VVWkWeG0cIT51z`, tax code `txcd_10103000` (software as a service for personal use) - **Price:** $24 a year, `tax_behavior: exclusive`, `price_1UUVggEJNixT7uDaaVEcm1i6` -- **Customer portal:** `bpc_1UUVh2EJNixT7uDa2ChCsS3U`, the default configuration. Invoice history, the card, name, email and address editable, cancelling at the period's end with a reason asked for. Plan changes are off. Returns to `https://pushthat.link/plan`; terms and privacy links are `/terms` and `/privacy`. +- **Customer portal:** `bpc_1UUVh2EJNixT7uDa2ChCsS3U`, the default configuration. Invoice history, the card, name, email and address editable, cancelling at the period's end with a reason asked for. Plan changes are off. Returns to `https://pushthat.link/plan`, which the web app redirects to `/account`, where the plan now is; terms and privacy links are `/terms` and `/privacy`. - **Webhook:** `we_1UUVhAEJNixT7uDa9cl3QtUg` at `https://us-central1-push-that.cloudfunctions.net/stripeWebhook`, API version `2025-03-31.basil`, for `customer.subscription.created`, `updated`, `deleted`, `paused` and `resumed`, `invoice.paid`, `charge.refunded` and `charge.dispute.created`. Its signing secret is shown in the endpoint's page in Workbench. There is one Firebase project, `push-that`, so the sandbox's webhook points at production's function. That is deliberate until launch (decided 2026-10-25): production runs on the sandbox's three settings while billing is tested end to end against the deployed functions, then all three are replaced with the live account's at once. The three always come from the same environment, since the key picks the account checkouts are made in, the webhook secret verifies only that account's endpoint, and the price id must be a price in it. -While production is on the sandbox, anyone who reaches the Plan page can subscribe with a test card and get Pro, so the web app does not link to it or show it until launch. +While production is on the sandbox, anyone who sees the plan on the Account page can subscribe with a test card and get Pro, so the web app does not show it until launch. | Secret | Before launch | At launch | | ----------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------- | From 34fcf330c542eeca0928a8be04310876f72023bd Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:05:17 -0600 Subject: [PATCH 03/12] Link to the plan when a push is refused for the month's limit The limit's message named what Pro allows but gave no way to it, and the plan is otherwise only reachable from the menu. Hitting the limit is when someone on Free is most ready to upgrade, so the Push page now follows that message, and only that one, with "Upgrade to Pro" (or "See your plan" on Pro), linking to the Account page. `refusalReason` says whether a refusal was the limit alongside the sentence. `refusalMessage` stays as its sentence alone for the extension's notice, which cannot hold a link. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/pages/Push.module.css | 7 ++++ apps/web/src/pages/Push.tsx | 53 +++++++++++++++++++++------- apps/web/src/services/pushRefusal.ts | 24 ++++++++----- apps/web/tests/pushRefusal.mjs | 11 ++++++ 4 files changed, 74 insertions(+), 21 deletions(-) diff --git a/apps/web/src/pages/Push.module.css b/apps/web/src/pages/Push.module.css index cf170f1..2398c5b 100644 --- a/apps/web/src/pages/Push.module.css +++ b/apps/web/src/pages/Push.module.css @@ -32,6 +32,13 @@ border: 1px solid #fecaca; } +/* The site's link color is its pink, which is hard to read on this pale red box */ +.error a { + color: inherit; + font-weight: 600; + text-decoration: underline; +} + .divider { display: flex; align-items: center; diff --git a/apps/web/src/pages/Push.tsx b/apps/web/src/pages/Push.tsx index c124cdd..15b8814 100644 --- a/apps/web/src/pages/Push.tsx +++ b/apps/web/src/pages/Push.tsx @@ -1,9 +1,10 @@ import { getFirestore } from 'firebase/firestore'; import { getStorage } from 'firebase/storage'; import { useState } from 'react'; +import { Link } from 'react-router'; import Button from '@/components/Button'; -import { LIMITS, formatMb } from '@/config/plan'; +import { LIMITS, PLAN_PAGE_LINKED, formatMb } from '@/config/plan'; import { usePlan } from '@/hooks/usePlan'; import { KEYS_UNAVAILABLE, usePushKeys } from '@/hooks/usePushKeys'; import { @@ -12,7 +13,7 @@ import { atLimit, isRulesRefusal, limitMessage, - refusalMessage, + refusalReason, } from '@/services/pushRefusal'; import { PushTooLongError, @@ -31,12 +32,17 @@ export default function Push() { const [isSubmitting, setIsSubmitting] = useState(false); const [isUploadSubmitting, setIsUploadSubmitting] = useState(false); const [error, setError] = useState(null); + // Whether `error` is the month's limit, which is followed by a link to the plan: hitting + // the limit is when someone on Free is most ready to upgrade, and the only way to the plan + // otherwise is the menu. + const [limitReached, setLimitReached] = useState(false); const { plan, refresh: refreshPlan } = usePlan(); const { keys } = usePushKeys(); const handleLinkSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(null); + setLimitReached(false); if (!url) return; if (!keys) { @@ -51,6 +57,7 @@ export default function Push() { // until it is read again; a refusal here asks for the read, so the next try is right. void refreshPlan(); setError(limitMessage(plan, 'url')); + setLimitReached(true); return; } @@ -79,15 +86,19 @@ export default function Push() { console.error('Error saving link:', error); // The limit reached on another device, a key a reset replaced, or a push this copy of // PushThat cannot make (pushRefusal.ts); the plan read again stops the next try here. - setError( - isRulesRefusal(error) - ? await refusalMessage(plan, 'url', refreshPlan, () => keyIsStale(getFirestore(), keys)) - : error instanceof PushUnconfirmedError + if (isRulesRefusal(error)) { + const refusal = await refusalReason(plan, 'url', refreshPlan, () => keyIsStale(getFirestore(), keys)); + setError(refusal.message); + setLimitReached(refusal.atLimit); + } else { + setError( + error instanceof PushUnconfirmedError ? UNCONFIRMED_MESSAGE : error instanceof PushTooLongError ? TOO_LONG_LINK_MESSAGE : 'Failed to save link. Please try again.' - ); + ); + } } finally { setIsSubmitting(false); } @@ -96,6 +107,7 @@ export default function Push() { const handleFileSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(null); + setLimitReached(false); if (!file) return; if (!keys) { @@ -121,6 +133,7 @@ export default function Push() { if (plan && atLimit(plan, 'file')) { void refreshPlan(); setError(limitMessage(plan, 'file')); + setLimitReached(true); return; } @@ -139,15 +152,19 @@ export default function Push() { if (fileInput) fileInput.value = ''; } catch (error) { console.error('Error saving file:', error); - setError( - isRulesRefusal(error) - ? await refusalMessage(plan, 'file', refreshPlan, () => keyIsStale(getFirestore(), keys)) - : error instanceof PushUnconfirmedError + if (isRulesRefusal(error)) { + const refusal = await refusalReason(plan, 'file', refreshPlan, () => keyIsStale(getFirestore(), keys)); + setError(refusal.message); + setLimitReached(refusal.atLimit); + } else { + setError( + error instanceof PushUnconfirmedError ? UNCONFIRMED_MESSAGE : error instanceof PushTooLongError ? 'That file name is too long to push.' : 'Failed to upload file. Please try again.' - ); + ); + } } finally { setIsUploadSubmitting(false); } @@ -161,7 +178,17 @@ export default function Push() { return (

    Push

    - {error &&
    {error}
    } + {error && ( +
    + {error} + {limitReached && PLAN_PAGE_LINKED && ( + <> + {' '} + {plan?.tier === 'pro' ? 'See your plan' : 'Upgrade to Pro'} + + )} +
    + )}
    diff --git a/apps/web/src/services/pushRefusal.ts b/apps/web/src/services/pushRefusal.ts index ee7d4df..4940c54 100644 --- a/apps/web/src/services/pushRefusal.ts +++ b/apps/web/src/services/pushRefusal.ts @@ -70,20 +70,28 @@ export const outdatedMessage = () => : 'PushThat refused this push. Reload the page to update PushThat, then try again.'; /** - * The sentence for a push the rules refused. `reread` is the page's read of the plan - * (`usePlan`'s `refresh`), which also keeps what it read, so the page's next check before - * sending sees the count that refused this one. If it cannot read, the plan the page + * Why the rules refused a push: the sentence, and whether the reason was the month's limit, + * which the Push page follows with a link to the plan. `reread` is the page's read of the + * plan (`usePlan`'s `refresh`), which also keeps what it read, so the page's next check + * before sending sees the count that refused this one. If it cannot read, the plan the page * already had decides. `keyIsStale` is the page's check of the account's key version; a * check that fails counts as not stale. */ -export async function refusalMessage( +export async function refusalReason( known: PlanReport | undefined, type: 'url' | 'file', reread: () => Promise, keyIsStale: () => Promise -): Promise { +): Promise<{ message: string; atLimit: boolean }> { const plan = (await reread().catch(() => undefined)) ?? known; - if (plan && atLimit(plan, type)) return limitMessage(plan, type); - if (await keyIsStale().catch(() => false)) return STALE_KEY_MESSAGE; - return outdatedMessage(); + if (plan && atLimit(plan, type)) return { message: limitMessage(plan, type), atLimit: true }; + if (await keyIsStale().catch(() => false)) return { message: STALE_KEY_MESSAGE, atLimit: false }; + return { message: outdatedMessage(), atLimit: false }; } + +/** + * `refusalReason`'s sentence alone, for where nothing can follow it with a link: the + * extension's notice for a page pushed from its menu (pagePush.ts). + */ +export const refusalMessage = async (...args: Parameters) => + (await refusalReason(...args)).message; diff --git a/apps/web/tests/pushRefusal.mjs b/apps/web/tests/pushRefusal.mjs index f4b1cac..efe7381 100644 --- a/apps/web/tests/pushRefusal.mjs +++ b/apps/web/tests/pushRefusal.mjs @@ -12,6 +12,7 @@ import { limitMessage, outdatedMessage, refusalMessage, + refusalReason, usedMessage, } from '../src/services/pushRefusal.ts'; @@ -53,6 +54,16 @@ describe('a refused push', () => { )); }); +// The Push page follows the limit's sentence, and only that one, with a link to the plan. +describe('whether a refusal was the limit', () => { + test('at the limit', async () => + assert.equal((await refusalReason(plan(49), 'url', read(plan(50)), stale)).atLimit, true)); + test('under a key a reset replaced', async () => + assert.equal((await refusalReason(plan(1), 'url', read(plan(1)), stale)).atLimit, false)); + test('out of date', async () => + assert.equal((await refusalReason(plan(1), 'url', read(plan(1)), current)).atLimit, false)); +}); + describe('the out-of-date sentence', () => { afterEach(() => delete globalThis.chrome); test('on the site, reload the page', () => assert.match(outdatedMessage(), /Reload the page/)); From 76a4a9ad80fb3370b1a186f707b5e4a5a15361b2 Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:12:21 -0600 Subject: [PATCH 04/12] Shorten the plan's button labels so they fit one line on a phone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The button's capitals and letter spacing wrapped "Subscribe for $24 a year" onto two lines at 375px. "$24/year" only just fit there and still wrapped at 360px, and "Confirming your subscription…" and "Update payment method" wrapped too. The button now says "Subscribe to Pro", with the price in the line beside it. The busy label is "Confirming…" and the past-due button is "Update card", which matches the plan's own sentence about updating the card. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/components/PlanSection.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/web/src/components/PlanSection.tsx b/apps/web/src/components/PlanSection.tsx index c82b73d..3c0ab84 100644 --- a/apps/web/src/components/PlanSection.tsx +++ b/apps/web/src/components/PlanSection.tsx @@ -216,14 +216,13 @@ export function PlanSection() {

    {canSubscribe && (
    + {/* Labels short enough for one line on a phone. The button's capitals and letter + spacing wrap "Subscribe for $24 a year" at 375px, and "$24/year" only just fits + there and wraps at 360px, so the price is in the line beside the button. */} - Before tax, charged by Stripe. Cancel any time. + ${plan.priceUsd} a year before tax, charged by Stripe. Cancel any time.
    )} {hasCustomer && ( @@ -233,7 +232,7 @@ export function PlanSection() { {pastDue && ( )} From 9ae9281d9d6fed64d394a32dfcfd59e8ee6a193c Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:21:06 -0600 Subject: [PATCH 05/12] Keep the Push page's limit link with the message it belongs to The message and whether it was the month's limit were two pieces of state, and only the limit paths set the flag. The link and file forms submit independently and share them, so a link push refused at the limit, followed by an unrelated failure of a file upload that was already under way, showed "Failed to upload file. Please try again. Upgrade to Pro". They are now one piece of state, set together by `fail`, so the link can only follow the message it was set with. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/pages/Push.tsx | 41 ++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/apps/web/src/pages/Push.tsx b/apps/web/src/pages/Push.tsx index 15b8814..a736d66 100644 --- a/apps/web/src/pages/Push.tsx +++ b/apps/web/src/pages/Push.tsx @@ -31,22 +31,22 @@ export default function Push() { const [file, setFile] = useState(null); const [isSubmitting, setIsSubmitting] = useState(false); const [isUploadSubmitting, setIsUploadSubmitting] = useState(false); - const [error, setError] = useState(null); - // Whether `error` is the month's limit, which is followed by a link to the plan: hitting - // the limit is when someone on Free is most ready to upgrade, and the only way to the plan - // otherwise is the menu. - const [limitReached, setLimitReached] = useState(false); + // The message and whether it is the month's limit, which is followed by a link to the + // plan: hitting the limit is when someone on Free is most ready to upgrade, and the only + // way to the plan otherwise is the menu. One piece of state, so the link cannot stay under + // a later, unrelated error: the link and file forms submit independently and share it. + const [error, setError] = useState<{ message: string; atLimit: boolean } | null>(null); + const fail = (message: string, atLimit = false) => setError({ message, atLimit }); const { plan, refresh: refreshPlan } = usePlan(); const { keys } = usePushKeys(); const handleLinkSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(null); - setLimitReached(false); if (!url) return; if (!keys) { - setError(KEYS_UNAVAILABLE); + fail(KEYS_UNAVAILABLE); return; } @@ -56,8 +56,7 @@ export default function Push() { // Read once per mount, so a new period or a subscription in another tab is not seen // until it is read again; a refusal here asks for the read, so the next try is right. void refreshPlan(); - setError(limitMessage(plan, 'url')); - setLimitReached(true); + fail(limitMessage(plan, 'url'), true); return; } @@ -68,7 +67,7 @@ export default function Push() { try { new URL(url); } catch (error) { - setError('Invalid URL'); + fail('Invalid URL'); setIsSubmitting(false); return; } @@ -88,10 +87,9 @@ export default function Push() { // PushThat cannot make (pushRefusal.ts); the plan read again stops the next try here. if (isRulesRefusal(error)) { const refusal = await refusalReason(plan, 'url', refreshPlan, () => keyIsStale(getFirestore(), keys)); - setError(refusal.message); - setLimitReached(refusal.atLimit); + fail(refusal.message, refusal.atLimit); } else { - setError( + fail( error instanceof PushUnconfirmedError ? UNCONFIRMED_MESSAGE : error instanceof PushTooLongError @@ -107,11 +105,10 @@ export default function Push() { const handleFileSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(null); - setLimitReached(false); if (!file) return; if (!keys) { - setError(KEYS_UNAVAILABLE); + fail(KEYS_UNAVAILABLE); return; } @@ -122,7 +119,7 @@ export default function Push() { // `>=`, as the Storage rule has it: a file of exactly the limit is refused there. The // rule measures the encrypted object, a few bytes a megabyte larger than the file. if (encryptedSize(file.size) >= limits.fileBytes) { - setError( + fail( `File size must be under ${formatMb(limits.fileBytes)}${plan?.tier === 'free' ? ` on the free plan (${formatMb(LIMITS.pro.fileBytes)} on Pro)` : ''}.` ); return; @@ -132,8 +129,7 @@ export default function Push() { // nothing to ever delete them. Refused here first, with the plan already in hand. if (plan && atLimit(plan, 'file')) { void refreshPlan(); - setError(limitMessage(plan, 'file')); - setLimitReached(true); + fail(limitMessage(plan, 'file'), true); return; } @@ -154,10 +150,9 @@ export default function Push() { console.error('Error saving file:', error); if (isRulesRefusal(error)) { const refusal = await refusalReason(plan, 'file', refreshPlan, () => keyIsStale(getFirestore(), keys)); - setError(refusal.message); - setLimitReached(refusal.atLimit); + fail(refusal.message, refusal.atLimit); } else { - setError( + fail( error instanceof PushUnconfirmedError ? UNCONFIRMED_MESSAGE : error instanceof PushTooLongError @@ -180,8 +175,8 @@ export default function Push() {

    Push

    {error && (
    - {error} - {limitReached && PLAN_PAGE_LINKED && ( + {error.message} + {error.atLimit && PLAN_PAGE_LINKED && ( <> {' '} {plan?.tier === 'pro' ? 'See your plan' : 'Upgrade to Pro'} From 551205a8385fc2ad6e1c6659ae0c775ca9dc884a Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:21:15 -0600 Subject: [PATCH 06/12] Say where Delete account is on the website in the deletion steps Step 1 has the reader open the menu, and step 2 said "Choose Delete account", then that on the website it is on the Account page. Read in order, that sends someone looking in the menu for an item that is no longer there. Step 2 now says to choose Account and then Delete account. This is the deletion page Google Play was given, so its steps should match the screen. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/pages/DeleteAccount.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/pages/DeleteAccount.tsx b/apps/web/src/pages/DeleteAccount.tsx index 9b8e6cf..e791602 100644 --- a/apps/web/src/pages/DeleteAccount.tsx +++ b/apps/web/src/pages/DeleteAccount.tsx @@ -81,8 +81,8 @@ export function DeleteAccount() { extension.
  • - Choose Delete account. On the website and in the extension it is on the{' '} - Account page, and it opens this page: use the form below. + Choose Delete account. On the website and in the extension, choose Account{' '} + and then Delete account, which opens this page: use the form below.
  • In the Android, iPhone and Mac apps, enter your password to confirm, and press Delete account From ff24299dda9cb9af8ea426cd75510bbf5f4aecaa Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:21:21 -0600 Subject: [PATCH 07/12] Say on Support that the website's Delete account is under Account Support said to use Delete account "here or in the app's menu". On the website and in the extension it is no longer in the menu but on the Account page the menu opens, so the sentence now says so. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/pages/Support.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/pages/Support.tsx b/apps/web/src/pages/Support.tsx index d4de96d..cce0cdf 100644 --- a/apps/web/src/pages/Support.tsx +++ b/apps/web/src/pages/Support.tsx @@ -70,9 +70,9 @@ export default function Support() {

    - To close your account, use Delete account, here or in the app’s menu: it - deletes the account at once, with everything pushed from it. If you cannot sign in, write to us from the - account’s address and we will delete it for you. + To close your account, use Delete account, here, from Account in the website’s + menu, or in the app’s menu: it deletes the account at once, with everything pushed from it. If you cannot sign + in, write to us from the account’s address and we will delete it for you.

    BUGS AND IDEAS
    From feeeec0dea1ebee81ee8add18f41b63080a7b843 Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:21:46 -0600 Subject: [PATCH 08/12] Lay out the plan section with the Account page's own section styles `PlanSection.module.css` repeated the Account page's section rules word for word (the flex column, the margin reset and the heading size), for two sections that sit one above the other on the same page. A change to one would have left the plan spaced unlike the sections around it. `PlanSection` now takes a `className` for its outer section, and Account passes its own. The plan's module keeps only what is the plan's alone. Co-Authored-By: Claude Opus 5.5 --- .../web/src/components/PlanSection.module.css | 19 +++---------------- apps/web/src/components/PlanSection.tsx | 7 ++++--- apps/web/src/pages/Account.module.css | 2 +- apps/web/src/pages/Account.tsx | 2 +- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/apps/web/src/components/PlanSection.module.css b/apps/web/src/components/PlanSection.module.css index 9c9a2d3..9019790 100644 --- a/apps/web/src/components/PlanSection.module.css +++ b/apps/web/src/components/PlanSection.module.css @@ -1,22 +1,9 @@ -.section { - margin: 2rem 0; - display: flex; - flex-direction: column; - gap: 0.75rem; -} - -/* The gap spaces a section's contents; the global margins on p, h2 and ul would add to it */ -.section > * { - margin: 0; -} - -.section h2 { - font-size: 1.25rem; -} +/* The section's own layout comes from the page, through `className`, so the plan is spaced + like the sections around it from one place. Only what is the plan's alone is here. */ /* This month and Pro are parts of the plan, under its heading, so they sit a step down and a little apart from what comes before them rather than starting sections of their own. */ -.section h3 { +.plan h3 { font-size: 1rem; margin-top: 0.75rem; } diff --git a/apps/web/src/components/PlanSection.tsx b/apps/web/src/components/PlanSection.tsx index 3c0ab84..f39165c 100644 --- a/apps/web/src/components/PlanSection.tsx +++ b/apps/web/src/components/PlanSection.tsx @@ -1,3 +1,4 @@ +import clsx from 'clsx'; import { useEffect, useRef, useState } from 'react'; import { Link, useNavigate, useSearchParams } from 'react-router'; @@ -74,7 +75,7 @@ export function describePlan(plan: PlanReport): { title: string; sentence: strin * Shown only while `PLAN_PAGE_LINKED` is on: production ran on the Stripe sandbox's keys * until launch, and a test card here would give anyone Pro. */ -export function PlanSection() { +export function PlanSection({ className }: { className?: string }) { const { plan, error: readError, refresh, setPlan } = usePlan(); const [busy, setBusy] = useState<'checkout' | 'settling' | 'portal' | 'payment' | null>(null); const [error, setError] = useState(null); @@ -181,7 +182,7 @@ export function PlanSection() { if (!plan) { return ( -
    +

    Plan

    {readError ? (

    @@ -209,7 +210,7 @@ export function PlanSection() { const limits = plan.limits; return ( -

    +

    Plan

    {title}. {sentence} diff --git a/apps/web/src/pages/Account.module.css b/apps/web/src/pages/Account.module.css index 4d75fa4..74f62fa 100644 --- a/apps/web/src/pages/Account.module.css +++ b/apps/web/src/pages/Account.module.css @@ -9,7 +9,7 @@ gap: 0.75rem; } -/* The gap spaces a section's contents; the global margins on p and h2 would add to it */ +/* The gap spaces a section's contents; the global margins on p, headings and lists would add to it */ .section > * { margin: 0; } diff --git a/apps/web/src/pages/Account.tsx b/apps/web/src/pages/Account.tsx index 57b67ec..2e16c06 100644 --- a/apps/web/src/pages/Account.tsx +++ b/apps/web/src/pages/Account.tsx @@ -31,7 +31,7 @@ export function Account() {

    Account

    - {PLAN_PAGE_LINKED && } + {PLAN_PAGE_LINKED && }

    Email

    From 20745cc9fcb472f503133a5d539dc7035e71532b Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:21:53 -0600 Subject: [PATCH 09/12] Remove the Account page's unused error style `.error` came over from the Plan page's module, but nothing on the Account page uses it: the plan section has its own. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/pages/Account.module.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/web/src/pages/Account.module.css b/apps/web/src/pages/Account.module.css index 74f62fa..364356e 100644 --- a/apps/web/src/pages/Account.module.css +++ b/apps/web/src/pages/Account.module.css @@ -23,10 +23,6 @@ font-size: 0.9rem; } -.error { - color: var(--color-error); -} - .danger { color: var(--color-error); } From 0362f9a391979168e7d5d639f568697d52fc3998 Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:21:53 -0600 Subject: [PATCH 10/12] Give the device id's reason in the Account page's overflow comment The rule that lets a long word break covers the email address and the device id, but its comment only explained the email. The device id's reason, 22 characters with no spaces, was lost when the rule moved from the Plan page's module. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/pages/Account.module.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/src/pages/Account.module.css b/apps/web/src/pages/Account.module.css index 364356e..34f5860 100644 --- a/apps/web/src/pages/Account.module.css +++ b/apps/web/src/pages/Account.module.css @@ -27,7 +27,8 @@ color: var(--color-error); } -/* An email address has no spaces to break at, and a long one would push a narrow screen sideways */ +/* An email address, or a device id (22 characters), has no spaces to break at, and a long + one would push a narrow screen sideways */ .email, .deviceId { overflow-wrap: anywhere; From 345e78da4fdf5bb33bce05bc7847485c4794971a Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:21:57 -0600 Subject: [PATCH 11/12] Drop the Plan page from the nav slider's comment The comment listed Plan among the pages with no nav item, but `/plan` now redirects to Account before anything renders, so the nav is never shown on it. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/components/Nav.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/components/Nav.tsx b/apps/web/src/components/Nav.tsx index cb4a494..5370f9b 100644 --- a/apps/web/src/components/Nav.tsx +++ b/apps/web/src/components/Nav.tsx @@ -18,7 +18,7 @@ export default function Nav() { left: offsetLeft, }); } else { - // A page with no item here (Account, Plan, the static pages while signed in): the + // A page with no item here (Account, the static pages while signed in): the // slider shrinks away where it stood, rather than staying lit on the page left behind. setSliderStyle((was) => ({ width: 0, left: was.left + was.width / 2 })); } From e5f594e8a7149fd4bdfff38268e5aef9cd426a81 Mon Sep 17 00:00:00 2001 From: C Deutsch Date: Sat, 14 Nov 2026 11:22:14 -0600 Subject: [PATCH 12/12] Rename `PLAN_PAGE_LINKED` to `PLAN_SHOWN` There is no Plan page to link any more. The flag now decides whether the plan shows at all: its section on the Account page, the Push page's link when a push is refused for the month's limit, and Support's link. Its comment names all three, so turning it off for a move back to sandbox keys is seen to hide every way to the checkout. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/components/PlanSection.tsx | 2 +- apps/web/src/config/plan.ts | 9 +++++---- apps/web/src/pages/Account.tsx | 4 ++-- apps/web/src/pages/Push.tsx | 4 ++-- apps/web/src/pages/Support.tsx | 6 +++--- docs/billing.md | 2 +- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/apps/web/src/components/PlanSection.tsx b/apps/web/src/components/PlanSection.tsx index f39165c..9d1aa88 100644 --- a/apps/web/src/components/PlanSection.tsx +++ b/apps/web/src/components/PlanSection.tsx @@ -72,7 +72,7 @@ export function describePlan(plan: PlanReport): { title: string; sentence: strin * moved here; that address now redirects to `/account` with its query (App.tsx), so the * checkout's return lands here either way. * - * Shown only while `PLAN_PAGE_LINKED` is on: production ran on the Stripe sandbox's keys + * Shown only while `PLAN_SHOWN` is on: production ran on the Stripe sandbox's keys * until launch, and a test card here would give anyone Pro. */ export function PlanSection({ className }: { className?: string }) { diff --git a/apps/web/src/config/plan.ts b/apps/web/src/config/plan.ts index 132c389..c62c76b 100644 --- a/apps/web/src/config/plan.ts +++ b/apps/web/src/config/plan.ts @@ -24,12 +24,13 @@ export const LIMITS: Record<'free' | 'pro', TierLimits> = { }; /** - * Whether the Account page shows the plan. On since launch (2026-10-25), - * when production moved to the live Stripe account. Turn it off only together with a - * move back to sandbox keys: on sandbox keys, anyone who saw the plan there could + * Whether the web app shows the plan: its section on the Account page, the Push page's link + * to it when a push is refused for the month's limit, and Support's link to it. On since + * launch (2026-10-25), when production moved to the live Stripe account. Turn it off only + * together with a move back to sandbox keys: on sandbox keys, anyone who saw the plan could * subscribe with a test card and get Pro. The rest of the Account page shows either way. */ -export const PLAN_PAGE_LINKED = true; +export const PLAN_SHOWN = true; export const SUPPORT_EMAIL = 'hello@pushthat.link'; diff --git a/apps/web/src/pages/Account.tsx b/apps/web/src/pages/Account.tsx index 2e16c06..f6d1d94 100644 --- a/apps/web/src/pages/Account.tsx +++ b/apps/web/src/pages/Account.tsx @@ -3,7 +3,7 @@ import { Helmet } from 'react-helmet'; import { Link } from 'react-router'; import { PlanSection } from '@/components/PlanSection'; -import { PLAN_PAGE_LINKED } from '@/config/plan'; +import { PLAN_SHOWN } from '@/config/plan'; import { useAuth } from '@/contexts/AuthContext'; import { deviceId } from '@/services/keyStore'; @@ -31,7 +31,7 @@ export function Account() {

    Account

    - {PLAN_PAGE_LINKED && } + {PLAN_SHOWN && }

    Email

    diff --git a/apps/web/src/pages/Push.tsx b/apps/web/src/pages/Push.tsx index a736d66..ee8a4fe 100644 --- a/apps/web/src/pages/Push.tsx +++ b/apps/web/src/pages/Push.tsx @@ -4,7 +4,7 @@ import { useState } from 'react'; import { Link } from 'react-router'; import Button from '@/components/Button'; -import { LIMITS, PLAN_PAGE_LINKED, formatMb } from '@/config/plan'; +import { LIMITS, PLAN_SHOWN, formatMb } from '@/config/plan'; import { usePlan } from '@/hooks/usePlan'; import { KEYS_UNAVAILABLE, usePushKeys } from '@/hooks/usePushKeys'; import { @@ -176,7 +176,7 @@ export default function Push() { {error && (
    {error.message} - {error.atLimit && PLAN_PAGE_LINKED && ( + {error.atLimit && PLAN_SHOWN && ( <> {' '} {plan?.tier === 'pro' ? 'See your plan' : 'Upgrade to Pro'} diff --git a/apps/web/src/pages/Support.tsx b/apps/web/src/pages/Support.tsx index cce0cdf..437b46f 100644 --- a/apps/web/src/pages/Support.tsx +++ b/apps/web/src/pages/Support.tsx @@ -2,7 +2,7 @@ import { Helmet } from 'react-helmet'; import { Link } from 'react-router'; import LegalContainer from '@/components/LegalContainer'; -import { LIMITS, PLAN_PAGE_LINKED, PRO_PRICE_USD, REFUND_DAYS, SUPPORT_EMAIL, formatMb } from '@/config/plan'; +import { LIMITS, PLAN_SHOWN, PRO_PRICE_USD, REFUND_DAYS, SUPPORT_EMAIL, formatMb } from '@/config/plan'; /** * Support, `/support`: how to reach a person, and where everything else is. Written for @@ -34,8 +34,8 @@ export default function Support() {

    To change your card, download an invoice or cancel, open{' '} - {PLAN_PAGE_LINKED ? Account : 'Account'} from the web app’s menu and choose Manage - billing. Cancelling stops the next renewal and keeps Pro until the year already paid for ends. + {PLAN_SHOWN ? Account : 'Account'} from the web app’s menu and choose Manage billing. + Cancelling stops the next renewal and keeps Pro until the year already paid for ends.

    diff --git a/docs/billing.md b/docs/billing.md index 2ad8537..bbc8751 100644 --- a/docs/billing.md +++ b/docs/billing.md @@ -62,7 +62,7 @@ Set in the dashboard, since the API cannot: - Checkout terms (Settings, Checkout and Payment Links): `/terms` and `/privacy`. - Revenue recovery (Billing, Revenue recovery): Smart Retries, failed-payment emails and automatic card updates on. Matters more on a yearly plan, since a card often expires within the year. -Once the three secrets hold the live values, the functions are redeployed (they read the secret versions current at deploy) and `PLAN_PAGE_LINKED` is turned on in the web app. The sandbox's webhook endpoint points at the same function, so it was disabled at the switch (2026-10-25): its deliveries fail the live signature. Re-enable it only with the sandbox's three secrets back in place. +Once the three secrets hold the live values, the functions are redeployed (they read the secret versions current at deploy) and `PLAN_SHOWN` is turned on in the web app. The sandbox's webhook endpoint points at the same function, so it was disabled at the switch (2026-10-25): its deliveries fail the live signature. Re-enable it only with the sandbox's three secrets back in place. ## How it is built