Skip to content

Add additional organization billing information to the Svelte billing settings#2275

Draft
niemyjski with Copilot wants to merge 15 commits into
mainfrom
copilot/add-billing-information-support
Draft

Add additional organization billing information to the Svelte billing settings#2275
niemyjski with Copilot wants to merge 15 commits into
mainfrom
copilot/add-billing-information-support

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor

Organizations can now store the billing identity and tax details needed for invoicing in the Svelte billing settings. The values use the existing organization data model and per-key endpoints, so this does not expand or break the organization API contract.

What changed

  • Adds billing name, billing address, VAT number, and VAT ID fields.
  • Normalizes whitespace-only values and deletes cleared keys instead of storing empty strings.
  • Debounces autosave, serializes overlapping submissions, and performs per-key writes sequentially so late responses and whole-document saves cannot overwrite newer or sibling edits.
  • Keeps the organization query cache current after successful writes.
  • Extracts the invoice table into a reusable BillingInvoices component.
  • Adds Storybook stories for populated, empty, loading, and error invoice states under Features/Organizations/BillingInvoices.

Screenshots

Billing information

Organization billing information fields

Invoice history — Storybook populated state

Invoice history Storybook story

Test coverage

  • Billing data extraction, normalization, missing/malformed data, and cleared-key behavior.
  • Serialized overlapping autosaves, sequential sibling-key writes, successful follow-up submissions, and rejected submissions.
  • Billing-page autosave wiring.
  • Invoice rows, paid/unpaid status, row-open and View Payment actions, plus empty/loading/error states.

Verification

  • npm run test:unit -- --run src/lib/features/organizations/billing-information.test.ts src/lib/features/organizations/components/billing-invoices.svelte.test.ts 'src/routes/(app)/organization/[organizationId]/billing/billing-page.svelte.test.ts' — 3 files, 11 tests passed.
  • npm run check — 0 errors and 0 warnings.
  • npm run build — passed.
  • npm run build-storybook — passed.
  • Local Aspire runtime verification — populated values autosaved, persisted after reload, and cleared values were deleted and remained empty after reload.
  • GitHub Actions Build run 30205531546 — API, client, E2E, Docker, and version passed.
  • GitHub Actions Website run 30205531465 — passed.

Breaking changes

None.

Copilot AI linked an issue May 31, 2026 that may be closed by this pull request
@CLAassistant

CLAassistant commented May 31, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ ejsmith
✅ niemyjski
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] Add support for additional billing information Add additional organization billing information to the Svelte billing settings Jun 1, 2026
Copilot AI requested a review from niemyjski June 1, 2026 00:23
Copilot AI and others added 5 commits June 27, 2026 20:11
Co-authored-by: niemyjski <1020579+niemyjski@users.noreply.github.com>
Co-authored-by: niemyjski <1020579+niemyjski@users.noreply.github.com>
Co-authored-by: niemyjski <1020579+niemyjski@users.noreply.github.com>
@ejsmith
ejsmith force-pushed the copilot/add-billing-information-support branch from a5bb43a to 9916b93 Compare June 28, 2026 01:24
@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
Exceptionless.Core 73% 65% 9499
Exceptionless.AppHost 38% 40% 139
Exceptionless.Insulation 23% 23% 205
Exceptionless.Web 84% 67% 6935
Summary 76% (22527 / 29467) 65% (10348 / 15860) 16778

@niemyjski

Copy link
Copy Markdown
Member

Follow-up reviewer-feedback and thermo-nuclear audit completed against live head e93c6879c3d0309d7024b4d8d510e42eaa654eb3 and origin/main dc940dd15c8d222d9764080622fdf4583d4546b8.

Feedback inventory and classification:

  • GraphQL review threads: 0 total / 0 unresolved.
  • Inline review comments: 0.
  • Submitted reviews: 0.
  • Top-level comments: the coverage report is informational and green; the CLA Assistant notice is an external gate because the Copilot committer cannot sign the CLA. There is no human, Codex, or Copilot code-review finding outstanding at the current live head.

Thermo-nuclear findings:

  • No remaining structural blocker or justified code change was found in the complete branch-vs-main diff.
  • The invoice table is isolated in an 89-line presentational component with populated/empty/loading/error Storybook states; the billing route is 301 lines and no changed file crosses 1,000 lines.
  • Serialized autosaves prevent older responses from overwriting newer input.
  • Per-key writes intentionally remain sequential: the backend handlers load and save the whole organization document per request, so parallel sibling-key writes can lose updates. This is correctness orchestration, not incidental serialization.
  • Missing/malformed legacy data normalizes safely, cleared values delete their stable keys, generic API access remains organization-scoped, and no API contract changed.
  • The PR description’s stale test filenames and unsupported backend-test claim were corrected.

Verification:

  • Focused Vitest: 3 files / 11 tests passed.
  • npm run check: 0 errors / 0 warnings.
  • npm run build: passed.
  • npm run build-storybook: passed.
  • git diff --check origin/main...HEAD: passed.
  • Build workflow 30205531546: API, client, E2E, Docker, and version passed.
  • Website workflow 30205531465: passed.

No commit was needed for this follow-up audit. The PR is code-ready and GitHub reports it mergeable; the remaining gates are the existing draft state and pending Copilot CLA.

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.

Add support for additional billing information

4 participants