Add custom SVG exporter, remove Rich from screenshot rendering

- Created svg_exporter.py with direct pyte-to-SVG rendering
- Eliminates Rich's export_svg() quirks (clip path count mismatch)
- Added 63 comprehensive tests for SVG exporter
- Removed Rich imports from local_server.py, terminal_session.py,
  app_session.py, and cli.py
- Replaced RichHandler with standard logging.basicConfig
- Replaced @rich.repr.auto with standard __repr__ methods
- Rich is no longer directly imported (still transitive via textual-serve)

Bump version to 0.3.0
This commit is contained in:
GitHub Copilot
2026-01-24 17:11:20 +00:00
parent d4acdbb4f1
commit d5a060d6aa
9 changed files with 934 additions and 165 deletions
+5 -5
View File
@@ -220,16 +220,16 @@ class TestTerminalSession:
# Should not raise
await session.wait()
def test_rich_repr(self):
"""Test rich repr output."""
def test_repr(self):
"""Test repr output."""
from textual_webterm.terminal_session import TerminalSession
mock_poller = MagicMock()
session = TerminalSession(mock_poller, "test-session", "bash")
repr_items = list(session.__rich_repr__())
assert ("session_id", "test-session") in repr_items
assert ("command", "bash") in repr_items
repr_str = repr(session)
assert "test-session" in repr_str
assert "bash" in repr_str
@pytest.mark.asyncio
async def test_open_uses_shlex_split_and_execvp_with_args(self):