feat(figment): complete pipeline integration with native effect plugin

- Add engine/effects/plugins/figment.py (native pipeline implementation)
- Add engine/figment_render.py, engine/figment_trigger.py, engine/themes.py
- Add 3 SVG assets in figments/ (Mexican/Aztec motif)
- Add engine/display/backends/animation_report.py for debugging
- Add engine/pipeline/adapters/frame_capture.py for frame capture
- Add test-figment preset to presets.toml
- Add cairosvg optional dependency to pyproject.toml
- Update EffectPluginStage to support is_overlay attribute (for overlay effects)
- Add comprehensive tests: test_figment_effect.py, test_figment_pipeline.py, test_figment_render.py
- Remove obsolete test_ui_simple.py
- Update TODO.md with test cleanup plan
- Refactor test_adapters.py to use real components instead of mocks

This completes the figment SVG overlay feature integration using the modern pipeline architecture, avoiding legacy effects_plugins. All tests pass (758 total).
This commit is contained in:
2026-03-21 13:09:37 -07:00
parent ef0c43266a
commit 7185005f9b
17 changed files with 1990 additions and 181 deletions

View File

@@ -27,9 +27,9 @@ class EffectPluginStage(Stage):
def stage_type(self) -> str:
"""Return stage_type based on effect name.
HUD effects are overlays.
Overlay effects have stage_type "overlay".
"""
if self.name == "hud":
if self.is_overlay:
return "overlay"
return self.category
@@ -37,19 +37,26 @@ class EffectPluginStage(Stage):
def render_order(self) -> int:
"""Return render_order based on effect type.
HUD effects have high render_order to appear on top.
Overlay effects have high render_order to appear on top.
"""
if self.name == "hud":
if self.is_overlay:
return 100 # High order for overlays
return 0
@property
def is_overlay(self) -> bool:
"""Return True for HUD effects.
"""Return True for overlay effects.
HUD is an overlay - it composes on top of the buffer
Overlay effects compose on top of the buffer
rather than transforming it for the next stage.
"""
# Check if the effect has an is_overlay attribute that is explicitly True
# (not just any truthy value from a mock object)
if hasattr(self._effect, "is_overlay"):
effect_overlay = self._effect.is_overlay
# Only return True if it's explicitly set to True
if effect_overlay is True:
return True
return self.name == "hud"
@property