Skip to content

feat: Insights, and background work that ends with the host and not before (ADRs 0066, 0067) - #59

Merged
jagdish-kumawat merged 1 commit into
mainfrom
feat/2026-11-06-insights
Nov 6, 2026
Merged

jagdish-kumawat merged 1 commit into
mainfrom
feat/2026-11-06-insights

Conversation

@jagdish-kumawat

@jagdish-kumawat jagdish-kumawat commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What this adds

Insights, a new screen between Overview and Live (ADR 0066):

  • All-time page views and daily visitors, on the website's whole record.
  • The best day ever, the busiest weekday and the busiest hour, on the website's own clock. Ties name everything that shares the top place.
  • A months-and-years table shaded by how busy each month was, read as total views or as an average per day. A month with no figure says why, and is never drawn as nought. On a phone each year is a card of twelve tiles.
  • Kept to people by the same switch as the overview.

No new data is collected and no schema changes. The screen reads the monthly figures ADR 0064 already keeps, and the running month live.

Background work that ends with the host and not before (ADR 0067):

  • A client running out of time reports a cancellation, and a catch filtered on the exception's type let it through and stopped the whole engine. Whether work was cancelled is now asked of the token it was given. An architecture test fails the build on the old shape.
  • Every timed service ends a failed run, writes it down and tries again at the next tick.
  • The driver no longer writes an abandoned statement as an error, and the HTTP client's per-statement lines are kept to warnings.
  • A refresh interval is validated between five minutes and 49 days, because a timer cannot wait longer.

Smaller fixes

  • The overview's headline cards settle on no figure under a refused answer instead of pulsing.
  • The dashboard waits two minutes on a forwarded request rather than the framework's 30 seconds.
  • All five tabs fit on a 360 px phone.
  • Eleven test classes no longer carry fixed dates that would have fallen out of the twelve months held.

How it was checked

  • Both editions built, every backend suite and pnpm verify green: Testing 11, Domain 117, Application 525, Classification 530, Architecture 28, Api 36, Sql 304, Mail 30, Integration 1091, web 1953, tracker 84.
  • Three adversarial review rounds, with everything confirmed fixed in this change.
  • 98 deliberate breakages, all caught by the tests.
  • Every state of the screen photographed in light and dark, at phone and desktop widths. Keyboard behaviour was driven in a real browser at 640 to 1016 px, with and without the fix.

Known limits

Recorded in the ADRs: a best day ever can change when a month still held is counted again; a month read beside another can differ by a few units until it is kept; keyboard behaviour was checked in Chromium only.

🤖 Generated with Claude Code

…efore (ADRs 0066, 0067)

Insights is a screen beside the overview, read from the same kept months as
All time (ADR 0066):

- `KeptHistory.Insights` folds kept months' stored arrays with Day and Hour
  series for the months answered live, on the website's clock. Every tied
  weekday and hour is named; nothing read names none. Shares are taken of their
  own figures.
- `GET /api/sites/{id}/insights[?only=people]`, answering the record, its
  months, what was left out and how far judging has reached.
- `/app/insights` sits between Overview and Live and carries the population but
  not the period: all-time highlights, most popular times, and a months-and-years
  table shaded on one violet ramp, read as totals or as an average per day. A
  year is a card of twelve tiles on a phone. Refused, waiting, empty and the two
  people-only absences are designed states drawn by one component.
- `experimental.proxyTimeout` is 120 s and the engine's longest statement is an
  explicit 100 s, so a slow reading is ended where the log says which.
- The overview's headline cards settle on no figure under a refused answer.
- Remembered addresses treat a choice as the end of arrival and write nothing
  the address already says, so People only pressed before the website is known
  keeps the way back working.

Whether background work was cancelled is asked of the token it was given, never
of the exception (ADR 0067):

- A client out of time reports a cancellation, which used to stop the host. Every
  timed service now ends a failed run there, writes it down and tries again at the
  next tick, and takes anything once its own token is cancelled as part of stopping.
  `CancellationTests` fails the build on the old filter.
- `StoreDriverLogging` drops the driver's error for an abandoned statement and
  keeps timeouts and real failures. `System.Net.Http.HttpClient` logs at Warning:
  it was 137,644 of the 138,209 lines the hosted engine wrote in thirteen hours.
- Refresh intervals are validated between five minutes and 49 days. Stopping
  during a download discards the part and says nothing of it.

Tests: `Fixtures/StillHeld` replaces fixed dates in eleven classes that would have
started failing as those dates passed out of the twelve months held, and
`Fixtures/HostRefusal` ends the race in `IgnoredSenderTests`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jagdish-kumawat
jagdish-kumawat force-pushed the feat/2026-11-06-insights branch from 61c4eab to 41dda95 Compare November 6, 2026 11:12
@jagdish-kumawat jagdish-kumawat changed the title feat: the picture by week and month, and All time from months kept for good (ADRs 0063, 0064) feat: Insights, and background work that ends with the host and not before (ADRs 0066, 0067) Nov 6, 2026
@jagdish-kumawat
jagdish-kumawat merged commit 02d3ae9 into main Nov 6, 2026
7 checks passed
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.

1 participant