Skip to content

Style app shell and route partials in admin dashboard#10

Open
fallofpheonix wants to merge 1 commit into
mainfrom
fix/dashboard-shell-css
Open

Style app shell and route partials in admin dashboard#10
fallofpheonix wants to merge 1 commit into
mainfrom
fix/dashboard-shell-css

Conversation

@fallofpheonix

@fallofpheonix fallofpheonix commented Jul 5, 2026

Copy link
Copy Markdown
Owner

base.css targeted the original map-centric markup; the index.html shell (.app/.topbar/.layout/.content) and the route partial classes (.summary-cards, .risk-card, .placeholder-map, .quick-actions, …) had no styles, so the dashboard rendered as unstyled text on a dark background.

This adds a commented shell-layout patch section to base.css reusing the existing design tokens (glass cards, accent gradients, risk colors). Verified locally: dashboard route now renders as a dark command-center layout with styled sidebar, topbar, metric cards, heatmap placeholder, and action buttons.

The map/routes/analytics partials still need equivalent treatment.

🤖 Generated with Claude Code

Summary by Sourcery

Style the admin dashboard app shell and route partials to match the existing dark command-center design.

New Features:

  • Add layout and typography styles for the admin app shell, including topbar, sidebar, and content regions.
  • Introduce styled dashboard route components such as overview header, summary cards, risk index, placeholder map, feed items, and quick actions.

Summary by CodeRabbit

  • New Features
    • Added styling for the app shell, including a top header, sidebar, content area, and dashboard card layouts.
    • Introduced visual states for navigation links, status indicators, metric highlights, and quick action buttons.
    • Added responsive layout rules for dashboard sections like overview, summary cards, feed items, and map placeholders.

base.css targeted the original map-centric markup; the index.html shell
(.app/.topbar/.layout/.content) and route partial classes had no styles
and rendered as unstyled text. Adds a shell layout patch reusing the
existing design tokens.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a new shell-layout section to the admin dashboard base.css to style the index app shell and dashboard route partials using existing design tokens, turning the previously unstyled dashboard into a structured, card-based command-center layout.

Flow diagram for new admin dashboard shell layout structure

flowchart TD
    App[app]
    Topbar[topbar]
    Layout[layout]
    Sidebar[sidebar]
    Content[content]
    Grid[dashboard-grid]
    SummaryCards[summary-cards]
    Card[card / metric]
    PlaceholderMap[placeholder-map]
    QuickActions[quick-actions]

    App --> Topbar
    App --> Layout
    Layout --> Sidebar
    Layout --> Content
    Content --> Grid
    Grid --> SummaryCards
    Grid --> PlaceholderMap
    Grid --> QuickActions
    SummaryCards --> Card
Loading

File-Level Changes

Change Details Files
Introduce layout and shell styling for the admin dashboard app container, top bar, sidebar, and content area.
  • Add flex column .app container filling the viewport height
  • Style .topbar with flex alignment, gradient logo text, and status pill appearance
  • Define .layout split with fixed-width sidebar and scrollable content area, including sidebar link hover states
  • Add .loader styling for loading states
dashboard-admin/css/base.css
Style dashboard route partials as a card-based grid using existing design tokens for cards, typography, and risk metrics.
  • Define .content .dashboard-grid and .summary-cards as responsive CSS grids for dashboard cards
  • Add .content .card, headings, and .metric variants (default/high/medium) reusing card background, borders, and risk colors
  • Style .overview-header, .risk-index text, and supporting feed items for consistent typography and spacing
dashboard-admin/css/base.css
Add visual treatments for dashboard-specific components like the placeholder map and quick action buttons.
  • Style .placeholder-map with fixed height, dashed border, and layered radial/linear gradient background as a heatmap stand-in
  • Add .feed-item row styling with subtle separators and secondary text color
  • Define .quick-actions layout and button styles, including gradient backgrounds and hover brightness transition
dashboard-admin/css/base.css

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This change appends a new CSS section to base.css defining app shell layout, topbar, sidebar, and dashboard content styles (cards, metrics, feed items, quick actions) for index.html route partials, without altering any existing declarations.

Changes

Shell Layout CSS

Layer / File(s) Summary
App shell and dashboard content styling
dashboard-admin/css/base.css
Appends CSS for .app, .topbar, .layout (sidebar/content), dashboard card grid, metric color variants, placeholder map block, feed item rows, and quick-action button styling.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: styling the admin dashboard app shell and route partials.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dashboard-shell-css

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.

@sourcery-ai sourcery-ai 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.

Hey - I've found 2 issues, and left some high level feedback:

  • .layout .sidebar uses the gap property without a flex or grid display; if spacing between children is intended, consider adding display: flex or display: grid so gap takes effect.
  • The fixed height: 180px on .placeholder-map may feel cramped or overly tall on different viewports; consider making this responsive (e.g., using min-height with flex growth or relative units) to better adapt to varying screen sizes.
  • Interactive elements like .quick-actions button only have hover styles; adding visible :focus states will improve keyboard accessibility and make the dashboard easier to navigate without a mouse.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- `.layout .sidebar` uses the `gap` property without a flex or grid display; if spacing between children is intended, consider adding `display: flex` or `display: grid` so `gap` takes effect.
- The fixed `height: 180px` on `.placeholder-map` may feel cramped or overly tall on different viewports; consider making this responsive (e.g., using `min-height` with flex growth or relative units) to better adapt to varying screen sizes.
- Interactive elements like `.quick-actions button` only have hover styles; adding visible `:focus` states will improve keyboard accessibility and make the dashboard easier to navigate without a mouse.

## Individual Comments

### Comment 1
<location path="dashboard-admin/css/base.css" line_range="738-741" />
<code_context>
+    min-height: 0;
+}
+
+.layout .sidebar {
+    width: var(--sidebar-width);
+    flex-shrink: 0;
+    gap: 6px;
+}
+
</code_context>
<issue_to_address>
**issue (bug_risk):** The `gap` property on `.layout .sidebar` will have no effect unless the sidebar is a flex or grid container.

Confirm whether `.layout .sidebar` is defined as a flex or grid container elsewhere. If not, `gap` will be ignored. If the goal is vertical spacing between sidebar items, consider making the sidebar a flex/grid container or applying margins to the child elements instead.
</issue_to_address>

### Comment 2
<location path="dashboard-admin/css/base.css" line_range="867-875" />
<code_context>
+    gap: 12px;
+}
+
+.quick-actions button {
+    padding: 12px 22px;
+    border-radius: 12px;
+    border: 1px solid var(--glass-border);
+    background: linear-gradient(110deg, rgba(0, 210, 255, 0.18), rgba(157, 80, 187, 0.18));
+    color: var(--text-primary);
+    font-size: 0.9rem;
+    cursor: pointer;
+    transition: filter 0.2s;
+}
+
</code_context>
<issue_to_address>
**suggestion:** Buttons have a hover state but no focus-visible treatment, which can hurt keyboard accessibility.

Only `:hover` is styled, so keyboard users may rely on inconsistent or overridden default focus styles. Please add a clear `:focus-visible` treatment (e.g., outline or box-shadow) aligned with the design to make these actions accessible to keyboard navigation.

Suggested implementation:

```
.quick-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
}

.quick-actions button {
    padding: 12px 22px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(110deg, rgba(0, 210, 255, 0.18), rgba(157, 80, 187, 0.18));
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: filter 0.2s, box-shadow 0.2s;
}

/* Mouse hover state */
.quick-actions button:hover {
    filter: brightness(1.08);
}

/* Keyboard focus-visible state for accessibility */
.quick-actions button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.75);
}

.app {

```

1. If there is already a `.quick-actions button` rule or `.quick-actions button:hover` rule elsewhere in `base.css`, merge these declarations instead of duplicating them to avoid conflicting styles.
2. You may want to replace the hard-coded `rgba(0, 210, 255, 0.75)` with a design token (e.g., `var(--accent)` or a dedicated focus color variable) if such a variable exists in your design system to keep the focus ring consistent with the rest of the app.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +738 to +741
.layout .sidebar {
width: var(--sidebar-width);
flex-shrink: 0;
gap: 6px;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): The gap property on .layout .sidebar will have no effect unless the sidebar is a flex or grid container.

Confirm whether .layout .sidebar is defined as a flex or grid container elsewhere. If not, gap will be ignored. If the goal is vertical spacing between sidebar items, consider making the sidebar a flex/grid container or applying margins to the child elements instead.

Comment on lines +867 to +875
.quick-actions button {
padding: 12px 22px;
border-radius: 12px;
border: 1px solid var(--glass-border);
background: linear-gradient(110deg, rgba(0, 210, 255, 0.18), rgba(157, 80, 187, 0.18));
color: var(--text-primary);
font-size: 0.9rem;
cursor: pointer;
transition: filter 0.2s;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Buttons have a hover state but no focus-visible treatment, which can hurt keyboard accessibility.

Only :hover is styled, so keyboard users may rely on inconsistent or overridden default focus styles. Please add a clear :focus-visible treatment (e.g., outline or box-shadow) aligned with the design to make these actions accessible to keyboard navigation.

Suggested implementation:

.quick-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
}

.quick-actions button {
    padding: 12px 22px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(110deg, rgba(0, 210, 255, 0.18), rgba(157, 80, 187, 0.18));
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: filter 0.2s, box-shadow 0.2s;
}

/* Mouse hover state */
.quick-actions button:hover {
    filter: brightness(1.08);
}

/* Keyboard focus-visible state for accessibility */
.quick-actions button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.75);
}

.app {

  1. If there is already a .quick-actions button rule or .quick-actions button:hover rule elsewhere in base.css, merge these declarations instead of duplicating them to avoid conflicting styles.
  2. You may want to replace the hard-coded rgba(0, 210, 255, 0.75) with a design token (e.g., var(--accent) or a dedicated focus color variable) if such a variable exists in your design system to keep the focus ring consistent with the rest of the app.

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

🧹 Nitpick comments (1)
dashboard-admin/css/base.css (1)

744-756: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add keyboard focus states for sidebar links and quick-action buttons.

Only :hover is styled; no explicit :focus/:focus-visible rule is provided for .layout .sidebar a or .quick-actions button, which can hurt keyboard-only navigation if a global outline reset exists elsewhere in the stylesheet.

♿ Suggested addition
 .layout .sidebar a:hover {
     background: var(--card-bg);
     color: var(--text-primary);
 }
+
+.layout .sidebar a:focus-visible {
+    background: var(--card-bg);
+    color: var(--text-primary);
+    outline: 2px solid var(--accent-blue);
+}
 .quick-actions button:hover {
     filter: brightness(1.25);
 }
+
+.quick-actions button:focus-visible {
+    outline: 2px solid var(--accent-blue);
+}

Also applies to: 867-876

🤖 Prompt for 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.

In `@dashboard-admin/css/base.css` around lines 744 - 756, Add explicit keyboard
focus styling for the sidebar and quick actions, since only hover states are
defined. Update the existing `.layout .sidebar a` and `.quick-actions button`
rules to include `:focus`/`:focus-visible` alongside `:hover`, using the same
visual treatment or a clearly visible focus ring so keyboard users can see the
active element.
🤖 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.

Nitpick comments:
In `@dashboard-admin/css/base.css`:
- Around line 744-756: Add explicit keyboard focus styling for the sidebar and
quick actions, since only hover states are defined. Update the existing `.layout
.sidebar a` and `.quick-actions button` rules to include
`:focus`/`:focus-visible` alongside `:hover`, using the same visual treatment or
a clearly visible focus ring so keyboard users can see the active element.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 06987cb5-0de3-46cd-b715-f003f5f14afd

📥 Commits

Reviewing files that changed from the base of the PR and between c38430f and 8b3cb72.

📒 Files selected for processing (1)
  • dashboard-admin/css/base.css

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b3cb7256d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +825 to +829
.content .metric {
font-family: var(--font-heading);
font-size: 2.2rem;
font-weight: 700;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scope metric styling to dashboard metrics

When the Diagnostics route is loaded into <main class="content">, system-health.html also contains several <div class="metric"> rows for the service details, so this broad selector turns those label/value rows into 2.2rem bold headline text. This selector appears intended for the dashboard summary numbers; scoping it to .risk-card .metric or .summary-cards .metric would avoid breaking the health page layout.

Useful? React with 👍 / 👎.

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.

1 participant