Skip to content

Fix/dashboard setup history#6

Merged
kytmanov merged 4 commits into
masterfrom
fix/dashboard-setup-history
Apr 22, 2026
Merged

Fix/dashboard setup history#6
kytmanov merged 4 commits into
masterfrom
fix/dashboard-setup-history

Conversation

@kytmanov
Copy link
Copy Markdown
Owner

No description provided.

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

This PR updates the web dashboard to a new “hero + timeline + overview chart” layout, and extends the /status payload to include file-type and health breakdowns to support richer UI state (including improved scheduler last-result reporting).

Changes:

  • Redesignes the dashboard template structure (new hero, timeline panel, overview chart + issue pills) and adds corresponding CSS/JS rendering logic.
  • Extends /status with file_types and overview_breakdown derived from new DB aggregation queries.
  • Updates/expands unit + Playwright E2E tests to assert the new dashboard elements and status payload shape.

Reviewed changes

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

Show a summary per file
File Description
tests/test_web_ui.py Updates dashboard assertions and adds coverage for new overview/timeline elements.
tests/test_server.py Adds test coverage for new /status fields (file_types, overview_breakdown).
tests/test_scheduler.py Updates scheduler tests to account for origin="scheduled" and adds last-result reporting coverage.
tests/test_playwright_e2e.py Extends E2E flow assertions for the new dashboard and adds a stale-status-response regression test.
semanticdog/web/templates/setup.html Adds stable DOM hooks for dynamically updating setup warnings/scan roots.
semanticdog/web/templates/dashboard.html Implements the new dashboard structure (hero, timeline, overview chart, issue pills).
semanticdog/web/static/app.js Implements new dashboard rendering logic and setup diagnostics refresh after saving config.
semanticdog/web/static/app.css Adds new dashboard styling for hero, timeline, overview chart, and pills.
semanticdog/services/scheduler.py Tags scheduled runs with origin="scheduled" and improves last_trigger_result reporting.
semanticdog/services/scan_manager.py Tracks active origin + last run summaries to support scheduler reporting and notifications.
semanticdog/server.py Adds /status breakdown fields and helper functions for computing them.
semanticdog/scanner.py Adjusts finish_scan(total=...) to exclude TOCTOU discards for “files examined” accuracy.
semanticdog/db.py Adds get_format_status_counts() query used by the new status breakdowns.

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

Comment thread semanticdog/services/scan_manager.py Outdated
Comment thread semanticdog/web/static/app.js
Comment thread semanticdog/web/static/app.js
Comment thread semanticdog/web/static/app.js Outdated
Comment thread semanticdog/web/static/app.js Outdated
Comment on lines +624 to +632
return `
<div class="diag-row">
<div class="diag-icon ${iconClass}">${icon}</div>
<div>
<div class="diag-name mono" style="font-size:0.8125rem;">${root.path}</div>
<div class="row" style="gap:0.5rem; margin-top:3px;">
<span class="badge ${badgeClass}">${badgeText}</span>
</div>
</div>
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

renderSetupDiagnostics() writes root.path into an HTML string assigned to scanRoots.innerHTML. Paths are user-controlled configuration input, so this is an XSS sink. Build the diagnostic rows with DOM APIs and set textContent for the path (or escape it) instead of interpolating into HTML.

Copilot uses AI. Check for mistakes.
Comment thread semanticdog/web/static/app.js Outdated
Comment thread semanticdog/server.py
Comment on lines +174 to +179
def _format_extension_label(ext: str) -> str:
if ext == "(no ext)":
return "No ext"
if ext == "other":
return "Others"
return ext[1:].upper() if ext.startswith(".") else ext.upper()
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

Labeling for the aggregated "other" bucket is inconsistent: _file_type_breakdown() uses "Other" while _format_extension_label() and _overview_breakdown() use "Others". This makes the API/UI harder to reason about and can lead to fragile tests. Consider standardizing on one label (singular vs plural) across both payloads/helpers.

Copilot uses AI. Check for mistakes.
@kytmanov kytmanov merged commit b8bd602 into master Apr 22, 2026
4 checks passed
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