Skip to content

fix(watcher): show new sessions in live monitor - #216

Merged
mike1858 merged 2 commits into
Piebald-AI:mainfrom
jimyag:feat/issue-7-live-monitor-new-sessions
Jul 26, 2026
Merged

mike1858 merged 2 commits into
Piebald-AI:mainfrom
jimyag:feat/issue-7-live-monitor-new-sessions

Conversation

@jimyag

@jimyag jimyag commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix the live monitor so sessions created after startup appear immediately without restarting Splitrail.

Key changes

  • Detect session IDs that are missing from the cached live view during incremental reloads.
  • Initialize full session metadata and conversation counts only for newly observed sessions.
  • Preserve the existing incremental path for sessions already present in the view.
  • Add regression coverage for both SingleMessage and SingleSession contribution strategies.

Validation

  • cargo build --quiet
  • cargo test --quiet (399 passed)
  • cargo clippy --quiet -- -D warnings
  • cargo doc --quiet
  • cargo fmt --all --quiet
  • git diff --check

Closes #7

Summary by CodeRabbit

  • Bug Fixes

    • Incremental reloads now correctly display newly discovered conversation sessions.
    • Updated views remain accurate when using single-message or single-session contribution modes.
  • Tests

    • Added coverage to verify that new sessions appear in live views after incremental file updates.

Initialize missing session aggregates during incremental reloads so newly created sessions appear without restarting the TUI.

Signed-off-by: jimyag <git@jimyag.com>
@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jimyag, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a3faab5-24aa-4511-846b-073de67fb744

📥 Commits

Reviewing files that changed from the base of the PR and between 9a2da64 and e08455e.

📒 Files selected for processing (2)
  • src/analyzer.rs
  • src/contribution_cache/mod.rs
📝 Walkthrough

Walkthrough

Incremental reloads now detect previously unseen conversation sessions and update the live view through a multi-session contribution for single-message and single-session strategies. New test fixtures and regression coverage verify the behavior for both strategies.

Changes

Incremental session visibility

Layer / File(s) Summary
Session detection and reload integration
src/analyzer.rs
Adds unseen-session detection and changes single-message and single-session reload handling to update the live view through multi-session contributions when needed.
Incremental session regression coverage
src/analyzer.rs
Adds a per-path test analyzer and verifies that incremental reloads expose new sessions under both contribution strategies.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: mike1858

Poem

I’m a rabbit watching sessions appear,
New hashes hop into the live view here.
Single messages, single sessions too,
Now fresh conversations come bounding through.
*hop hop* the tests all cheer!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: newly created sessions now appear in the live monitor.
Linked Issues check ✅ Passed The changes address issue #7 by making new sessions visible during incremental reloads and adding regression coverage.
Out of Scope Changes check ✅ Passed The PR stays focused on live-view session handling and related tests, with no clear unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/analyzer.rs`:
- Around line 644-648: The new-session application in src/analyzer.rs lines
644-648 and 662-666 is not reversible because it applies a
MultiSessionContribution while caching a single-message/session contribution.
Update both strategy branches to cache and later subtract contribution data
equivalent to what add_new_sessions_to_view applies, and add regression coverage
for adding then deleting a new session under both strategies.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 27bbc3ac-3ce3-4fb7-a411-939e96118cf2

📥 Commits

Reviewing files that changed from the base of the PR and between 76d5327 and 9a2da64.

📒 Files selected for processing (1)
  • src/analyzer.rs

Comment thread src/analyzer.rs Outdated
Keep lightweight contributions and session metadata reversible so deleting the last source removes its live session and conversation count.

Signed-off-by: jimyag <git@jimyag.com>

@mike1858 mike1858 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thank you; outstanding issue closed!

@mike1858
mike1858 enabled auto-merge (squash) July 26, 2026 16:03
@mike1858
mike1858 merged commit 9de0187 into Piebald-AI:main Jul 26, 2026
6 checks passed
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.

Show new addition in the live monitor session

2 participants