fix: resolve #511 - denser, collapsible mobile Admin Logs UI#513
Conversation
Replace the Admin Logs MudTable with compact per-entry cards whose metadata (level chip, timestamp, category) and message stay visible at all times. Stack traces are collapsed by default behind a Show/Hide details toggle and render in a bounded, scrollable monospace block that wraps long lines so cards never overflow the viewport. The level filter uses icon-only buttons with accessible labels on mobile and keeps text labels on desktop. Claude-Session: https://claude.ai/code/session_01FXTcypoCgycSM2KrgMGoLm
|
Warning Review limit reached
Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Walkthrough
ChangesAdmin Logs card layout and expand/collapse
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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
`@code/FinanceManager.Components/Components/Features/Admin/AdminLogsPage.razor`:
- Around line 46-57: In AdminLogsPage.razor, the empty-state and paging footer
are being rendered even when LoadPage() fails and _loadError is set, which makes
an error look like a normal empty result. Update the conditional rendering
around the _page.Count == 0 block and the footer so they only show when
_loadError is null, and keep the alert/error state separate from the “No log
entries match…” and “Showing 0–0 of 0” UI.
- Around line 20-37: The accessible label is currently only on the inner span
inside the AdminLogsPage toggle items, so the interactive MudToggleItem itself
is not properly named on small screens. Move the title/aria-label attributes
onto each MudToggleItem in AdminLogsPage.razor for the all, warning, and error
options, and keep the inner content purely presentational so the control is
accessible regardless of breakpoint.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c0bf57f6-ceb1-41b7-b8ea-a2df95eef864
⛔ Files ignored due to path filters (1)
CHANGELOG.mdis excluded by!**/*.md
📒 Files selected for processing (2)
code/FinanceManager.Components/Components/Features/Admin/AdminLogsPage.razorcode/FinanceManager.Components/Components/Features/Admin/AdminLogsPage.razor.cs
- Move aria-label/title from the inner span onto each MudToggleItem so the filter control is named at every breakpoint (the text label is hidden on mobile, so the inner span alone left the button unnamed there). - Gate the empty-state card and the paging footer on _loadError being null so a load failure shows only the error alert instead of also reporting "No log entries match..." and "Showing 0-0 of 0". Claude-Session: https://claude.ai/code/session_01FXTcypoCgycSM2KrgMGoLm
Closes #511
Summary
Reworks the Admin → Logs page (
AdminLogsPage) so log entries are dense and readable on mobile, with stack traces hidden behind an expand affordance. Only this page renders full stack traces; the dashboardAdminLogsCardalready truncates and is unchanged.Changes
MudPapercard with a fixed header that is always visible — inline log-level chip + local timestamp, category, and the message preview (which wraps viaoverflow-wrap:anywhere). This replaces theMudTablewhose cells pushed metadata off-screen on narrow viewports.MudCollapse(collapsed by default). The expanded block is monospace, bounded tomax-height:240pxwith internal scroll, and guards overflow (white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word) so long namespaces/paths never push the card past the viewport. Per-entry expand state is tracked in the code-behind via aHashSet<int>keyed onLogEntryDto.Id, cleared on filter/page change.MudToggleGroupitems now carry icons (list / warning / error) plus a text label hidden below thesmbreakpoint, so mobile shows icon-only buttons and desktop keeps the text labels. Each item has anaria-label/title(All logs,Warnings,Errors).Testing
dotnet build ./code/FinanceManager.slnx— clean (warnings-as-errors).dotnet format— no changes.dotnet testunit suite — 494 passed.Changelog
Changedentry under[Unreleased](Improve mobile Admin Logs UI density and keep log metadata visible #511).Generated by Claude Code
Summary by CodeRabbit
New Features
Bug Fixes