Commit Graph

83 Commits

Author SHA1 Message Date
giles
05cba16cef Fix category highlighting and revert current_local_href breakage
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 43s
- Update shared submodule: category selector uses slug comparison
  instead of current_local_href for active state
- Keep current_local_href commented out in category_context() to
  avoid overriding the base template value used by brand filters

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:29:06 +00:00
giles
74d6071ad4 Update shared submodule: select_colours Jinja global
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 43s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:17:26 +00:00
giles
1aa3659bb8 Uncomment current_local_href in category_context for subcategory highlighting
The category selector compares current_local_href against sub.local_href
to determine the active subcategory. This was commented out, so no
subcategory was ever highlighted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:17:12 +00:00
giles
aab9cf3f6b Update shared submodule: fix menu item highlighting
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m59s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:57:12 +00:00
giles
6984f3f3db Update shared submodule: delete button + quantity clamp in cart_item
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 48s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:43:42 +00:00
giles
a50c5e4d46 Update shared submodule: cart_quantity_url template support
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 48s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:32:38 +00:00
giles
ca5b952ffc Update shared submodule: MarketService write methods
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 42s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 05:57:33 +00:00
giles
d7162f5543 Fix inconsistent cart count: include calendar entries in market app
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s
Market context processor was only counting product CartItems for cart_count,
while blog/cart/events apps include calendar entries too. Use cart service
for consistent counts across all apps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 05:17:04 +00:00
giles
0a3997b82a Update shared submodule: DTO template compatibility fixes
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 05:05:46 +00:00
giles
50cad49576 Update shared submodule: revert extend_existing workaround
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 44s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:51:08 +00:00
giles
fe255fc53c Fix cart template: use direct CartItem queries in market context
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 47s
Market owns CartItem/Product — query directly with selectinload
so templates can access item.product.slug and other ORM attributes.
The cart service DTOs are for cross-domain consumers (blog, events).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:50:06 +00:00
giles
ad445e2fd2 Fix NameError: import services registry in create_app scope
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 44s
The services singleton was used in before_request closures but the
import was removed when refactoring to domain_services_fn.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:45:37 +00:00
giles
b04dbbba67 Remove glue submodule: models moved to shared/
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 59s
The glue layer's models (MenuNode, ContainerRelation), services
(navigation, relationships), and event handlers have been absorbed
into shared/. The glue submodule caused duplicate SQLAlchemy table
registration for 'menu_nodes'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:41:20 +00:00
giles
3fea2e6fdb Update shared submodule: fix duplicate table error for MenuNode
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:34:59 +00:00
giles
acf352ee3b Domain isolation: replace cross-domain imports with service calls
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m3s
Replace direct Post query and CartItem imports with typed service calls.
Market registers all 4 services via domain_services_fn with has() guards.

Key changes:
- app.py: use domain_services_fn, Post query → services.blog,
  CartItem → services.cart, MarketPlace+Post join → separate queries,
  glue navigation → shared navigation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:30:22 +00:00
giles
33befd4c3d Update shared submodule: fix ticket_types lazy-load
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 39s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 22:02:22 +00:00
giles
8dfb95ccab Update shared submodule: fix cart-mini home link
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:49:54 +00:00
giles
7ccdc1fa83 Decouple market: use shared.models for all cross-app imports
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s
- Replace blog.models import with shared.models equivalent
- Convert market/models/market.py and market_place.py to re-export stubs
- Update shared + glue submodule pointers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:58:11 +00:00
giles
31f9aa3fac Remove 47 identical market template overrides of shared templates
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 45s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:03:31 +00:00
giles
ec1880b658 Update shared submodule: fix orders link htmx interception
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:30:58 +00:00
giles
72042e793b Update shared submodule: use coop_url for auth links
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 51s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:18:43 +00:00
giles
b3125c5db4 Update shared submodule: fix market nav link
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 42s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 18:57:11 +00:00
giles
7edc0a53a1 Update shared submodule: add page_config to get_checkout
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 47s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 18:38:20 +00:00
giles
867bfa234f Update shared submodule: market_product_url for correct product URLs
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 49s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 18:19:56 +00:00
giles
bc1a7783df Update shared submodule: add page_config to SumUp checkout
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 51s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 17:52:19 +00:00
giles
0015839845 Update shared submodule: fix doubled URLs in |host filter
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 51s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 11:46:07 +00:00
giles
63778d9f20 Fix cart quantities not showing on product list after page refresh
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 45s
The context processor loaded cart items but only passed aggregates
(cart_count, cart_total) — not the cart list itself. Templates need
the full list to display per-product quantities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 21:40:48 +00:00
giles
28938e38b5 Fix cart count: query DB directly instead of cross-app API
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 42s
Two bugs fixed:

1. First htmx add didn't update mini cart count because the context
   processor's API call couldn't see the uncommitted transaction.
   Fix: pass cart_count/cart_total explicitly from the route handler.

2. Page refresh always showed cart count 0 because the internal API
   call to the cart service failed to resolve cart identity correctly.
   Fix: replace the API call with a direct DB query using the same
   shared database and session, matching how the cart app itself works.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:39:43 +00:00
giles
faa72eec5d Update shared submodule: cross-app checkout URL fix
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 39s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:22:30 +00:00
giles
8c2358022a Fix undefined calendar_total/calendar_cart_entries in product cart template
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s
The _added.html template's summary macro expects calendar_total and
calendar_cart_entries from the cart/events domain. The market app has
no calendar entries, so pass a no-op function and empty list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:15:07 +00:00
giles
44f475857b Fix AttributeError on g.cart in product cart route
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 42s
g.cart was never populated in the market app — the cart loader
before_request hook was only registered in the cart microservice.
Replace the dead filter-building code with an actual query that
loads cart items inline, scoped to the current user/session.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 10:11:49 +00:00
giles
039386b6e7 README: replace vague cross-app section with actual code dependencies
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 43s
List specific model imports, glue services, and internal APIs
that market code actually references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:47:50 +00:00
giles
dc94cfa29e Update shared + glue submodule pointers (README additions)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 53s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:36:26 +00:00
giles
a29612ffa4 Rewrite README for post-decoupling architecture
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 55s
Fix microservice count (4 not 3), document submodules, models,
scraper, all blueprints including bp/cart/, and cross-app integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:28:56 +00:00
giles
99dd473afb Phase 5: Update shared + glue submodule pointers
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 39s
shared: migration to drop cross-domain FK constraints
glue: order lifecycle services, cart adoption, login/order handlers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:11:58 +00:00
giles
7820257577 Update shared submodule to include glue layer + MenuItem fix
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 46s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 08:03:32 +00:00
giles
f81d6803d4 Add glue layer: replace /internal/menu-items API with direct DB query
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 46s
- Context processor: get_navigation_tree() replaces api_get("coop", "/internal/menu-items")
- Add glue submodule

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 23:37:47 +00:00
giles
ba10f5547a ci: clean all sibling dirs before copying to fix stale table defs
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m26s
Previous runs left self-copies (e.g. market/market/) that caused
'Table already defined' errors. Split into two loops: first rm -rf
all sibling dirs, then copy only non-self siblings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:31:49 +00:00
giles
7025333951 CI: skip copying own models to avoid duplicate SQLAlchemy table defs
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m34s
Each app has its own models/ at the root (imported as bare `models.X`).
The CI copy was also creating {app}/models/ (imported as `{app}.models.X`),
causing SQLAlchemy to see the same table defined twice.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:14:50 +00:00
giles
737c82ae7f Update shared submodule: import all model packages at startup
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 47s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:01:41 +00:00
giles
cccdba65a8 CI: use git archive for sibling models (atomic, race-safe)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 49s
The cp approach failed when sibling repos were mid-update from
their own CI runs. git archive reads directly from git objects,
and git fetch ensures origin/decoupling is available even if the
sibling working tree is on a different branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:10:59 +00:00
giles
7b1f8a0f5e CI: copy sibling app models into build context for cross-domain imports
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m42s
Phases 1-3 split models by domain ownership, but cross-app imports
still exist (e.g. cart imports market.models.CartItem). In Docker
each app only has its own code. The CI step now copies sibling app
model packages into the build context before docker build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:01:51 +00:00
giles
000185c2cc Update shared submodule: merge diverged alembic heads
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m26s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 14:27:30 +00:00
giles
4f90f65a8f Update shared submodule (adds missing alembic.ini)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m28s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 14:20:16 +00:00
giles
3b24cf45e5 Add PYTHONPATH=/app so Hypercorn spawn workers find app module
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m40s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 14:01:33 +00:00
giles
a6ed49d0c1 Update shared submodule: rename logging → log_config
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m19s
Fixes stdlib logging shadow that caused circular import in Docker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 13:55:51 +00:00
giles
62000256aa Replace shared_lib submodule with shared for decoupling deploy
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m11s
- Swap shared_lib submodule → shared (tracking decoupling branch)
- Dockerfile: shared_lib/ → shared/, remove bp symlink hack
- CI: trigger on decoupling branch, use dynamic ref_name

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 13:29:25 +00:00
giles
079293eb2c fix: update market template to use container refs, add config
- Template uses m.page.slug instead of m.post.slug
- Add app-config.yaml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 12:50:48 +00:00
giles
478636f799 feat: decouple market from shared_lib, add app-owned models
Phase 1-3 of decoupling:
- path_setup.py adds project root to sys.path
- Market-owned models in market/models/ (market, market_place)
- All imports updated: shared.infrastructure, shared.db, shared.browser, etc.
- MarketPlace uses container_type/container_id instead of post_id FK

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 12:46:32 +00:00
giles
41b4e0fe24 fix: remove existing bp dir before symlinking in Dockerfile
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 48s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 01:08:09 +00:00