fix(logs): harden global logs with shared parsing, SSE fixes, and level filter (#539)

- Extract log parsing utilities (normalizeContainerName, parseLogTimestamp,
  detectLogLevel, stripControlChars, demuxDockerLog) to shared module,
  eliminating duplication between polling and SSE endpoints
- Fix timestamp regex to accept timezone offsets (+HH:MM/-HH:MM), not just Z
- Replace any[] with typed GlobalLogEntry interface
- Add SSE heartbeat (30s) to prevent reverse proxy timeouts
- Add X-Accel-Buffering: no header for nginx SSE compatibility
- Replace swallowed catch blocks with console.warn diagnostics
- Fix SSE not reconnecting on node switch (missing dep in effect array)
- Add settings change event so devMode/pollRate updates apply without remount
- Add log level filter (ALL/ERROR/WARN/INFO) to toolbar
- Replace overflow-auto div with ScrollArea for design system compliance
- Add strokeWidth={1.5} to all toolbar icons
- Include stack name in download format
- Surface fetch errors with inline banner
- Add 39 unit tests for all log parsing utilities
- Update docs with level filter documentation and refreshed screenshot
This commit is contained in:
Anso
2026-04-12 21:19:08 -04:00
committed by GitHub
parent c1fb0caba6
commit a74a516850
9 changed files with 572 additions and 188 deletions
+2 -1
View File
@@ -42,8 +42,9 @@ Use the controls in the toolbar above the log panel to narrow what you see:
| **Search** | Full-text filter across the message, container name, and stack name (case-insensitive) |
| **Stacks** | Checkbox dropdown; select one or more stacks to show only their containers' logs. Displays "All" when nothing is selected. |
| **All Streams** | Filter by output stream: `All Streams`, `STDOUT`, or `STDERR` |
| **All Levels** | Filter by severity: `All Levels`, `ERROR`, `WARN`, or `INFO` |
Filters combine. For example, you can show only `STDERR` from a specific stack while searching for a keyword.
Filters combine. For example, you can show only `ERROR` lines from a specific stack while searching for a keyword.
## Controls
Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 KiB

After

Width:  |  Height:  |  Size: 230 KiB