170 Commits
Author SHA1 Message Date
SalastilandClaude Opus 5 eb1b9e0682 config: let Cloudflare's challenge run behind behindCloudflare
Cloudflare injects its JS-detection bootstrap inline into origin HTML.
`script-src 'self'` stops it executing, so the challenge never records
that it was solved and Cloudflare serves another one on the next
request -- a loop no visitor can escape, which reads as a Cloudflare
bug rather than a header of ours.

Allowing it needs `'unsafe-inline'`, since an inline script cannot be
allowlisted by URL and Cloudflare cannot know a nonce we generate. That
is a real weakening, so it is opt-in: the default policy is unchanged
byte for byte, and only an instance Cloudflare actually fronts turns it
on. Nothing else in the policy relaxes.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-10-10 15:30:29 -04:00
SalastilandClaude Opus 5 83bcae01b7 docker: stop shipping the host target dir into the build
There was no .dockerignore, so `COPY . .` carried target/ -- three
gigabytes of artifacts built by a different toolchain than the builder
stage's -- plus cache/ and .git into every build. Mirror .gitignore's
allowlist and keep the context to what the build actually reads.

The final image is unchanged: the runtime stage only copies the binary,
public/ and config/.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-10-09 23:03:02 -04:00
SalastilandClaude Opus 5 95129b4e76 js: close the account popover the click did not open
The outside-click handler guarded `event.target` against non-elements
and then called `.closest` on it unguarded a line later, so the guard
bought nothing. Take the guarded reference through both uses.

While here, close every popover except the clicked one: the handler left
open popovers alone whenever the click landed on any trigger, so opening
a second account signal left the first one hanging open over the
timeline.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-10-09 22:55:24 -04:00
SalastilandClaude Opus 5 9582c9eed3 country: assert the tables match what the lookup assumes
`flag` binary searches both tables, so an entry inserted out of order
stops resolving with no error anywhere -- and the sort order lived only
in a comment. Check it, along with the two invariants the rest of the
lookup rests on: names are lowercased, because the needle is, and codes
are `A..=Z`, because `Flag`'s `Display` offsets off `b'A'` and panics
otherwise.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-10-09 22:55:24 -04:00
SalastilandClaude Opus 5 bd7f9e9414 embed: cover the photo-prefixed activity id
The `/photo/N` unfurl encodes the photo in the status id Discord echoes
back, zero-padding the tweet to 19 digits so the prefix stays outside
snowflake range. Nothing exercised that round trip, and the padding is
easy to break without noticing, so pin the encoding, the plain-id case,
the tenth-photo fallback and the rejections. Same for `keep_only_photo`,
which the unfurl leans on to narrow the media.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-10-09 22:55:24 -04:00
Salastil 64a4331512 Merge upstream teapot into our fork 2026-10-09 22:50:32 -04:00
Amaan Qureshi 3af2e07d0b pins: update 2026-10-04 21:32:46 -04:00
Amaan Qureshi 68ba24381a status: preview only the linked photo for /photo/N unfurls 2026-10-04 21:32:45 -04:00
Amaan Qureshi 6468a44ed0 css: give the main thread card an even border 2026-10-01 02:50:50 -04:00
Amaan Qureshi 7b6fa095d0 views: draw thread lines between replies in a chain 2026-10-01 02:50:49 -04:00
Amaan Qureshi 4a5ac3a1fe routes: trim trailing slashes and fix indexed media redirects 2026-10-01 02:39:52 -04:00
Amaan Qureshi 925e392c96 nix: take clang and wild from buildPackages 2026-09-30 22:48:41 -04:00
entailz 187d63f92b deps: bump rustls to 0.23.45 2026-09-21 18:46:14 -04:00
entailzandAmaan Qureshi 0c69db354e country: show the account location as a flag instead of text
Co-authored-by: Amaan Qureshi <[email protected]>
2026-09-21 18:46:14 -04:00
entailz ec13a1a0b0 css: raise font weight for hidpi and fix the verified badge fill 2026-09-21 18:46:14 -04:00
SalastilandClaude Opus 5 938e3c6037 search: read every filter toggle the panel emits
The panel generated `f-<name>` and `e-<name>` checkboxes for ten filters,
but `SearchQuery` named a subset of nine fields and serde dropped the
rest, so "retweets only" and every exclude but replies did nothing. The
one exclude field that existed, `e-retweets`, was a name no checkbox ever
submitted.

Collect the toggles by prefix instead, validating each against
`VALID_FILTERS`, and drive the checkboxes from a single table so the two
sides cannot drift apart again. An exclude now wins over the matching
include, which would otherwise build a query that can never match.

Profile search and the search feed grew the same handling: both parsed
the query text alone and ignored the toggles entirely. The feed keys its
cache on the built query, since filters are part of a feed's identity.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-20 20:28:32 -04:00
ewof 7081c11f14 themes: add Nord Dark and Nord Light 2026-09-20 03:46:43 -04:00
Amaan Qureshi 8e1996e397 parser: preserve media grid order
Fixes #3
2026-09-16 19:59:24 -04:00
ewof 9b37d20b51 example: add publicPort 2026-09-16 19:32:32 -04:00
Amaan Qureshi 04b1cfee52 media: preserve every GIF in multi-GIF posts 2026-09-06 04:02:45 -04:00
Amaan Qureshi cc1330ebcb http: name every transport failure instead of formatting a string 2026-09-06 04:02:45 -04:00
Amaan Qureshi de37f0587a views: take preferences everywhere instead of an optional twin 2026-09-06 04:02:45 -04:00
Amaan Qureshi bfb52f143f sessions: keep the limit maps ordered 2026-09-06 04:02:45 -04:00
Amaan Qureshi 6de4cde206 comments: drop the ones that restate the code beneath them 2026-09-06 04:02:45 -04:00
Amaan Qureshi 99d0564fbf types: name the search product, ranking mode and tab kinds 2026-09-06 04:02:44 -04:00
Amaan Qureshi 884fb7c658 modules: drop every pub use and import from the defining module 2026-09-06 04:02:42 -04:00
Amaan Qureshi b641bd8482 all: prefer turbofish 2026-09-03 01:52:37 -04:00
Amaan Qureshi fceb9834ff api: type the GraphQL variables instead of assembling json values 2026-09-03 01:52:37 -04:00
Amaan Qureshi 9c71848770 cache: serve stale search and profile pages while one refresh runs 2026-09-03 01:52:37 -04:00
Amaan Qureshi 42baad12b5 api: refuse ids that cannot be snowflakes before spending a session 2026-09-03 01:52:37 -04:00
Amaan Qureshi 13bf915b1f parser: read media search modules and grid entries 2026-09-03 01:52:36 -04:00
Amaan Qureshi b0af8d499f parser: return an empty timeline when X sends no instructions 2026-09-03 01:52:36 -04:00
Amaan Qureshi 1262c11ab3 utils: append the cursor after an existing query string 2026-09-03 01:52:36 -04:00
Amaan Qureshi 85c36c26a0 api: stop paging a search that repeats one post 2026-09-03 01:52:36 -04:00
Amaan Qureshi 9aed08c046 api: report an expired cursor as a bad request 2026-09-03 01:52:36 -04:00
Amaan Qureshi f26ef79007 api: rotate a locked cookie session instead of calling the profile suspended 2026-09-03 01:52:36 -04:00
Amaan Qureshi 8e88f648bf api: treat a bodyless 404 as transient and retry once 2026-09-03 01:52:34 -04:00
Amaan Qureshi 5054640a27 prefs: let the theme cookie be read from script 2026-08-31 21:41:06 -04:00
Amaan Qureshi 9bfb7e75a3 css: rework thread connectors, nav and the about panel 2026-08-30 03:09:38 -04:00
Amaan Qureshi 458358c525 views: show country and translation on quoted posts 2026-08-30 02:15:46 -04:00
Amaan Qureshi 2ab6875626 views: say what a suspended or missing account means 2026-08-30 01:47:26 -04:00
Amaan Qureshi b4de859995 css: realign the interstitial with the new layout layer 2026-08-29 23:18:29 -04:00
Amaan Qureshiandentailz f168a06bfd css: add the information-first layout layer
Co-authored-by: entailz <[email protected]>
2026-08-29 23:18:28 -04:00
Amaan Qureshiandentailz 4f08ae5fe5 views: fill the photo rail grid evenly
Co-authored-by: entailz <[email protected]>
2026-08-29 22:35:17 -04:00
Amaan Qureshiandentailz 2df877c74a css: limit the Twemoji face to emoji codepoints
Co-authored-by: entailz <[email protected]>
2026-08-29 22:35:17 -04:00
Amaan Qureshiandentailz 155f36dbf7 views: mark thread position on timeline items
Co-authored-by: entailz <[email protected]>
2026-08-29 22:35:17 -04:00
Amaan Qureshiandentailz 6e0be8626d config: document the X-Posed community cache
Co-authored-by: entailz <[email protected]>
2026-08-29 22:35:17 -04:00
Amaan Qureshiandentailz b9772f09a7 views: add a mobile navigation menu
Co-authored-by: entailz <[email protected]>
2026-08-29 22:35:17 -04:00
Amaan Qureshiandentailz c36ffc52e8 views: abbreviate profile stat counts
Co-authored-by: entailz <[email protected]>
2026-08-29 22:35:17 -04:00
Amaan Qureshiandentailz fb5bcc7bf4 views: add the sticky thread context bar
Co-authored-by: entailz <[email protected]>
2026-08-29 22:35:17 -04:00