100 Commits
Author SHA1 Message Date
zk 15c522840d fix: disable api imports if not in list 2026-06-02 16:26:32 +00:00
zk 24d1848df8 fix: and add a migration for sdvx recalc 2026-06-01 23:34:22 +00:00
zk 003e248cf2 fix: disable level checks in eam csv 2026-06-01 23:33:09 +00:00
zk 210462818a fix: enable nabla in cg 2026-06-01 23:30:43 +00:00
zk 45b07723ee fix: lr2ir.com zombocom 2026-05-31 23:02:15 +00:00
zk 600bee4e45 fix: ensure raja ir file is latest 2026-05-31 12:35:39 +00:00
zk 06e1453d26 feat: enforce seeds sort (#1593) 2026-05-26 19:22:55 +01:00
zk 3571f1b3af feat: add new ddr banner 2026-05-24 17:40:16 +00:00
zk 09e7efea5e feat: new arcaea banner + track ongeki banner (#1582) 2026-05-24 18:02:43 +01:00
zk 6412be838e feat: persist simpleColours choice to localStorage (#1581) 2026-05-24 18:02:27 +01:00
zk 1cdae85a24 fix: new sitekeys 2026-05-24 16:24:25 +00:00
zk 559a02e6c9 fix: use the sitekeys lol 2026-05-24 16:09:57 +00:00
zk 5abd6dde5b fix: improve request logging (#1578)
* fix: improve request logging

* fix: also fix this while i'm here
2026-05-24 16:33:28 +01:00
zk dcb7c8d41b feat: recaptcha->hcaptcha (#1577) 2026-05-24 16:09:23 +01:00
zk 3c029ded02 feat: pick your own dan, if you want (#1575)
* temp: review later

* fix: remove git env vars

* feat: manually set dans
2026-05-24 15:19:53 +01:00
zk dcc41adeec feat: import timestops (#1574)
* feat: import timestops

* feat: and a page to edit it
2026-05-24 13:06:13 +01:00
zk 43963e0f62 fix: partial time graph issues (#1573) 2026-05-24 11:32:44 +01:00
zk 9bf3ad972d feat: highly optimise playcount-based queries (#1572) 2026-05-24 01:04:25 +01:00
zk e045ed4cbf fix: proxy tables not trimming levels enough (#1571) 2026-05-24 00:03:45 +01:00
zkandTest Name 76adb8b6e7 fix: various backsync fixes, changes seeds to not be formatted by biome anymore, just JSON.stringify(x, null, "\t") (#1570)
* fix: various backsync fixes, assorted changes

* automated: Backsync BMS+PMS Songs/Charts 2026-05-23T22:16:28.469Z

* fix: some patches, but all good!

---------

Co-authored-by: Test Name <test@example.com>
2026-05-23 23:33:57 +01:00
zk 96a9c0e373 zk/bms fixes (#1569)
* fix: hahahahahaha

* fix: follow redirs in bms table sync
2026-05-23 22:22:55 +01:00
zk 9abe3e4d4b fix: hard pg load (#1568)
* fix: hard pg load

* fix: arr of andromeda
2026-05-23 20:06:09 +01:00
zk 059656bdd5 fix: revert import button working (#1567) 2026-05-23 19:43:05 +01:00
zk 0c130ad965 fix: docs ci 2026-05-23 14:45:25 +00:00
zk 4659c45d62 fix: disable seeds delete for bms/pms (#1566) 2026-05-23 15:44:43 +01:00
zk 42de1999a6 fix: through the wire 2026-05-23 14:16:55 +00:00
zk 7b3d9d2392 fix: mkpath in rsync stuffs 2026-05-23 14:09:32 +00:00
zk 2703990c96 fix: pms tables should auto reload (#1565) 2026-05-23 14:19:39 +01:00
zk ae5e72aa89 fix: resize profile images on upload and cache redirect responses (#1564)
* fix: resize profile images on upload and add cache headers

Profile pictures were stored at original upload size (up to 1 MB) but
only ever displayed at 32–128 px, so every page load downloaded the full
original image. Additionally, no Cache-Control headers were set anywhere
in the pipeline, forcing a fresh round-trip through the API redirect and
CDN on every page view.

- Resize JPEG/PNG pfps to max 256×256 and banners to max 1920×1080 via
  sharp before storing; re-encode to WebP at 85% quality (GIFs skipped
  to preserve the animated-GIF easter egg)
- Hash the resized buffer so the CDN path reflects what's on disk
- Set ContentType and CacheControl: immutable on S3 PutObject so CDN
  edges and browsers cache the objects indefinitely (safe because paths
  are content-addressed via SHA-256)
- Add Cache-Control: public, max-age=3600, stale-while-revalidate=86400
  to the GET /pfp and GET /banner redirect responses so browsers cache
  the userId→CDN-URL mapping and skip the API hop on repeat visits

Fixes #1553

* chore: apply biome formatting

* chore: generate ImportTimestop kanel type

* feat: add backfill-media script to migrate existing profile images

One-off script that reads every user's existing pfp and banner from S3,
runs them through the same sharp resize/WebP pipeline as new uploads,
stores the result under the new content-addressed key with immutable
cache headers, and updates custom_pfp_location/custom_banner_location
in the DB.

Features:
- --dry-run flag to preview changes without writing anything
- Skips objects already at optimal size (idempotent)
- Gracefully handles missing S3 objects (logs + skips)
- Summary stats at the end
- Reads S3 config from CLI args or TACHI_CDN_SAVE_LOCATION_* env vars

* chore: apply biome formatting to backfill-media

* fix: resize animated GIFs to animated WebP via sharp animated:true

* test: rewrite change-pfp/banner tests as real S3 + sharp integration

Remove the CDN mock entirely. Tests now pass real image buffers through
sharp and verify the stored S3 object via CDNRetrieve:

- PNG/JPEG input → assert stored object is WebP, dimensions ≤256×256,
  smaller than the original
- GIF input → assert stored object is WebP
- Hash returned from the action == SHA256 of the stored WebP bytes
  (not the original upload)
- Delete tests upload a real pfp then delete it and verify CDNRetrieve
  throws afterwards

Also move change-pfp.test.ts from the isolated vitest project back to
the default pool now that it no longer uses vi.mock.

* chore: apply biome formatting to test file

* fix: use POSTGRES_TEST_HOST env var in bot vitest setup

Both vitest.globalSetup.ts and vitest.setup.ts hardcoded 'tachi-postgres'
(the dev server), but just bot-db-test-template-reset creates the template
on 'tachi-postgres-test' (the tmpfs test server). Workers then failed to
clone the template because they were looking on the wrong host.

Mirrors the pattern already used in the server package:
  process.env.POSTGRES_TEST_HOST ?? 'tachi-postgres-test'

* fix: update pfp router tests for WebP resize pipeline

The PUT tests were comparing the stored S3 bytes directly to the original
upload buffer. Since we now resize and re-encode to WebP, this always
fails. Also, following the mockApi redirect to fetch the bytes added a
slow supertest round-trip.

Replace with: read custom_pfp_location from the DB after PUT, fetch the
stored object directly via CDNRetrieve, and assert it is smaller than the
original (non-deterministic WebP compression makes exact byte comparison
inappropriate).

* fix: update banner router tests for WebP resize pipeline

* fix: tests

* fix: ci
2026-05-23 13:48:49 +01:00
zk f53d44b638 feat: homepage (#1563)
* feat: githooks, check before push

* feat: homepage
2026-05-23 10:07:48 +01:00
zk 496337be76 feat: githooks, check before push (#1562) 2026-05-23 10:03:44 +01:00
zk 28c66ca6a5 feat: orphans reverted on import revert, and lots of import stress tests (#1559)
* feat: orphans reverted on import revert, and lots of import stress tests

* fix: fix
2026-05-22 20:47:41 +01:00
zk 19fdb4ce0f feat: githooks, check before push (#1560) 2026-05-22 20:47:19 +01:00
zk e363bd2532 docs: migrate from mkdocs to mdbook (#1558)
* docs: migrate from mkdocs to mdbook

- Rename old mkdocs docs/ to old-docs/ for reference
- Set up new docs/ with mdbook (book.toml + src/ tree)
- Mirror full nav structure from mkdocs.yml into SUMMARY.md
- Add Justfile-docs with docs-serve, docs-build, docs-check, docs-install recipes
- Import Justfile-docs from root Justfile
- Rewrite .github/workflows/docs.yml: build step uses taiki-e/install-action
  to install mdbook, split into separate build + deploy jobs, PR builds
  run the check step too

* ci(docs): pin actions to SHAs, install mdbook via release binary

* ci(docs): install mdbook from apt instead of curling a release binary

* dev: replace mkdocs python stack with mdbook in dev image

* ci(docs): apt only works on Debian; restore release binary install for Ubuntu CI

* docs: fix duplicate file entries in SUMMARY.md

* docs: remove docs-install recipe

* docs: remove site-url from book.toml to fix asset loading

* dev: install mdbook from upstream release binary, not Debian apt

The Debian package (0.4.x+ds) strips bundled font assets, leaving the
built site without fonts/fonts.css. Use the upstream tarball (same as CI)
so the theme is complete. Handles x86_64 and aarch64.

* docs: vendor mdbook tarballs in dev/mdbook/, install from there

Dockerfile.dev uses COPY + tar to install the right arch at build time.
CI extracts the x86_64 tarball directly from the checkout.
No network access required for either — and no stripped-fonts Debian package.

* fix: unwritten
2026-05-22 20:43:07 +01:00
zk 180c86ed7d fix: bun lockfile 2026-05-22 16:39:31 +00:00
zk b354757524 fix: make bms table view denser + add cumulative folder stats (#1549)
* fix: make bms table view denser + add cumulative folder stats

* fix: fix
2026-05-21 23:54:01 +01:00
zk d610409049 fix: allow tachiIR v4 it would help 2026-05-21 21:25:17 +00:00
zk 7ac1b3d657 feat: flesh out all the rest of the IR options in beatoraja (#1548)
* feat: flesh out all the rest of the IR options in beatoraja

* fix: fix
2026-05-21 22:10:11 +01:00
zk 8c6cda1e88 fix: crlf -> lf (#1546) 2026-05-21 20:48:59 +01:00
zk 4a28e14b45 fix: mount forgit correctly 2026-05-21 18:15:21 +00:00
zk 05bc8733df ai bug audit 1 (#1545)
* fix: use highlights in tachi rival table

* fix: silentReject forgot pw

* fix: bms table sync typo

* fix: typo

* fix: mass typos

* fix: tests
2026-05-21 19:13:23 +01:00
zk d475da367d fix: add safety preventions for table symbols (#1544)
* fix: add safety preventions for table symbols

* feat: unmangle the nonsense on lets-go-time-hell

* fix: fix

* fix: test
2026-05-21 18:30:27 +01:00
zk f30fb08221 fix: dedupe goals in getRelevantFolderGoals (#1543) 2026-05-21 17:53:56 +01:00
zk aa402be116 feat: check.yml (#1541) 2026-05-21 17:53:40 +01:00
zk a5f139ce0a fix: run just fix 2026-05-21 16:32:55 +00:00
zk 8a57df288e fix: obscure issue in folder stats (#1533)
* fix: obscure issue in folder stats

* fix: obvious typos

* fix: test
2026-05-20 20:56:56 +01:00
zk 3133480899 fix: reverting scores such that you have no scores should not enlinger a pb (#1530)
* fix: reverting scores such that you have no scores should not enlinger a pb

* fix: lint
2026-05-20 20:15:14 +01:00
zk b4163548e4 fix: various bad frontend urls using legacy gameGroup/playtype stuff (#1531) 2026-05-20 19:59:07 +01:00
zk 68af25e345 fix: improve soft/hard error distinction in score import page (#1532) 2026-05-20 19:54:51 +01:00
zk 65f833ac65 fix: eam csv uses bad unicode spaces (#1529) 2026-05-20 19:54:22 +01:00
zk 00d76747e2 feat: kill tis (#1528) 2026-05-20 19:54:10 +01:00
zk 7232308bce fix: quest ui has a react keying issue (#1527) 2026-05-20 19:53:57 +01:00
zk c569243194 feat: remove mongo and all of its deps (#1525)
* feat: remove mongo and all of its deps

* feat: remove all mongodb logic+thin out some unused deps
2026-05-20 19:48:39 +01:00
zk 23482d3ae8 fix: make bms/pms cells not truncate (#1526) 2026-05-20 19:42:37 +01:00
zk de1947573a fix: make bms/pms use normal sorting on tables (#1519) 2026-05-20 02:13:10 +01:00
zk 9be4426ab5 feat: move beatoraja IR into monorepo (#1517) 2026-05-20 02:05:09 +01:00
zk 6d77ed3c48 feat: significantly better ci images (#1516) 2026-05-20 01:20:32 +01:00
zk 312119e686 fix: sgl tables not working (#1514) 2026-05-20 01:04:07 +01:00
zk ce425d1381 fix: dont run aggressive crons in localdev by default (#1513)
* fix: dont run aggressive crons in localdev by default

* fix: this test wasn't spurious

* fix: lintmaxxing

* fix: glass tables

* fix: 11
2026-05-20 00:59:54 +01:00
zk 0908b63b38 fix: bms ordering and NULLS LAST in score sorting (#1512) 2026-05-20 00:45:08 +01:00
zk 02c611bba0 fix: fix fix 2026-05-19 23:33:04 +00:00
zk 370e7d5219 fix: just fix 2026-05-19 23:29:55 +00:00
zk 90bb64fbde fix: fix 2026-05-19 00:57:30 +01:00
zk 88c271dc68 feat: buffer in memory. bun http2 doesn't work 2026-05-19 00:47:35 +01:00
zk 28db23f995 fix: i miss the rage 2026-05-19 00:18:14 +01:00
zk 69659c4254 fix: metallic mind 2026-05-18 23:14:35 +00:00
zk 70e8c38896 fix: quadruple backoff 2026-05-19 00:00:21 +01:00
zk e2d28f8ac3 fix: ms 2026-05-18 23:45:04 +01:00
zk c07dd5c878 fix: embed html in bot instead of fs-level nonsense 2026-05-18 21:06:28 +00:00
zk 01be15ac6d fix: misc linting errors 2026-05-18 20:25:52 +00:00
zk b74a87d3da fix: add ddr to env file 2026-05-18 20:16:20 +00:00
zk 0299f15d1d fix: lower log noise 2026-05-18 21:13:03 +01:00
zk 54af389ee2 fix: tests 2026-05-18 19:46:26 +01:00
zk 3f57d77ef1 fix: attachments 2026-05-18 18:40:24 +00:00
zk f52cc515a1 emerg: scoreID must use legacyChartID to maintain stability 2026-05-18 19:31:54 +01:00
zk ae94f723b8 feat: v3! 2026-05-18 17:50:10 +00:00
zk 2d4d4550ff fix: better error handling on failed imports 2026-05-18 17:12:38 +00:00
zk 97ae10d316 fix: server, fix test 2026-05-18 17:48:39 +01:00
zk 71828e52ff feat: re-add exp. backoff on score imports 2026-05-18 17:43:35 +01:00
zk 5f9d72a9bd fix: last call 2026-05-18 17:28:21 +01:00
zk f6bfd70bec fix: activity endless loop 2026-05-18 17:23:45 +01:00
zk aa8bd4043a fix: claude issue 2026-05-18 16:21:12 +00:00
zk d5531907f2 fix: edgecase with folder quests 2026-05-18 17:00:35 +01:00
zk 3ee1f5c269 fix: y u not nullable 2026-05-18 15:57:37 +00:00
zk 640572faa7 fix: ... 2026-05-18 16:45:18 +01:00
zk 9ef7616c81 fix: claude is right this is a landmine 2026-05-18 15:41:35 +00:00
zk 23bc63cebe feat: dim not played text a bit 2026-05-18 15:36:58 +00:00
zk 1d7a97dc58 feat: a button to do all profile recalcs 2026-05-18 15:12:38 +00:00
zk 14ccaf20fb fix: session output validation 2026-05-18 15:08:41 +00:00
zk 705721c710 feat: improve comms on orphan summaries if diff/artist provided 2026-05-18 15:04:02 +00:00
zk b57843d79a fix: allow v3 batch manual imports (it already worked) 2026-05-18 14:57:47 +00:00
zk ce816c92a7 fix: thanks for blocking the build 2026-05-18 13:28:03 +00:00
zk 622115706d fix: folder resolution and remove smooth scrolling 2026-05-18 13:21:43 +00:00
zk df965b7d95 fix: activity feed should filter goals on game, too 2026-05-18 13:17:04 +00:00
zk e22fe8713f feat: recalc profiles endpoint, frontend rivals fix, ublock origin fix 2026-05-18 13:14:25 +00:00
zk 60c64c9874 fix: load game banners correctly 2026-05-18 14:02:14 +01:00
zk bef09c0a11 fix: ok, bun 2026-05-18 12:21:45 +00:00
zk ffe807362f fix: postgresfixes 3 2026-05-18 12:21:09 +00:00
zk a4a46913c2 fix: postgresfixes 2 2026-05-18 12:07:36 +00:00
zk 3d9526ec41 fix: a first miscellany of postgres fixes 2026-05-18 11:54:18 +00:00