Commit Graph
904 Commits
Author SHA1 Message Date
adamfandClaude Opus 5.5 30918eefaa Raise the upload rate limit to 30/min, burst 20
Test and deploy / test (push) Successful in 1m54s
Test and deploy / deploy (push) Successful in 1m2s
Dropping several pictures onto a canvas page uploads them all at once,
which the old 5/min, burst 3 limit cut off after three. Uploading needs
a signed-in user and accounts are admin-created, so a far higher
ceiling is still safe against filling the volume.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 23:48:44 +01:00
adamfandClaude Opus 5.5 30e1fb31d8 Fix the landing notes editor, drop-to-upload pictures, retire Demoman
The box editor rendered inside the landing page's overlay canvas, which
is pointer-events: none so the page underneath stays clickable; the
panel inherited it and ignored every click and keystroke. It is now
teleported to <body>.

Image and video files dropped onto a canvas in edit mode are uploaded
and each becomes an unframed box at the drop point, sized to its aspect
ratio. The upload code moves to home3/upload.js, shared with the
editor's "Insert upload".

The hand-written Demoman shrine is unrouted (and its slug unreserved)
so it can be remade as a canvas page. /shrines lists only canvas pages
and keeps the admin-only create form behind a "+ New shrine" button.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 23:47:15 +01:00
adamfandClaude Opus 5.5 bb5fd2bef9 Make the box canvas reusable: canvas pages, admin-only boxes, landing notes
Test and deploy / test (push) Successful in 2m8s
Test and deploy / deploy (push) Successful in 1m8s
The /stp canvas is now BoxCanvas.vue, keyed by a page. Boxes carry a
page ("stp", "index" for the landing page's notes overlay, or a Page
slug) and an adminOnly flag that the boxes resolver filters server-side.

A new Page type lets the admin create canvas pages in the browser,
served at /<slug> by the router's catch-all (CanvasPage.vue), starting
from a Blank, Shrine or Notes-board layout. Slugs that an SPA or nginx
route would answer first are refused. Renaming a page moves its boxes;
deleting it deletes them.

The GTO, Evangelion and Skipskipbenben placeholder routes are dropped
in favour of canvas pages listed on /shrines, which the landing page
now links to. The box editor gains an admin-only toggle and an
upload-and-insert button, and there are Note, Heading, Text, Gallery
and Video templates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 23:36:48 +01:00
adamfandClaude Opus 5.5 44347e40eb Link the job tracker, activity tracker and USACO from the front page
Test and deploy / test (push) Successful in 1m42s
Test and deploy / deploy (push) Successful in 1m11s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 22:45:30 +01:00
adamfandClaude Opus 5.5 c5a722bd1e Add the usaco service and its /usaco/ route
Test and deploy / test (push) Successful in 2m14s
Test and deploy / deploy (push) Successful in 1m36s
The USACO practice log from the usaco repo's site/: one container, git
as its store (a clone in ./usaco-data), behind nginx with the prefix
kept, like /jobs/. Gitea may now deliver webhooks to it by name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 21:49:48 +01:00
adamfandClaude Opus 5.5 1b5c8fc4a9 Document the activity tracker's admin-gated pages
Test and deploy / test (push) Successful in 1m39s
Test and deploy / deploy (push) Successful in 26s
The tracker now gates its dashboard and new setup page on the site's
admin session, as jobs does. Pass it AUTH_VALIDATE_URL built from
BACKEND_HOST/PORT so it follows the backend if that is renamed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 21:27:02 +01:00
adamf 746f20158e Remove too many stamps
Test and deploy / test (push) Successful in 1m45s
Test and deploy / deploy (push) Successful in 21s
2026-10-14 21:20:02 +01:00
adamfandClaude Opus 5.5 d28524e8c0 Run the activity tracker as its own published image at /tracker/
Test and deploy / test (push) Successful in 2m0s
Test and deploy / deploy (push) Successful in 1m29s
Same shape as jobs: adam-french.co.uk/adamf/activity-tracker, published by
the adamf/ccp repo's CI, with an explicit environment list and its own
database role. nginx strips the /tracker prefix. The env test now covers
the new service's allow-list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 20:39:05 +01:00
adamfandClaude Opus 5.5 e788e16898 Make /stp an admin-editable canvas of boxes
Test and deploy / test (push) Successful in 1m58s
Test and deploy / deploy (push) Successful in 1m18s
/stp is now views/home3/Home3.vue: boxes an admin creates, drags, resizes
and edits in the browser, saved to the database so every visitor sees the
same layout.

- backend: a Box GraphQL type (kind widget|html, x/y/w/h/z in px on a
  1400px design canvas, framed, hideOnMobile). Public `boxes` query;
  create/update/delete are @admin. Geometry is clamped rather than
  rejected. Framed has no gorm default, since GORM would turn an explicit
  false into true on insert.
- vue: widget boxes render the existing widgets from a registry; html
  boxes render in an iframe sandboxed with allow-scripts and no
  allow-same-origin, so admin script can't read cookies or call /api. The
  site tokens and fonts (inlined as data: URLs) are injected into each
  frame. The canvas scales to fit the window; phones get a single column
  in (y, x) order. Edit mode saves geometry on release and has a
  CodeMirror side panel (lazy-loaded) with a live HTML preview. Templates
  cover Clock, Weather (Open-Meteo) and Image/GIF. "Import current layout"
  recreates the old Home.vue grid on an empty canvas.
- Home.vue is kept with a STATUS: legacy header. Docs updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 18:15:03 +01:00
adamf f66d9c52ee ignore claude
Test and deploy / test (push) Successful in 1m29s
Test and deploy / deploy (push) Successful in 9s
2026-10-14 17:49:18 +01:00
adamfandClaude Opus 5.5 99fe175ebf Delete the old job code now that the tracker runs on its own
Test and deploy / test (push) Successful in 1m9s
Test and deploy / deploy (push) Successful in 1m33s
The job tracker has run from its own image at /jobs/ since 931b02c, so its
old copy here goes: the GraphQL schema, resolvers and models for
applications, references, sources, leads and the search profile; the
capture and email handlers and services; the Python posting reader, lead
scorer and email classifier; the Vue pages, stores and the capture-token
card on the Environment tab; and the userscript (nginx already redirects
its old URL to /jobs/).

The six old tables stay in the stp database: AutoMigrate never drops
anything, and dropping them is a manual step. The env variables stay in
the registry, where they already belong to the jobs service.

Docs (CLAUDE.md, DEPLOYMENT.md and the three READMEs) now describe the
site without the tracker, and DEPLOYMENT.md lists the jobs service and
./jobs-data.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 17:35:18 +01:00
adamfandClaude Opus 5.5 931b02c9e4 Run the job tracker as its own container at /jobs/
Test and deploy / test (push) Successful in 2m3s
Test and deploy / deploy (push) Successful in 1m31s
The tracker (applications, leads, email pipeline, capture userscript) now
lives in the adamf/job-tracker repo and runs here from its published image.

- docker-compose.yml: a `jobs` service with an explicit environment list
  (its own database role; none of the site's other secrets), ./jobs-data
  mounted at /data, and nginx waiting for it. The dev override seeds it.
- nginx: /jobs/ proxied to it with the prefix kept, and 301s from
  /cv/jobs, /cv/leads and the old userscript URL.
- env_registry.json and .env.example: the email and job-lead variables now
  belong to the jobs service; CLAUDE_* to python and jobs; new
  POSTGRES_JOBS_* and JOBS_IMAGE_TAG. The compose environment test now
  checks the jobs service's list as well as python's.
- backend: no longer starts the email and job-lead schedulers or serves
  the capture and email routes, since the tracker reads the same settings
  and would otherwise process everything twice. The old job code stays
  until the tracker has run for a while.
- vue: the CV page's Jobs button goes to /jobs/; the old routes are gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 17:08:18 +01:00
adamfandClaude Opus 5.5 148b94959d Show the Tailscale SSH address as Gitea's clone URL
Test and deploy / test (push) Successful in 1m38s
Test and deploy / deploy (push) Successful in 13s
SSH (22 and 2222) is no longer forwarded by the router; it is reached
over the tailnet instead. SSH_DOMAIN only sets the clone URL Gitea
displays. HTTPS clones through nginx at ROOT_URL stay public.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 16:45:49 +01:00
adamfandClaude Opus 5.5 da2ab9fb17 Serve Gitea's container registry at /v2/ on the apex domain
Test and deploy / test (push) Successful in 1m35s
Test and deploy / deploy (push) Successful in 26s
Docker clients always talk to /v2/ at the root of the host, whatever
Gitea's ROOT_URL says, and Gitea advertises its token endpoint at
https://<domain>/v2/token. The apex server block redirected everything to
www, so the registry was unreachable. It now proxies /v2/ to Gitea, without
a body size limit or request buffering, and redirects the rest as before.

Needed to publish the job-tracker image.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 16:37:22 +01:00
adamfandClaude Opus 5.5 8b902350ad Add rescoring and a posting-date order to the leads inbox
Test and deploy / test (push) Successful in 1m56s
Test and deploy / deploy (push) Successful in 1m8s
rescoreJobLeads (RescoreAll, "Rescore all" on /cv/leads) scores every
matched inbox lead again, for after the profile or the model has
changed. Scores are not wiped first: a lead keeps its old score until
the new one is saved, and the new scored_at column marks which leads the
job has reached, so a job that dies partway leaves no gaps. Leads that
had used up their attempts get them back.

The inbox can also be ordered by when a posting went up, falling back to
when it was found where the source gave no date.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 15:52:33 +01:00
adamfandClaude Opus 5.5 3764ea9c0b Default to Sonnet 5.5 and make the Claude model an admin setting
Every Claude call used a hard-coded claude-haiku-4-5. The model is now
CLAUDE_MODEL, read by the Python service, defaulting to
claude-sonnet-5-5 and offered on the admin panel's Environment tab as a
choice of Haiku 4.5, Sonnet 5.5 and Opus 5.5.

The request is shaped per model. Sonnet and Opus think by default and
bill that against max_tokens, so they get low effort and 4,000 tokens of
headroom over each caller's reply ceiling; Haiku 4.5 rejects the effort
setting and keeps the plain request. A refusal is logged and reported as
the route's failed message instead of surfacing as an empty reply.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 15:52:33 +01:00
adamfandClaude Opus 5.5 299b5f5224 Add a way to score every unscored lead without polling
Test and deploy / test (push) Successful in 2m1s
Test and deploy / deploy (push) Successful in 1m21s
A run caps its scoring at forty leads, so a first poll of several boards
left a backlog that could only be cleared by pressing "Check now"
repeatedly, re-fetching every source each time.

scoreJobLeads (JobLeadService.ScoreAll, "Score unscored" on /cv/leads)
re-applies the keyword filter and then scores every matched, unscored
lead, with no cap on the count and a one-hour limit on the time. A lead
Claude fails on is tried once per press rather than three times, so a
passing failure does not write it off. It shares the run lock and the
polled status with runJobLeadSync, and the page now reloads the leads
while either job is in flight.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 15:36:32 +01:00
adamfandClaude Opus 5.5 af50e6c8ab Add a job leads inbox that finds and scores postings
Test and deploy / test (push) Successful in 1m55s
Test and deploy / deploy (push) Successful in 59s
The tracker recorded applications but could not find jobs. A new
pipeline (services/job_leads.go, job_sources.go) polls a watch list of
sources on a timer or on request, files unseen postings as leads, marks
which pass a keyword and location pre-filter, and has Claude score those
against a single search profile through a fourth internal Python route,
/internal/jobs/score.

Sources are Greenhouse, Lever and Ashby company boards (public JSON) and
Adzuna and Reed keyword searches (API keys). The two search fetchers are
written from the providers' documentation and tested only against stubs.

Leads are their own table, not a job status, and are not soft deleted:
the (source_kind, external_id) index is the dedup, so a dismissed lead
has to remain a row. A lead reaches the tracker only by promotion, which
goes through UpsertJobApplication. That upsert moves from the capture
handler into services so promotion and the fetcher can share it; the
capture endpoint's behaviour is unchanged.

/cv/leads is the page: inbox, watch list and profile form. The timer is
off unless JOB_LEADS_ENABLED=true and never runs at start-up, so a
deploy spends no Claude calls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 15:03:46 +01:00
adamfandClaude Opus 5.5 810d3118b3 Document make check, schema-level auth and the Python Claude routes
Test and deploy / test (push) Successful in 5m12s
Test and deploy / deploy (push) Successful in 2m1s
Bring CLAUDE.md, README.md and DEPLOYMENT.md in line with the CI gate,
the GraphQL directives, the shared nginx routes partial and the move of
every Claude call to the Python service. CLAUDE.md also said there was
no token revocation; logout and password changes bump TokenVersion.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 14:39:19 +01:00
adamfandClaude Opus 5.5 b832dd68b4 Gate deploys on tests and share the nginx route table
Makefile: make check runs the backend, Python, Vue and compose checks
that previously lived only in local notes.

deploy.yaml: a test job runs the backend and Python suites in containers
on every push, and deploy needs it. Deploy also refuses to run if main
has moved past the tested commit. maintenance.yaml takes the env-apply
lock around its compose steps, as deploy already did.

nginx: the 24 proxied locations that production and dev both carried now
live once in nginx_routes.conf.template, rendered by the entrypoint on
every boot path. The effective config is unchanged for both.

Remove the root package.json and lockfile, which nothing referenced.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 14:39:19 +01:00
adamfandClaude Opus 5.5 d3f722d077 Give the job tracker stores and fix the admin route guard
createCrudStore captures the places store's pattern and now backs
places, job applications and job references. JobApplications.vue no
longer calls gql() itself and is split into the applications table, the
references table and the add form, with the status vocabulary in
jobStatus.js.

api.js is a thin REST client that turns failures into an ApiError
carrying the backend's message; the admin views and Listening.vue use it
in place of raw axios and fetch.

The router guard waited on the home query's loaded flag, which is never
set when that query fails, so /admin and /cv/jobs could hang. It now
awaits a standalone me query owned by the auth store, and homeData gains
a settled flag for widgets that only need to know the fetch finished.

The Vite proxy targets are configurable through VITE_PROXY_*, and
build:js runs the Vite build without wasm-pack.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 14:39:19 +01:00
adamfandClaude Opus 5.5 71344a1f8d Declare GraphQL auth in the schema and drop the Go Claude client
Authorisation: @admin and @signedIn schema directives replace the 25
hand-copied resolver checks. A test fails if a mutation has neither and
is not on the public allow-list, so a new mutation cannot ship unguarded.

IDs: uint model IDs bind through graphql.UintID, removing the ten
int(obj.ID) resolvers.

Job status is a GraphQL enum, tied to services.statusOrder by a test.
Input is strict, so the mutations no longer coerce an unknown status to
"applied"; output is lenient so one legacy row cannot fail the list.

deleteJobApplication and deleteJobAppReference now error on a missing id
like the other deletes.

The rowing reader, the job extractor and now the email classifier reach
the Python service through one services.CallPython helper. The email
pipeline's prompt and fence stripping moved to Python, and
anthropic-sdk-go is gone from go.mod.

Fix the auth test fixture, whose 11-byte secret had been panicking the
services test package since InitAuth began requiring 32 bytes. Add a
test that keeps the python service's compose environment list in step
with the env registry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 14:39:19 +01:00
adamfandClaude Opus 5.5 307268fbea Put every Claude call behind one helper in the Python service
rowing.py and jobs.py repeated the same call, error mapping, fence
stripping and validation; that now lives in claude.ask_json, and the
internal routes share one wrapper and one exception handler in main.py.

Add /internal/email/classify, which takes over the email pipeline's
Claude call from the Go backend (prompt ported verbatim, plus a sentence
fencing the email off as data).

The internal-only guard is now a dependency, so a request that came
through nginx gets 404 even when its body is invalid, where it used to
get 422.

requirements-dev.txt adds pytest and httpx on top of requirements.txt so
the tests run on a host; the image still installs only requirements.txt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 14:39:18 +01:00
adamfandClaude Opus 5.5 2786bce022 Manage .env from the admin panel
Add an Environment tab to /admin that lists every variable in .env.example
and lets keys, OAuth settings, email settings and generated secrets be
changed without SSH. Secrets are write-only; infrastructure variables are
shown read-only.

The backend never writes .env or touches Docker. It validates an edit and
queues it in env-apply/run/request.json; env-apply/apply.py, run on the host
by a systemd path unit (env-apply/install.sh), rewrites .env atomically,
keeps .env.bak, and recreates only the services that read the change.

backend/services/env_registry.json is the single list of variables, shared
by the backend and the host script; a test keeps it in step with
.env.example. It replaces the drifted checklist in handle_admin.go. The job
capture token card moves to the new tab.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 14:02:28 +01:00
adamfandClaude Opus 5.5 26f312e307 Generate the job capture token from the admin panel
Deploy with Docker Compose / deploy (push) Successful in 52s
The userscript's bearer token was an env var, JOB_CAPTURE_TOKEN, so rotating
it meant editing .env and redeploying. It is now minted on the admin
diagnostics panel instead, and the env var is gone.

- services.CaptureToken keeps only a SHA-256 of the token, in
  backend/token/job_capture_token.json beside the OAuth tokens, so it
  survives rebuilds and cannot be read back. The token is shown once.
- GET/POST/DELETE /admin/capture-token report, generate (replacing any
  existing token) and revoke it, behind the cookie-authenticated admin group.
- With no token generated the capture routes still answer 503.
- Userscript bumped to 1.0.1 for the changed prompt text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 13:40:30 +01:00
adamfandClaude Opus 5.5 b8670246a8 Add browser job capture to the job tracker
Deploy with Docker Compose / deploy (push) Successful in 1m31s
A Violentmonkey userscript, served by the site and installed from /cv/jobs,
adds the posting open in the browser (LinkedIn, an ATS, any company page) to
the tracker. Claude reads the title, company and location off the page text.

- Three token-guarded REST routes under /api/jobs/capture (status, extract,
  upsert). They take a bearer token, JOB_CAPTURE_TOKEN, because the auth
  cookies are SameSite=Lax and never sent from another origin. An unset token
  switches the routes off.
- The upsert matches on a canonical posting URL, then (company, job title),
  so a capture and the email pipeline do not make two rows for one job.
- The Claude call is a new internal Python route, /internal/jobs/extract,
  alongside the rowing reader; the client and fence stripping they share move
  to python/app/claude.py.
- New "saved" status ranked below "applied", and a description column holding
  the posting text, shown per row on the tracker.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 13:33:28 +01:00
adamf 94eaa8e239 Merge branch 'rowing-reader-to-python' into main
Deploy with Docker Compose / deploy (push) Successful in 16m36s
Weekly Maintenance / maintenance (push) Successful in 1m58s
2026-10-09 11:47:56 +01:00
adamfandClaude Opus 5.5 f8d48ba9af Move the rowing photo Claude call to the Python service
POST /rowing in the Go backend no longer calls the Anthropic SDK. It keeps
the admin gate, EXIF date, duplicate check, sanity bounds and insert, and
sends the image to a new internal Python route, POST /internal/rowing/read,
which makes the Claude call and returns the three numbers it read.

The route spends a paid call and has no auth of its own, so nginx 404s
/py/internal/ and the route refuses anything carrying the proxy headers
nginx adds. The python container now receives CLAUDE_API_KEY.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 11:46:17 +01:00
adamf 5827fb3ddd Merge pull request 'Make the stamps wall bounce at every page size' (#8) from worktree-stamps-always-bounce into main
Deploy with Docker Compose / deploy (push) Successful in 16s
Weekly Maintenance / maintenance (push) Successful in 13m19s
Reviewed-on: https://www.adam-french.co.uk/gitea/adamf/web_server/pulls/8
2026-10-01 15:20:30 +01:00
adamf 6dd15414e9 Merge pull request 'Improve /stp layout on small screens' (#7) from worktree-small-screen-ui into main
Deploy with Docker Compose / deploy (push) Successful in 28s
Reviewed-on: https://www.adam-french.co.uk/gitea/adamf/web_server/pulls/7
2026-10-01 15:19:02 +01:00
adamfandClaude Opus 5.5 76735f0552 Improve /stp layout on small screens
- Listening and Steam: fit the artwork to the cell instead of scrolling.
  The image is now a flexible item that takes the height left over after
  the text, so a wide/short cell or a wrapped title can no longer overflow.
- Below 1360px the two sidebars collapse into one tabbed panel (Chat,
  Bookmarks, Commits, Steam) under the sheet instead of a long stack of
  individually scrolling boxes. CSS-only: widgets stay mounted once.
- Phone: clamp song/artist to one line and give the grid a minimum
  height so album art stays visible on short screens.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 15:15:10 +01:00
adamfandClaude Opus 5.5 d843b0baf1 Make the stamps wall bounce at every page size
The wall was a wrapping flex row with a fixed 4-stamp min-width, so it only
overflowed (and so only bounced) when its cell was narrower than that. At
tablet widths the cell is wider, the wall fitted, and horizontal motion
stopped.

Lay it out as a fixed-track grid whose column and row counts come from the
cell's own size via a ResizeObserver, always one to two stamps larger than
the cell on both axes, cycling the stamps to fill every slot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 15:04:04 +01:00
adamfandClaude Opus 5.5 8d7606bbe8 Retire quartz, hasura and autoheal into .deprecated/
Deploy with Docker Compose / deploy (push) Successful in 1m1s
Quartz was already replaced by silverbullet-public; its build context moves
to .deprecated/quartz. Hasura and autoheal are removed from the stack, with
their compose services (and Hasura's nginx blocks) kept verbatim under
.deprecated/ alongside a README on how to bring each back.

Removes the /hasura/ route from both nginx templates and the envsubst
allow-list, and updates the docs and comments that referred to the three
services. With autoheal gone nothing restarts an unhealthy container; the
healthchecks are now informational only, and the docs say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 14:58:17 +01:00
adamf e25fbbab96 Merge pull request 'Replace Quartz with a read-only SilverBullet for public /notes/' (#6) from silverbullet-public-notes into main
Deploy with Docker Compose / deploy (push) Successful in 29s
Reviewed-on: https://www.adam-french.co.uk/gitea/adamf/web_server/pulls/6
2026-10-01 14:47:54 +01:00
adamfandClaude Opus 5.5 7ce86f08ec Replace Quartz with a read-only SilverBullet for public /notes/
/notes/ is now served by silverbullet-public: the same SilverBullet 2.11.0
image as the /sb/ editor, run with SB_READ_ONLY over a read-only mount of
the vault. Quartz is retired (quartz/ kept with a STATUS header).

Keeping private/ off the public site needs nginx, not just SilverBullet:
SB_SPACE_IGNORE only filters the file listing. Verified with curl that
2.11.0 still serves ignored paths via /.fs/<path>, via server-rendered page
URLs, and exposes the vault's .git through /.fs/.git/. nginx now 404s any
private/ or templates/ segment at any depth and any nested dot-folder under
/notes/. SB_REVISIONS=disabled stops /.revisions serving git history, and
nginx blocks it as a second layer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 20:37:10 +01:00
adamf 78324bf7a3 remove auth validation on quartz
Deploy with Docker Compose / deploy (push) Successful in 57s
2026-09-30 18:22:23 +01:00
adamfandClaude Code 6dcb6b1384 Add stopwatch tab to Timer widget
Deploy with Docker Compose / deploy (push) Successful in 52s
Weekly Maintenance / maintenance (push) Successful in 3m40s
Co-Authored-By: Claude Code <[email protected]>
2026-09-23 16:28:24 +01:00
adamfandClaude Code ac8b3dadf3 Revert site-wide CSP from shared security headers
Deploy with Docker Compose / deploy (push) Successful in 26s
03e10be introduced the CSP before it was tested against the SPA's wasm
loader and the Gitea proxy. Gitea's own templates emit inline <script>
blocks, so the shared script-src would need 'unsafe-inline' to keep it
working — a CSP that weak nulls out most of its protection. Drop the
header site-wide; the /uploads/ locked-down CSP stays.

Co-Authored-By: Claude Code <[email protected]>
2026-09-22 23:29:00 +01:00
adamfandClaude Code a3bf0b26e5 csp: allow wasm-unsafe-eval so Rust AutoScroll WASM loads
Deploy with Docker Compose / deploy (push) Successful in 47s
03e10be added a CSP to the SPA document; default-src 'self' without
'wasm-unsafe-eval' blocks WebAssembly.instantiateStreaming, killing the
wasm port of AutoScroll. Keyword permits wasm compilation only, not JS eval.

Co-Authored-By: Claude Code <[email protected]>
2026-09-22 23:26:16 +01:00
adamfandClaude Code 4c49f5e177 Readable traffic log: drop heartbeat noise, surface visitors and errors
Deploy with Docker Compose / deploy (push) Successful in 50s
Replaces gin's default logger with a custom formatter:

- /auth/validate-admin (nginx auth_request subrequests — the 5-seconds
  flood that is not a user), /auth/refresh and /auth/check no longer log
  a line at all on success; their failures are kept.
- Human latency units (15ms, not 153020ns).
- Lines for requests from outside the docker subnet carry the client IP
  — the "who is using my site" line — while internal infrastructure
  successes stay lean.
- 4xx lines carry " !!", 5xx " !!! SERVER ERROR", both greppable.

The admin panel's Diagnostics log pane gains a "visitors only" filter
that keeps just the IP-suffixed and error lines (on by default).

Co-Authored-By: Claude Code <[email protected]>
2026-09-22 23:20:22 +01:00
adamfandClaude Code a362d12ebc Fix AutoScroll stopping a viewport short of the end
Deploy with Docker Compose / deploy (push) Successful in 24s
scrollTop saturates at scrollHeight - clientHeight, so scaling pos by the
full scrollHeight meant the drift ran out of travel before pos reached 1.

Co-Authored-By: Claude Code <[email protected]>
2026-09-22 23:14:19 +01:00
adamfandClaude Code 03e10be2e4 Security audit fixes: JWT secret guard, WS revocation, nginx headers/TLS, loopback Gitea
Deploy with Docker Compose / deploy (push) Successful in 59s
- auth: panic at init if BACKEND_SECRET missing/short — HS256 would happily
  start with an empty key, making admin tokens forgeable by anyone
- websocket: admin check now goes through AuthenticateTokenWithClaims so the
  "tv" token-version revocation applies on /ws too; a logged-out or
  password-changed token no longer keeps it alive for its full lifetime
- admin diagnostics: check BACKEND_SECRET not the nonexistent AUTH_SECRET
- rowing upload: 10MB cap before buffering + base64 (admin-only route, but
  unbounded read = easy memory exhaustion + huge paid Claude call)
- nginx: shared security_headers.conf (XFO/nosniff/Referrer-Policy/HSTS/CSP)
  included in every location that sets its own add_header — nginx drops the
  parent's whole set otherwise; CSP added to the SPA document;
  ssl_protocols pinned to TLSv1.2/1.3; HSTS on apex redirect
- compose: Gitea HTTP bound to 127.0.0.1 (plain HTTP was LAN-exposed);
  autoheal docker socket mount read-only

Co-Authored-By: Claude Code <[email protected]>
2026-09-22 23:12:56 +01:00
adamfandClaude Code 8bd93cbd8e Add admin diagnostics: env-var config check and log tail
Deploy with Docker Compose / deploy (push) Successful in 45s
Two admin-only REST endpoints and a Diagnostics tab in the admin panel:

- GET /admin/config reports which known environment variables are set,
  what each is for, and the value only for non-credential vars. Secrets
  are never returned, only their presence.
- GET /admin/logs returns the tail of backend/logs/go.log (Gin traffic
  plus application lines), bounded to 256 KiB and 500 lines so the read
  is constant-size however large the file has grown.

tailLogFile is split out from the handler and tested for the line cap,
the partial-first-line rule, and the empty/missing cases.

Co-Authored-By: Claude Code <[email protected]>
2026-09-22 23:02:57 +01:00
adamfandClaude Code 49909037db Document Microsoft Graph email auth env vars; newest bookmarks first
Deploy with Docker Compose / deploy (push) Successful in 1m4s
Co-Authored-By: Claude Code <[email protected]>
2026-09-22 22:55:35 +01:00
adamfandClaude Code ff186f04a7 Spotify unauthenticated: throttled log + admin reconnect on Listening widget
Deploy with Docker Compose / deploy (push) Successful in 40s
- Backend logs a rate-limited (1/h) "not authenticated" line when a resolver
  finds the Spotify client nil instead of silently degrading to null.
- New public-but-gated spotifyNeedsReauth query: false for everyone except
  an admin session whose backend has no client.
- The /stp Listening widget offers admins a "Reconnect Spotify" button that
  hits /api/spotify/auth and navigates to the returned authorisation URL;
  non-admins still see the widget degrade as before.

Co-Authored-By: Claude Code <[email protected]>
2026-09-22 22:54:48 +01:00
adamfandClaude Code 241acb82d9 Install wget in backend image so the healthcheck can run
Deploy with Docker Compose / deploy (push) Successful in 48s
The compose healthcheck probes with `wget`, but the runtime image only
installed ca-certificates, so every probe died as "executable file not
found" and autoheal restarted the container in a ~90s loop.

Co-Authored-By: Claude Code <[email protected]>
2026-09-22 22:46:02 +01:00
adamfandClaude Code 50c2fdfdd1 Harden job-application tracker: backend fixes, tests, UI rework
Deploy with Docker Compose / deploy (push) Successful in 1m8s
Backend (email sync + resolvers):
- Sync window anchored on latest received_at with slack + rewind age-out
- Skip ctx-cancelled per-email side effects
- Soft-deleted applications no longer block pipeline matching
- Status normalization shared between pipeline and resolvers, with tests
- Reject empty jobTitle/company on create/update
- IMAP fallback synthesizes Message-ID from stable message traits
- Consistent list ordering with id tie-break

Frontend (JobApplications.vue):
- Unified status vocabulary with pipeline (lowercase keys)
- Emptied optional fields now clear on save; row stays open on failure
- URL editable, notes textarea, appliedAt defaults to today
- Error banner, delete confirmations, inline status select
- Search, sortable columns, status-count filter tiles, stale-row marker
- CSV export with UTF-8 BOM + CRLF

Tests: stdlib table-driven tests for sync, status, auth, handlers.

Co-Authored-By: Claude Code <[email protected]>
2026-09-22 22:31:30 +01:00
adamfandClaude Code 8effc3de83 Add Bad Apple ASCII intro tile, wire into home grid
Deploy with Docker Compose / deploy (push) Successful in 22s
Co-Authored-By: Claude Code <[email protected]>
2026-09-22 21:58:11 +01:00
adamfandClaude Opus 5 fea22871cf Stop hiding private/ and templates/ from the notes editor
Deploy with Docker Compose / deploy (push) Successful in 9s
SB_SPACE_IGNORE was set to quartz's ignorePatterns, which was the wrong thing
to copy. The two settings answer different questions: quartz hides private/
because it must never be published, whereas SilverBullet is the editor, behind
the admin gate, and hiding notes from it only stops them being edited.

Now ignores .obsidian alone, which is editor config and plugin JS rather than
notes. Quartz keeps its own ignorePatterns, so /notes/ publishes exactly what
it did before; these files were already tracked in the notes repo, so nothing
becomes newly reachable.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BCQFvkvorAw1xwhd5gL2qZ
2026-09-22 13:44:48 +01:00
adamfandClaude Opus 5 507bdb5939 Let the editor request an immediate notes sync
Deploy with Docker Compose / deploy (push) Successful in 9s
Waiting out SILVERBULLET_GIT_INTERVAL is annoying when you want a note on
another device now. The sidecar's sleep is now split into short slices that
watch sync-request.md in the vault; when its modification time changes, it
syncs on the spot. The "Sync notes" toolbar button in the vault's Sync.md
writes that file.

The trigger file is deliberately never deleted here. Deleting it would fight
SilverBullet's client sync, which would re-upload its cached copy and produce
a delete/recreate loop while a tab is open; only the mtime is significant. It
is gitignored in the notes repo, so it never reaches a commit.

Signalling through a file in the shared vault rather than shell.run or a
docker socket: both containers already have that directory, so this adds no
capability to either, which is the same reasoning behind using a sidecar
instead of SilverBullet's own shell backend.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BCQFvkvorAw1xwhd5gL2qZ
2026-09-22 13:40:51 +01:00