chore(billing): delete the dead seat-based billing feature#3507
Draft
adboio wants to merge 1 commit into
Draft
Conversation
The usage-based billing cutover shipped (#3485, #3487, #3488) and the seat model is dead code: nothing rendered useSeat, the seat store was only fed by auth/onboarding sync calls, and the /api/seats/* client methods have no remaining product surface. Removed: shared seat types/plan keys, core SeatService/seatView/ seatErrors + tokens, the UI seat store/client/hook, api-client seat methods and seat error classes, the SUBSCRIPTION_STARTED/CANCELLED analytics events, the orphaned "upgrade_dialog" surface literal, and the gateway invalidate-plan-cache chain (router procedure, service method, endpoint, URL helper) whose only caller was the seat upgrade flow. Auth identity sync keeps the usage-snapshot cache clear (still load-bearing for usage billing); the llmGateway query invalidation it carried was a no-op (no queries live under that key) and is dropped. Generated-By: PostHog Code Task-Id: 1039ea23-9930-44e2-9888-b05cf8b129ec
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The usage-based billing cutover has fully shipped (#3485 → #3487 → #3488) and the backend migration off seats is underway. The entire seat-based model — per-user seats, auto-provisioning, upgrade/cancel/reactivate flows — is now dead code in the client: nothing renders it, and keeping it around invites confusion with the live usage-billing surfaces sitting in the same directories.
Changes
Pure deletion plus the surgical unhooking around it; no behavior change to the live usage-billing surfaces.
shared/seat.ts(SeatData, plan keys), coreseatService/seatView/seatErrors+ DI tokens + module, UIseatStore/seatClient/useSeat(already had zero importers), the five/api/seats/*api-client methods and both seat error classes, and their tests.LlmGatewayService.invalidatePlanCache, endpoint member, URL helper) — its only caller was the seat upgrade flow.SUBSCRIPTION_STARTED/SUBSCRIPTION_CANCELLEDevents and the"upgrade_dialog"surface literal nothing emits anymore. The liveUPGRADE_PROMPT_*events are untouched.llmGatewayquery invalidation; onboarding's org switch drops its seat fetch;BILLING_FLAGitself stays (it gates the live billing UI).How did you test this?
pnpm typecheck— all 23 packages passpnpm exec biome ci .— clean (3528 files)shared,core,ui,api-client,host-router,agentutils). The@posthog/agentserver /@posthog/git/@posthog/workspace-serversuites and the@posthog/ditoken scan fail in this sandbox for pre-existing environmental reasons (the sandbox blocks the plaingit committheir fixtures use; the di repo-scan times out under parallel load) — unrelated to this diff, and identical onmainhere.node scripts/check-host-boundaries.mjs— no new violationsbiome lint packages/core— zeronoRestrictedImportsAutomatic notifications
Created with PostHog Code