Skip to content

refactor(admin): dashboard lists share one table, badge and message fields - #599

Merged
PiquelChips merged 3 commits into
mainfrom
refactor/544-admin-ui-tables
Nov 21, 2026
Merged

PiquelChips merged 3 commits into
mainfrom
refactor/544-admin-ui-tables

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Part of #544. Stacked on #564 (fix/550-notice-icons), which also edits crates/ui/src/admin: retarget to main once it merges.

The dashboard's components wrote three things out again and again:

  • Tables. Each list repeated the same empty line, table-wrap, thead and tbody around its rows: keys, deliveries, clients, accounts, an account's sessions, invitations, announcements and audit checkpoints. Now data_table takes the headings, the empty line and whether there are rows, and each list writes only its rows.
  • Badges. Seven places built a (tone, label) tuple and read it as .0 and .1. Now they return a named Badge, and the badge component renders it. A client's listed status keeps its own match, since a typed ClientStatus there is still an open decision.
  • Message fields. The message page and the announcement form copied the same subject and text inputs. Now both use message_fields, which focuses the subject only on the message page, as before.

The alert card's own badge function becomes alert_badge, because the component now has that name. data_table's child makes the audit page's view slightly larger, which pushed its render future over Clippy's large_futures limit, so web/admin/audit.rs boxes that render, as the dashboard does for its other large pages.

  • Tests merged or removed: none.
  • Files edited outside the Admin area: none.
  • Proof that the markup is unchanged: a scratch test, not committed, rendered 69 dashboard pages against the scratch database before and after. Together with refactor(admin): every change that asks only why shares one page #593's change, this covered every list touched here, filled and empty, the account page with its sessions, the message page and the announcement form. After normalizing IDs, timestamps and the order of rows created in the same instant, the HTML is identical. A second scratch render in sourceorigin-ui covered the alert cards in every state (needing attention, investigating, monitoring, cleared), the previous alerts and the update fields' select. The output is byte-identical.

Checks: just fmt; cargo clippy -p sourceorigin-ui -p auth-service --all-targets with and without --all-features (-D warnings); cargo doc -D warnings -p sourceorigin-ui; cargo test --doc -p sourceorigin-ui; just test -p sourceorigin-ui --all-features; just db test -E 'test(/^web::admin::/)'; just rust unused; just docs screenshots: it rewrote only admin/overview.png, the known nondeterministic one, and account/data.png, which is already stale on main (its top bar lacks the search box and bell the settings pages now have); neither page is touched here.

Note

Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 (via T3 Code)

@PiquelChips PiquelChips added admin The admin dashboard at admin.sourceorigin.dev refactor No behviour changes labels Nov 20, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in sourceorigin.dev Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

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

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a585d386-117b-41e4-b648-17bdf5a610ae
Commits

Reviewing files that changed from the base of the PR and between 9b6d375 and 26303ac.

Files selected for processing: 10

  • apps/auth-service/src/web/admin/audit.rs
  • crates/ui/src/admin/alerts.rs
  • crates/ui/src/admin/announcements.rs
  • crates/ui/src/admin/audit.rs
  • crates/ui/src/admin/clients.rs
  • crates/ui/src/admin/deliveries.rs
  • crates/ui/src/admin/keys.rs
  • crates/ui/src/admin/lists.rs
  • crates/ui/src/admin/mod.rs
  • crates/ui/src/admin/users.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@PiquelChips
PiquelChips marked this pull request as ready for review November 20, 2026 10:26
@PiquelChips
PiquelChips marked this pull request as draft November 21, 2026 14:00
@PiquelChips
PiquelChips marked this pull request as ready for review November 21, 2026 14:24
Base automatically changed from fix/550-notice-icons to main November 21, 2026 15:30
…ields

Eight lists wrote out the same empty line, table-wrap, thead and tbody
around their rows; seven places built a badge as a `(tone, label)` tuple;
the message page and the announcement form copied the same subject and
text inputs. `data_table`, `Badge` with its `badge` component, and
`message_fields` now hold each once. The markup is unchanged.
…e lint

`data_table`'s child makes the audit page's view slightly larger, so its render future crossed Clippy's `large_futures` limit. It is boxed like the dashboard's other large pages.
@PiquelChips
PiquelChips force-pushed the refactor/544-admin-ui-tables branch from e0fef16 to 26303ac Compare November 21, 2026 15:54
@PiquelChips
PiquelChips added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 88da4e0 Nov 21, 2026
14 checks passed
@PiquelChips
PiquelChips deleted the refactor/544-admin-ui-tables branch November 21, 2026 18:09
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in sourceorigin.dev Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

admin The admin dashboard at admin.sourceorigin.dev refactor No behviour changes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant