Skip to content

Add price & remove privacy score - #60

Merged
dewabisma merged 4 commits into
mainfrom
beast/improve-ux-again
Oct 13, 2026
Merged

dewabisma merged 4 commits into
mainfrom
beast/improve-ux-again

Conversation

@dewabisma

Copy link
Copy Markdown
Collaborator

No description provided.

@dewabisma
dewabisma requested a review from n13 October 12, 2026 15:07

@n13 n13 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer model: GPT-6.1 Sol

REQUEST_CHANGES — three correctness issues remain at c3a04ceecf814930ca94c065846cde68c91998ad.

  1. [P1] Restore the public GraphQL URLs for both networks — network-provider.tsx:7–8. Both production endpoints now start with http://127.0.0.1:8080/. NETWORKS uses these values even when VITE_ENABLE_LOCAL_NETWORK is disabled, and both Apollo and useFetchClient use the selected URL directly. Consequently, the deployed explorer queries each visitor's own computer instead of the public indexer, breaking chain statistics, search, and detail/listing requests on Mainnet and Planck. Both loopback URLs are present in the production bundle. Restore the original HTTPS endpoints; any development proxy must be explicitly limited to development.

  2. [P2] Fetch the price through an endpoint browsers can read — use-qtc-price.ts:28. The production hook fetches https://migration.fail/api/tracker directly from the browser. Two live checks with Origin: https://explorer.quantus.com, including browser-style fetch headers, returned HTTP 200 JSON without Access-Control-Allow-Origin. Browsers therefore reject access to that response under CORS, and the QTC Price card enters its error state. The mocked-fetch tests and the fixed development price hide this integration failure. Serve the validated quote through a same-origin Pages function, or ensure the tracker allows the explorer origin before relying on direct browser access.

  3. [P2] Clear the cached font promise when loading fails — og-fonts.ts:21–36. fontsPromise permanently retains a rejected Promise.all. If any font fetch fails once, every later image generation in that worker isolate immediately rethrows the old error, even after the font endpoint recovers. This makes uncached OG requests return 500 and prevents refreshing cached images until the isolate is replaced. I reproduced an initial 503 followed by a healthy fetch implementation: the second call still rejected with the original 503 and issued no new fetches. Clear the memoized promise on rejection while propagating/logging the error; keep memoization after successful loading.

Validation: frozen-lockfile dependency installation passed; bun run build (Vite + TypeScript) passed; 17 focused market/chain-stat tests passed; git diff --check passed; wrangler pages functions build passed. A local Miniflare 4 smoke check with fixture tracker data and the committed fonts produced a valid 1200×630 PNG and verified cache reuse (compatibility date 2026-08-06). Both GitHub checks are successful; the CI workflow currently runs the build with its test step disabled. Browser execution was unavailable because no Chromium executable is installed; the CORS finding is based on live HTTP responses and browser CORS rules. Tracked PR files were left unchanged.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Deploying explorer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9261981
Status: ✅  Deploy successful!
Preview URL: https://31eb443f.explorer-kpt.pages.dev
Branch Preview URL: https://beast-improve-ux-again.explorer-kpt.pages.dev

View logs

@dewabisma
dewabisma requested a review from n13 October 12, 2026 16:34

@n13 n13 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer model: GPT-6.1 Sol

APPROVE — no blocking code findings at c17bec7f0f35174604227480fb5c6f9fe8e8ec79 after reviewing the full diff against 8e65cbad649e79dfd45d660689480b2cb02a4b75.

The earlier findings are resolved: both public GraphQL URLs are restored; a rejected font-loading promise is cleared, with retry and successful memoization verified; and the tracker now sends Access-Control-Allow-Origin: https://explorer.quantus.com. Chromium rendered the production build's QTC Price card using the live tracker response at the explorer origin (static assets and unrelated GraphQL responses were supplied locally).

Validation passed:

  • Frozen-lockfile dependency installation with CI's Bun 1.2.16; production Vite build and TypeScript check.
  • 17 focused market and chain-stat tests; git diff --check.
  • wrangler pages functions build; local Miniflare 4 smoke checks produced a valid 1200×630 PNG and verified query-independent cache reuse, stale-image fallback on tracker failure, and an uncached 500 response. Runtime smoke testing used compatibility date 2026-07-30 with nodejs_compat enabled.
  • Font fault injection: an initial 503 was followed by a successful retry, then reuse without further fetches.

Deployment caveat: the GitHub build and dependency checks pass, but Cloudflare Pages still reports a failed deployment. The local function build/runtime checks pass; Cloudflare deployment logs and dashboard configuration were unavailable because this environment has no authenticated Cloudflare account. The deployment failure's cause is therefore unconfirmed, and that check should be resolved before merging. CI currently leaves its test step disabled. Tracked PR files were left unchanged.

@dewabisma
dewabisma requested a review from n13 October 12, 2026 17:11

@n13 n13 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer model: GPT-6.1 Sol

APPROVE — no blocking findings at 9261981bf1ce5093a90601fbca36f95fce102ff2, after inspecting the full diff against 8e65cbad649e79dfd45d660689480b2cb02a4b75 and the earlier review threads.

The latest JSX-free Open Graph template builds successfully and the exact-head Cloudflare preview serves a valid 1200×630 PNG with the live quote. The public GraphQL endpoints remain correct, and failed font loading retries successfully while successful loads remain memoized. The privacy-score removal is consistent across the UI, query, generated operation, and detail schema.

Validation passed:

  • Frozen-lockfile dependency installation with CI's Bun 1.2.16; bun run build (Vite and TypeScript); git diff --check.
  • 17 focused market and chain-stat tests.
  • wrangler pages functions build; live preview /api/og returned HTTP 200, image/png, and the expected dimensions.
  • Temporary source-level smoke checks verified font retry/memoization, query-independent fresh cache reuse, stale-image fallback on tracker failure, and uncached 500/no-store responses for failed or invalid tracker data. These handler checks used a fixture image generator; actual rendering was verified on the deployed preview.
  • Chromium rendered the local production build's QTC Price card at https://explorer.quantus.com using the live tracker (HTTP 200, displayed $135.56); static assets were supplied locally and unrelated GraphQL requests were stubbed.
  • All current GitHub checks, including Cloudflare Pages, are successful. Tracked PR files were left unchanged.

Nonblocking caveats: the tracker currently permits only https://explorer.quantus.com, so Pages preview origins cannot read the live price; production-origin browser access passed. CI still has its test step disabled. Consider logging caught OG errors at functions/api/og.ts:64 so an upstream failure served from the stale cache remains observable.

@dewabisma
dewabisma merged commit 8cbf8b8 into main Oct 13, 2026
3 checks passed
@dewabisma
dewabisma deleted the beast/improve-ux-again branch October 13, 2026 02:38
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.

2 participants