6 Commits

Author SHA1 Message Date
Matt Isenhower
66cb97cd6c Replace lane pause with the scheduling switch, and use toggles in the panel
Pause and turning scheduling off did nearly the same thing, so pause is gone:
a lane with scheduling off runs only when started by hand. Every on/off control
in the admin panel (lanes, renewals, the daily archive run, social accounts) is
now a toggle switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 13:48:30 -08:00
Matt Isenhower
a406f73622 Add switches for renewals and compression; judge renewals by their result
A credential renewal now counts as failed only when it ends without a new
bullet token. A step that failed and was made up for by a later one (znca
briefly unavailable, say) is kept as a warning and no longer goes to
Sentry.

Everything that runs on its own now has a switch in the admin panel:
scheduled renewals (one switch for every region) and the daily archive
compression join the lanes' scheduling switches. The compressor's starts
from AUTOMATIC_SCHEDULING_ENABLED: on in dev, off in production, so the
production compressor can be deployed before spectre stops.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:08:10 -08:00
Matt Isenhower
47f532f578 Show archive compressions in the admin panel
Compressor runs get an Archive row and filter on the timeline, a details view with the
run's log lines, and a Controls card with Compress now and Dry run. The updater reaches the
compressor through a COMPRESSOR binding to its Durable Object (dev only for now); without the
binding the panel leaves the archive out. Worker tests use a stand-in compressor Worker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:11:29 -08:00
Matt Isenhower
73f4d403bd Replace the quick/default/all update modes with lane run options
The modes mostly chose which lane's updaters ran, which the lanes now decide. The fast
lane keeps one option, translations (quick runs at :00-:04 skip them); the slow lane has
none. Runs, slots and manual requests carry the option instead of a mode, and the admin
panel shows runs as quick or full, with an "Include translations" box for manual fast
runs. Slots and runs saved with a mode run with the defaults.

The Node runner follows the same cadence: npm run splatnet:quick is the fast lane without
translations, splatnet the fast lane, and splatnet:all both lanes. The unused disableXRank
and disableFestivalRankings settings are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 09:39:16 -08:00
Matt Isenhower
ae117404a4 Make the admin timeline and its list one scrollable view
The Timeline page showed four kinds of things on the time axis but only
lane runs in the list, and credential renewals could not be opened. Now
both draw from one set of items (lib/activity.js): lane runs, credential
renewals, social posts, and what is coming up next.

- The timeline scrolls back through the last 48 hours by dragging (with a
  short glide after a flick), and loads earlier history six hours at a
  time. Marks that would cover each other are stacked so each can be
  clicked.
- The timeline and the list follow one cursor, so scrolling either moves
  the other. A marker shows the moment the list is lined up with, and
  "Now" returns both to the present. The list is windowed, with upcoming
  items above a "now" line.
- Everything opens in the details panel: renewals with their errors and
  log lines, posts with each account's result, upcoming items with when
  and why. A selected upcoming or running item stays selected as it
  starts and finishes. The selection is ?item=<key> in the address.
- Lane and credential controls move to a new Controls page, which links
  back to the timeline. The Timeline page notes a paused or unscheduled
  lane.
- The list filters by row and by problems; the timeline dims the rest.

Worker side:

- Scheduler keeps runs for 48 hours (HISTORY_MS) instead of the last 50,
  with log lines stored apart from the run summaries so listing stays
  cheap. New history({ from, to }) RPC; run() finds a run directly when
  given its start time; posts() takes a time span.
- RegionAuth keeps 48 hours of renewals, each with its trigger and log
  lines, and serves them by time span and one at a time.
- New GET /admin/api/activity (by time span) and /admin/api/auth/event.
  Status carries only the newest activity, and log lines from renewals
  name the renewal that printed them.

Checked in the local preview against the simulated API; not yet run
against a deployed Worker.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 13:57:38 -08:00
Matt Isenhower
c2666b27ca Add an admin panel to the updater Worker
A small Vue + Tailwind app in workers/updater/admin, served by the updater
Worker on its own hostname (admin.splatoon3.ink, admin.dev.splatoon3.ink)
behind Cloudflare Access:

- Timeline: both lanes, credential renewals, and social posts on one time
  axis, a filterable run list, run details with per-updater timings and
  the run's own log lines, lane controls (run now, pause, scheduling),
  credential renewal, and a combined text log.
- Social: the post log with errors, per-account posting switches, when
  each status last went to each account, and a preview that can post one
  status by hand after a confirmation.
- Data: freshness of the core data files, the published file list, a
  check that the site serves the new data, and a cache purge.

Worker side:

- src/admin: the Access JWT check (jose; fails closed and only answers on
  ADMIN_HOSTNAME) and the API. Actions must be same-origin JSON POSTs, and
  the app is served with a strict CSP from the ADMIN_ASSETS binding.
- Runs capture their console output (AsyncLocalStorage), so log lines
  belong to the run that printed them. The Scheduler keeps a post log and
  serves run details and log lines; RegionAuth keeps its last 24 renewals.
- A manual run from the panel only posts to social when asked to.

Shared code:

- StatusGeneratorManager records what was posted or failed, and skips
  accounts turned off in private settings/social.json (the Node runner
  honours this too). app/social/admin.mjs previews and posts one status.
- Updater results include their duration.

Also: npm run admin:dev runs the panel against a simulated API, deploy
scripts build the panel first, the dev environment's assets move to
dev-assets.splatoon3.ink, and the lockfile drops entries nothing depends
on any more.

Not yet run against a deployed Worker or a real Access application.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 12:59:36 -08:00