threadbare #
FENNELWICK
The browser build of longread, served at
threadbare.substandard.blog. It is a
substandard subsite: same paper, ink, red pen and hard misprint shadows as
substandard.blog. It reads public Bluesky records directly, with no backend.
Sign-in with atproto is required; the session identifies the account and grants
no write access.
What it does #
- Sign in uses atproto OAuth with the identity-only
atprotoscope. The app is unavailable without a session. - Scan surfaces one account's long self-threads that are worth writing up, scored with the same six-composite tree as panoptiblog. The defaults look back ten years, include threads that start as replies, and require five posts. There is no word floor; the score weighs prose and depth. The list starts at the top quarter by percentile; lower-scoring threads sit behind a Show button, and Show can include the top half or all threads.
- Follows merges the same table across the accounts a handle follows.
- Blog lists an account's
site.standard.publicationrecords andsite.standard.documentrecords, maps documents back to their source posts, and recommends only threads that are not already documents. - Drafts keeps the signed-in account's exported Markdown in IndexedDB. Nothing is written to an account.
Each thread carries up to five topics: words drawn from its own text with a bundled stopword list. The extraction is local and deterministic. It is not a model, makes no extra request, and does not affect the ranking.
Each result is a compact row: a 1/n thread spine, the author's avatar,
display name and handle, a two-line root snippet, the first image as a
thumbnail, engagement, three topics, and the score. The full root and its
quoted posts are in the thread view. The card is rendered from public records,
not an embed.bsky.app iframe, so it keeps the substandard theme and makes no
third-party request.
Rows have a ⋯ menu for opening the post on Bluesky. Copy and save appear only
when the thread belongs to the signed-in account, and drafts are stored per
account. Scan and follows settings and sort order live in the URL and in
localStorage, so a scan is shareable and restores on return. Long result sets
render 50 rows at a time; follows results stream in as accounts finish, and a
running scan can be cancelled.
The score is panoptiblog's canonical tree, version 18, from
scripts/panoptiblog/score-tree.json. Six composites (Audience, Volume,
Consistency, Style, Pulse and Network) average percentile-ranked factors; the
overall raw score averages the composites, and the displayed score is that raw
score's percentile among the scanned threads. A scan or follows run is one
cohort. Factors that describe publications use thread-scoped inputs with the
same ids and bounds: likes, reposts plus quotes, quotes per kiloword, attention against
the author's median, thread continuity and post formats. Expanding the score
shows the overall percentile and cohort, each composite and factor with its
weight, scale, raw value and percentile, the engagement counts, and any score
notes.
What it looks for #
Long self-threads that can stand alone: one line of thought, enough prose and structure to read as an essay, and a voice that holds. Link dumps and short reaction chains fall on depth, structure and continuity.
This is not a best-performing list. Audience — likes, reposts and quotes — is one of six composites. A quiet thread with strong writing, volume and continuity can outrank a popular but thin one. Engagement is a diagnostic, and the score is a percentile within the scanned cohort.
Strong content labels (!hide, spam, scam, impersonation) hide a row behind
a “show hidden” toggle; adult and graphic labels show a content warning with a
Show button. The thread view applies the same rule. If a post has forks, the
card shows ⑂ n and the thread view lists every branch, with the chosen path
marked and clickable alternatives.
Quoted posts are fetched and rendered inline. A quote whose author carries
!no-unauthenticated stays a link, matching the CLI's opt-out rule.
Develop #
npm install
npm run build:wasm # compiles infra/longread/wasm to src/wasm
npm run dev
npm run check runs tsc --noEmit. npm test runs the unit tests. npm run build writes dist/.
A harness can build with VITE_THREADBARE_TEST_DID=<did> to exercise the
signed-in UI without an OAuth round trip. Normal builds leave it unset.
The Vite dev server is pinned to 127.0.0.1:5190. The threadbare wordmark is
src/assets/threadbare.svg; the substandard wordmark and icon come from
brand/ and public/icons/. The sticker favicon is copied by the
threadbare-favicon prek hook.
Sign-in #
public/client-metadata.json is the OAuth client. It asks for atproto only,
so the session identifies the account and grants no write access. The callback
is /oauth/callback; a CloudFront viewer-request function rewrites that path
to index.html, so the static release handles it. The metadata lists only the
production callback. On local dev, src/auth.ts builds a loopback client
instead. The authorization server fetches the metadata from the production
URL, so a local sign-in works after that metadata is deployed.
Deploy #
scripts/deploy-threadbare.sh builds the app, uploads an immutable release tree to
s3://threadbare.substandard.blog/releases/<sha>/, and flips CloudFront with
tofu apply. The Route53 zone, certificate, bucket and distribution live in
infra/threadbare.tf. The release includes client-metadata.json; the
authorization server fetches it from the deployed site, so sign-in works only
after the first deploy.
The first apply needs AWS credentials and a release_sha for the frontpage in
infra/terraform.tfvars.json; scripts/deploy-site.sh writes that value.
Browser support #
Reading public.api.bsky.app, plc.directory and PDS listRecords endpoints
from the browser relies on their access-control-allow-origin: * responses.
did:web documents must also send CORS headers; most accounts are did:plc.