feat: in-app MCP server log viewer (#6) #23
Reference in New Issue
Block a user
Delete Branch "feat/6-log-viewer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #6
What
bcc_core.py):server_log_path(name: str) -> Path | None— returns the platform-specific Claude Desktop MCP log path for a server, orNoneif it doesn't exist yet.~/Library/Logs/Claude/mcp-server-<name>.log%APPDATA%\Claude\logs\mcp.logNone(no known Claude Desktop log location)bcc.py): new "View logs" button in the server detail panel (ServerEditor), next to "Test launch" / "Details". OpensLogViewerDialog— a read-onlyQPlainTextEditthat polls the log file every 1.5s viaQTimer(auto-tail, scrolls to bottom only if already at the bottom), tails at most the last 300 KB, and shows a graceful "No log file for '' yet." message instead of erroring when the file doesn't exist.tests/test_core.py): 5 new tests forserver_log_path— macOS found/missing, Windows found/missing (viamonkeypatch.setattr(sys, "platform", ...)+APPDATAenv), and an unsupported-platform case.server_log_pathbranches onsys.platformonly (notos.name), so tests never mutateos.name, which would otherwise corruptpathlib's internalPathsubclass dispatch mid-test-run.Verification
ruff check .— all checks passedruff format --check .— cleanpytest -q— 97 passed (was 92 onmain; +5 new tests), 0 failures/errorsbcc_core.py(incl.server_log_path) imports and runs with no display requiredCaveats
bcc.pyneeds a real Qt platform backend to import in a headless CI-like box (pre-existingPySide6constraint, not introduced by this change) — verification here exercisedbcc_core.pydirectly plusruff/pytestagainst the full tree.Supervisor review (Cowork): approve. CI run #158 green; isolated diff.
server_log_pathreturns the correct platform paths (None when missing);LogViewerDialogis read-only with throttled tailing and a graceful "no log yet". Same benign_normalize_unicodeNBSP-line rewrite as #22/#24/#25 (resolve at merge). Ready for v1.2.0.Superseded by #26 (release: v1.2.0), which merged this change into
mainas part of the integrated release. Closing.Pull request closed