Skip to content

Plans: plan and scans in Subscription, one upgrade prompt for every limit - #7

Merged
almas-alright merged 6 commits into
mainfrom
feature/plans
Oct 27, 2026
Merged

almas-alright merged 6 commits into
mainfrom
feature/plans

Conversation

@almas-alright

Copy link
Copy Markdown
Contributor

What

The web side of plans (API: LyricScripts/ScribbleScan, branch feature/plans).

  • Subscription (profile menu): the plan and this month's automatic scans, with See plans.
  • One upgrade prompt: the API's 402 upgrade_required answers become an ss:upgrade event (apiError in the client); UpgradeDialog shows the bigger plans with prices from GET /v1/plan, the suggested one highlighted, and Email us to upgrade when the server has a support address (until payments exist).
  • Upload dialog: how many automatic scans are left; when none are, that the upload still works and the details are typed in. Hidden while the server reads nothing automatically.
  • Excel export failures go through apiError, so its limit opens the same prompt.
  • openapi.json is the API's current contract (adds the plan routes; sign-in and reconciliation routes were already on the API).

Tested

  • typecheck, vitest (32, new test/plan.test.ts), next build, Biome on the new files.
  • In a browser against the API in dev mode: Subscription panel, See plans, creating a business space on Free (402 → "Upgrade to Business"), scans left and used up, Escape closing only the top dialog.

Note

Overlaps with #5 (4 files, mostly the generated API files) and #6 (3 files); whichever merges later needs a small merge.

🤖 Generated with Claude Code

…ry limit

- Subscription (profile menu) shows the plan and this month's automatic
  scans, with "See plans".
- The API's 402 upgrade_required answers become one "ss:upgrade" event
  (apiError in the client); UpgradeDialog shows the bigger plans with
  their prices from GET /v1/plan, the suggested one first, and "Email us
  to upgrade" when the server has a support address.
- The upload dialog says how many automatic scans are left, and when none
  are, that the upload still works and the details are typed in. Hidden
  while the server reads nothing automatically.
- Excel export failures go through apiError, so its limit opens the prompt.
- openapi.json is the API's current contract (adds the plan routes;
  sign-in and reconciliation routes were already on the API).

Tested in a browser against the API in dev mode: Subscription, See plans,
a business space on Free (402 -> Upgrade to Business), scans left and
used up, and Escape closing only the top dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T06:26:21.975688Z 65efae3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65efae3c9b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/plan.ts
almas-alright and others added 4 commits October 27, 2026 15:02
The label came from how many types a plan had, so a plan with two would
still promise receipts, invoices and bank statements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main brought the Biome cleanup (#6), which reformatted the files this
branch touches. Took main's versions of app-shell, profile-menu and the
upload dialog and re-applied this branch's few lines: the UpgradeDialog
mount, PlanSummary in Subscription, and ScansLeft in the upload dialog;
formatted the export line in the receipts page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI now runs the lint after the build (#4), so Biome was checking the
generated .next folder: 15,411 findings, all in build output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@almas-alright almas-alright left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

conflict occured

Main brought passwordless sign-in (#5). openapi.json keeps this branch's
copy, the API's full contract, which already has the sign-in routes; the
generated types are regenerated from it. CLAUDE.md keeps both new
paragraphs (sign-in, plans).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@almas-alright
almas-alright merged commit 005b3a2 into main Oct 27, 2026
2 checks 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