Files
sideline/tests
David Gwilliam 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
..