Repository navigation
fix(cli,web,mobile): repair tier display, opencode v2 startup and v2 health checks - #130
Merged
Merged
Conversation
…health checks Fixes #129: the Dodo webhook stored the event name suffix ('updated', 'created', ...) as subscription_status, so effectiveTier() saw a non-'active' status and the CLI reported 'free' while the dashboard showed the raw paid tier. The webhook now reads the real status from the payload, ignores non-subscription events, keeps the paid tier through the cancel-at-period-end grace window, and effectiveTier() self-heals rows corrupted by the old webhook. Dashboard, API-key validation and the tunnel server all use the same grace-aware logic. Fixes #128: 'opencode serve --log-level DEBUG' is rejected by the v2 binary, killing the server at startup, and the CLI still printed a QR for the dead backend. The CLI now detects the server major via 'opencode --version', uses the matching flags, health paths and /api/* proxy routes, fails fast on spawn errors, and only hands back health-verified ports. The mobile app probes /api/info before /global/health so v2 servers no longer show 'remote server unreachable'. Custom binaries supported via opencodeBin config / CROSSCODE_OPENCODE_BIN.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 1, 2026
Open
This branch was successfully deployed
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.
Fixes #128 and #129.
#129 — CLI showed free tier while dashboard showed starter
Root cause: the Dodo webhook stored the event-name suffix (e.g.
subscription.updated→ statusupdated) assubscription_status.effectiveTier()only acceptedactive, so the CLI (and tunnel server) computedfreewhile the dashboard displayed the rawtiercolumn (starter). Cancelling withcancel_at_period_endmade this certain to hit.effectiveTier()now acceptsactive/trialing/past_due, honors the grace window, and self-heals rows corrupted by the old webhook (unknown status + future renewal → paid).#128 — 'Failed to start opencode serve' then a dead QR; app says unreachable (opencode v2)
Root causes: v2 rejects
--log-level DEBUG(needs lowercase), so the server died at startup;proc 'error'only printed a message while execution continued to a scannable-but-dead QR; and the mobile app probed only/global/health, which on v2 serves the web UI instead of JSON health.opencode --versionand uses matching serve flags, log patterns, health paths (/api/infoon v2) and/api/*proxy routes.opencodeBinconfig /CROSSCODE_OPENCODE_BIN(documented indocs/cli.md)./api/infobefore/global/healthin both the connect screen and the home health check, and caches the detected version per connection.Verified:
tsc --noEmitclean oncrosscode,@crosscode/shared,tunnel-server,mobile; web has only pre-existing stale.nextcache errors for removed beta pages.effectiveTieredge cases tested (grace, corrupted status, expired). CLItsupbuild succeeds.