Skip to content

refactor(tools): flatten the page and stop the Bash section from vanishing - #86

Closed
Fl0p wants to merge 3 commits into
mainfrom
flo-570-tools-page-flatten
Closed

refactor(tools): flatten the page and stop the Bash section from vanishing#86
Fl0p wants to merge 3 commits into
mainfrom
flo-570-tools-page-flatten

Conversation

@Fl0p

@Fl0pFl0p commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Follow-up to the board's feedback on the tools page rework: the nesting was
redundant, and the Bash breakdown was invisible with no way to tell why.

Flatten

DataTable already draws its own bordered, shadowed surface, so wrapping it in
a Card title="All Tools" rendered a box inside a box — for a heading the page
title already gave. The table now sits directly on the page, matching the Users
list. The Bash block loses its card too and becomes a plain <section> with a
heading, so the page reads as one flat column.

Why the Bash breakdown was never visible

It rendered as null whenever it had no rows, so it vanished entirely — no
heading, no empty state, nothing to explain the absence. It now always renders
and states the reason.

The reason is not a bug. I captured a live Claude Code session against a local
OTLP receiver. Its Bash tool span is:

claude_code.tool {tool_name: "Bash", tool_use_id: "toolu_…",
gen_ai.tool.call.id: "toolu_…", duration_ms: 54,
span.type: "tool"}

Which tool ran, not what it ran. Across the full session — every span type, with
CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1 — no command and no tool_input
attribute appears anywhere; user_prompt comes through <REDACTED>. So this
breakdown cannot be populated by Claude Code telemetry at all.

That matters because the 0.3.0 changelog reads as if the DuckDB filter-pushdown
fix made this work. The pushdown bug was real and the fix is correct, but it
could not on its own put rows in this table. The docs and changelog now say so.
The endpoint is kept for OTLP producers that do send command — cotel's ingest
is generic.

Open product question for the board: since this can never populate for a
Claude Code user, the alternative is deleting the section and the endpoint
outright rather than showing a permanently-empty block. I kept it (reversible,
and it answers the question in-product) but the removal is a one-liner if you'd
rather not carry dead surface.

Verified

  • npm run build green; go build ./... and go test ./internal/api/ green
    (docker golang:1.23-bookworm)
  • Loaded in Chromium against a local instance seeded with 505 Claude Code-shaped
    spans (no command attribute — reproducing the board's view):
    • no recharts on the page (chart stays gone)
    • "All Tools" no longer in the page text; "Bash commands" section present
    • sorting hits the API: clicking Avg Duration issued
      /api/v1/tools?range=month&sort=avg_duration_ms&order=asc&page=1&limit=0
    • range switcher persists across reload (set Week → still Week after reload)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Tools are now displayed directly on the Tools page without an “All Tools” card wrapper.
    • The Bash command section now provides explanatory text and a clear empty state when no command data is available.
    • Existing loading, coverage, table, and pagination views remain available when data exists.
  • Documentation

    • Clarified Bash command telemetry availability and endpoint behavior for supported telemetry sources.
  • Style

    • Improved spacing and visual hierarchy for Tools page sections.

…shing
The tools table was wrapped in a Card titled "All Tools". DataTable already
draws its own bordered, shadowed surface, so that was a box inside a box for a
heading the page title already gave. The table now sits directly on the page,
matching the Users list.
The Bash breakdown rendered as null whenever it had no rows, so it disappeared
with no trace and no explanation. It is now a plain section that always renders
and states why it is empty.
It is empty for a reason no fix can change: Claude Code's tool spans carry
tool_name, tool_use_id and duration_ms only — which tool ran, not what it ran.
Captured from a live session (enhanced-telemetry beta, and with user-prompt
logging on) no span carries a command or tool_input attribute at any point.
The endpoint stays for OTLP producers that do send one; the docs and changelog
now say so instead of implying the breakdown works against Claude Code.
Co-Authored-By: Daedalus <daedalus@agents.flopbut.local>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitaiBot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in:40 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dd6f086d-a585-41e9-b552-e960dad16970

📥 Commits

Reviewing files that changed from the base of the PR and between 877bce4 and 9b5941f.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • frontend/src/pages/Tools.tsx
  • internal/dashboard/static/index.html
📝 Walkthrough

Walkthrough

The Tools page now uses a flat layout and always displays the Bash commands section. It shows an explanatory empty state when command data is unavailable. Documentation describes the Claude Code telemetry limitation, and dashboard asset references use updated hashed filenames.

Changes

Tools page updates

Layer / File(s)Summary
Tools page rendering
frontend/src/pages/Tools.tsx, frontend/src/pages/Tools.module.css, internal/dashboard/static/index.html
The page removes the “All Tools” card wrapper, adds section styles, and always renders the Bash commands section with its loading, table, pagination, and empty states. The dashboard loads updated asset filenames.
API and changelog documentation
docs/operations/api-reference.md, CHANGELOG.md
The documentation states that Claude Code telemetry does not provide command text, while command-aware OTLP producers remain supported. The changelog records the Tools page changes.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the two primary changes: flattening the Tools page and keeping the Bash section visible when no data exists.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch flo-570-tools-page-flatten

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.

@coderabbitaicoderabbitaiBot 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 `@internal/dashboard/static/index.html`:
- Around line 8-9: The dashboard entrypoint in index.html references hashed Vite
assets that are absent from internal/dashboard/static, causing 404s. Either add
the corresponding built JavaScript and CSS assets under the static assets
directory, or update the script and stylesheet references to filenames that
exist there, while preserving a working dashboard load.
🪄 Autofix

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6bb0d265-6de6-4de2-a9f5-ec5b0d40abb0

📥 Commits

Reviewing files that changed from the base of the PR and between b18cdad and 877bce4.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • docs/operations/api-reference.md
  • frontend/src/pages/Tools.module.css
  • frontend/src/pages/Tools.tsx
  • internal/dashboard/static/index.html

Comment threadinternal/dashboard/static/index.html Outdated
Daedalusand others added 2 commits August 10, 2026 00:02
…lemetry
The Bash section only branched on loading and row count, so a failed
/bash-commands request fell through to the empty state and told the user
Claude Code sends no command text — attributing an API failure to the
producer's telemetry. Destructure SWR's error and render ErrorState.
Co-Authored-By: Daedalus <daedalus@agents.flopbut.local>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Daedalus <daedalus@agents.flopbut.local>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Fl0p

Fl0p commented Aug 9, 2026

Copy link
Copy Markdown
ContributorAuthor

Squash-merged locally as 1dcbc09 on main (the merge button rewrites author/committer to the shared OAuth identity).

@Fl0pFl0p closed this Aug 9, 2026
@Fl0p
Fl0p deleted the flo-570-tools-page-flatten branch August 9, 2026 22:08
Sign up for freeto 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

@Fl0p