Skip to content

Add line limit filtering to workflow log display#320

Merged
t0mdavid-m merged 1 commit intomainfrom
claude/fix-log-line-limit-FPBFB
Jan 26, 2026
Merged

Add line limit filtering to workflow log display#320
t0mdavid-m merged 1 commit intomainfrom
claude/fix-log-line-limit-FPBFB

Conversation

@t0mdavid-m
Copy link
Member

@t0mdavid-m t0mdavid-m commented Jan 26, 2026

Summary

Enhanced the workflow log display in the execution section to support filtering log output based on a configurable line limit, while maintaining the full content for status checks.

Key Changes

  • Refactored log file reading from read() to readlines() for line-by-line processing
  • Separated content parsing (for status checks) from display rendering
  • Added conditional logic to apply line limit filtering:
    • When log_lines_count == "all": display entire log
    • Otherwise: display only the last N lines based on st.session_state.log_lines_count
  • Preserved original status detection logic that checks full content for "WORKFLOW FINISHED"

Implementation Details

  • The full log content is still read and checked for workflow completion status
  • Only the display output is filtered, preventing loss of important status information
  • Uses list slicing (lines[-count:]) for efficient tail-like behavior on large logs
  • Maintains backward compatibility with existing "all" option for displaying complete logs

Summary by CodeRabbit

  • New Features

    • Added line-limiting display option for static logs, allowing you to view either all lines or only the last N lines based on your configuration.
  • Bug Fixes

    • Improved log file reading and display handling for better reliability.

✏️ Tip: You can customize this high-level summary in your review settings.

The line limit setting (e.g., 100 lines) was only being applied during
real-time log display while the workflow was running. After completion,
the static display showed the entire log file regardless of the selected
line limit. Now the same line limit logic is applied to both display modes.

https://claude.ai/code/session_012mUhD9Ki1ybEVCeWRxVwfH
@t0mdavid-m t0mdavid-m merged commit a0b3f7e into main Jan 26, 2026
4 of 7 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The log display mechanism in StreamlitUI's execution section was refactored to read log files line-by-line using readlines() instead of read(), and now supports line-limited display showing either all lines or only the last N lines as configured in session state.

Changes

Cohort / File(s) Summary
Streamlit UI Log Display
src/workflow/StreamlitUI.py
Modified static log display in execution_section to use readlines() for reading logs and reconstruct content from individual lines. Added conditional logic to display all lines or limit output to the last N lines based on st.session_state.log_lines_count configuration. Real-time spinner path remains unchanged.

Poem

📜 Logs line by line, now neatly trimmed,
No longer reading all at once, so grim,
The last N lines shine bright and clear,
Or all at once, without a fear! 🐰✨

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants

Comments