Commit Graph

80 Commits

Author SHA1 Message Date
Claude 717cdca44b Move widget reorder arrows next to the Active/Disabled badge 2026-07-26 19:11:09 +00:00
Claude 9e13e95f35 Simplify Widgets tab: state button instead of checkbox, add drag-free up/down reordering
Drops the checkbox/tooltip/hint-paragraph combo for a single click-to-toggle
Active/Disabled badge (same pattern as EventsTab's Active/Paused). Widget
order is now admin-sortable via up/down arrows and persisted as
widgetOrder, with Sidebar.svelte rendering widgets in that exact sequence
instead of a fixed hardcoded order.
2026-07-26 19:05:24 +00:00
Claude 9ca5bf566d Update Widgets tab copy to reflect that disabling actually stops polling
The "Hidden" tag, checkbox tooltip, and intro hint previously only described
sidebar visibility, which undersold what disabling now does (scheduler.ts
gates the actual poller on this flag too). Tag is now "Off", tooltips say
"stops polling and hides from the sidebar" / "resumes polling and shows in
the sidebar", and the intro hint spells out both effects plus the immediate
re-poll on re-enable. Bookmarks (no backend poller) gets its own accurate,
narrower wording via a new hasBackendPoller prop on WidgetSection instead of
inheriting a claim that doesn't apply to it.
2026-07-26 18:50:08 +00:00
Claude 2f083feb76 Gate widget pollers on their Widgets-tab enabled flag, not just sidebar visibility
Disabling Weather/Stocks/PoE2 in the Widgets tab previously only hid the
sidebar box — the backend kept polling on schedule regardless. scheduler.ts
now skips both the interval tick and the startup-immediate poll for any
widget currently disabled, so there's no outbound call for something nobody's
displaying. Re-enabling a widget (via PATCH /api/admin/settings) triggers an
immediate poll instead of waiting out its normal cadence, mirroring the
existing weather-location-change behavior.

Verified live: booted with poe2 disabled and confirmed no poll fired at
startup (previously always immediate), then re-enabled via PATCH and
confirmed the poll fired immediately.
2026-07-26 18:40:50 +00:00
Claude 175794cfc3 Simplify Tracked Items row to just the source count
Drop the keyword-match list and recap-status text from the row view — both
are still visible/editable in the edit panel, the row just needed the source
count.
2026-07-26 18:35:23 +00:00
Claude bfe776b331 Move More>> toggle to edit-only, show source count instead of names in list
The row view now shows "N sources active" instead of listing every attached
source's name, and the "More »" spillover checkbox only appears in the edit
panel — it's no longer duplicated inline on every row.
2026-07-26 18:22:53 +00:00
Claude 199177a3d2 Replace cadence lock with a real off/1h/3h/6h/12h/24h recap interval
Undoes the previous lock — some tracked items (a commit feed, a torrent feed)
are just organizing sources under a nav entry and never want an AI recap at
all, so the control needs to be both live and able to express "never."

Replaces the old cadence ('continuous'/'daily'/'hourly'/'custom') + cadenceTime
model with a single recapIntervalHours: 1 | 3 | 6 | 12 | 24 | null field (null
= off), which also simplifies eventsRecap.ts's isDue() down to one comparison.
Off by default for new items. The "Show in More »" toggle is now available
both inline on the row and inside the edit panel.
2026-07-26 18:16:34 +00:00
Claude 1068a4a5f7 Rename Tracked Events to Tracked Items, add More>> spillover, lock recap cadence
- Tracked items get the same isSpillover flag as categories: a per-item "More"
  checkbox collapses it into the "More »" nav tab instead of its own top-level
  tab, mirroring Category.isSpillover end to end (schema, CRUD, public API,
  nav partitioning, /more page).
- Renamed user-facing "Tracked events" text to "Tracked items" (admin tab,
  toolbar, buttons, placeholders, /event/:id subtitle) — the underlying
  TrackedEvent/events data model and routes are unchanged.
- Locked the per-item recap cadence dropdown (previously a live
  Continuous/Daily/Hourly picker) and moved it to its own labeled section with
  an explanatory hint: reading eventsRecap.ts confirmed Continuous and Hourly
  currently behave identically, so the live choice was more confusing than
  useful. New items are fixed to Continuous; existing items show their real
  cadence read-only.
2026-07-26 17:59:56 +00:00
Claude 20f9267594 Remove dead defaultPollIntervalMinutes global setting
Confirmed dead: every source's pollIntervalMinutes is NOT NULL DEFAULT 15 and
the admin form only ever submits 5/15/60, so sourcesDueForPoll()'s fallback to
the global default could never actually trigger. Removes the setting end to
end (schema, settings.ts, scheduler/poller/sources signatures, admin types,
mock backend fixture) and drops the now-single-item "Poll interval" panel from
the Sources & Merge tab.
2026-07-26 17:31:52 +00:00
Claude e7367bbb86 Combine Merge and Sources admin tabs, add explanation to Poll interval
Category priority and Sources now live at the top of the combined tab, each
collapsed by default behind the same CollapsibleSection pattern used for the
Widgets tab. Merge strictness and the rest of the synthesis settings sit below,
uncollapsed. The Poll interval panel's hint now explains that it's a fallback
only — every source sets its own poll interval, so this global default has no
effect in current usage.
2026-07-26 17:24:11 +00:00
Claude e6ac6cd061 Consolidate Weather/Stocks/Bookmarks/PoE2 into a single admin "Widgets" tab
Each widget now has an independent enable/disable checkbox that gates its
visibility in the sidebar (new global_settings.widgets columns + GET /api/widgets),
and is collapsed by default behind a WidgetSection wrapper so the tab stays
manageable as more widgets get added. The four existing tab components
(WeatherTab/StocksTab/BookmarksTab/Poe2Tab) are reused unmodified as each
section's expanded content.
2026-07-26 17:09:26 +00:00
Claude 24bf5afb07 Act on review findings: dead code, poe2_primary_currency_name, inefficiencies, custom source type
- Delete dead ArticleCard.svelte and five zero-call-site backend exports
  (getTagsByIds, unclusteredItemsForSources, itemsByCluster, deleteAllContentItems,
  latestArticleInThread)
- Drop poe2_primary_currency_name from the schema entirely (dev DB, no migration
  concerns)
- settings.ts: bind named params instead of 33 positional ?s to remove the
  reorder-and-silently-corrupt risk
- Remove the long-dead stooqToYahooSymbols unconditional startup rewrite
- Share direct-publish logic between runPassthroughCycle/runSynthesisCycle via a new
  publishItemsDirect helper, and cache sourcesDb.listSources() once per synthesis tick
  instead of a per-item getSource() call
- Remove the 'custom' source type (had no adapter of its own, aliased to api)
2026-07-26 16:45:46 +00:00
Claude c217545968 Add full program review: dead code, inefficiency, and UI consistency audit
Written report only, no code changes — catalogs findings across backend,
frontend, admin panel, and cross-system interactions for follow-up triage.
2026-07-26 16:05:55 +00:00
Claude d0bf6d18bc Auto-refresh sidebar data so a stale tab picks up backend polls
Verified the PoE2 24h-change computation itself is correct (simulated
24+ hours of real hourly polling against the actual recordRate/
rateAtOrBefore/markPolled functions — change24h starts populating
right on schedule at hour 24). The real problem: weather/stocks/poe2/
bookmarks are only fetched once when the layout first loads.
SvelteKit never re-runs a load() on its own — only on navigation or
explicit invalidation — so a browser tab left open never sees any of
those widgets update no matter how long the backend has been polling.

Named the layout's load() dependency ('app:sidebar') and invalidate
just that on a 5-minute timer, rather than invalidateAll() — which
would also re-run page-level loads and could reset things like the
home feed's own pagination state on every refresh.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-26 00:00:11 +00:00
Claude 0ff8da8363 Weather: label which day each hourly forecast entry belongs to
The hourly strip covers the next 24h starting from "now", which
almost always crosses a day boundary partway through — a flat
12-hour-per-row grid gave no indication of where "today" ends and
"tomorrow" begins. Grouped the hours by calendar day instead, with a
"Today"/"Tomorrow"/weekday label above each group.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-25 23:07:51 +00:00
Claude 4066c48412 Sidebar: sync scroll instead of a separate inner scrollbar
The previous fix (max-height + overflow-y:auto) made every widget
reachable but required scrolling the sidebar itself independently of
the article column — two different scroll regions felt janky.

Replaced it with a three-layer structure: a plain spacer sized to the
sidebar's full natural height (reserving the right amount of page
scroll room), a sticky+clipped viewport box, and a content wrapper
translated upward via a scroll listener. The translation amount is
driven by how far the page has scrolled past the point where the
sidebar started sticking, clamped to the overflow amount — so
scrolling the article feed down reveals more of the sidebar in
lockstep, and scrolling back up reverses it, all through the single
page scrollbar. Short sidebars that already fit the viewport are
unaffected (reveal range is zero, so it behaves exactly like plain
sticky-to-top as before).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-25 03:50:18 +00:00
Claude 4d9b11789f Cap sidebar height so every widget stays reachable
Weather + Stocks + PoE2 + Bookmarks stacked can be taller than the
viewport, especially on categories with a short article list. A
sticky element taller than the viewport gets its overflow glued
below the fold for the whole scroll (position: sticky doesn't clip
or scroll an oversized element, it just pins the top and leaves the
excess off-screen until the container's bottom edge finally arrives).
Capping the sidebar's height to the viewport and scrolling it
internally keeps every widget reachable instead of some of them being
permanently cut off.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-25 03:34:46 +00:00
Claude b4f317e3d5 Fix 7-day forecast showing yesterday: UTC date-parsing bug
new Date("YYYY-MM-DD") parses bare date strings as UTC midnight per
spec, then toLocaleDateString() rendered that in the browser's local
timezone — for any zone behind UTC (all of the Americas), that rolls
the displayed date back a full day, making "today" look like it
already passed. Added parseDateOnly() (year/month/day constructor,
builds the date in local time instead of round-tripping through UTC)
and use it for the daily forecast headings.

Also switched the heading format to "Friday July, 24th, 2026" per
request, which needed the row layout to drop its fixed 40px width for
the old "Thu" abbreviation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-25 03:27:47 +00:00
Claude 07d7919f10 PoE2 widget: show "—" instead of nothing when 24h change is pending
Pairs need 24h of accumulated poll history before a change% exists
(self-computed, since poe.ninja doesn't expose that window) — the
sidebar widget was silently omitting the change badge in that case
while the admin tab already showed "24h —", so a freshly tracked (or
freshly deployed) pair looked broken instead of just pending. Also
fixed the up/down color classes defaulting a null change to green via
`?? 0` — the placeholder now renders neutral, not falsely positive.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-25 03:18:17 +00:00
Claude 37ac84c414 PoE2: drop 1h/7d change, remove icons, link panel to poe.ninja
Simplify to 24h-only change per pair (both directions) since that's
all that's needed. Icons weren't adding anything to the display, so
they're gone from the schema, API, and both components. The sidebar
widget and admin tab's underlying data model both got smaller as a
result — fewer columns, fewer fields, less to render.

The sidebar panel now links out to poe.ninja's own currency page for
the currently tracked league (https://poe.ninja/poe2/economy/{league
slug}/currency), matching the existing pattern of Weather's widget
linking to its own detail page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-25 03:11:37 +00:00
Claude 0a57e687a5 Slow PoE2 poller to 1 hour — matches poe.ninja's own refresh rate
poe.ninja's overview data doesn't update faster than hourly, so
polling every 15 minutes was just re-fetching the same numbers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-25 02:54:23 +00:00
Claude a51387902c Rework PoE2 module: pairwise currency exchange rates, 1h/24h/7d change
PoE2's economy is inherently pairwise (Exalted vs Chaos, Divine vs
Exalted), not everything quoted in one reference currency, so the
watchlist now tracks admin-picked currency pairs and shows both
directions with 1h/24h/7d change. poe.ninja doesn't expose per-pair
rates or multiple change windows, so both are self-computed: any
pair's rate comes from dividing the two currencies' primaryValue
(same reference currency cancels out), and change% is derived from
our own poll-history snapshots rather than poe.ninja's fixed 7-day
sparkline. The inverse direction's change is exact closed-form math
from the forward change, not a sign-flip approximation.

The old single-currency watchlist schema can't be mapped onto pairs,
so migrate() drops and rebuilds poe2_watchlist when it detects the
old shape.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-25 02:48:28 +00:00
Claude 6d5d74b9bb Add PoE2 sidebar module: currency exchange watchlist
Tracks Path of Exile 2 currency values via poe.ninja's public economy
API, mirroring the existing Weather/Stocks sidebar modules. Always
follows the current challenge league (auto-detected, no admin picker).
Admin browses and picks currencies from a live list rather than typing
symbols, since currency ids are opaque. Change % is a 7-day window,
labeled accordingly to avoid the same interval ambiguity Stocks had.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-25 01:54:55 +00:00
Claude 0a50ec7b48 Label stock ticker % change with its interval
The change % is since the previous trading day's close (Yahoo's
own definition, same as any standard quote), but nothing on screen
said so. Sidebar widget now shows a "today" label next to the
Stocks header; admin Stocks tab gets an explanatory hint above the
list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-25 00:32:14 +00:00
Claude 57c49f6858 Switch stock ticker source from Stooq to Yahoo Finance
Stooq's public quote endpoint now gates every request behind a
client-side proof-of-work challenge (confirmed by manual curl
testing), which a plain server-side fetch can't pass and isn't
worth running a headless browser to solve. Yahoo's unofficial
/v8/finance/chart endpoint still works with just a browser-like
User-Agent header (also confirmed manually — bare curl/fetch UAs
get rate-limited immediately).

One request per ticker instead of one batched request (Yahoo's
batch quote endpoint needs a cookie+crumb handshake this one
doesn't), and change % is now computed against the real previous
close instead of the open-vs-close approximation Stooq's format
forced. Existing installs get their three default tickers
(Dow/S&P/Bitcoin) rewritten from Stooq to Yahoo symbol syntax
automatically; any ticker an admin added themselves is left alone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-24 23:47:36 +00:00
Claude b83640e980 Expand weather: feels-like, alerts, full current conditions, 2-row hourly
Sidebar widget now reads "Weather - <Location>" and shows a "Feels
like" line (Open-Meteo's own apparent_temperature, which already
blends heat index and wind chill as appropriate rather than needing
season-specific logic here).

The /weather page gains a current-conditions grid (humidity,
precipitation chance, wind direction/speed, pressure, sunrise,
sunset — wind and pressure units independently configurable in the
admin Weather tab) and an alerts section sourced from the US National
Weather Service (free, no key, US-only — fails safe to no alerts
elsewhere) shown between current conditions and the hourly strip.

Also fixes the hourly strip, which is now a fixed 12-column grid (two
rows of 12) instead of one overflowing horizontal-scroll row that
extended into the sidebar's column.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-24 22:52:53 +00:00
Claude a45a813a41 Add sidebar: Weather, Stocks, and Bookmarks widgets
A persistent right-hand sidebar (hidden only on /admin/**) with three
independent widgets: current-conditions weather (Open-Meteo, no API
key) linking to a new /weather forecast page; Dow/S&P/crypto/stock
tickers (Stooq, polled every 15 minutes); and admin-curated bookmark
links reusing the existing private-access lock per entry.

Weather and stocks are each self-contained modules (client + poller)
under backend/src/weather and backend/src/stocks, mirroring how
telegram/ is separated from the rest of the ingestion pipeline, so
either can be modified or removed independently. Bookmarks has no
external service, so it follows the plainer categories/events
DB-module + CRUD-route pattern instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-24 22:14:50 +00:00
Claude dbc922f3bd More page: render articles with ArticleListRow, bump preview cap to 5
Reuses the same tweet/telegram/article rendering each category page
uses instead of a bespoke title-only row, so the digest matches what
users see after clicking through.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-24 17:40:36 +00:00
Claude 8e1ba82eb4 Add category nav spillover: "More »" tab + digest page
Categories can now be flagged isSpillover in the admin priority list,
collapsing them out of the main nav into a single "More »" tab that
links to a new /more page listing each spillover category's newest
articles, with the category name linking through to its full page.
Keeps the nav from growing unbounded or word-wrapping as categories
are added.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-24 17:08:55 +00:00
Claude fbb879effe Rearchitect tracked events: a real displayed category, recap is additive
Previously a tracked event withheld all matching items from ever
publishing individually — they sat unclustered until the recap job fired,
which then bundled them into one article and discarded the raw items.
Visitors saw nothing from an event until a recap happened, and never saw
the underlying pieces at all.

Matching items now publish through the exact same pipeline as everything
else (individually or merged with same-story coverage via the normal
clustering pipeline), just tagged with the event's id via a new
publishDirect/publishCluster opts.eventId. An item whose source is
assigned to an event but doesn't match its keyword filter still
publishes normally, just without the tag, instead of being dropped.

The recap is now a periodic *additional* AI-written summary of everything
already published under the event since the last recap (new
synthesizeRecap prompt + publishEventRecap, reading MergedArticle bodies
rather than raw feed items) — never a replacement. Added a new
MergedArticle.isRecap flag so the two are visually distinguishable.

Frontend: a tracked event is now a real displayed category — new
/event/[id] page (mirrors /category/[name]), active events appended to
the site nav, and a "🧵 AI Recap" marker on recap articles.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 23:25:36 +00:00
Claude 97d3ed366c Fix missing storage-used display; add keyword filter for tracked events
Retention panel's "currently using" line and usage bar were always blank
— totalStorageBytes() existed but was never wired into the settings
response, so retention.storageUsedMB was undefined on every load. Now
computed fresh on every GET/PATCH /api/admin/settings.

Tracked events gain a keywords field: only items whose title/summary/
body contain at least one of them (word, phrase, or emoji — e.g. 🇮🇷 for
an "Iran war" event) qualify for that event's recap, instead of every
item from its assigned sources. An item from an event-linked source that
doesn't match now falls through to normal synthesis rather than being
silently dropped. Also added the source-assignment + keyword-filter edit
UI to EventsTab.svelte, which had no way to populate sourceIds at all
before this (the "assign from the Sources tab" comment referenced a
feature that was never built).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 23:07:50 +00:00
Claude a2b9d3bb0a Fix forward attribution: show origin channel as author, not the polled one
Was backwards — the card displayed the polled channel's own name/avatar
with a "Forwarded from @origin" line. Now mirrors the tweet retweet
pattern exactly: the card's author identity (name/handle/avatar) is
always the original channel/user, forward or not, same as tweet.authorName
never being the retweeter. A new repostedByHandle field (replacing
forwardedFrom) carries the polled channel's own handle for the
"Forwarded by @X" line above the card.

Media resolution still keys off the polled channel specifically (a new
sourceChannelUsername field) since attached media lives on the polled
channel's own copy of the message regardless of who originally posted it
— only the avatar now resolves against the displayed (possibly origin,
possibly null) channel identity.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 22:36:06 +00:00
Claude 4b1eca4c79 Merge remote-tracking branch 'origin/master' into development
# Conflicts:
#	backend/src/ingestion/adapters/base.ts
#	backend/src/pipeline/publish.ts
#	backend/src/storage/db/types.ts
#	frontend/src/lib/types.ts
2026-07-23 22:20:50 +00:00
Claude 26810f1fed Show "Forwarded from" attribution on forwarded Telegram messages
Mirrors the repost-line treatment tweets already get. GramJS resolves a
forward's origin channel/user from entities Telegram sends alongside the
same getMessages response (message.forward.chat/.sender), falling back
to fwdFrom.fromName for the rarer case where the origin hid its identity.
TelegramCard shows "↪️ Forwarded from @username" (or just the name if no
public handle) above the meta row.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 22:14:15 +00:00
Claude 1c6c0d4092 Add self-host/proxy media modes for Telegram, mirroring Nitter's Retention panel
Telegram has no public hotlinkable media URL the way Twitter's CDN does,
so there's no "direct" option: self-host downloads via the logged-in
account and stores locally; proxy re-fetches live through that same
account on each view via a new /media/telegram-proxy route (small
in-memory cache to absorb repeat views), without persisting anything.

Adapter no longer downloads media eagerly at ingestion — it only records
lightweight refs (message id, kind, mime type, dimensions); publish.ts
resolves those into a servable url per the admin's chosen mode, same
timing as Nitter's tweet media resolution. New "Telegram (message media)"
panel added to the admin Retention tab alongside the existing Nitter one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 21:21:24 +00:00
Claude f8072ab339 Build out a functional Telegram adapter, rendered like the tweet card
Logs into a real Telegram account via MTProto (GramJS) rather than a bot,
so it can read any public channel's history. API ID/hash and the login
session are entered through the admin Connections panel and stored
encrypted at rest (new storage/crypto.ts AES-256-GCM helper) rather than
via .env. Messages render as their own TelegramCard (same treatment as
tweets) and open the original message on Telegram instead of an internal
article page; attached media/albums are downloaded and self-hosted at
ingestion time since Telegram has no public hotlinkable media URL.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 20:23:28 +00:00
Salastil 6682697403 Merge pull request #13 from Salastil/claude/nitter-rss-tweets
Claude/nitter rss tweets
2026-07-23 14:26:15 -04:00
Salastil de2bbf2e57 Merge pull request #12 from Salastil/development
Add per-source "reissue" action: republish existing content fresh
2026-07-23 14:25:15 -04:00
Claude 9ec09e2b1b Add per-source "reissue" action: republish existing content fresh
Unlike "Clear content" (which deletes both the raw ingested items and
the published articles), reissue keeps the raw content_items and only
deletes the articles built from them, resetting cluster_id so those
items get picked up and republished by the very next scheduler tick.

This is for picking up pipeline/rendering changes on already-ingested
content without depending on the source feed to serve the same items
again — Nitter/Twitter in particular won't reliably resurface an old
tweet on a fresh poll. Same multi-source protection as clearing: an
article merged from this source's items together with another
source's is left alone entirely, since undoing just one contributor's
share of a merge isn't supported.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 18:19:53 +00:00
Claude 6065207c67 Stop truncating quote-tweet text, keep media at thumbnail size
extractQuotedTweet() was capping the quoted tweet's text at 240
characters via toSummary(); it now keeps the full cleaned text,
matching the outer tweet's own body which was never truncated.
Dropped the matching -webkit-line-clamp: 3 on .quoted-text in
TweetCard.svelte so the full text actually renders instead of being
clipped after 3 lines. Media sizing (.quoted-img's 140px cap, the
media grid's fixed cell heights) is unchanged — only text was meant
to stay unconstrained.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 18:11:38 +00:00
Claude 7f181384ef Add repost flag and nested quoted-tweet frame to TweetCard
Nitter's RSS marks a bare retweet with a "RT by @handle:" prefix on
the item's <title> (dc:creator is already the original author, not
the retweeter — confirmed against a real sample). TweetCard now shows
a "🔁 Reposted by @handle" line above an otherwise-unchanged card.

A quote-tweet's RSS description carries the embedded tweet fully
inline in a <blockquote> (author, text, one image, permalink) — no
extra fxtwitter call needed. TweetCard renders it as a smaller frame
nested inside the same outer card, below the quoting tweet's own
text and media, labeled "↩️ Replying to @handle" per how this reads
to a visitor even though it's technically Nitter's quote-tweet
representation. Clicking it opens that tweet's own permalink,
independent of the outer card's link.

Both parsers verified against the real sample RSS (Polymarket/
rawsalerts retweet, Goldman/zerohedge quote-tweet) and against the
live publishDirect pipeline.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 18:04:29 +00:00
Claude d93eb6f1cf Fix retweet/reply author mismatch: name and handle now describe the same person
authorName came from fxtwitter's enrichment (keyed by the tweet ID, which
for a retweet/reply resolves to the original tweet) while authorHandle was
hardcoded to the RSS feed's dc:creator — which is actually whichever list
member's retweet or reply surfaced the item, not the original author. The
card ended up showing one person's display name next to another person's
@handle. Both fields now come from the same enrichment response, falling
back together to the RSS-derived handle only when enrichment fails.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 17:39:05 +00:00
Salastil 78e356c6c1 Merge pull request #11 from Salastil/development
Add private categories feature with password-protected access
2026-07-23 00:15:00 -04:00
Claude 668055fe7d Merge remote-tracking branch 'origin/master' into development
# Conflicts:
#	backend/src/index.ts
#	backend/src/storage/db/index.ts
2026-07-23 03:02:10 +00:00
Claude b5e155fb72 Add private categories, unlockable via a password-gated cookie login
Categories can now be marked "Private" in the admin panel's Category
priority list. Private categories (and every article tagged with
one, even if it's also tagged with a public category) are hidden
from /api/categories, /api/feed, and /api/article/:id for anyone
without a valid login — a plain visitor's browser, not the admin API
key, since that's a header-based credential for the admin SPA only.

Login is a single shared password set via PRIVATE_ACCESS_PASSWORD in
the backend's .env (unset by default, which disables the feature
entirely). On success the backend sets a stateless httpOnly cookie —
its value is a deterministic hash of the password, checked with a
timing-safe comparison on every request, so there's no session table
to maintain. The cookie is requested at the ~400-day cap browsers
enforce on persistent cookies, the closest a cookie can get to
"retained indefinitely."

On the frontend, an always-visible lock icon in the masthead (shown
whenever the feature is configured, independent of the admin panel's
own enabled/disabled toggle) opens a password prompt and reflects
locked/unlocked state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 02:56:08 +00:00
Claude b4aade7210 Revert "Add private categories, unlockable via a password-gated cookie login"
This reverts commit 7546c0388e.
2026-07-23 02:54:21 +00:00
Claude 7546c0388e Add private categories, unlockable via a password-gated cookie login
Categories can now be marked "Private" in the admin panel's Category
priority list. Private categories (and every article tagged with
one, even if it's also tagged with a public category) are hidden
from /api/categories, /api/feed, and /api/article/:id for anyone
without a valid login — a plain visitor's browser, not the admin API
key, since that's a header-based credential for the admin SPA only.

Login is a single shared password set via PRIVATE_ACCESS_PASSWORD in
the backend's .env (unset by default, which disables the feature
entirely). On success the backend sets a stateless httpOnly cookie —
its value is a deterministic hash of the password, checked with a
timing-safe comparison on every request, so there's no session table
to maintain. The cookie is requested at the ~400-day cap browsers
enforce on persistent cookies, the closest a cookie can get to
"retained indefinitely."

On the frontend, an always-visible lock icon in the masthead (shown
whenever the feature is configured, independent of the admin panel's
own enabled/disabled toggle) opens a password prompt and reflects
locked/unlocked state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 02:46:08 +00:00
Salastil 9068a02542 Merge pull request #10 from Salastil/claude/nitter-rss-tweets
Add Nitter (Twitter) source support with dedicated tweet rendering
2026-07-22 22:28:43 -04:00
Claude 7c44552ae0 Rework tweet card click targets: frame->tweet, photo->new tab, video->play
The whole card previously linked to our own /article/[id] page. Per
request, clicking the card frame now opens the original tweet (in a
new tab) instead — there's no separate "full article" view for a
tweet anyway. Clicking a photo opens that image by itself in a new
tab (still resolved through the configured media mode, so proxy mode
doesn't leak the browser's IP to Twitter when viewing the full image
either). Clicking a video's native controls still just plays/pauses
it rather than navigating anywhere.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 00:39:30 +00:00
Claude 058f6bbca8 Specify video/mp4 MIME type on tweet video source
Firefox needs an explicit type on <source> to pick a decoder,
especially when the URL's extension is followed by a query string
(?tag=29) rather than ending cleanly in .mp4. fxtwitter's own
response confirms these are always video/mp4.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c1L8ghNBFjfiH64UMViP8
2026-07-23 00:30:53 +00:00