Commit Graph

297 Commits

Author SHA1 Message Date
Jared Schoeny
e30d7b0dd0 Serve Discover and the homepage from cache instead of a function per visit (#88)
* Make catalog pages statically cacheable

Co-authored-by: Cursor <cursoragent@cursor.com>

* Match discover skeleton card height

Co-authored-by: Cursor <cursoragent@cursor.com>

* Align skeleton text line reservations

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix catalog invalidation gaps

Co-authored-by: Cursor <cursoragent@cursor.com>

* Stop animating browser back while keeping tag-picker scroll smooth

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 18:43:45 -06:00
Jared Schoeny
cb120290e5 Serve anonymous hack pages from cache without dropping owner tools (#86)
* Prerender public hack pages so anonymous visits can be served from cache.

Signed-in owners and admins still get the session-gated page at the same URL via a cookie-only rewrite.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Keep the site notice off the static hack page cache.

Signed-in visits to /session redirect to the canonical hack URL; signed-out visits 404.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Prerender the top 750 public hack pages at build time.

Almost the whole catalog is visited within a week, so first-hit generation after deploys is wasted compared to a slightly longer SSG step.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Show the public hack page when session auth is missing.

An expired or leftover cookie was rewriting visitors onto /session and 404ing approved hacks that anonymous users can see.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Note that forks must replace the hardcoded Supabase project ID.

Middleware cookie matchers cannot use env vars, so other communities need to swap in their own project ref.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 11:51:11 -06:00
Jared Schoeny
6308852df0 Keep the Select ROM button on screen for long base ROM names (#87) 2026-08-29 08:58:44 -06:00
Jared Schoeny
91ed1d1eee Keep long URLs, code, and tables from overflowing hack descriptions on mobile. (#85)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 19:27:18 -06:00
Jared Schoeny
d6d04240d4 Make the hack gallery fullscreen preview usable on phones (#84)
Opening a screenshot barely grew it on mobile, and Safari stretched every PixelImage. The lightbox now fits the screen by default on phones, with pixel-perfect still available, and WebKit keeps the original aspect ratio.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 18:59:58 -06:00
Jared Schoeny
19c2cd65ae Help new visitors find the download path on hack pages (#83)
Some checks failed
Deploy Supabase Migrations to Production / migrate (push) Has been cancelled
* Help new visitors find the download path on hack pages.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Keep the download help tab above the mobile action bar shadow.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Give the version chip a pointer cursor.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Make the download help tab a bit larger.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 16:38:53 -06:00
Jared Schoeny
22ebbb78d0 Resume patch downloads that die mid-body instead of starting over (#82)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 10:51:49 -06:00
Jared Schoeny
567f79c00e Tell request failures from truncated patch downloads (#81)
Some checks failed
Deploy Supabase Migrations to Production / migrate (push) Has been cancelled
* Expand patch download diagnostics

Separate request and body failures, capture response sizes, and sample successful fetches so protocol and truncation patterns can be compared.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Move the details migration after hack review threads.

CI rejects new migration filenames that sort before the tip on main.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 11:34:37 -06:00
Jared Schoeny
73fa5837e6 Hide the homepage download celebration until the next milestone is set. (#80)
The 500k thank-you stays live in code but only appears when NEXT_PUBLIC_DOWNLOADS_MILESTONE is set, so we can wait for 1M without another copy change later.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 17:22:02 -06:00
Jared Schoeny
798a4f209e Recommend auto-generating patches from a modified ROM (#79)
* Recommend auto-generating patches from a modified ROM.

Manual .bps/.xdelta upload is now a fallback so submitted patches more reliably match the chosen base ROM.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Match generate-mode file pickers to the patch upload control.

Browse stays a distinct button so it does not blend into the filename text.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Mark manual patch upload as a fallback with a caution icon.

Makes it clearer that an existing .bps/.xdelta may not match the chosen base ROM.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 23:32:19 -06:00
Jared Schoeny
124384790a Add website-only bug report note to the contact form (#78) 2026-08-24 09:13:52 -06:00
Jared Schoeny
f2550cabe2 Fix sending approved hack updates to the admin Discord path (#77)
Approved version uploads now notify only the non-admin Hackdex webhook. Pending submissions still go to the review thread or admin webhook fallback. Also drop the tada emoji from the pending-approval embed.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-23 08:31:31 -06:00
Jared Schoeny
e0747efb82 Add Discord review threads and a Resend reply loop for submitted hacks (#76)
Some checks failed
Deploy Supabase Migrations to Production / migrate (push) Has been cancelled
* Add a Discord review thread and Resend reply loop for submitted hacks.

Admins can email submitters from a forum thread and inbound replies land back in that same thread.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add an admin endpoint to register Discord guild commands.

Local still uses the npm script; production can hit /api/discord/register while logged in as an admin.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add an admin backup to create a missing Discord review thread.

If submit fails to open a thread, an admin can create one from the hack details menu.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Match inbound review replies when the plus-address token is lowercased.

Mail delivers To in lowercase, so tokens are now hex and lookups are case-insensitive.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Use distinct review embeds for /reply and inbound creator mail.

/reply posts a green embed with subject, Discord avatar, and the creator username; thread replies drop the To field.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Gate /reply by Discord role and mark inbound From as verified.

DISCORD_REPLY_ROLE_IDS is required; creator mail still posts when the address does not match the account.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Retry inbound review mail when Discord does not post the embed.

A failed thread post no longer records the email as processed or returns 200 to Resend.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Notify the admin webhook when a review thread cannot be loaded.

Patch upload no longer stays silent if getHackReviewThread throws.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Keep the /reply ack honest after the review email is sent.

A later Discord or deferred-response failure no longer claims the email failed.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Make the admin review message stand out in the reply email.

The quote sits in a rose-tinted box so it is not just another paragraph.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Tag review threads as claimed or unclaimed and announce claims.

New and backup-created threads get the matching forum tag; dashboard claims swap Unclaimed to Claimed.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 22:07:33 -06:00
Jared Schoeny
d07230a0c4 Require hack report details and collect optional contact email (#75)
Details are now required for every report type. Non-stolen reports can include an optional email so staff can follow up; stolen reports still require email.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-22 10:26:29 -06:00
Jared Schoeny
38d8752c89 Merge pull request #74 from jschoeny/feat/patch-download-telemetry
Some checks failed
Deploy Supabase Migrations to Production / migrate (push) Has been cancelled
Add patch download failure telemetry
2026-08-20 12:23:35 -06:00
Jared Schoeny
6d2a61f91c Add a local-dev fallback for download device IDs
crypto.randomUUID is unavailable on HTTP, which breaks download counting during local development. Production still uses the native UUID.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 11:12:29 -06:00
Jared Schoeny
3ac3a9c4b7 Add patch download failure telemetry
Capture actionable diagnostics for signed URL, network, HTTP, and patch application failures while keeping reporting best-effort.
2026-08-18 10:01:15 -06:00
Jared Schoeny
e6b91a6045 Fix trending rankings for hacks with many patches (#73) 2026-08-17 18:35:44 -06:00
Jared Schoeny
c4a295643c Update README disclaimer 2026-08-17 18:15:41 -06:00
Jared Schoeny
c7c88d1840 Xdelta patching (#71)
Some checks failed
Deploy Supabase Migrations to Production / migrate (push) Has been cancelled
* Add xdelta patch support

* Fix potential race on reupload to new format + update typings

* Fix waiting too long to call showSaveFilePicker

* Allow seeing patch format in version history
2026-08-03 10:56:45 -06:00
Jared Schoeny
30ab839d0f Update baseRoms.ts
- Add German Diamond and Pearl
- Add Japanese TCG2
- Fix spacing issue
2026-07-24 12:47:50 -06:00
Jared Schoeny
b13dbc3033 Better optimize middleware matcher 2026-07-22 14:21:53 -06:00
Jared Schoeny
556d28235e Stop using description for discover search (expensive) 2026-07-21 18:32:07 -06:00
Jared Schoeny
3445ba04a5 Disable prefetching by default on HackCards and otherHacks 2026-07-21 18:06:52 -06:00
Jared Schoeny
92c86e80af Make pending hacks assignable to admin for review (#66)
Some checks failed
Deploy Supabase Migrations to Production / migrate (push) Has been cancelled
* Extract common Modal component

* Move admin pending hacks list to client component

* Add assigning pending hacks to admin for review
2026-07-18 22:37:41 -06:00
Jared Schoeny
6568c0c2d1 Update hack description input with example and credits req 2026-07-18 14:38:49 -06:00
Jared Schoeny
34129f99dc Fix up homepage layout issues on mobile 2026-07-11 12:20:16 -06:00
Jared Schoeny
4d07738144 Add 500K celebration changes 2026-07-11 09:40:11 -06:00
Jared Schoeny
43aa0236e1 Add customizable patch version selector + related UX improvements (#62)
Some checks failed
Deploy Supabase Migrations to Production / migrate (push) Has been cancelled
* Add `hack_patcher_patches` table

* Implement patcher version server actions

* Use first curated patch as default when custom patcher list is active

* Allow saving custom patcher lists with unpublished patch auto-publish

* Keep custom patcher list consistent across archive and new uploads

* Add creator UI for Latest vs Custom patcher version settings

* Add patch version picker to hack page downloader

* Add custom public version names for Custom patcher mode

* Fix direct patch download consistency between Latest vs Custom modes

* Consolidate download and patch to one button press

* Fix rom ready for patching checks

* Fix Select ROM pop-in while base roms loading

* Tighten patcher patches db insertion

* Harden getSignedPatchUrl permission checks

* Fix not using selected patch's filename

* Acknowledge Custom patcher setting in HackPatchForm

* Update types/db.ts

* Refresh discover cache on patch published

* Add migration ordering check to ci.yaml

* Fix new migrations ordering
2026-07-10 22:42:51 -06:00
Jared Schoeny
6e41bb99f8 Label new tags for creators + tag categories migration fix (#64)
Some checks are pending
Deploy Supabase Migrations to Production / migrate (push) Waiting to run
* Add ability to see new tags since last update

* Fix some bugs and edge cases

* Add migration fix to appease ci
2026-07-09 23:35:10 -06:00
Jared Schoeny
8ea523de3c Add array chunk helper for discover data fetching
Some checks failed
Deploy Supabase Migrations to Production / migrate (push) Has been cancelled
2026-07-07 15:46:04 -06:00
Jared Schoeny
2e7a34e8f8 Fix Unknown author bug in discover browser 2026-07-07 15:03:55 -06:00
Jared Schoeny
17a58d18fc Fix discover state not preserved on browser back 2026-07-07 14:05:23 -06:00
Jared Schoeny
d9986e6af8 Use url params to persist Discover state (#63)
* Persist Discover state in url query params

* Add button to copy link to current discover state

* Make tags clickable in hack detail page

* Improve CollapsibleTags styling
2026-07-07 12:53:27 -06:00
Jared Schoeny
350d660936 Add supabase db migration workflows (#65)
* Add ci supabase workflows

* Fix unused db seeding
2026-07-07 12:29:16 -06:00
Jared Schoeny
6e17c5fbf6 Send email to user on hack approval (#61)
* Add MJML and hack-approved email template

* Move email sending to util file

* Add trigger to send hack approved email

* Fix replyTo contact form regression

* Add email subject sanitization

* Adjust subject of hack approval email

* Use singleton for mail transporter

* Fix wrong replyTo restoration
2026-06-13 13:25:55 -06:00
Jared Schoeny
34e86ed323 Add verifying state to hack action bar 2026-05-29 13:45:19 -06:00
Jared Schoeny
ac81e2eebb Add ability for admins to contact creators 2026-05-29 13:38:29 -06:00
Jared Schoeny
e122a182d7 Add note about contacting devs to submit hacks 2026-05-29 13:03:01 -06:00
Jared Schoeny
64fbc7fcde Add not found page for hacks 2026-05-29 13:03:01 -06:00
Jared Schoeny
5fc3a45ade Update FAQ with more info 2026-05-29 13:03:01 -06:00
Jared Schoeny
e74844d606 Add FUNDING.yml 2026-05-29 13:01:57 -06:00
Andy George
2312230c5f Update copyright year to 2026 (#44)
* Update Footer.tsx

* Update recovery.html

* Update LICENSE.md

* Update confirmation.html

* revert license year, automatically retrieve footer year

* Update src/components/Footer.tsx

Co-authored-by: Jared Schoeny <jared@jschoeny.com>

---------

Co-authored-by: Jared Schoeny <jared@jschoeny.com>
2026-05-29 10:53:33 -06:00
Jared Schoeny
4117d4a220 Add BaseRomErrorModal on bad rom selections 2026-05-22 23:37:28 -06:00
Jared Schoeny
4a99825abe Fix Pokemon Bleue typo 2026-05-14 20:40:50 -06:00
Jared Schoeny
673e2a619b Add some FR/DE baseRoms 2026-05-14 20:38:36 -06:00
Jared Schoeny
eee73bcca4 Add (Rev 0) to baseRoms for clarification 2026-05-14 20:25:18 -06:00
Jared Schoeny
896c1177bb Fix direct patch downloads not logged for counter 2026-05-01 23:12:44 -06:00
Jared Schoeny
f7e25405f3 Add ai pledge to readme 2026-05-01 21:50:33 -06:00
Jared Schoeny
7c1724b27d Implement patch download permissions (#51) 2026-05-01 13:21:57 -10:00