Commit Graph

21 Commits

Author SHA1 Message Date
giles
e49668b301 Add fragment blueprint + sync shared: micro-frontend infrastructure
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m19s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:27:47 +00:00
giles
139eb3ac1f Rename coop_title to market_title, update shared submodule
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m52s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 08:33:20 +00:00
giles
3c87832fdf Add global + page-scoped market listings with infinite scroll
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m4s
- New all_markets blueprint at / with paginated grid and HTMX infinite scroll
- New page_markets blueprint at /<slug>/ for page-scoped market listing
- list_marketplaces service method (via shared submodule update)
- Updated slug preprocessor to handle both /<slug>/ and /<page_slug>/<market_slug>/
- Removed inline markets_listing() route (replaced by all_markets blueprint)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:34:58 +00:00
giles
930ffae854 Tech debt cleanup: update README, fix comments, sync shared submodule
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 52s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 15:36:03 +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
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
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
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
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
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
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
b8f57ef92f fix: register cart loader so g.cart is available for product cart route
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 35s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 00:52:29 +00:00
giles
2788e24ec8 fix: inject post data into template context for post header row
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 36s
The post header bar needs `post` in the template context to render
the page link, feature image, and nav. Added context processor to
spread g.post_data into templates, matching the events app pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 00:12:35 +00:00
giles
98abe5a0de fix: rename post slug URL param to page_slug to avoid collision
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 39s
The market blueprint already uses <slug> for product routes,
so the app-level prefix uses <page_slug> instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 20:20:49 +00:00
giles
6202b31e8e fix: nest market blueprint under post slug /<slug>/<market_slug>/
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 43s
Market app now follows the events app pattern — URLs include
the post slug prefix (e.g. /market/suma-market/). Hydrate
loads both post and market, verifying market belongs to post.
Scraper default URLs updated accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 20:15:45 +00:00
giles
33a30bef06 fix: remove duplicate market_slug in blueprint registration
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s
The url_prefix was being set both in register_market_bp() and
app.register_blueprint(), causing a SyntaxError from duplicate
route parameter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 18:26:26 +00:00
giles
9b2687b039 feat: restructure market app with per-market URL scoping
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s
- URL structure changes from /<route> to /<market_slug>/<route>
- Root / shows markets listing page
- app.py: url_value_preprocessor, url_defaults, hydrate_market (events app pattern)
- Browse queries (db_nav, db_products_nocounts, db_products_counts) accept market_id
- _productInfo reads g.market.id to scope all queries
- save_nav accepts market_id, sets on new NavTop rows
- API save_nav passes g.market.id
- Scraper default URLs point to /suma-market/ on port 8001

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 18:08:48 +00:00
giles
dc7c989834 feat: add shared library as git submodule
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-09 23:41:50 +00:00
giles
6271a715a1 feat: initialize market app with browsing, product, and scraping code
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Split from coop monolith. Includes:
- Market/browse/product blueprints
- Product sync API
- Suma scraping pipeline
- Templates for market, browse, and product views
- Dockerfile and CI workflow for independent deployment
2026-02-09 23:16:34 +00:00