Skip to content

feat: add grouped view to logs table with expandable fallback chains - #5522

Merged
akshaydeo merged 1 commit into
devfrom
07-24-feat_show_logs_chain_on_table
Aug 11, 2026
Merged

akshaydeo merged 1 commit into
devfrom
07-24-feat_show_logs_chain_on_table

Conversation

@impoiler

@impoiler impoiler commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

Adds a "Group" toggle to the logs table that collapses fallback chains under their root request. When enabled, the table fetches only root-level log entries (roots_only=true) and lazily loads each chain's children via the sessions endpoint when a row is expanded. This makes it easier to understand multi-step fallback sequences without being overwhelmed by individual attempt rows.

Changes

  • Added a grouped URL state parameter (parseAsBoolean) that is automatically disabled when a parent_request_id session filter is active, since that view is already scoped to a single chain.
  • Introduced a rootsOnly parameter to the getLogs API query, which appends roots_only=true to the request when grouped view is active.
  • Added child_count, children_cost, and children_tokens fields to LogEntry for aggregate data returned by the roots_only endpoint.
  • Introduced a DisplayLogEntry type that extends LogEntry with a __chainChild flag, used to mark lazily-loaded child rows injected below their expanded parent in the table.
  • Added an expand column to the logs table in grouped mode. Root rows with children show a chevron + child count button; child rows show a corner connector icon to indicate hierarchy.
  • Chain expansion state (expandedChainIds, chainChildren, loadingChainIds) is managed locally on the page and reset whenever filters, pagination, or the grouped toggle changes.
  • Added a tableMeta prop to LogsDataTable so the expand column can access toggle callbacks without threading props through column factories.
  • Child rows are visually distinguished with a left border and a muted background.
  • Added a "Group" button to LogsHeaderView with a tooltip explaining the behavior and a performance caveat for large tables.

Type of change

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

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

  1. Navigate to the Logs page.
  2. Click the Group button in the header toolbar.
  3. Verify the table switches to showing only root requests, with a chevron and child count on rows that have fallback children.
  4. Click a chevron to expand a chain — child rows should appear indented below the root with a left border.
  5. Click the chevron again to collapse.
  6. Apply a session/parent filter and confirm the Group toggle is automatically disabled.
  7. Change the page or filters and confirm expanded state resets.
cd ui
pnpm i
pnpm build

Screenshots/Recordings

Add before/after screenshots of the grouped vs. flat log table view.

Breaking changes

  • Yes
  • No

Related issues

Security considerations

No new auth surfaces. The sessions endpoint used for lazy-loading children is already gated by the same RBAC policies as the main logs endpoint.

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

impoiler commented Jul 24, 2026

Copy link
Copy Markdown
Member Author

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

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 59 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9549d67b-51a8-42d1-bb76-7b2dc4ab68b2

📥 Commits

Reviewing files that changed from the base of the PR and between d882596 and cf49fc5.

📒 Files selected for processing (6)
  • ui/app/workspace/logs/page.tsx
  • ui/app/workspace/logs/views/columns.tsx
  • ui/app/workspace/logs/views/logsHeaderView.tsx
  • ui/app/workspace/logs/views/logsTable.tsx
  • ui/lib/store/apis/logsApi.ts
  • ui/lib/types/logs.ts
📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added a grouped view for workspace logs that organizes fallback chains under root entries.
    • Expanded groups now load and display child logs on demand.
    • Added visual indicators, chain details, and loading states for expanded entries.
    • Grouped-view preferences persist in the URL and reset when filters or pagination change.
    • Added a grouped-view toggle with explanatory guidance in the logs header.
    • Root-level pagination is preserved while viewing grouped logs.

Walkthrough

Grouped log viewing now persists in the URL. Grouped mode fetches root logs, loads filtered child logs on expansion, and renders child rows with hierarchy controls and styling.

Changes

Grouped log-chain viewing

Layer / File(s) Summary
Logs query and display contracts
ui/lib/types/logs.ts, ui/lib/store/apis/logsApi.ts
LogEntry includes child aggregates. DisplayLogEntry marks injected child rows. getLogs supports root-only requests.
Grouped logs state and data flow
ui/app/workspace/logs/page.tsx
The page persists grouped mode, fetches root logs, loads children lazily, caches results, resets expansion state when view inputs change, and inserts children into display rows.
Grouped table controls and row rendering
ui/app/workspace/logs/views/columns.tsx, ui/app/workspace/logs/views/logsHeaderView.tsx, ui/app/workspace/logs/views/logsTable.tsx
The header adds the grouped-view toggle. The table adds expansion controls, child connectors, table metadata, fixed-column handling, and child-row styling.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant LogsHeaderView
  participant LogsPage
  participant getLogs
  participant LogsAPI
  participant LogsDataTable
  LogsHeaderView->>LogsPage: toggle grouped view
  LogsPage->>getLogs: request roots_only=true
  getLogs->>LogsAPI: fetch root logs
  LogsAPI-->>getLogs: return root logs with child aggregates
  getLogs-->>LogsPage: return root logs
  LogsPage->>LogsDataTable: render root display rows
  LogsDataTable->>LogsPage: toggle fallback-chain expansion
  LogsPage->>getLogs: request filtered child logs
  getLogs->>LogsAPI: fetch filtered children
  LogsAPI-->>getLogs: return child logs
  getLogs-->>LogsPage: return child logs
  LogsPage->>LogsDataTable: render children beneath the root
Loading

Possibly related PRs

  • maximhq/bifrost#6011: Adds the backend roots_only filtering and child aggregate fields consumed by this grouped logs UI.

Suggested reviewers: akshaydeo, pratham-mishra04

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: a grouped logs view with expandable fallback chains.
Description check ✅ Passed The description covers the feature, implementation, testing steps, affected areas, security, and breaking changes; screenshots and some checklist items remain incomplete.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 07-24-feat_show_logs_chain_on_table

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

@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_on_table branch 5 times, most recently from a4e507c to a098a2a Compare July 24, 2026 14:40
@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_on_table branch 10 times, most recently from 71b963f to 02513b4 Compare July 31, 2026 07:25
@CLAassistant

CLAassistant commented Jul 31, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_on_table branch from 02513b4 to 91a21d5 Compare July 31, 2026 08:21
@impoiler
impoiler changed the base branch from dev to graphite-base/5522 July 31, 2026 11:17
@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_on_table branch from 91a21d5 to 17c4767 Compare July 31, 2026 11:17
@impoiler
impoiler changed the base branch from graphite-base/5522 to 07-24-feat_show_logs_chain_backend July 31, 2026 11:18
@impoiler impoiler self-assigned this Jul 31, 2026
@impoiler impoiler changed the title feat: show logs chain on table feat: add grouped view to logs table with expandable fallback chains Jul 31, 2026
@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_on_table branch from 17c4767 to f77659c Compare July 31, 2026 12:51
@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_backend branch from 582bcb3 to a4fd6d7 Compare July 31, 2026 12:51
@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_on_table branch from f77659c to a698051 Compare August 3, 2026 06:12
@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_backend branch from a4fd6d7 to 27ca8b7 Compare August 3, 2026 06:12
@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_backend branch from 2a59bf6 to c1bd494 Compare August 10, 2026 03:37

akshaydeo commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • Aug 10, 7:17 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 11, 6:07 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 11, 6:07 AM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo changed the base branch from 07-24-feat_show_logs_chain_backend to graphite-base/5522 August 10, 2026 07:17
@akshaydeo
akshaydeo changed the base branch from graphite-base/5522 to dev August 10, 2026 07:17
@akshaydeo
akshaydeo dismissed coderabbitai[bot]’s stale review August 10, 2026 07:17

The base branch was changed.

@impoiler
impoiler changed the base branch from dev to graphite-base/5522 August 10, 2026 07:33
@impoiler
impoiler changed the base branch from graphite-base/5522 to dev August 10, 2026 07:33
@impoiler
impoiler changed the base branch from dev to graphite-base/5522 August 10, 2026 07:34
@impoiler
impoiler changed the base branch from graphite-base/5522 to dev August 10, 2026 07:34
@impoiler
impoiler changed the base branch from dev to graphite-base/5522 August 10, 2026 07:35
@impoiler
impoiler changed the base branch from graphite-base/5522 to dev August 10, 2026 07:35
@impoiler
impoiler changed the base branch from dev to graphite-base/5522 August 10, 2026 07:35
@impoiler
impoiler force-pushed the graphite-base/5522 branch from c90f9c3 to c1bd494 Compare August 10, 2026 07:35
@impoiler
impoiler changed the base branch from graphite-base/5522 to 07-24-feat_show_logs_chain_backend August 10, 2026 07:35
@impoiler
impoiler changed the base branch from 07-24-feat_show_logs_chain_backend to graphite-base/5522 August 10, 2026 07:36
@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_on_table branch from 717a66d to ad74fed Compare August 10, 2026 07:36
@impoiler
impoiler force-pushed the graphite-base/5522 branch from c1bd494 to c90f9c3 Compare August 10, 2026 07:36
@impoiler
impoiler changed the base branch from graphite-base/5522 to dev August 10, 2026 07:37
@impoiler
impoiler force-pushed the 07-24-feat_show_logs_chain_on_table branch from ad74fed to d30dfd4 Compare August 10, 2026 17:51
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 10, 2026
@akshaydeo
akshaydeo dismissed coderabbitai[bot]’s stale review August 10, 2026 22:20

The merge-base changed after approval.

@akshaydeo
akshaydeo requested a review from a team as a code owner August 10, 2026 22:20
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.

3 participants