35e5c8d38b
refactor: phase 3 - API efficiency improvements
...
Add typed dataclasses for tuple returns:
- types.py: HeadlineItem, FetchResult, Block dataclasses with legacy tuple converters
- fetch.py: Add type hints and HeadlineTuple type alias
Add pyright for static type checking:
- Add pyright to dependencies
- Verify type coverage with pyright (0 errors in core modules)
This enables:
- Named types instead of raw tuples (better IDE support, self-documenting)
- Type-safe APIs across modules
- Backward compatibility via to_tuple/from_tuple methods
Note: Lazy imports skipped for render.py - startup impact is minimal.
2026-03-15 19:13:32 -07:00
cdc8094de2
refactor: phase 2 - modularization of scroll engine
...
Split monolithic scroll.py into focused modules:
- viewport.py: terminal size (tw/th), ANSI positioning helpers
- frame.py: FrameTimer class, scroll step calculation
- layers.py: message overlay, ticker zone, firehose rendering
- scroll.py: simplified orchestrator, imports from new modules
Add stream controller and event types for future event-driven architecture:
- controller.py: StreamController for source initialization and stream lifecycle
- events.py: EventType enum and event dataclasses (HeadlineEvent, FrameTickEvent, etc.)
Added tests for new modules:
- test_viewport.py: 8 tests for viewport utilities
- test_frame.py: 10 tests for frame timing
- test_layers.py: 13 tests for layer compositing
- test_events.py: 11 tests for event types
- test_controller.py: 6 tests for stream controller
This enables:
- Testable chunks with clear responsibilities
- Reusable viewport utilities across modules
- Better separation of concerns in render pipeline
- Foundation for future event-driven architecture
Also includes Phase 1 documentation updates in code comments.
2026-03-15 19:13:32 -07:00
f170143939
refactor: phase 1 - testability improvements
...
- Add Config dataclass with get_config()/set_config() for injection
- Add Config.from_args() for CLI argument parsing (testable)
- Add platform font path detection (Darwin/Linux)
- Bound translate cache with @lru_cache(maxsize=500)
- Add fixtures for external dependencies (network, feeds, config)
- Add 15 tests for Config class, from_args, and platform detection
This enables testability by:
- Allowing config injection instead of global mutable state
- Supporting custom argv in from_args() for testing
- Providing reusable fixtures for mocking network/filesystem
- Preventing unbounded memory growth in translation cache
Fixes: _arg_value/_arg_int not accepting custom argv
2026-03-15 19:13:32 -07:00
9ae4dc2b07
fix: update ntfy tests for SSE API (reconnect_delay)
2026-03-15 15:16:37 -07:00
757c854584
fix: apply ruff auto-fixes and add hk git hooks
...
- Fix pre-existing lint errors in engine/ modules using ruff --unsafe-fixes
- Add hk.pkl with pre-commit and pre-push hooks using ruff builtin
- Configure hooks to use 'uv run' prefix for tool execution
- Update mise.toml to include hk and pkl tools
- All 73 tests pass
fix: apply ruff auto-fixes and add hk git hooks
- Fix pre-existing lint errors in engine/ modules using ruff --unsafe-fixes
- Add hk.pkl with pre-commit and pre-push hooks using ruff builtin
- Configure hooks to use 'uv run' prefix for tool execution
- Update mise.toml to include hk and pkl tools
- Use 'hk install --mise' for proper mise integration
- All 73 tests pass
2026-03-15 15:16:37 -07:00
4844a64203
style: apply ruff auto-fixes across codebase
...
- Fix import sorting (isort) across all engine modules
- Fix SIM105 try-except-pass patterns (contextlib.suppress)
- Fix nested with statements in tests
- Fix unused loop variables
Run 'uv run pytest' to verify tests still pass.
2026-03-15 15:16:37 -07:00
6e39a2dad2
feat: migrate Ntfy message retrieval from polling to SSE streaming, replacing poll_interval with reconnect_delay for continuous updates.
2026-03-15 13:44:26 -07:00
11226872a1
feat: Implement interactive font selection by scanning the fonts/ directory for .otf, .ttf, and .ttc files, adding new fonts and updating documentation.
2026-03-15 03:52:10 -07:00
e6826c884c
feat: Implement an interactive font face picker at startup, allowing selection of specific font faces from a font file.
2026-03-15 03:38:14 -07:00
9140bfd32b
feat: Introduce a complementary color gradient for queue messages.
2026-03-15 02:44:38 -07:00
66c13b5829
refactor: Change firehose from a drifting overlay to a fixed bottom strip and message display from a top-pinned section to a centered overlay.
2026-03-15 02:26:44 -07:00
086214f05e
style: remove firehose opaque row backdrop and background color
2026-03-15 01:31:44 -07:00
0f762475b5
feat: Apply a distinct background color to firehose lines.
2026-03-15 01:08:17 -07:00
b00b612da0
refactor: rename rendering components and variables for clarity, distinguishing between message, ticker, and scroll motion layers.
2026-03-15 00:58:36 -07:00
39dab4b22b
feat: Implement a drifting firehose overlay that scrolls independently over the main ticker content.
2026-03-15 00:49:58 -07:00
9bd8115c55
feat: introduce the scroll engine with a main rendering loop for headlines, messages, and visual effects.
2026-03-14 23:36:56 -07:00
2c777729f5
feat: Introduce ntfy.sh message polling, content fetching with caching, and microphone input monitoring.
2026-03-14 23:34:23 -07:00
2e6b2c48bd
feat: Introduce visual effects module, enhance text rendering with SSAA, and add shifting gradient support.
2026-03-14 22:15:48 -07:00
f6ad89769f
feat: Implement OTF to terminal half-block rendering pipeline including font loading, text rasterization, word-wrap, and gradient coloring.
2026-03-14 21:53:47 -07:00
d3c403848c
feat: Introduce translate module for Google Translate integration and location-based language detection, and add a new filter module.
2026-03-14 21:00:24 -07:00
119ed193c0
feat: Add terminal module.
2026-03-14 20:57:53 -07:00
dcc3718012
refactor: Create engine package, extracting data sources to sources.py, and add refactoring documentation.
2026-03-14 20:56:24 -07:00