firebreak/web/app
Zach Tatman b2fe586b72
fix(web): render the signed-in header on error pages (#21)
Exception handlers run outside FastAPI's dependency injection, so the error handler never resolved the session and always passed user=None, making every error page (e.g. a 404 hit while signed in) show the 'Sign In with Forgejo' header instead of the account menu.

Resolve the session by hand from the request cookie via lookup_session, degrading to None on any failure so error rendering can never itself raise. A missing or invalid cookie (a real 401) still yields None and the correct signed-out header.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 13:51:32 -04:00
..
auth refactor(web): add Forgejo service + token encryption modules 2026-06-10 17:03:10 -04:00
models feat(web): setup wizard, settings page, Firebreak rename (#15) 2026-06-08 14:56:27 -04:00
routers refactor(web): decompose main.py into a composition root 2026-06-10 17:03:10 -04:00
services refactor(web): add Forgejo service + token encryption modules 2026-06-10 17:03:10 -04:00
static style(web): design token system + Firebreak branding pass 2026-06-10 17:03:10 -04:00
templates feat(web): gate dev CSS live-reload behind debug + fix watcher 2026-06-10 17:03:10 -04:00
__init__.py Add FastAPI web service with async SQLAlchemy and Docker (#10) 2026-04-24 16:03:54 -04:00
config.py refactor(web): expose app settings as required/optional FastAPI deps 2026-06-10 17:03:10 -04:00
database.py Add FastAPI web service with async SQLAlchemy and Docker (#10) 2026-04-24 16:03:54 -04:00
deps.py feat(web): OAuth CSRF protection, refactor, and cleanup (#11) 2026-05-15 15:18:52 -04:00
errors.py fix(web): render the signed-in header on error pages (#21) 2026-07-18 13:51:32 -04:00
main.py refactor(web): decompose main.py into a composition root 2026-06-10 17:03:10 -04:00
middleware.py refactor(web): expose app settings as required/optional FastAPI deps 2026-06-10 17:03:10 -04:00
templating.py refactor(web): decompose main.py into a composition root 2026-06-10 17:03:10 -04:00