Commit Graph

4 Commits

Author SHA1 Message Date
57de835ae0 feat: Implement scrolling camera with layout-aware filtering
- Rename VERTICAL camera mode to FEED (rapid single-item view)
- Add SCROLL camera mode with float accumulation for smooth movie-credits style scrolling
- Add estimate_block_height() for cheap layout calculation without full rendering
- Replace ViewportFilterStage with layout-aware filtering that tracks camera position
- Add render caching to FontStage to avoid re-rendering items
- Fix CameraStage to use global canvas height for scrolling bounds
- Add horizontal padding in Camera.apply() to prevent ghosting
- Add get_dimensions() to MultiDisplay for proper viewport sizing
- Fix PygameDisplay to auto-detect viewport from window size
- Update presets to use scroll camera with appropriate speeds
2026-03-17 00:21:18 -07:00
637cbc5515 fix: pass border parameter to display and handle special sources properly
BUG FIXES:

1. Border parameter not being passed to display.show()
   - Display backends support border parameter but app.py wasn't passing it
   - Now app.py passes params.border to display.show(border=params.border)
   - Enables border-test preset to actually render borders

2. WebSocket and Multi displays didn't support border parameter
   - Updated WebSocket Protocol to include border parameter
   - Updated MultiDisplay.show() to accept and forward border parameter
   - Updated test to expect border parameter in mock calls

3. app.py didn't properly handle special sources (empty, pipeline-inspect)
   - Border-test preset with source='empty' was still fetching headlines
   - Pipeline-inspect source was never using the introspection data source
   - Now app.py detects special sources and uses appropriate data source stages:
     * 'empty' source → EmptyDataSource stage
     * 'pipeline-inspect' → PipelineIntrospectionSource stage
     * Other sources → traditional items-based approach
   - Uses SourceItemsToBufferStage for special sources instead of RenderStage
   - Sets pipeline on introspection source after build to avoid circular dependency

TESTING:

- All 463 tests pass
- Linting passes
- Manual test: `uv run mainline.py --preset border-test` now correctly shows empty source
- border-test preset now properly initializes without fetching unnecessary content

The issue was that the enhanced app.py code from the original diff didn't make it into
the refactor commit. This fix restores that functionality.
2026-03-16 19:53:58 -07:00
f5de2c62e0 feat(display): add reuse flag to Display protocol
- Add reuse parameter to Display.init() for all backends
- PygameDisplay: reuse existing SDL window via class-level flag
- TerminalDisplay: skip re-init when reuse=True
- WebSocketDisplay: skip server start when reuse=True
- SixelDisplay, KittyDisplay, NullDisplay: ignore reuse (not applicable)
- MultiDisplay: pass reuse to child displays
- Update benchmark.py to reuse pygame display for effect benchmarks
- Add test_websocket_e2e.py with e2e marker
- Register e2e marker in pyproject.toml
2026-03-16 00:30:52 -07:00
829c4ab63d refactor: modularize display backends and add benchmark runner
- Create engine/display/ package with registry pattern
- Move displays to engine/display/backends/ (terminal, null, websocket, sixel)
- Add DisplayRegistry with auto-discovery
- Add benchmark.py for performance testing effects × displays matrix
- Add mise tasks: benchmark, benchmark-json, benchmark-report
- Update controller to use new display module
2026-03-15 22:25:28 -07:00