Skip to content

Conversation

@Pratham-Mishra04
Copy link
Collaborator

Summary

Fixed missing filter checks in the UI for live log updates, ensuring that logs are properly filtered by objects, selected key IDs, and virtual key IDs.

Changes

  • Added missing filter conditions in the logs page to check for:
    • Object filters
    • Selected key ID filters
    • Virtual key ID filters
  • Updated the changelog to document this bug fix

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (Next.js)
  • Docs

How to test

  1. Apply filters for objects, selected key IDs, or virtual key IDs in the logs UI
  2. Verify that live log updates respect these filters
  3. Check that only logs matching the selected filters appear in the UI
# UI
cd ui
pnpm i
pnpm test
pnpm build

Breaking changes

  • Yes
  • No

Related issues

Fixes an issue where logs filtering was incomplete for live updates.

Security considerations

No security implications.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 3, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Fixed missing filter checks in the logs section for live updates, now providing enhanced filtering capabilities with additional criteria for better log management.

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

Walkthrough

A changelog entry documents a UI logs filter fix, and the logs page now applies additional client-side filtering conditions on objects, selected_key_ids, and virtual_key_ids arrays to refine live update visibility.

Changes

Cohort / File(s) Summary
Changelog Documentation
transports/changelog.md
Single entry documenting fix: "added missing logs filter checks in ui for live updates"
Log Filtering Logic
ui/app/workspace/logs/page.tsx
Enhanced log matching with new client-side filter conditions: objects, selected_key_ids, and virtual_key_ids. Logs are retained only when filter arrays are non-empty and the log's corresponding values are included in those arrays. Preserves existing provider, model, status, and time-based filters.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A rabbit hops through logs so bright,
New filters bloom—what a delight!
Objects, keys, and virtuals too,
Now only worthy logs shine through! 🐰✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding missing filter checks for live log updates in the UI.
Description check ✅ Passed The description covers all major required sections including summary, changes, type, affected areas, testing steps, and checklist items; only minor optional details like screenshots are absent.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 01-03-fix_added_missing_filter_checks_on_logs_ui

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between afb7a08 and 8c08e0f.

📒 Files selected for processing (2)
  • transports/changelog.md
  • ui/app/workspace/logs/page.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

always check the stack if there is one for the current PR. do not give localized reviews for the PR, always see all changes in the light of the whole stack of PRs (if there is a stack, if there is no stack you can continue to make localized suggestions/reviews)

Files:

  • transports/changelog.md
  • ui/app/workspace/logs/page.tsx
🔇 Additional comments (2)
transports/changelog.md (1)

1-1: LGTM! Changelog entry accurately documents the fix.

The changelog entry appropriately describes the bug fix for missing filter checks in the UI for live log updates.

ui/app/workspace/logs/page.tsx (1)

450-458: LGTM! Filter checks correctly added for live updates.

The three new filter checks follow the established pattern and correctly address the bug where client-side filtering wasn't applied to live WebSocket updates. The implementation is consistent with existing filters for providers, models, and status.

Note on virtual_key_id handling: Line 456 includes an additional null check (log.virtual_key_id &&) that differs from the objects and selected_key_ids filters. This means logs without a virtual_key_id will be shown even when filtering by specific virtual key IDs. Please verify this matches the intended product behavior—specifically, whether logs lacking a virtual key ID should appear when users filter by virtual key IDs.

Optional: Consider adding a clarifying comment

If the null-handling behavior for virtual_key_id is intentional, consider adding a brief inline comment to document this design decision:

+	// Note: Logs without virtual_key_id are shown even when filtering by virtual key IDs
 	if (filters.virtual_key_ids?.length && log.virtual_key_id && !filters.virtual_key_ids.includes(log.virtual_key_id)) {
 		return false;
 	}

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

🧪 Test Suite Available

This PR can be tested by a repository admin.

Run tests for PR #1225

@akshaydeo akshaydeo merged commit 187190b into main Jan 3, 2026
11 checks passed
@akshaydeo akshaydeo deleted the 01-03-fix_added_missing_filter_checks_on_logs_ui branch January 3, 2026 08:42
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.

[Bug]: When live updates are enabled, new logs are not filtered according to the selected filters.

3 participants