Commit Graph

14 Commits

Author SHA1 Message Date
giles
7ec5609aac Clear session cookie when account signals logout via inbox
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m26s
Check did_auth:{device_id} in Redis — if absent while user has
a session cookie, account has logged out. Clear the cookie so
next request triggers prompt=none which won't re-auth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 01:26:17 +00:00
giles
eaefdd326b Fix healthcheck + external URL in silent auth middleware
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m27s
- Add /health endpoint, update healthcheck to use it
- Use configured base URL instead of internal Docker URL
- Add /health to skip prefixes for silent auth

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 01:06:44 +00:00
giles
e1f13abc7f Fix middleware ordering: device_id must be outermost
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m4s
FastAPI runs the last-registered middleware first on request.
device_id_middleware was inner, so silent_auth_check's early
redirect bypassed it — cookie never set.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 00:50:24 +00:00
giles
b294fd0695 Add AP inbox endpoint + device auth signaling
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m2s
- POST /inbox with HTTP Signature verification
- Device ID cookie tracking + adoption from account
- Silent auth checks local Redis for did_auth signals
- Replaces shared-Redis coupling with AP activity delivery

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 00:41:33 +00:00
giles
ab3b6b672d Add silent auto-login via prompt=none OAuth check
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m24s
Middleware on every GET checks if user is logged in. If not, does a
silent prompt=none redirect to account. If account has an active
session, login completes invisibly. Otherwise sets a 5-minute cooldown
cookie to avoid redirect loops.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:43:08 +00:00
gilesb
8e1c08abdc Add effects upload endpoint
- New /effects/upload endpoint for uploading effect files
- Parses PEP 723 dependencies and @-tag metadata
- Lists, gets, and deletes effects by content hash

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 06:37:24 +00:00
gilesb
e806337503 Remove unnecessary redirect routes, fix template links
- Removed /run/{id} and /recipe/{id} redirect routes
- Updated templates to use /runs/ and /recipes/ paths

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 18:05:24 +00:00
gilesb
6c73a06539 Fix redirect handlers to pass dependencies explicitly
The /run/{id} and /recipe/{id} redirects were calling route handlers
directly without passing the required service dependencies.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 18:02:24 +00:00
giles
b47417704e Fix /media route by mounting cache router directly
Avoids Depends() resolution issues with manual function calls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 13:21:26 +00:00
giles
ada51c0880 Add 404 handler and template
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 13:14:29 +00:00
giles
e7e95b7857 Fix Request type hints in redirect handlers
FastAPI requires type hints to recognize Request objects.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 13:11:36 +00:00
giles
a34fff3aaa Add database init/close lifecycle events to app startup
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:52:29 +00:00
giles
022f88bf0c Complete L1 router and template migration
- Full implementation of runs, recipes, cache routers with templates
- Auth and storage routers fully migrated
- Jinja2 templates for all L1 pages
- Service layer for auth and storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 07:49:37 +00:00
giles
adc876dbd6 Add modular app structure for L1 server refactoring
Phase 2 of the full modernization:
- App factory pattern with create_app()
- Settings via dataclass with env vars
- Dependency injection container
- Router stubs for auth, storage, api, recipes, cache, runs
- Service layer stubs for run, recipe, cache
- Repository layer placeholder

Routes are stubs that import from legacy server.py during migration.
Next: Migrate each router fully with templates.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 07:08:08 +00:00