Commit Graph
227 Commits
Author SHA1 Message Date
zk a846e7ed7a fix: i do it to myself (#1682) 2026-06-17 22:18:16 +01:00
zk f6ba08b6c9 fix: folder-to-go metric is wrong (#1681) 2026-06-17 22:10:40 +01:00
zk c0dca6f6a9 feat: manual human pass over the code, untangle and remove entropy (#1668)
* fix: use 3003 for seeds port + expose ports consistently

* fix: seeds-webui license AGPL3 -> MIT

* fix: more port 3100 to 3003

* feat: remove "GPT/UGPT" as a phrase from the codebase

* fix: clean up some ridiculous legacy code hoops
2026-06-17 21:34:26 +01:00
Ben Hutchinson eff9101f79 Set a default of 0 when a rating value is null when calculating rank (#1675)
* Set a default of 0 when a rating value is null when calculating rank

* make null values be last place

* adjust test for new null rating case
2026-06-17 21:23:05 +01:00
zk 216617c54a fix: move goal logic into tachi-common (#1673) 2026-06-16 00:27:37 +01:00
Ben Hutchinson b27e2ba02b Add an extra case in set rivals for empty rival list (#1667) 2026-06-15 00:58:42 +01:00
zkandzk 8270d5360a fix: remove entropy (#1664)
Co-authored-by: zk <--global>
2026-06-14 13:51:24 +01:00
zk 8ce160b8ae feat: maybe stabilise pb cleaning (#1662) 2026-06-13 11:22:35 +01:00
zk 99fe1186ff fix: sdvx goals maxxive + ensure this is easier to fix in future (#1661)
* fix: goalfix

* fix: goalfix 2

* fix: fmt

* fix: script for fixing quests, too, ugh
2026-06-13 11:04:29 +01:00
ash 249dbf5e19 add NBL to SDVX_INF_DIFFS + add altTitles (#1660)
* Fix more SDVX altTitles

* add NBL to SDVX_INF_DIFFS
2026-06-13 10:55:41 +01:00
zk 0391fbacf0 feat: propogate lyko's fixes from lr2ir-dataset (#1644) 2026-06-06 15:34:37 +01:00
beerpsi c405ebcb56 Update last seen after the request is finished (#1643)
* Skip locked rows when updating last seen date

* run as post-response hook

* return correct key

* Change it on the frontend instead

* Session may not be available

* Don't cause a diff
2026-06-06 13:33:07 +01:00
zk a815848fb6 fix: ensure some sanity in .env files (#1640) 2026-06-04 21:17:39 +01:00
zk 480f607538 feat: include chart_leaderboard in datasetgen (#1639) 2026-06-04 21:07:22 +01:00
zk df19c693d7 fix: handle lamp re-arrangement from cg (#1624) 2026-06-02 20:08:37 +01:00
zk 77b925a0eb feat: use vf7 to calculate vfclass now (#1622)
* feat: use vf7 to calculate vfclass now

* fix: usc
2026-06-02 19:08:07 +01:00
zk 77dd7dbb6f feat: add NABLA and ULTIMATE to the difficulty list for eam csvs (#1621) 2026-06-02 17:53:25 +01:00
zk 0a74b4277a fix: set playcount=1 for beatoraja score data, instead of 0 (#1620)
* fix: set playcount=1 for beatoraja score data, instead of 0

* fix: tests
2026-06-02 17:42:03 +01:00
zk 15c522840d fix: disable api imports if not in list 2026-06-02 16:26:32 +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
Berk Buturakandzk d495d7e99c sdvx nabla support (#1599)
* feat: add sdvx nabla support

Added VF7 algorithm to sdvx profiles
Added nabla folder
Extended sdvx seed with new charts and decimal rerates

* fix: some comments

* refactor: break InsaneCharRebinds out into its own file

* fix: removed weird chars on sdvx song seeds

* fix: charfix

---------

Co-authored-by: zk <zkldi.dev@gmail.com>
2026-06-02 00:21:53 +01:00
zk 830a19a40d fix: auto-timestops are silly, remove them (#1612) 2026-06-01 22:50:35 +01:00
blobdash 0f56f326aa [sdvx] Add ULT def for KaiSDVX (EAG/FLO) (#1609) 2026-06-01 22:25:34 +01:00
Greg628 ccf264477e pop'n music Jam & Fizz fix for CG import (#1601) 2026-05-30 00:58:36 +01:00
nairobi 63a7a5d43b feat: folder goal exemptions for metrics with chartDependentMax (#1591)
* feat: conditional chartDependentMax

* requested fixes

* run fix again
2026-05-26 22:27:55 +01:00
zk f7a973ca28 feat: improve game group banner code (#1597) 2026-05-26 22:27:44 +01:00
nairobi 388e6736c2 fix: arcaea notecount check (#1596)
* fix: arcaea notecount test

* add check for empty notecount

* add check for empty judgements
2026-05-26 21:25:10 +01:00
zk 8d4d10d7ff zk/make class really really clear (#1595)
* fix: make what class you're importing for REALLY clear

* feat: allow users to unset classes
2026-05-26 20:32:28 +01:00
zk 06e1453d26 feat: enforce seeds sort (#1593) 2026-05-26 19:22:55 +01:00
nairobiandzk c7a5718bc6 feat: enum formatting, convert platinumStars to enum, ongeki genre folders (#1592)
* feat(ongeki): platenum + genre folder draft

* nonsense

* this... seems to pass?

* genre folders

* incorrectly genred bonus tracks

* restore re:master

* perfect shining

* migration

* Revert migration lmao

This reverts commit 4f27e7bb2c.

* fix bonus track folder slugs

* fix: run seeds-sort

---------

Co-authored-by: zk <zkldi.dev@gmail.com>
2026-05-26 19:22:02 +01:00
nairobi e8b460b9ee feat: better arcaea judgement cell + ptt calculation fixes (#1589)
* feat: PM judgements + correct rating calc

* apparently, I forgot SQL syntax

* rg-stats test case
2026-05-26 18:25:16 +01:00
nairobi da9c6acd0a fix: manual class selector spamming derived classes (#1590) 2026-05-25 23:09:25 +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 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 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 4659c45d62 fix: disable seeds delete for bms/pms (#1566) 2026-05-23 15:44:43 +01:00
beerpsi 48e654cabc Add new color classes for maimai DX and CHUNITHM (#1561)
* Add new color classes for maimai DX and CHUNITHM

* mark all game profiles as dirty instead of re-deriving
2026-05-23 15:42:08 +01: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 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 d610409049 fix: allow tachiIR v4 it would help 2026-05-21 21:25:17 +00:00