Repository navigation
feat: a post is read on a page of its own, and every post in one list (ADR 0070) - #62
Merged
Merged
Conversation
… (ADR 0070)
A post on Insights opens a page of its own: its views since they were first counted, on average per
day and in its best month, a chart of its views by the hour, day, week, month or year, every month
and year by total views or by average per day, and its last 13 weeks day by day. All posts lists
every post the sitemap names with how often each was read, searchable, the most read or the newest
first.
- GET /api/sites/{id}/insights/post?path= answers one listed post's record; its headline is
Insights' own figure (kept months before the first month answered from reports, the reports from
there on). A month never kept for the post, or kept before the post was listed, has no figure
rather than nought.
- GET /api/sites/{id}/insights/post/series draws the post's chart, answering the website series'
SeriesResponse.
- The paths asked about are the control-plane row's, never the request's: the post's own and the
path a same-site redirect landed on, bound as at most two values and compared after
reconciliation. An unknown website, a forbidden one and an unlisted path answer the same 404
without asking the telemetry store.
- GET /api/sites/{id}/posts lists every listed post, Most read (Insights' tie rule) or Newest,
25, 50 or 100 a page. A search matches title or path case-insensitively in PostgreSQL (ILIKE,
with \ % _ escaped and the text bound); a whole http(s) address is compared by the path it
names. No posts or no match is answered without the telemetry store.
- Dashboard: /app/insights/post and /app/insights/posts. Insights' post titles open the post's
page and an arrow opens it on the website; a post opened from the list leads back to the same
page, search and order of it. The Overview's chart pieces move unchanged into
components/charts/cut-picture.tsx and lib/analytics/use-picture-plan.ts.
- Shared controls change on every screen that uses them: 40 px phone controls in ListSwitch,
PopulationSwitch and Pagination, phone paging that keeps a short list whole, a stretched link on
a ranked row, a lone figure in a long line drawn as a dot, and focus never left under the
sticky header.
No migration, and no retention or privacy change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Live headline card shows the page views of the same half hour on its right: the sum of every minute's page views in the answer the screen already reads, the minute running now among them. It is not announced as the visitor count is. No engine change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What this changes
A post's own page (
/app/insights/post?path=) — opened from any post title on Insights:All posts (
/app/insights/posts) — reached from Insights' "See all N posts":Live — the headline card shows the page views of the same half hour beside its visitors.
Engine
GET /api/sites/{id}/insights/post,GET /api/sites/{id}/insights/post/series,GET /api/sites/{id}/posts.\ % _) forILIKE … ESCAPE '\'; SQL-looking text finds nothing.ADR 0070 records the decision, what it does not do (no visitors per post, no best day, case folding limited by the database locale) and the cost per page load.
Shared pieces that change for other screens
40 px phone controls in ListSwitch / PopulationSwitch / Pagination, phone paging that keeps a short list whole, a stretched row link in ranked lists, a lone figure in a long line chart drawn as a dot, and focus never left under the sticky header.
Checks run locally
pnpm verify: web 2,594, tracker 84, edition 124, site 78.next buildfree andDEWIRIDE_EDITION=cloudboth list/app/insights/post,/app/insights/postsand/app/live.No migration, no retention or privacy change, no
ee/change.🤖 Generated with Claude Code