Skip to content

fix(rpc): show the real base endpoint in RPC response URL, not a fabr…#31

Merged
mikedotexe merged 1 commit into
mainfrom
fix/rpc-response-endpoint-url
Jul 21, 2026
Merged

fix(rpc): show the real base endpoint in RPC response URL, not a fabr…#31
mikedotexe merged 1 commit into
mainfrom
fix/rpc-response-endpoint-url

Conversation

@mikedotexe

Copy link
Copy Markdown
Collaborator

…icated path

The LIVE RESPONSE header and the expanded-response modal on RPC operation pages displayed a synthetic URL like
https://rpc.mainnet.fastnear.com/account/view_account. NEAR JSON-RPC does not route by path — every method is a POST to the base endpoint with the method in the JSON body — so that /account/view_account slug never matched the actual request that the page fires.

Drop the buildRpcEndpointUrl helper (which derived the slug from the canonical docs path) and report the real endpoint the request POSTs to (selectedNetworkDetails.url), which also correctly tracks mainnet/testnet. The change is runtime-display only; REST/HTTP pages, which have genuine paths, are untouched.

Update the two playwright assertions that had codified the old behavior.

Claude-Session: https://claude.ai/code/session_01H8DjaLbA7Ed63XuSAENrJ7

…icated path

The LIVE RESPONSE header and the expanded-response modal on RPC operation
pages displayed a synthetic URL like
`https://rpc.mainnet.fastnear.com/account/view_account`. NEAR JSON-RPC does
not route by path — every method is a POST to the base endpoint with the
method in the JSON body — so that `/account/view_account` slug never matched
the actual request that the page fires.

Drop the buildRpcEndpointUrl helper (which derived the slug from the canonical
docs path) and report the real endpoint the request POSTs to
(selectedNetworkDetails.url), which also correctly tracks mainnet/testnet. The
change is runtime-display only; REST/HTTP pages, which have genuine paths, are
untouched.

Update the two playwright assertions that had codified the old behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8DjaLbA7Ed63XuSAENrJ7
@mikedotexe
mikedotexe merged commit f914d2f into main Jul 21, 2026
2 checks passed
@mikedotexe
mikedotexe deleted the fix/rpc-response-endpoint-url branch July 21, 2026 13:58
mikedotexe added a commit that referenced this pull request Jul 21, 2026
…an older build)

No content change. Four PRs merged within ~3 minutes (#32, #33, #30, #31) and their
Cloudflare Pages deployments finished out of order:

  #33 fe452e4  14:01:28
  #31 f914d2f  14:02:13   <- newest commit (contains the RPC endpoint-URL fix)
  #30 99a2520  14:02:56   <- finished LAST

CF Pages points the production alias at the last deployment to *finish*, not the
newest commit, so docs.fastnear.com got pinned to #30's build (main.6e03125c.js),
which predates the RPC fix. Result: the live docs still rendered a fabricated
`https://rpc.mainnet.fastnear.com/account/view_account` instead of the real base
endpoint.

This empty commit forces a fresh production deployment of current main, which
already contains the fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8DjaLbA7Ed63XuSAENrJ7
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