fix: address pre-merge review findings — stale identity strings, pyright error, fragile test path, formatting, README accuracy
Required fixes:
- main.py: update module docstring, startup comment, and FastAPI title from
'tmux-web coordinator' / 'coordinator service' → 'muxplex' (4 locations)
- test_api.py: replace hasattr/BaseRoute pattern with isinstance(r, (APIRoute,
APIWebSocketRoute)) to satisfy pyright (union-attr error eliminated)
Recommendations applied:
- test_api.py + test_cli.py: auto-formatted with ruff (blank-line normalisation)
- test_cli.py: replace exec(Path('muxplex/__main__.py').read_text()) with
importlib.util.find_spec() to obtain the absolute path — no longer assumes
pytest is invoked from a specific working directory
- README.md: fix architecture table — WebSocket proxy moved from ttyd.py
description to main.py; ttyd.py now correctly described as lifecycle only
All 178 tests pass; python_check clean (0 errors, 0 warnings).
This commit is contained in:
@@ -171,10 +171,10 @@ muxplex/
|
||||
├── __init__.py
|
||||
├── __main__.py # `python -m muxplex` entry point
|
||||
├── cli.py # CLI argument parsing and `install-service` subcommand
|
||||
├── main.py # FastAPI app factory and route registration
|
||||
├── main.py # FastAPI app: session API, bell hooks, WebSocket proxy to ttyd, static frontend
|
||||
├── sessions.py # tmux session discovery and snapshot capture
|
||||
├── bells.py # Bell/activity notification tracking
|
||||
├── ttyd.py # ttyd process lifecycle management and WebSocket proxy
|
||||
├── ttyd.py # ttyd process lifecycle management (spawn, kill, PID tracking)
|
||||
├── state.py # Shared in-process state (sessions, bells, ttyd)
|
||||
├── frontend/ # Static frontend assets (served as package data)
|
||||
│ ├── index.html
|
||||
|
||||
Reference in New Issue
Block a user