Skip to content

feat: add percentage - #61

Merged
dewabisma merged 2 commits into
mainfrom
beast/update-with-percentage
Oct 14, 2026
Merged

dewabisma merged 2 commits into
mainfrom
beast/update-with-percentage

Conversation

@dewabisma

Copy link
Copy Markdown
Collaborator

No description provided.

@dewabisma
dewabisma requested a review from n13 October 14, 2026 12:52

@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 — the new OG freshness window defeats caching for normal tracker snapshots.

  • P2: Preserve cache reuse when the tracker observation is older than five minutes — src/lib/qtc-market.ts:18. The live tracker returned updatedAt=2026-10-14T12:45:06.010Z; at 12:55 UTC that snapshot was about ten minutes old, and its HTTP response still advertised roughly 50 minutes of cache lifetime. The OG handler stores this observation time as X-Observed-At and uses it for both image freshness and browser TTL. With the new five-minute threshold, even a newly rendered image is immediately stale: two consecutive handler requests using that snapshot performed two tracker fetches and two image renders, both returning Cache-Control: public, max-age=0. This repeatedly renders unchanged data and increases request latency and Worker load. Restore the one-hour window, or implement bounded revalidation that reuses the image when the tracker observation has not changed. Cover consecutive requests with an observation older than five minutes in a handler regression test.

Validation at b0cee07c665c91003bf4743c3dbc68744d9abdc4:

  • bun test src/lib/qtc-market.test.ts: 13 passed.
  • bun run build: passed, including TypeScript.
  • Prettier check on all four changed files and git diff --check: passed.
  • Handler reproduction with the captured live snapshot, an in-memory cache, and a stubbed image renderer confirmed the finding.
  • All current GitHub checks passed; the CI “Build and Test” job currently runs the build with its test step disabled.

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying explorer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 67a1a49
Status: ✅  Deploy successful!
Preview URL: https://1e678333.explorer-kpt.pages.dev
Branch Preview URL: https://beast-update-with-percentage.explorer-kpt.pages.dev

View logs

@dewabisma
dewabisma requested a review from n13 October 14, 2026 14:03

@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 67a1a496591f3d39b46c9101e4182270e4e79ac8.

Reviewed the complete diff and affected callers. The shared FromAddressCell applies the minting label consistently across the transfer, unified-transaction, and extrinsic-transfer tables; both account-type label callers supply the address.

Rechecked the earlier OG-cache finding against the current upstream behavior. At 14:08:22 UTC, the tracker observation was 247 seconds old and advertised 52 seconds of remaining cache lifetime, consistent with a five-minute window. The earlier one-hour upstream-cache mismatch is no longer present in these live responses. With the captured payload at a one-minute observation age, two consecutive handler requests used one tracker fetch and one image render, both with a positive browser TTL. The exact-head Cloudflare preview also returned HTTP 200, a valid PNG, and max-age=179.

Validation:

  • bun test on the market, minting-display, From-cell, address-classification, and account-filter suites: 58 passed, 0 failed.
  • bun run build: passed, including TypeScript.
  • Prettier check on all 15 changed files and git diff --check: passed.
  • Chromium check of the production price display at 375, 640, 680, 768, and 1024 pixels: price and percentage remained visible.
  • All current GitHub checks passed. The CI test step remains disabled; the focused tests above were run locally.

@dewabisma
dewabisma merged commit 44dd392 into main Oct 14, 2026
3 checks passed
@dewabisma
dewabisma deleted the beast/update-with-percentage branch October 14, 2026 14:18
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