Commit Graph
229 Commits
Author SHA1 Message Date
jjbrunton 705d88dca1 Revert "Publish noVNC on host:16080 to bypass WS-stripping reverse proxy"
This reverts commit 65a8fcb163.
2026-05-22 21:32:12 +01:00
jjbruntonandClaude Opus 4.7 65a8fcb163 Publish noVNC on host:16080 to bypass WS-stripping reverse proxy
The upstream openresty proxy in front of Dokploy strips the
WebSocket Upgrade header, which kills noVNC. Publishing noVNC
directly on a host port (16080) avoids the proxy entirely.
Auth is still gated by VNC_PASSWORD. The dashboard continues
to go through Traefik on its existing domain.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 21:30:14 +01:00
jjbruntonandClaude Opus 4.7 9091eed7d1 Use a named docker volume for /app/data on Dokploy
A ./data bind mount points at the deploy directory, which Dokploy
rebuilds on every redeploy — wiping the SQLite db, the persistent
browser session, and the cached Matrix credentials. That forced the
slow re-login + chat.reddit.com token sniff on every container start.

Switch to a named docker volume (reddit_bot_data) so the data
directory survives rebuilds.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 21:19:22 +01:00
jjbruntonandClaude Opus 4.7 4a3b44bc87 Don't crash bootstrap on Matrix token capture failure
If chat.reddit.com sniffing fails, fall through with a placeholder
credential set so the post-monitoring/processor side of the bot
(and the web UI) stay up. Chat features are disabled until the
next successful token refresh.

Also dump diagnostics on sniff timeout: final page URL, every host
the page touched (with request counts + whether any carried an
Authorization header), and a full-page screenshot to data/matrix-debug.png.
This makes the three failure modes (page didn't load / loaded but
never hit Matrix / hit Matrix without auth) distinguishable from logs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 21:09:38 +01:00
jjbruntonandClaude Opus 4.7 665ff8b1f3 Clear stale X display lock before starting Xvfb
A bot crash leaves /tmp/.X99-lock behind; the next container start
hits "Server is already active for display 99" and the entrypoint
previously fell through with only a warning, so Chromium then died
with "Missing X server or $DISPLAY" in a tight crash loop. Remove
the stale lock up-front and fail hard if Xvfb still won't come up,
so the failure mode is "container won't start" rather than "bot
crashes forever".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 21:04:28 +01:00
jjbruntonandClaude Opus 4.7 1b6dfd67e3 Persist t2→username mappings in reddit_users table
Adds a durable mapping so the UI never has to show raw t2_xxx IDs or
MXIDs just because the in-memory cache is cold after a restart.
ChatService seeds from the table on construction and writes through
every resolution path; cached chats whose username is still t2_xxx
get upgraded from the DB on loadCache.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 20:34:06 +01:00
jjbruntonandClaude Opus 4.7 160172403b Stop publishing ports 3000/6080 to the host
On Dokploy, traffic is routed through Traefik via the configured
domain — publishing host ports caused a collision with another
service already bound to 3000 on the same host. Switch to `expose`
so the ports are reachable on the internal Docker network only.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:29:37 +01:00
jjbruntonandClaude Opus 4.7 eb7bc7c045 Install x11-utils and wait reliably for Xvfb in entrypoint
The Xvfb readiness loop in entrypoint.sh used xdpyinfo, which isn't
in the Playwright base image. On busy hosts the loop fell through
before Xvfb was ready, so Chromium launched with no X server and
crashed with "Missing X server or \$DISPLAY".

Add x11-utils (provides xdpyinfo) and extend the readiness loop to
10 s with explicit logging.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:01:32 +01:00
jjbruntonandClaude Opus 4.7 90d81b840f Pin DNS to 1.1.1.1/8.8.8.8 in docker-compose
Chromium in the container was failing with ERR_INTERNET_DISCONNECTED
when navigating to Reddit. Override container DNS to public resolvers
so the browser can reach reddit.com / chat.reddit.com.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:00:01 +01:00
jjbruntonandClaude Opus 4.7 9389c6258a Set DEBIAN_FRONTEND=noninteractive in Dockerfile
tzdata was prompting for a timezone interactively during apt-get install,
which hangs the Dokploy build. Pin TZ=Etc/UTC and skip the prompt.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 18:51:40 +01:00
jjbruntonandClaude Opus 4.7 05c95db6bd Record sent chats in messages repo and blur gallery by default
Threads MessagesRepository through ChatService so first outgoing chat
messages are persisted for stats, and extends the repo + DB client to
support chat-room-keyed lookups. Adds tests covering the new behavior.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 18:48:14 +01:00
jjbruntonandClaude Opus 4.7 2260388dc8 Blur gallery images by default, sync progress UI, and add chat/monitor tests
- Blur NSFW media gallery images until hover/reveal
- Surface chat sync progress in the dashboard header
- Extend chat service, cache, and monitor with delta-media handling
- Add tests for chat cooldown, delta media, and monitor flows

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 10:01:09 +01:00
jjbrunton 633bb0ec04 Restructure chat service, web routes, and add test suite
Split monolithic chat service into modular structure with Matrix client
support, extract web server into per-resource route modules, introduce
bootstrap/main-loop separation, and add comprehensive vitest coverage
across services, repositories, and utilities. Adds project docs and
CLAUDE.md agent instructions.
2026-05-21 01:32:10 +01:00
jjbruntonandClaude Opus 4.6 dfa0580859 Update source code and remove runtime data from tracking
Add gitignore rules for browser session data, SQLite databases,
media downloads, and build artifacts. Remove previously tracked
runtime files from the repository.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-20 18:54:07 +01:00
jjbrunton e90213d1ff Update 2026-01-05 15:15:16 +00:00
jjbrunton 00934fecbb Update 2026-01-05 15:13:59 +00:00
jjbrunton 2a78f65b09 Update 2026-01-05 15:11:35 +00:00
jjbrunton cad1f7b842 Update 2026-01-05 15:06:58 +00:00
jjbrunton 9602403f8a Update 2026-01-05 15:04:16 +00:00
jjbrunton 58bb6b6dfc Update 2026-01-05 14:44:55 +00:00
jjbrunton 2cf474899c Update 2026-01-05 14:34:20 +00:00
jjbrunton 0158103f64 Update docker-compose.yml 2026-01-05 12:45:14 +00:00
jjbrunton 7b3ea37127 Update 2026-01-05 00:17:06 +00:00
jjbrunton b780bff850 Update 2026-01-04 20:26:41 +00:00
jjbrunton c460dd9715 Initial 2026-01-04 19:33:33 +00:00
jjbrunton 0ca98deaf5 Update 2026-01-04 19:30:51 +00:00
jjbrunton 24b197c2c2 Update 2026-01-04 19:26:50 +00:00
jjbrunton 0c5ffc5001 Update 2026-01-04 19:24:56 +00:00
jjbrunton c552956516 Initial 2026-01-04 19:16:31 +00:00