refactor: polish pass#400
Merged
Merged
Conversation
…308 cache pollution
…3 callers off bare event-name strings
…s instead of flat-zero line
…ver-side PostHog tag
…d-pattern to fmt/fmt:fix
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
@claude review |
|
Claude finished @adibarra's task in 3m 12s —— View job Review🟢 LGTM — no blocking issues found. Read the diff across all 21 files. The polish pass is well-scoped, with new tests covering the extracted code (29 tests for Verified
Non-blocking observations
|
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.
Note
Medium Risk
Compare page static-param removal and redirect logic affect SEO/caching; trend interpolation and JSON-LD escaping change user-visible chart gaps and structured-data safety; feedback failure events include truncated error text sent to analytics.
Overview
This polish pass adds server-side observability via a lightweight
trackServerhelper (PostHgo/capture/or console fallback), wired into feedback API failures (E_CRYPTO/E_INSERT) and per-dollar PNG render failures (502 + short cache instead of opaque 500s).Compare routes stop pre-enumerating slugs in
generateStaticParamson the HTML pages (still fully dynamic SSR) and only 308-redirect when the slug differs from canonical after case-insensitive comparison, avoiding redundant CDN cache entries for mixed-case URLs that already match content.Chart/trend correctness: interpolated trends return null (gaps) when a metric is missing on any frontier point instead of drawing a misleading zero line; lightweight trend points gain optional measured power fields and drop unsafe casts. Dynamic x-axis reads use typed
AggDataEntryaccessors in chart and trend hooks.JSON-LD now escapes
>,&, and<in inline script payloads (with tests). Feature gate re-lock is centralized inrelockFeatureGate()with unit tests. Latest-image age/outdated helpers move tolatest-image-utilswith Vitest coverage. FeedbackForm loads vianext/dynamicin the nudge registry. Root lint/fmt scripts pass--no-error-on-unmatched-patternconsistently.Reviewed by Cursor Bugbot for commit 7c171aa. Bugbot is set up for automated code reviews on this repo. Configure here.