Skip to content

feat(devices): count imported devices in the compliance chart#3384

Merged
tofikwest merged 2 commits into
mainfrom
feat/device-compliance-chart-imported
Jul 10, 2026
Merged

feat(devices): count imported devices in the compliance chart#3384
tofikwest merged 2 commits into
mainfrom
feat/device-compliance-chart-imported

Conversation

@tofikwest

@tofikwest tofikwest commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Problem

The Device Compliance donut excluded integration-imported devices entirely — with an Intune-synced device in the table, the chart said "3 devices" while the table showed 4, and the Compliant counts didn't line up with the visible Yes badges. Reads as a bug (and was reported as one).

Change

Every device in the table now counts in the chart:

  • Imported device with a source verdict (sourceCompliance.isCompliant) → Compliant / Non-Compliant
  • Imported device with no verdict (provider reports none) → gray Not Tracked segment — never fabricated into a verdict
  • Agent + Fleet counting unchanged (stale still counts as non-compliant)
  • "Not Tracked" appears in the legend only when non-zero, so orgs without imported devices see the exact same chart as before
  • Orgs with ONLY imported devices now get a chart instead of the install-the-agent empty state

Tests

5 new chart cases (verdict compliant/non-compliant, no-verdict → Not Tracked, imported-only org, no spurious legend entry) — 88/88 devices tests passing, typecheck clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TfDHFTwRgYxUoyyqGkHPDc


Summary by cubic

Include integration-imported devices in the Device Compliance chart so totals match the table, and fix chart colors to use design‑system tokens. Imported devices without a source verdict now show as a gray Not Tracked segment.

  • Bug Fixes
    • Imported devices use sourceCompliance.isCompliant for Compliant/Non-Compliant; no verdict → Not Tracked.
    • Legend shows Not Tracked only when non-zero; imported-only orgs now see the chart.
    • Agent and Fleet logic unchanged; stale agent devices still count as non-compliant.

Written for commit bb9102d. Summary will update on new commits.

Review in cubic

The Device Compliance donut previously excluded integration-imported
devices entirely, so its total contradicted the device table right below
it. Now every device counts: imported devices use the SOURCE's verdict
(sourceCompliance.isCompliant) for Compliant/Non-Compliant, and imported
devices with no verdict land in a gray 'Not Tracked' segment instead of
being fabricated into a verdict. The Not Tracked legend entry only
appears when it exists, so agent/Fleet-only orgs see no change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfDHFTwRgYxUoyyqGkHPDc
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jul 10, 2026 3:01am
comp-framework-editor Ready Ready Preview, Comment Jul 10, 2026 3:01am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Jul 10, 2026 3:01am

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

…lack

CHART_COLORS referenced hsl(var(--chart-positive)) etc. from the legacy
@trycompai/ui stylesheet, which the app no longer loads — so all pie
segments fell back to SVG-default black. Use the design-system tokens
the app actually defines: --primary (brand green) for compliant,
--destructive for non-compliant, --muted-foreground for not tracked.
Dark mode adapts automatically.

Note: vendors/backup-overview charts reference the same dead tokens
(same black rendering) — left for a follow-up, out of scope here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfDHFTwRgYxUoyyqGkHPDc
@vercel vercel Bot temporarily deployed to Preview – portal July 10, 2026 02:58 Inactive
@tofikwest tofikwest merged commit f94f02a into main Jul 10, 2026
10 checks passed
@tofikwest tofikwest deleted the feat/device-compliance-chart-imported branch July 10, 2026 03:01
claudfuen pushed a commit that referenced this pull request Jul 10, 2026
# [3.100.0](v3.99.3...v3.100.0) (2026-07-10)

### Bug Fixes

* **devices:** address cubic review on device-sync connection status ([4fa7598](4fa7598))
* **devices:** address release-PR review on device sync ([#3387](#3387)) ([f0c9f2c](f0c9f2c))
* **devices:** show reconnect hint when device-sync connection is errored ([d41bb5c](d41bb5c))
* **devices:** surface broken saved sync source on the closed trigger ([d59f0a0](d59f0a0))

### Features

* **devices:** count imported devices in the compliance chart ([#3384](#3384)) ([f94f02a](f94f02a))
* **devices:** universal source-reported compliance + last-seen for device sync ([#3383](#3383)) ([c45fa5f](c45fa5f))
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.100.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants