Skip to content

Fix/UI theme bugs 40 41#43

Merged
BenediktSchackenberg merged 8 commits intomainfrom
fix/ui-theme-bugs-40-41
Apr 17, 2026
Merged

Fix/UI theme bugs 40 41#43
BenediktSchackenberg merged 8 commits intomainfrom
fix/ui-theme-bugs-40-41

Conversation

@BenediktSchackenberg
Copy link
Copy Markdown
Owner

@BenediktSchackenberg BenediktSchackenberg commented Apr 17, 2026

Description

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Other: ___

Checklist

  • npm run build passes (frontend)
  • dotnet build passes (backend)
  • Tested in browser (dark theme)
  • No new TypeScript errors
  • SQL queries use parameterized @param (no string concat)

Screenshots

…base/application

Groups results by server when viewing all instances. Each server
section is collapsible. Keeps existing database/application filter
dropdowns for filtering within a selected server.

Closes #32
…etter details

- Drive selector dropdown to filter by specific drive letter/name
- Instance filter dropdown in estate view (no instance param)
- Active filter badges with clear button
- Used/Free/Total three-column detail grid per drive card
- Critical (>85%) and Warning (>70%) counts in header
- Percentage shown on each drive card
- Drive label shown when available

Closes #31 (partial — latency requires backend changes)
…base/application

Groups results by server when viewing all instances. Each server
section is collapsible. Keeps existing database/application filter
dropdowns for filtering within a selected server.

Closes #32
Show an empty placeholder instead of loading all instances at once.
The page loads instantly with a 'Select an instance' prompt, and only
fetches data once a server is chosen.

Addresses feedback from @edwillis777 (#28):
- Memory: was taking 34 seconds to load
- Blocking: was taking 1m 30s to load

Closes #29 (partial — Performance Summary needs separate attention)
feat(drives): add drive selector, instance filter, and detailed stats
…ver-drilldown

feat(slow-queries): add server grouping with drill-down
…d-heavy-pages

perf: require instance selection on Memory and Blocking pages
TabNav was using bg-white/5 (transparent white) which renders as a
dark semi-transparent overlay in light mode, making tabs hard to see.

Replaced with theme-aware CSS classes:
- Dark mode: keeps the original subtle dark background
- Light mode: uses a visible slate background with readable text colors

Closes #41
Copilot AI review requested due to automatic review settings April 17, 2026 17:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates several frontend pages to improve dark/light theme consistency and refine “performance” UX, including better filtering/grouping and clearer empty states.

Changes:

  • Slow Queries: adds per-server grouping in “All Instances” view and refactors row rendering/expansion logic.
  • Memory + Blocking: changes initial loading behavior and adds a “Select an instance” empty state.
  • Drives + TabNav: adds drive/instance filtering UI, fixes em-dash rendering, and introduces TabNav theme overrides via CSS classes.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
frontend/src/pages/SlowQueriesPage.tsx Adds server-grouped “All Instances” rendering and refactors expandable rows.
frontend/src/pages/MemoryPage.tsx Changes loading defaults and adds “select instance” empty state gating.
frontend/src/pages/DrivesPage.tsx Adds filtering UI, updates drive card layout, and fixes dash rendering.
frontend/src/pages/BlockingPage.tsx Changes loading defaults and adds “select instance” empty state gating.
frontend/src/index.css Adds TabNav dark/light-mode styling overrides.
frontend/src/components/TabNav.tsx Switches TabNav styling to use new CSS classes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}, []);

useEffect(() => {
if (!selectedInstance) { setLoading(false); return; }
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

Same issue as MemoryPage: if (!selectedInstance) { ... return; } makes the empty dropdown value (labeled “All Instances”) show a “Select an instance” empty state rather than loading data. Either remove/rename that option to indicate a required selection, or support the all-instances behavior when selectedInstance is undefined.

Suggested change
if (!selectedInstance) { setLoading(false); return; }

Copilot uses AI. Check for mistakes.
function formatBytes(bytes: number): string {
if (!bytes) return '—';
function formatBytes(bytes: number | null | undefined): string {
if (!bytes) return '';
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

formatBytes treats 0 as “no value” because it uses if (!bytes). This will render an em dash for legitimate 0-byte values (e.g., 0 free/used), which is misleading. Consider changing the check to bytes == null (or typeof bytes !== 'number') so 0 formats as 0.0 MB (or similar).

Suggested change
if (!bytes) return '—';
if (bytes == null) return '—';

Copilot uses AI. Check for mistakes.
Comment on lines +62 to +64
(!selectedInstance || d.InstanceDisplayName === selectedInstance)
);
}, [drives, selectedDrive, selectedInstance]);
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

selectedInstance is still applied in filtered even when id is present (instance detail route). Since the instance filter UI is hidden in that mode, a previously-selected instance filter can silently make the instance-drives view appear empty after navigation. Fix by resetting selectedInstance when id changes, or by ignoring selectedInstance in the filter predicate when id is truthy.

Suggested change
(!selectedInstance || d.InstanceDisplayName === selectedInstance)
);
}, [drives, selectedDrive, selectedInstance]);
(id || !selectedInstance || d.InstanceDisplayName === selectedInstance)
);
}, [drives, selectedDrive, selectedInstance, id]);

Copilot uses AI. Check for mistakes.
Comment on lines +136 to +142
<button onClick={() => setSelectedInstance('')} className="ml-1 hover:text-white">×</button>
</span>
)}
{selectedDrive && (
<span className="px-2 py-0.5 rounded-full bg-purple-400/10 text-purple-400">
{selectedDrive}
<button onClick={() => setSelectedDrive('')} className="ml-1 hover:text-white">×</button>
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

The filter “clear” button uses only the “×” glyph and has no accessible label. Add an aria-label (e.g., “Clear instance filter”) so screen readers announce its purpose.

Suggested change
<button onClick={() => setSelectedInstance('')} className="ml-1 hover:text-white">×</button>
</span>
)}
{selectedDrive && (
<span className="px-2 py-0.5 rounded-full bg-purple-400/10 text-purple-400">
{selectedDrive}
<button onClick={() => setSelectedDrive('')} className="ml-1 hover:text-white">×</button>
<button aria-label="Clear instance filter" onClick={() => setSelectedInstance('')} className="ml-1 hover:text-white">×</button>
</span>
)}
{selectedDrive && (
<span className="px-2 py-0.5 rounded-full bg-purple-400/10 text-purple-400">
{selectedDrive}
<button aria-label="Clear drive filter" onClick={() => setSelectedDrive('')} className="ml-1 hover:text-white">×</button>

Copilot uses AI. Check for mistakes.
Comment on lines +136 to +142
<button onClick={() => setSelectedInstance('')} className="ml-1 hover:text-white">×</button>
</span>
)}
{selectedDrive && (
<span className="px-2 py-0.5 rounded-full bg-purple-400/10 text-purple-400">
{selectedDrive}
<button onClick={() => setSelectedDrive('')} className="ml-1 hover:text-white">×</button>
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

This “×” clear button should be type="button" and should have an accessible label (e.g., aria-label="Clear drive filter"). Without an explicit type, buttons can default to submit if this component is ever placed inside a form, and the glyph-only label is not screen-reader friendly.

Suggested change
<button onClick={() => setSelectedInstance('')} className="ml-1 hover:text-white">×</button>
</span>
)}
{selectedDrive && (
<span className="px-2 py-0.5 rounded-full bg-purple-400/10 text-purple-400">
{selectedDrive}
<button onClick={() => setSelectedDrive('')} className="ml-1 hover:text-white">×</button>
<button
type="button"
aria-label="Clear instance filter"
onClick={() => setSelectedInstance('')}
className="ml-1 hover:text-white"
>
×
</button>
</span>
)}
{selectedDrive && (
<span className="px-2 py-0.5 rounded-full bg-purple-400/10 text-purple-400">
{selectedDrive}
<button
type="button"
aria-label="Clear drive filter"
onClick={() => setSelectedDrive('')}
className="ml-1 hover:text-white"
>
×
</button>

Copilot uses AI. Check for mistakes.
Comment on lines 24 to 26
useEffect(() => {
if (!selectedInstance) { setLoading(false); return; }
setLoading(true);
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

The new guard if (!selectedInstance) { ... return; } prevents loading any data when the dropdown is set to its empty value (currently labeled “All Instances”). That makes the “All Instances” option behave like an error/empty state and breaks the previous ability to call the endpoint without an instanceId. Either remove/rename the “All Instances” option and make the UI clearly require a selection, or allow the undefined instance case and render a meaningful all-instances view.

Copilot uses AI. Check for mistakes.
@BenediktSchackenberg BenediktSchackenberg merged commit ce703c3 into main Apr 17, 2026
10 checks passed
@BenediktSchackenberg BenediktSchackenberg deleted the fix/ui-theme-bugs-40-41 branch April 17, 2026 18:20
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.

2 participants