Skip to content

feat(portal): let clients order the standard add-ons - #623

Merged
devantler merged 8 commits into
mainfrom
claude/portal-addons
Nov 16, 2026
Merged

devantler merged 8 commits into
mainfrom
claude/portal-addons

Conversation

@devantler

Copy link
Copy Markdown
Contributor

Stacked on #622 (launch discount). Review only this PR's commit. It rebases onto danish-law's offerings PR with the stack.

The maintainer approved a standard set of add-ons. This PR adds them to the catalogue and lets clients order them in the portal, behind the existing order gates. The public listing under the offers follows in its own PR on top of danish-law's price change, which touches the same public copy.

Catalogue (addons in offerings.json)

Each add-on has an id, a kind (one-time or monthly), a VAT-inclusive price in whole kroner, the offerings it fits, an optional unit limit (max) and EN/DA text. The portal refuses to start with an add-on it cannot sell.

  • Monthly, hosting required:
    • priority 400 and express 1000 (tiers; at most one per order);
    • statistics 75 (website, app);
    • email 100.
  • One-time:
    • language 1500 per language, up to 5 (website, app);
    • contact-form 1500 (website, app);
    • payments 3000 (website, app);
    • news 2500 (website);
    • accounts 4000 (app only);
    • migration 1500 (website);
    • seo 1000 (website, app).

The cut add-ons (test version, extra storage, booking, integrations, accessibility check, logo kit) are not in the catalogue and stay fixed quotes.

Ordering and billing

  • Choosing. The receipt lists the add-ons that fit the request's offering, monthly ones only when the proposal includes hosting. The client ticks them and shows the price again. Without JavaScript, a GET form updates the summary, which lists each add-on and the total before the order button (section 12). The order form carries the choice; a retry with another choice is a conflict.
  • Storage. The order stores each add-on with its unit price at the time (portal_order_addons, migration v25). The order's one-time and monthly prices include them, so funding, withdrawals and settlements are unchanged. The launch discount takes off the proposal's own one-time price only.
  • Invoice and payment lines.
    • Numina gets the order's own line, then one line per add-on: one-time ones on the first invoice, monthly ones on each monthly invoice.
    • Stripe Checkout gets the same lines: one-time on the payment, monthly on the subscription.
    • Every price is in whole kroner, so each line's net is exact and the lines add up to the charge.
  • Display. The confirmation email, the receipt and the operator's page list the add-ons.
  • Purge. The retention purge deletes a former client's order add-ons.
  • Candidates. The business-site AGENTS.md now says: a request outside the offer becomes an addon-candidate issue that describes only the request, never the customer. The label is declared in feat(labels): add the addon-candidate label to business-site .github#947, merged, and the monthly review is monorepo#5085, merged.

Tests

TestAddon*:

  • validation: unknown, another offering's, repeated, units over the limit, two tiers, monthly without hosting, and an invalid catalogue;
  • an invoice order with three add-ons: summary and total before the button, refused out-of-offering add-on, idempotent retry, a retry with other add-ons refused, the stored totals, the mail, the Numina lines for the first and a monthly invoice, and the receipt;
  • a card order with the launch discount on the base only, and the Stripe lines on both sessions.

Mutation checks on the invoice lines and the retry rule are load-bearing. The full Go suite passes, and golangci-lint, vet, gofmt, jscpd and cspell are clean.

Part of #21

🤖 Generated with Claude Code

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review for standard add-ons: catalogue validation, GET-based selection and totals before the order button, stored add-ons and totals, one Numina and Stripe line per add-on, discount on the base price only

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T02:24:38.246402Z 6d49ae0 Manual request
ℹ️ 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: 7bc39ef584

ℹ️ 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 server/internal/identity/request.go Resolved
Comment thread server/internal/identity/order.go Resolved
devantler added a commit that referenced this pull request Nov 16, 2026
Codex review on #623:
- An impossible add-on choice (both priority tiers, or units out of
  range) stays ticked with its reason, and the receipt offers no order
  until the client corrects it, instead of silently ordering without
  add-ons.
- A retry of an existing order compares the add-ons it names with the
  order's stored ids and units, keeping their stored prices, so a later
  catalogue change does not turn a card restart into a conflict. Only a
  new order is checked against the current catalogue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler
devantler force-pushed the claude/portal-addons branch from 7bc39ef to 8453916 Compare November 16, 2026 00:38
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review for Re-review after the findings on the previous head were fixed (see the replies on each thread).

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 84539164a6

ℹ️ 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".

@devantler
devantler force-pushed the claude/portal-launch-discount branch from 3b46f0c to dd0f46a Compare November 16, 2026 00:47
devantler added a commit that referenced this pull request Nov 16, 2026
Codex review on #623:
- An impossible add-on choice (both priority tiers, or units out of
  range) stays ticked with its reason, and the receipt offers no order
  until the client corrects it, instead of silently ordering without
  add-ons.
- A retry of an existing order compares the add-ons it names with the
  order's stored ids and units, keeping their stored prices, so a later
  catalogue change does not turn a card restart into a conflict. Only a
  new order is checked against the current catalogue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler
devantler force-pushed the claude/portal-addons branch from 8453916 to 17a1650 Compare November 16, 2026 00:48
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review for Review this PR's own commits; it is stacked on its base branch (rebased onto #625).

@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: 5edcbec6e6

ℹ️ 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 server/internal/identity/request.go Resolved
@devantler
devantler force-pushed the claude/portal-launch-discount branch from dd0f46a to a592c55 Compare November 16, 2026 01:05
devantler added a commit that referenced this pull request Nov 16, 2026
Codex review on #623:
- An impossible add-on choice (both priority tiers, or units out of
  range) stays ticked with its reason, and the receipt offers no order
  until the client corrects it, instead of silently ordering without
  add-ons.
- A retry of an existing order compares the add-ons it names with the
  order's stored ids and units, keeping their stored prices, so a later
  catalogue change does not turn a card restart into a conflict. Only a
  new order is checked against the current catalogue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler
devantler force-pushed the claude/portal-addons branch from 5edcbec to 61fe284 Compare November 16, 2026 01:05
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review for Review this PR's own commits; it is stacked on its base branch, now on #625's latest head.

@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: 61fe2842fc

ℹ️ 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 server/internal/identity/order.go Resolved
@devantler
devantler force-pushed the claude/portal-launch-discount branch from a592c55 to e357d88 Compare November 16, 2026 01:29
devantler added a commit that referenced this pull request Nov 16, 2026
Codex review on #623:
- An impossible add-on choice (both priority tiers, or units out of
  range) stays ticked with its reason, and the receipt offers no order
  until the client corrects it, instead of silently ordering without
  add-ons.
- A retry of an existing order compares the add-ons it names with the
  order's stored ids and units, keeping their stored prices, so a later
  catalogue change does not turn a card restart into a conflict. Only a
  new order is checked against the current catalogue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
devantler added a commit that referenced this pull request Nov 16, 2026
…Hint

Codex review on #623: a catalogue price change deployed between the
order summary and the order button would have charged the new price.
Each add-on's form value now carries the unit price the client was
shown, and a new order is refused unless the catalogue still has it. A
retry keeps the stored prices.

CI's template check (HTMLHint) refused template actions inside tags:
the add-on checkboxes and the units select now render whole tags in
if/else and use wrapping labels instead of template ids.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler
devantler force-pushed the claude/portal-addons branch from 61fe284 to 3a06b48 Compare November 16, 2026 01:29
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review for Re-review this PR's own commits after rebasing onto main (#625 merged); findings on earlier heads are answered on their threads.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 3a06b484e8

ℹ️ 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".

Base automatically changed from claude/portal-launch-discount to main November 16, 2026 01:46
devantler and others added 4 commits November 16, 2026 02:47
The maintainer approved a standard set of add-ons (offerings.json
addons): monthly feature-request priority tiers, visitor statistics and
email sending, and one-time extras such as an extra language, a contact
form or online payments.

- The receipt lists the add-ons that fit the request's offering
  (monthly ones only with hosting); the client ticks them and the
  summary before the order button shows each line and the total.
- The order stores them with their unit prices (portal_order_addons,
  migration v25); its prices include them, so funding, withdrawals and
  settlements work unchanged. At most one priority tier per order.
- The launch discount takes off the proposal's own one-time price only.
- Numina invoices and Stripe Checkout get one line per add-on: one-time
  ones with the first charge, monthly ones every month.
- The confirmation email, the receipt and the operator's page list them.
- business-site AGENTS.md: requests outside the offer become
  addon-candidate issues that describe only the request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex review on #623:
- An impossible add-on choice (both priority tiers, or units out of
  range) stays ticked with its reason, and the receipt offers no order
  until the client corrects it, instead of silently ordering without
  add-ons.
- A retry of an existing order compares the add-ons it names with the
  order's stored ids and units, keeping their stored prices, so a later
  catalogue change does not turn a card restart into a conflict. Only a
  new order is checked against the current catalogue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The maintainer's decision on the terms review (#621): Priority and
Express are targets, not guarantees.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
devantler and others added 2 commits November 16, 2026 02:47
…Hint

Codex review on #623: a catalogue price change deployed between the
order summary and the order button would have charged the new price.
Each add-on's form value now carries the unit price the client was
shown, and a new order is refused unless the catalogue still has it. A
retry keeps the stored prices.

CI's template check (HTMLHint) refused template actions inside tags:
the add-on checkboxes and the units select now render whole tags in
if/else and use wrapping labels instead of template ids.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devantler
devantler force-pushed the claude/portal-addons branch from 3a06b48 to 3164548 Compare November 16, 2026 01:47
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review for Re-review after rebasing onto main now that #622 merged; the add-on commits are unchanged.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 31645489c5

ℹ️ 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".

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

✅MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 1.21s
✅ CSS stylelint 1 0 0 0 1.88s
✅ GO golangci-lint yes yes no no 123.7s
✅ GO revive 187 0 0 0.88s
✅ HTML djlint 5 0 0 1.76s
✅ HTML htmlhint 5 0 0 0.53s
✅ JSON jsonlint 2 0 0 0.11s
✅ JSON prettier 2 0 0 0 0.62s
✅ JSON v8r 2 0 0 1.1s
✅ MARKDOWN markdownlint 17 0 0 0 1.43s
✅ MARKDOWN markdown-table-formatter 17 0 0 0 0.45s
✅ REPOSITORY betterleaks yes no no 0.75s
✅ REPOSITORY checkov yes no no 15.81s
✅ REPOSITORY git_diff yes no no 0.13s
✅ REPOSITORY grype yes no no 166.81s
✅ REPOSITORY osv-scanner yes no no 153.42s
✅ REPOSITORY secretlint yes no no 0.99s
✅ REPOSITORY syft yes no no 2.58s
✅ REPOSITORY trivy yes no no 16.22s
✅ REPOSITORY trivy-sbom yes no no 0.14s
✅ REPOSITORY trufflehog yes no no 1.55s
✅ SPELL cspell 214 0 0 5.4s
✅ SPELL lychee 24 0 0 131.17s

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.2.0 --custom-flavor-setup --custom-flavor-linters COPYPASTE_JSCPD,CSS_STYLELINT,GO_GOLANGCI_LINT,GO_REVIVE,HTML_DJLINT,HTML_HTMLHINT,JSON_JSONLINT,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_CSPELL,SPELL_LYCHEE

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@github-code-quality

github-code-quality Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Go

Go / code-coverage/go

main claude/portal-addons 6d49ae0 +/-
— 78% —

Line coverage data for the main branch is not yet available.

View coverage of the 10 most covered files.
File main claude/portal-addons 6d49ae0 +/-
internal/identity/browser.go — 90% —
internal/webapp/app.go — 89% —
internal/identity/contact.go — 89% —
internal/custom...ity/material.go — 85% —
internal/identity/request.go — 81% —
internal/identi...ork_approval.go — 79% —
internal/identity/card.go — 78% —
internal/identi...l_acceptance.go — 77% —
internal/identity/order.go — 76% —
internal/identity/billing.go — 69% —

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 16, 2026 02:13 UTC

MegaLinter's djlint (H015) wants a line break after a heading.

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

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review for One-line markup change after the last green: a line break after the add-on heading (djlint H015).

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 2828d543c6

ℹ️ 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".

@devantler
devantler marked this pull request as ready for review November 16, 2026 02:22
@devantler
devantler requested a review from a team as a code owner November 16, 2026 02:22
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review for Only MegaLinter's automatic Prettier reformatting of offerings.json since the last green (same JSON content).

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 6d49ae0533

ℹ️ 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".

@devantler
devantler merged commit ab2c6ff into main Nov 16, 2026
40 checks passed
@devantler
devantler deleted the claude/portal-addons branch November 16, 2026 02:26
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