Commit Graph

3 Commits

Author SHA1 Message Date
giles
9ab4b7b3fe Prevent circular fragment fetching between apps
fetch_fragment() auto-returns "" when called inside a fragment request
(detected via X-Fragment-Request header). This prevents deadlocks when
e.g. blog fetches cart-mini from cart, and cart's context processor
fetches nav-tree from blog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 18:17:47 +00:00
giles
20d3ff8425 Make fragment failures raise by default instead of silent degradation
FragmentError raised on network errors or non-200 responses when
required=True (default). Logs at ERROR level. Pass required=False
for optional fragments that should degrade gracefully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 18:03:04 +00:00
giles
b882770828 Add fragment composition infrastructure for micro-frontend UI
New HTTP client (fragments.py) fetches HTML fragments from other apps
over the Docker network, with Redis caching and graceful degradation.
Jinja global `fragment()` available in all templates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:26:08 +00:00