Skip to content

Show the total runs and a last page link on Activity - #9

Merged
github-actions[bot] merged 16 commits into
sourcejump:u/zasbufrom
zasbu:feat/runs-total-offset
Nov 6, 2026
Merged

github-actions[bot] merged 16 commits into
sourcejump:u/zasbufrom
zasbu:feat/runs-total-offset

Conversation

@zasbu

@zasbu zasbu commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Shows the total number of runs under the Activity table, with a link to skip straight to the last page.

Stacked on #8. The website part works with today's API. It only shows the total and the last page once the API change below is live.

API change (needs a deploy to take effect)

Previews only run web/, so the API part has to go upstream and be deployed to beta.

GET /v1/runs (api/crates/api/src/runs/recent.rs):

  • New response field total: runs matching the filters, across all pages.
  • New query param offset (default 0, must be 0 or more): runs to skip. Applied after cursor if both are given.
  • cursor / next_cursor work as before.
  • No migration. The count reuses the list's filters and runs in parallel with the page query.

Included: tests, regenerated api/openapi.json, web/src/api/schema.ts and .sqlx cache, and the docs/site-api.md line.

To make it live: merge into sourcejump/sourcejump, then deploy the API to beta (just deploy beta, see docs/deploy.md).

Website

  • Runs load 90 at a time (six pages). With total from the API, any page loads with one request and the pager shows the full count and the last page.
  • Without total (the API as deployed now), the page falls back to walking forward with cursor. Either order of merging works.

Tested against a local API with sample data: every page matched the API's rows for the same offset, including with filters.

ddyfad pushed a commit that referenced this pull request Nov 6, 2026
* Fixed inconsistent flag scales

* Fixed inconsistent flag scales

* Fixed inconsistent flag scales

* Fixed inconsistent flag scales
ddyfad pushed a commit that referenced this pull request Nov 6, 2026
…y map names

Fixes from the 2026-11-06 audit (#9, #10, #15, #19, dot map names):

- Replay checks, SJR encoding, route tracing and SJR decoding run in
  spawn_blocking, as map images already do: files up to 128 MB at gzip's
  highest level took seconds of CPU on the async workers.
- Storage PUTs (viewer files up to ~256 MB) get 10 minutes and streamed
  downloads 30 minutes instead of the client's 30 s, which covered the whole
  body and cut off large or slow transfers.
- The heartbeat checks its per-IP limit before it looks the key up, so
  over-limit senders cost no database query. Tested with a closed pool.
- Map names made only of dots are refused: names end up in storage keys and
  URL paths.
- Tests that the description and release PUTs need manage_maps, and a success
  test for the description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions
github-actions Bot changed the base branch from main to u/zasbu November 6, 2026 14:58
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Couldn't merge into u/zasbu, most likely because of a conflict. Update your branch from u/zasbu and push again.

@github-actions
github-actions Bot merged commit 638bf40 into sourcejump:u/zasbu Nov 6, 2026
3 checks passed
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Merged into u/zasbu. It'll be live at https://zasbu-sj.okwhiteli.st in a few minutes.

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