Skip to content

fix: optimize log viewer TUI performance and improve run status colors#753

Merged
FL4TLiN3 merged 2 commits intomainfrom
fix/log-viewer-perf-and-status-colors
Mar 12, 2026
Merged

fix: optimize log viewer TUI performance and improve run status colors#753
FL4TLiN3 merged 2 commits intomainfrom
fix/log-viewer-perf-and-status-colors

Conversation

@FL4TLiN3
Copy link
Contributor

Summary

  • Remove continueToNextStep (~1091 files, ~400MB) and resolveToolResults (~1091 files) from tree event loading — 14x faster (1008ms → 70ms)
  • Parallelize run event loading across 50 runs with Promise.all
  • Add getCheckpointsByRunId with header-based pre-filtering (read first 256 bytes to check runId before full parse) — 25x faster (438ms → 17ms)
  • Add getFirstEvent for extracting job query from a single startRun event instead of loading all events
  • Fix double statSync calls in getCheckpointsByJobId sort
  • Normalize run status colors: primary (white) for completed/suspending, destructive (red) for errors only, muted (gray) for incomplete runs

Test plan

  • bun run typecheck passes
  • bun run test passes (all 97 tests across 8 files)
  • bun run build passes
  • bun run validate:changeset passes
  • Manual verification with perstack log on /tmp/bash-gaming-test

🤖 Generated with Claude Code

FL4TLiN3 and others added 2 commits March 12, 2026 18:46
Performance: remove continueToNextStep and resolveToolResults from tree event
loading (~400MB → ~15MB), parallelize run event loading with Promise.all,
add header-based checkpoint filtering for run-specific queries, and use
getFirstEvent for job query extraction. Status colors: use primary (white) for
completed/suspending runs, red for errors only, muted for incomplete runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FL4TLiN3 FL4TLiN3 merged commit adae8ee into main Mar 12, 2026
11 checks passed
@FL4TLiN3 FL4TLiN3 deleted the fix/log-viewer-perf-and-status-colors branch March 12, 2026 09:48
@FL4TLiN3 FL4TLiN3 mentioned this pull request Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant