Commit Graph

64 Commits

Author SHA1 Message Date
giles
8c72664e1f Update shared submodule pointer to latest template fix
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-19 09:32:40 +00:00
giles
6140c727c6 Add /quantity/ endpoint so cart +/- buttons work same-origin
Adds POST /quantity/<product_id>/ to set cart item quantity (or remove at 0),
and registers cart_quantity_url Jinja global so the shared template uses it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:31:11 +00:00
giles
8498807597 Remove Calendar model import from checkout, use DTO fields
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 47s
resolve_page_config() now reads entry.calendar_container_id from the
CalendarEntryDTO instead of fetching the Calendar ORM model. Fixes
stale CalendarEntry type hints to CalendarEntryDTO. Updates shared
submodule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 06:07:12 +00:00
giles
72062930f0 Update shared submodule pointer to latest DTO fixes
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-19 05:07:29 +00:00
giles
edad7b299d Fix DTO compatibility in cart templates and page_cart service
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m58s
- page_cart.py: use ce.calendar_container_id instead of ce.calendar.container_id
- _cart.html: use entry.calendar_name instead of entry.calendar.name
- Update shared submodule with DTO field additions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 05:05:04 +00:00
giles
cf04a3a9fd Update shared submodule: revert extend_existing workaround
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-19 04:52:05 +00:00
giles
e5c686643c Fix NameError: import services registry in create_app scope
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 42s
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:36 +00:00
giles
ad7f933278 Remove glue submodule: models moved to shared/
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m3s
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:15 +00:00
giles
377396283d Update shared submodule: fix duplicate table error for MenuNode
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m31s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:34:44 +00:00
giles
049b35479b Domain isolation: replace cross-domain imports with service calls
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 44s
Replace direct Post, Calendar, CalendarEntry model queries and glue
lifecycle imports with typed service calls. Cart registers all 4
services via domain_services_fn with has() guards.

Key changes:
- app.py: use domain_services_fn, Post query → services.blog
- api.py: Calendar/CalendarEntry → services.calendar
- checkout: glue order_lifecycle → services.calendar.claim/confirm
- calendar_cart: CalendarEntry → services.calendar.pending_entries()
- page_cart: Post/Calendar queries → services.blog/calendar
- global_routes: glue imports → service calls

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:30:17 +00:00
giles
b7f09d638d Update shared submodule: fix ticket_types lazy-load
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-18 22:02:21 +00:00
giles
52105def89 Update shared submodule: fix cart-mini home link
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 38s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:49:53 +00:00
giles
8527ddb84b Decouple cart: use shared.models for all cross-app imports
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 50s
- Replace all imports from blog.models, market.models, events.models
  and bare models.* with shared.models equivalents
- Convert cart/models/order.py and page_config.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:10 +00:00
giles
d6d82664d6 Remove 23 identical cart template overrides of shared templates
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-18 20:03:21 +00:00
giles
56230eff0a Update shared submodule: fix orders link htmx interception
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-18 19:30:56 +00:00
giles
7f25e6b63f Update shared submodule: use coop_url for auth links
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 19:18:41 +00:00
giles
91f05d41ca Add oob context processor to orders blueprint for full-page rendering
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 38s
The orders/index.html template extends auth/index.html which needs
the oob dict for template inheritance. Without it, direct navigation
to /orders/ fails with "'oob' is undefined".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:06:40 +00:00
giles
bd14e2564a Update shared submodule: fix market nav link
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-18 18:57:10 +00:00
giles
1256755a3a Fix checkout return: resolve product URLs and read status after SumUp check
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 43s
Resolve page_slug and market_slug from the order's page_config so that
product links on the checkout return page include the correct prefix.
Also move the status read after check_sumup_status so the template
reflects the actual payment result.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 18:38:11 +00:00
giles
298b5cd0a7 Fix product URLs: use market_product_url with page/market prefix
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-18 18:19:53 +00:00
giles
e341df5836 Update shared submodule: add page_config to SumUp checkout
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-18 17:52:16 +00:00
giles
d81d116be8 Update shared submodule: fix doubled URLs in |host filter
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 11:46:08 +00:00
giles
de219aa870 Update shared submodule pointer (README addition)
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-14 23:16:46 +00:00
giles
93ffffac16 Update glue submodule pointer (README addition)
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-14 19:49:55 +00:00
giles
fb70c4c76d README: replace vague cross-app section with actual code dependencies
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
List specific model imports, glue services, internal APIs, and
domain events that cart code actually references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:47:55 +00:00
giles
2af4dd2073 Remove dead code: routes_old.py and unused imports
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 45s
- routes_old.py: 253 lines, completely unreferenced (replaced by
  global_routes, page_routes, overview_routes)
- page_routes.py: remove unused check_sumup_status, get_order_with_details
- global_routes.py: remove unused is_htmx_request, config imports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:46:52 +00:00
giles
6aa2919f34 Remove dead adopt_session_cart_for_user.py (replaced by glue/services/cart_adoption.py)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 37s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:39:21 +00:00
giles
61686fd70c Remove dead login_helper.py (replaced by glue/services/cart_adoption.py)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 37s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:38:18 +00:00
giles
4f9f482c6c Rewrite README for post-decoupling architecture
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 42s
Remove stale /adopt endpoint reference, document submodules, all
services, glue integration, checkout flow, and domain events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:29:03 +00:00
giles
34032160f9 Phase 5: Update shared + glue submodule pointers
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 57s
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
d407957928 Phase 5: Replace cross-domain writes with glue services, emit events
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s
- checkout.py: use claim_entries_for_order(), emit order.created
- check_sumup_status.py: use confirm_entries_for_order(), emit order.paid
- global_routes.py: use get_entries_for_order() instead of relationship
- order.py: remove calendar_entries relationship
- api.py: remove /adopt endpoint (replaced by event-driven adoption)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 17:35:43 +00:00
giles
cd332b2544 Update shared submodule to include glue layer + MenuItem fix
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-12 08:03:32 +00:00
giles
9cf8ff1114 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 41s
- 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:50 +00:00
giles
14838ebbaa 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 6m7s
Previous runs left self-copies (e.g. cart/cart/) 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:54 +00:00
giles
dc379b30a2 CI: skip copying own models to avoid duplicate SQLAlchemy table defs
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m4s
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:57 +00:00
giles
d8bec5317a Update shared submodule: import all model packages at startup
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-11 16:01:43 +00:00
giles
f4cd2f41c7 CI: use git archive for sibling models (atomic, race-safe)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s
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:11:01 +00:00
giles
029b02ff18 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 1m46s
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:58 +00:00
giles
908f92464e Update shared submodule: merge diverged alembic heads
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m27s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 14:27:34 +00:00
giles
c4fbfa4c53 Update shared submodule (adds missing alembic.ini)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m12s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 14:20:20 +00:00
giles
3adf268ffe Add PYTHONPATH=/app so Hypercorn spawn workers find app module
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-11 14:01:42 +00:00
giles
e97eea816f Update shared submodule: rename logging → log_config
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m25s
Fixes stdlib logging shadow that caused circular import in Docker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 13:56:01 +00:00
giles
25fc3a933c Replace shared_lib submodule with shared for decoupling deploy
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m10s
- 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:28 +00:00
giles
5d0653bf2e feat: decouple cart from shared_lib, add app-owned models
Phase 1-3 of decoupling:
- path_setup.py adds project root to sys.path
- Cart-owned models in cart/models/ (order, page_config)
- All imports updated: shared.infrastructure, shared.db, shared.browser, etc.
- PageConfig 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:34 +00:00
giles
8ce8fc5380 fix: remove existing bp dir before symlinking in Dockerfile
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 44s
shared_lib now has a bp/ directory that conflicts with the symlink.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 01:08:04 +00:00
giles
b6f8141f20 Revert "fix: remove is_page filter from cart page hydration"
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 18s
This reverts commit d0da418f12.
2026-02-11 00:55:06 +00:00
giles
d0da418f12 fix: remove is_page filter from cart page hydration
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 18s
Posts used as containers aren't necessarily pages. Market and events
apps don't filter on is_page either.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 00:54:12 +00:00
giles
d5cb2131b7 chore: move repo to ~/rose-ash/ and add configurable CI paths
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 14s
REPO_DIR points to /root/rose-ash/cart, COOP_DIR to /root/coop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:05:43 +00:00
giles
742d84e999 chore: update shared_lib submodule to Phase 4
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 19s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 21:46:59 +00:00
giles
cb2fcd9d32 feat: per-page carts with overview, page-scoped checkout, and split blueprints (Phase 4)
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 21s
Splits the monolithic cart blueprint into three: cart_overview (GET /),
page_cart (/<page_slug>/), and cart_global (webhook, return, add).

- New page_cart.py service: get_cart_for_page(), get_calendar_entries_for_page(), get_cart_grouped_by_page()
- clear_cart_for_order() and create_order_from_cart() accept page_post_id for scoping
- Cart app hydrates page_slug via url_value_preprocessor/url_defaults/hydrate_page
- Context processor provides page-scoped cart data when g.page_post exists
- Internal API /internal/cart/summary accepts ?page_slug= for page-scoped counts
- Overview template shows page cards with item counts and totals
- Page cart template reuses show_cart() macro with page-specific header

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 21:45:30 +00:00