Skip to content

fix: resolve #511 - denser, collapsible mobile Admin Logs UI#513

Merged
avresial merged 2 commits into
developfrom
511-improve-mobile-admin-logs-ui-density
Jun 29, 2026
Merged

fix: resolve #511 - denser, collapsible mobile Admin Logs UI#513
avresial merged 2 commits into
developfrom
511-improve-mobile-admin-logs-ui-density

Conversation

@avresial

@avresial avresial commented Jun 29, 2026

Copy link
Copy Markdown
Owner

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 dashboard AdminLogsCard already truncates and is unchanged.

Changes

  • Card list instead of a table. Each entry is a compact MudPaper card with a fixed header that is always visible — inline log-level chip + local timestamp, category, and the message preview (which wraps via overflow-wrap:anywhere). This replaces the MudTable whose cells pushed metadata off-screen on narrow viewports.
  • Stack traces collapsed by default. When an entry has an exception, a Show details / Hide details toggle drives a MudCollapse (collapsed by default). The expanded block is monospace, bounded to max-height:240px with 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 a HashSet<int> keyed on LogEntryDto.Id, cleared on filter/page change.
  • Responsive level filter. The MudToggleGroup items now carry icons (list / warning / error) plus a text label hidden below the sm breakpoint, so mobile shows icon-only buttons and desktop keeps the text labels. Each item has an aria-label/title (All logs, Warnings, Errors).
  • Denser header on mobile via a wrapping header row.

Testing

  • dotnet build ./code/FinanceManager.slnx — clean (warnings-as-errors).
  • dotnet format — no changes.
  • dotnet test unit suite — 494 passed.
  • Rendered the page on the running app (admin account, in-memory DB) and screenshotted mobile (430×920) and desktop (1280×1000) in both collapsed and expanded states: cards stay within the viewport, metadata stays visible, the stack trace appears only after expanding and wraps within its bounded block, and the filter is icon-only on mobile / text on desktop.

Changelog


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Admin Logs now displays entries in a cleaner card-based layout with clearer level, time, category, and message details.
    • Log exceptions can be expanded or collapsed directly from each entry.
    • The level filter now wraps more gracefully and shows icons alongside labels.
  • Bug Fixes

    • Expanded log details are reset when moving between pages, preventing old expansion states from carrying over.
    • Improved empty and loading states for better feedback when no entries match the current filter or data is still loading.

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
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 32 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

Run ID: fe82117d-76bf-4000-b4b8-687c2872533b

📥 Commits

Reviewing files that changed from the base of the PR and between 2d7d1e6 and f0cd131.

📒 Files selected for processing (1)
  • code/FinanceManager.Components/Components/Features/Admin/AdminLogsPage.razor

Walkthrough

AdminLogsPage is refactored from a MudTable-based log list into a card/paper-based layout. A HashSet<int> _expanded field tracks which entries are expanded, with IsExpanded/ToggleExpand helpers and automatic clear on page navigation. The Razor markup adds loading, empty, and per-entry card states with MudCollapse for exception details, and updates the level filter toggles with flex-wrap and icon+label content.

Changes

Admin Logs card layout and expand/collapse

Layer / File(s) Summary
Expand/collapse state management
code/.../AdminLogsPage.razor.cs
Adds _expanded HashSet<int>, IsExpanded(int id), ToggleExpand(int id), and clears _expanded in PrevPage and NextPage.
Card-based log list and filter toggle markup
code/.../AdminLogsPage.razor
Replaces MudTable with conditional loading indicator, empty-state message, and per-entry outlined paper cards (chip, timestamp, category, message, MudCollapse exception block). Updates level filter toggle group with flex-wrap and icon+label spans.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The page is reworked to cards with collapsible details, but the reviewed changes still show icon+label filters and don't evidence the required mobile-only icon controls or bounded long-line handling. Switch mobile filters to icon-only buttons with accessible labels, and add bounded wrapping/scroll styling for expanded stack traces so metadata stays visible.
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 (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: a denser, collapsible mobile Admin Logs UI for issue #511.
Out of Scope Changes check ✅ Passed The changes stay focused on the Admin Logs page UI and expansion state, with no unrelated functionality introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 511-improve-mobile-admin-logs-ui-density

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

📥 Commits

Reviewing files that changed from the base of the PR and between d6d7648 and 2d7d1e6.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !**/*.md
📒 Files selected for processing (2)
  • code/FinanceManager.Components/Components/Features/Admin/AdminLogsPage.razor
  • code/FinanceManager.Components/Components/Features/Admin/AdminLogsPage.razor.cs

Comment thread code/FinanceManager.Components/Components/Features/Admin/AdminLogsPage.razor Outdated
- 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
@avresial avresial marked this pull request as ready for review June 29, 2026 07:15
@avresial avresial merged commit 87fcf09 into develop Jun 29, 2026
11 checks passed
@avresial avresial deleted the 511-improve-mobile-admin-logs-ui-density branch June 29, 2026 07:16
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.

Improve mobile Admin Logs UI density and keep log metadata visible

2 participants