Release v1.15.3 — analytics view: blocked filter + Blocked Queries panel + Pacific timestamps#116
Merged
Merged
Conversation
…cked Queries panel, Pacific timestamps - Empty Result Queries (Last 7 days) excludes blocked=true rows so the v1.15.2 blocklist short-circuits don't double-count as 'real users found nothing' content gaps. Predicate is 'blocked = false', safe for historical rows (schema declares BOOLEAN NOT NULL DEFAULT FALSE). - New Blocked Queries (Last 7 days) panel on /analytics — count + last_seen + up to 5 sample queries per block_reason, surfaced via a new /api/analytics/blocked-queries route. Window honors 'days' but no filter wiring (the rows the blocklist short-circuited never reached the layer filters describe). - Every absolute timestamp on the /analytics dashboard now renders in America/Los_Angeles via Intl.DateTimeFormat (DST-aware: PDT in summer, PST in winter). Storage (Postgres TIMESTAMPTZ in UTC), server window math, and URL from/to contract are unchanged — only display flips.
jpr5
added a commit
that referenced
this pull request
Jun 17, 2026
Reverts PR #116. The v1.15.3 `getBlockedQueries` SQL throws against real Postgres, and the client-side `Promise.all` rejection blanks the entire /analytics page with 'Failed to load analytics: Failed to fetch blocked queries'. Restoring v1.15.2 immediately to get the page working again. The three v1.15.3 changes (blocked filter, Blocked Queries panel, Pacific timestamps) will re-ship as v1.15.4 after explicit local verification against the real Postgres schema.
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.
Three operator-facing /analytics fixes shipped together:
blocked=truerows from "Empty Result Queries (Last 7 days)" — v1.15.2 already short-circuits these via the blocklist; they were visible in the empty-result table only because the SQL filtered onresult_count = 0alone. AddedAND blocked = falsetogetEmptyQueries. Predicate is safe for historical rows that predate the column (schema declaresBOOLEAN NOT NULL DEFAULT FALSE).block_reason, surfaced via a new/api/analytics/blocked-queriesroute. Operator can now see the blocklist actively catching abuse. Window honorsdaysbut takes no other filter params (the rows it surfaces never reached the layer those filters describe).Intl.DateTimeFormat) — emits e.g.2026-06-17 09:40:32 PDT(orPSTin winter) instead of UTC. Storage (Postgres TIMESTAMPTZ in UTC), server-side window math, and the URLfrom/tocontract are all unchanged — only the display side of absolute-instant cells flips.No search API or telemetry changes — operator-facing only.
Test coverage
getEmptyQueriesSQL now containsblocked = false(regression-pinned).getBlockedQueriesreturns one row perblock_reason, groups null-reason rows under<unknown>, orders by hits DESC, and uses a parameterized window interval./api/analytics/blocked-queriesroute: 200 with valid token, 401 without, 500 envelope on DB-layer rejection.last_seencell renders PDT (June) and PST (January) markers; missing/non-parseable values render an em-dash; new Blocked Queries panel fetches the endpoint, renders one row per reason with PDT marker, joined sample queries, and shows a 'No blocked queries' fallback when empty.Notes for reviewer
parseISODate,todayISO,tomorrowISO, theshortDateFmtpill formatter) is intentionally NOT changed — those govern the URLfrom/tocontract and date-picker math, which must stay UTC-aligned with the server's window math. Only operator-facing absolute timestamps flip to Pacific.cli.test.ts(dist-not-built env) are out of scope; verified they fail identically onmain.