Skip to content

Fix pricing calculator shared URL restoration - #727

Draft
ehfeng wants to merge 1 commit into
mainfrom
codex/fix-pricing-calculator-url
Draft

ehfeng wants to merge 1 commit into
mainfrom
codex/fix-pricing-calculator-url

Conversation

@ehfeng

@ehfeng ehfeng commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

Opening or reloading a calculator URL currently resets every control to its default, even though editing controls writes the chosen values into the URL. Restore the plan, browser type, duration and session count after hydration. For example, ?plan=hobbyist&browserType=headful&duration=60&sessions=10000#pricing-calculator now restores the $100 estimate.

Accept only supported plan/browser values and nonnegative safe-integer counts, with per-field defaults for missing or invalid parameters. GPU links retain Enterprise or Start-Up, or select Start-Up when needed, matching the existing controls. Restoration leaves the incoming URL untouched; subsequent interactions use the existing URL writer and preserve unrelated query parameters. Rates and pricing calculations are unchanged.

Testing

  • npx --yes mint@4.2.930 broken-links with Node 22 — no broken links.
  • npx --yes mint@4.2.930 dev --no-open --port 3418 — local pricing page renders successfully.
  • Chrome: shared Hobbyist/headful URL restores 60 seconds × 10,000 sessions and $100; reload preserves it. Editing to 20,000 sessions updates the URL and $180 total, which survives reload.
  • Chrome: 12 parameter cases covering missing/empty values, invalid enums (including prototype names), negatives, malformed/decimal/exponent/whitespace values, NaN/Infinity, zero, MAX_SAFE_INTEGER and the next integer, GPU plan upgrade, Enterprise GPU, and headless pricing. Incoming URLs remain unchanged during restoration.
  • Chrome: unrelated utm_source parameter survives input changes and reload; no console errors in tested flows.
  • git diff --check.

The initially installed Mintlify 4.2.257 reported seven unrelated broken links; the repository-pinned 4.2.930 check above passes. Browser checks were performed against the actual local Mintlify preview; no new test framework was added.

Visual proof

Mintlify PR preview with shared calculator parameters also restores the expected $100 estimate in Chrome without console errors. Both the GitHub broken-links check and Mintlify preview build passed for c8e24868dadf56dc738f78c5bef414a565091572.

Local preview verified after reload: Hobbyist, headful, 60 seconds, 20,000 sessions → $30 base + $160 usage − $10 credits = $180 total.

Additional notes

Follow-up to #723; its rendering fix remains unchanged. Draft for review only; no merge or production deployment requested.

@mintlify

mintlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Kernel 🟢 Ready View Preview Oct 28, 2026, 2:49 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

This branch was successfully deployed

1 active deployment
staging — c8e24868 Deployed Oct 28, 2026 by mintlify[bot]
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