Commit Graph

837 Commits

Author SHA1 Message Date
giles
0e14d2761a Fix L2 deployment: healthcheck, DB deadlock, CI image resolution
- Add /health endpoint (returns 200, skips auth middleware)
- Healthcheck now hits /health instead of / (which 302s to OAuth)
- Advisory lock in db.init_pool() prevents deadlock when 4 uvicorn
  workers race to run schema DDL
- CI: --resolve-image always on docker stack deploy to force re-pull

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:35:11 +00:00
giles
e4c7432303 Remove widget system — fully replaced by fragment composition
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m47s
Delete shared/contracts/widgets.py, shared/services/widget_registry.py,
and shared/services/widgets/ (empty stubs). Remove register_all_widgets()
from factory and widgets Jinja global from jinja_setup. Zero consumers
remain — all cross-app UI composition now uses the fragment API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:20:58 +00:00
giles
b45a2b6c10 Fix OAuth token exchange: use internal URL, add error logging
The server-to-server token exchange was hitting the external URL
(https://account.rose-ash.com/...) which can fail from inside Docker
due to DNS/hairpin NAT. Now uses INTERNAL_URL_ACCOUNT (already set in
both docker-compose files) for the POST. Adds logging at all three
failure points so silent redirects are diagnosable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 01:20:41 +00:00
giles
3dde4e79ab Add OAuth SSO, device ID, and silent auth to L2
- Replace L2's username/password auth with OAuth SSO via account.rose-ash.com
- Add device_id middleware (artdag_did cookie)
- Add silent auth check (prompt=none with 5-min cooldown)
- Add OAuth config settings and itsdangerous dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:50:31 +00:00
giles
1dc87d0f64 Add OAuth SSO, device ID, and silent auth to L2
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 7m0s
- Replace L2's username/password auth with OAuth SSO via account.rose-ash.com
- Add device_id middleware (artdag_did cookie)
- Add silent auth check (prompt=none with 5-min cooldown)
- Add OAuth config settings and itsdangerous dependency
- Register artdag_l2 client with account service

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:50:24 +00:00
giles
d8206c7b3b Fix gutter width: close header wrapper before dark main area
The max-w-screen-2xl wrapper now only constrains the header/nav,
matching blog layout. Dark content area goes full-width with its
own inner max-w constraint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:45:57 +00:00
giles
a5717ec4d4 Fall back to username for auth-menu email param
Existing sessions have email=None since the field was just added.
Username IS the email in Art-DAG (OAuth returns user.email as username).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:39:19 +00:00
giles
1b4e51c48c Add max-width gutters to match coop layout
Wrap page in max-w-screen-2xl mx-auto py-1 px-1 like blog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:38:14 +00:00
giles
e7610bed7c Dark content area beneath coop header
Wrap content block in bg-dark-800 so all existing dark-themed
templates render correctly without per-file migration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:34:56 +00:00
giles
e58def135d Add deploy.sh and zap.sh scripts for manual deploys
Ported from old art-dag root, updated for monorepo paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:26:39 +00:00
giles
a13c361dee Configure monorepo build: unified CI, local deps, .dockerignore
- Dockerfiles use monorepo root as build context
- common/ and core/ installed as local packages (no git+https)
- Client tarball built from local client/ dir
- Unified CI with change detection: common/core -> rebuild both
- Per-repo CI workflows removed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:16:23 +00:00
giles
5173167f3e Import test/ 2026-02-24 23:10:04 +00:00
giles
c590f2e039 Squashed 'test/' content from commit f2edc20
git-subtree-dir: test
git-subtree-split: f2edc20cba865a6ef67ca807c2ed6cee8e6c2836
2026-02-24 23:10:04 +00:00
giles
1862fe96fc Import client (art-client) as client/ 2026-02-24 23:09:47 +00:00
giles
7784e6b2b0 Squashed 'client/' content from commit 4bb0841
git-subtree-dir: client
git-subtree-split: 4bb084154a4eb4b4f580d52d936cab05ef313ebb
2026-02-24 23:09:47 +00:00
giles
97d4d4ce21 Import core (art-dag) as core/ 2026-02-24 23:09:39 +00:00
giles
cc2dcbddd4 Squashed 'core/' content from commit 4957443
git-subtree-dir: core
git-subtree-split: 4957443184ae0eb6323635a90a19acffb3e01d07
2026-02-24 23:09:39 +00:00
giles
d77241602f Import common/ 2026-02-24 23:08:41 +00:00
giles
ea9015f65b Squashed 'common/' content from commit ff185b4
git-subtree-dir: common
git-subtree-split: ff185b42f0fa577446c3d00da3438dc148ee8102
2026-02-24 23:08:41 +00:00
giles
44694da76f Import L2 (activity-pub) as l2/ 2026-02-24 23:07:31 +00:00
giles
f54b0fb5da Squashed 'l2/' content from commit 79caa24
git-subtree-dir: l2
git-subtree-split: 79caa24e2129bf6e2cee819327d5622425306b67
2026-02-24 23:07:31 +00:00
giles
4dff4cfafb Import L1 (celery) as l1/ 2026-02-24 23:07:19 +00:00
giles
80c94ebea7 Squashed 'l1/' content from commit 670aa58
git-subtree-dir: l1
git-subtree-split: 670aa582df99e87fca7c247b949baf452e8c234f
2026-02-24 23:07:19 +00:00
giles
3ca1c14432 Initial monorepo commit 2026-02-24 23:04:48 +00:00
giles
66c0c23de9 Add Art-DAG to coop nav-tree fragment
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m59s
Append synthetic artdag nav entry to blog's nav-tree handler so
Art-DAG appears in the shared navigation across all 6 coop apps.
Register artdag_url as Jinja global.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:28:21 +00:00
giles
660a6db6fb Fix INTERNAL_URL_ARTDAG: use Docker internal URL not external
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m27s
Art-DAG l1-server runs on port 8100 and shares the externalnet overlay
network with coop apps. Using the internal URL avoids the reverse proxy
and the silent auth middleware that was 302-redirecting fragment requests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:14:12 +00:00
giles
2fe27fb34a Wire Art-DAG nav-item fragment into account dashboard nav
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 51s
Fetches artdag nav-item alongside events and cart account-nav-items,
so Art-DAG link appears in the account dashboard sidebar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 22:07:52 +00:00
giles
b3d853ad35 Add Phase 5: link-card fragments, oEmbed endpoints, OG meta
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m48s
- fetch_fragment_batch() for N+1 avoidance with per-key Redis cache
- link-card fragment handlers in blog, market, events, federation (single + batch mode)
- link_card.html templates per app with content-specific previews
- shared/infrastructure/oembed.py: build_oembed_response, build_og_meta, build_oembed_link_tag
- GET /oembed routes on blog, market, events
- og_meta + oembed_link rendering in base template <head>
- INTERNAL_URL_ARTDAG in docker-compose.yml for cross-stack fragment fetches

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 21:44:11 +00:00
giles
4d7f8cfea2 Add fragment composition plan to docs
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 44s
Includes batch fragments, consumer-side styling, viral video
distribution (AP attachments + oEmbed + Open Graph), and link-card
fragment design.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:57:51 +00:00
giles
567888c9e0 Fix cart template cross-app url_for crash and favicon 404
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m30s
- Cart _cart.html: replace url_for('market.browse.product...') with
  market_product_url() for links and cart_global.update_quantity for
  quantity forms (market endpoints don't exist in cart app)
- Factory favicon route: use STATIC_DIR instead of relative "static"
  (resolves to shared/static/ where favicon.ico actually lives)
- Cart context processor: fetch all 3 fragments (cart-mini, auth-menu,
  nav-tree) concurrently, matching pattern in all other apps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:48:23 +00:00
giles
8b52a11b67 Add cart-mini + auth-menu fragments to all apps, fix like button
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m21s
- Market, events, federation, account now fetch cart-mini, auth-menu,
  and nav-tree fragments concurrently (matching blog's pattern)
- Move like button template to shared/browser/templates/ so blog can
  find it without needing market's templates in its container

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:26:20 +00:00
giles
e1f9c964f5 Update app READMEs for monorepo
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m56s
Remove stale submodule references, port numbers, and Running sections.
Add fragment composition details. Create READMEs for federation and account.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:13:00 +00:00
giles
796443c06d Add monorepo README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:10:23 +00:00
giles
a8d1c7a130 Add local deploy script for quick testing
Builds and restarts individual services without going through CI.
Supports explicit app names, --all, or auto-detection from git diff.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:09:18 +00:00
giles
dd309ca894 CI: also build apps whose images don't exist yet
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m14s
Handles first deploy — images aren't in the local registry yet,
so they must be built even if the diff doesn't touch app dirs.
2026-02-24 20:03:54 +00:00
giles
1b3922d46d Fix CI change detection: save old HEAD before fetch/reset
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
The diff was comparing HEAD vs origin after fetch, but before the
first real push they point to the same commit — producing an empty
diff and skipping all builds. Now saves HEAD before fetch so the
comparison works, and falls back to rebuild-all when HEAD hasn't
moved (first deploy or CI re-run on same commit).
2026-02-24 20:03:16 +00:00
giles
f42042ccb7 Monorepo: consolidate 7 repos into one
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m5s
Combines shared, blog, market, cart, events, federation, and account
into a single repository. Eliminates submodule sync, sibling model
copying at build time, and per-app CI orchestration.

Changes:
- Remove per-app .git, .gitmodules, .gitea, submodule shared/ dirs
- Remove stale sibling model copies from each app
- Update all 6 Dockerfiles for monorepo build context (root = .)
- Add build directives to docker-compose.yml
- Add single .gitea/workflows/ci.yml with change detection
- Add .dockerignore for monorepo build context
- Create __init__.py for federation and account (cross-app imports)
2026-02-24 19:44:17 +00:00