Commit graph

18 commits

Author SHA1 Message Date
ZTatman
03ecda9ef5 chore(web): checkpoint in-progress backend and tooling work
Parks uncommitted work off the now-merged design branch: router/service tweaks (dashboard, settings, forgejo), dev.sh, dependency bumps, agents.md notes, editor settings, a .playwright-mcp ignore, and the .claude/launch.json dev-server config. Checkpoint only — not yet reviewed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 14:20:04 -04:00
Zach Tatman
25e6f794c1
Merge pull request #20 from ZTatman/codex/design-brand-mark
refactor(web): single-ink brand mark system + header/404 polish
2026-07-18 14:04:11 -04:00
Zach Tatman
0472242274
Merge pull request #22 from ZTatman/codex/design-page-doctrine
feat(web): apply firebreak theme doctrine across pages
2026-07-18 14:03:46 -04:00
Zach Tatman
783b97498c
Merge pull request #18 from ZTatman/codex/design-css-system
refactor(web): design-system CSS cleanup + theme primitives
2026-07-18 14:00:27 -04:00
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
ZTatman
a7a0d1aabb refactor(web): single-ink brand mark system + header and 404 polish
Full-color brand art (cream + red) is hero/dark-ground only; on light
ground the mark is a single-ink stamp that takes its context's text color.
This is the one treatment that survives a future ash-and-ember dark mode
with zero new assets — currentColor follows --color-foreground on flip.

- Add partials/_brand.html: one currentColor Firebreak mark, colored by a
  text-* utility at each call site.
- Header: mark + real-text wordmark in text-foreground (replaces the cold
  #17191C logo that clashed with the warm page); also fold the inline
  border style into border-b border-border.
- Complete the account-dropdown Alpine migration (same file): wire the
  panel id/aria-controls, drive the open-state highlight and focus-return
  through Alpine, drop the <details> cruft, add a transition.
- Setup: replace the invisible cream-on-light logo (and its compensating
  drop-shadow) with the ink mark.
- 404: "Outside the break" copy, token-driven watermark at 25%, and a
  guard so the duplicate detail line no longer renders.
- Delete 3 now-unused logo SVGs (black, red, brand).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 14:17:52 -04:00
ZTatman
1883381f3f feat(web): apply firebreak theme doctrine across pages
Make the metaphor structural: a thing gets visual heat only if it
increases exposure; contained things stay silent.

- Badge diet: private repos render unmarked (an unmarked row is the
  "contained" statement); only Public/Archived/Empty earn a badge. Public
  wears the ember "live ember" badge (a public repo is a fire starter);
  fork/mirror demote to muted mono provenance beside the name.
- Containment status grammar in empty/warning states
  (STATUS · CONTAINED — 0 EXPOSED); firebreak-rule dividers under page
  headings; remove the settings sidebar (one section doesn't earn a rail)
  in favor of a single column; reuse .notice-rail for the success notice.
- Sweep the ad-hoc text-foreground/NN gray ladder to
  text-muted-foreground, fixing sub-AA helper text.

Includes the landing hero (index.html) legibility pass so hero copy stays
cream after the foreground token flipped to charcoal.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 14:17:52 -04:00
ZTatman
97ded2d287 refactor(web): prune design tokens and consolidate CSS components
Tailwind v4 emits every @theme var to :root, so unused tokens ship for
nothing. Remove ~16 dead ones (accent, panel, slate, the *-muted washes,
radius-xl/2xl, brand-obsidian/jet/ash) after confirming zero references.

- Fold badge sizes into a single .badge; delete badge-md/lg @utilities and
  the unused success/warning/slate recipes. Fix badge/mono-chip vertical
  centering with leading-none (text-box silently no-ops on flex items).
- Add theme primitives: .firebreak-rule (a cut divider — ember segment,
  gap, hairline), .link-fuse (share-link lifetime), .status-line
  (containment grammar), .badge-ember, .btn-danger-quiet.
- Give .btn-disabled a real border so disabled buttons match their
  bordered siblings in the Actions column; unify uppercase-label tracking
  to 0.12em; route .form-input through the token border + ember focus
  ring; drop the one-off .btn-xs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 14:17:52 -04:00
ZTatman
32635d9d0d feat(web): gate dev CSS live-reload behind debug + fix watcher
The base.html live-reload poller is now wrapped in {% if debug %} so it
never ships to production. dev.sh exports DEBUG=true and uses 'entr -d' in
a loop so newly created templates are picked up (the old 'find | entr'
snapshot missed them), with a fallback when entr is not installed.
2026-06-10 17:03:10 -04:00
ZTatman
a0617c6be4 refactor(web): decompose main.py into a composition root
Move page routes to routers/dashboard.py, the content-negotiated error
handler to errors.py (register_error_handlers), and the dev css-mtime
endpoint to routers/dev.py (included only when debug). main.py shrinks to
lifespan + wiring + the / landing route.

Dashboard repos now load lazily via an htmx fragment so a slow/unreachable
Forgejo instance never blocks first paint; Forgejo html_url is sanitized
against non-http(s) schemes before rendering into href.
2026-06-10 17:03:10 -04:00
ZTatman
e3ead49f13 refactor(web): add Forgejo service + token encryption modules
Centralize all Forgejo HTTP in app/services/forgejo.py (get/post +
authorize_url/exchange_code/fetch_user, typed ForgejoError, defensive
base-URL join). Centralize credential encryption in app/auth/tokens.py
(decrypt_pat/set_pat, set_client_secret/decrypt_client_secret) so the
get_fernet()+crypto+column pattern no longer leaks into routers.

auth/settings/setup now delegate to these modules; the duplicated
client-secret encrypt block and per-call httpx clients are gone.
2026-06-10 17:03:10 -04:00
ZTatman
8b7f2664d0 refactor(web): expose app settings as required/optional FastAPI deps
Mirror the session.py dependency trio: current_app_settings (honest
optional accessor), get_app_settings (required; raises 500 if reached
unconfigured), and set_app_settings (single write path). Middleware reads
through the accessor instead of poking app.state directly.

get_app_settings takes request and calls current_app_settings internally
rather than declaring it as a sub-Depends — a Depends param typed with a
TYPE_CHECKING-only forward ref makes FastAPI drop the marker and treat it
as a query param.
2026-06-10 17:03:10 -04:00
ZTatman
4a3d045b85 style(web): design token system + Firebreak branding pass
Dark-only Tailwind v4 @theme tokens, cinematic landing hero, operational
dashboard styling, and the Firebreak logo/wordmark assets. Templates use
semantic component classes instead of inline styles and color literals.
2026-06-10 17:03:10 -04:00
ZTatman
55d2718968 wip: setup reconfiguration and design polish checkpoint 2026-06-08 16:55:17 -04:00
f3a0d2dd73
feat(web): setup wizard, settings page, Firebreak rename (#15) 2026-06-08 14:56:27 -04:00
200226015e
[codex] Update boilerplate UI design system (#12)
* feat(web): Jinja2 + HTMX + Pico CSS boilerplate

- Add jinja2, aiofiles, jinja2-fragments, python-multipart deps
- Wire up Jinja2Blocks (jinja2-fragments) and static file serving
- Create base.html (Pico Jade theme, HTMX, nav with auth state)
- Create index.html (landing) and dashboard.html (user profile)
- Add get_optional_session dependency for anonymous template context
- Refactor get_current_session to share session lookup logic

* feat(web): replace Pico CSS with Tailwind standalone CLI (dark+pink theme)

- Download Tailwind v4.3.0 standalone CLI binary (gitignored)
- Define custom dark+pink theme tokens in input.css
- Add dev.sh for parallel Tailwind watcher + uvicorn
- Update Dockerfile to build Tailwind during image build
- Update templates with Tailwind utility classes
- Generate minified output.css at build time

* Update boilerplate UI design system

* Refine Forgejo sign-in button

* feat(ui): adjust starting ui template html structure and theme styling

* refactor(ui): normalize Tailwind design tokens

* refactor(ui): fix Forgejo token input styling and validation styling

* refactor(ui): move panel titles and sub titles outside panels

* refactor(ui): vendor forgejo logo svg from /web/static/img
2026-05-26 22:50:25 -04:00
74a0d0dbb7
feat(web): OAuth CSRF protection, refactor, and cleanup (#11) 2026-05-15 15:18:52 -04:00
e27a9d7e7d
Add FastAPI web service with async SQLAlchemy and Docker (#10) 2026-04-24 16:03:54 -04:00