Skip to content

feat(cloud): AI safety ratings for Startup Manager and Uninstaller#73

Merged
dbfx merged 5 commits intomainfrom
feat/cloud-safety-ratings
Mar 25, 2026
Merged

feat(cloud): AI safety ratings for Startup Manager and Uninstaller#73
dbfx merged 5 commits intomainfrom
feat/cloud-safety-ratings

Conversation

@dbfx
Copy link
Contributor

@dbfx dbfx commented Mar 25, 2026

Summary

  • Adds cloud-enriched AI safety ratings to both the Startup Manager and Program Uninstaller pages
  • Each program/startup item shows a color-coded shield icon (green 8-10, amber 5-7, orange 3-4, red 1-2) that expands to show AI description and score on click
  • When cloud is not linked, badges are greyed out with a toast prompting to link
  • Cloud agent POSTs items to /devices/{id}/startup-programs and /devices/{id}/installed-programs, polls while analyses are pending
  • Ratings are pushed to renderer via IPC when cloud agent syncs (on connect, every 30 min health report)

Files changed

Layer Files
Types shared/types.ts, shared/channels.ts
Main cloud-agent.ts, startup-safety.ipc.ts (new), program-safety.ipc.ts (new), ipc/index.ts
Preload preload/index.ts
Renderer startup-store.ts, uninstaller-store.ts, StartupPage.tsx, UninstallerPage.tsx
i18n en/startup.json, en/uninstaller.json

Test plan

  • Without cloud linked: visit Startup/Uninstaller — shields show greyed ShieldOff, click shows toast
  • With cloud linked: shields show pending, then populate as ratings arrive
  • Click a rated item — detail panel expands with score, description, analyzed date
  • Sort by Safety works on both pages
  • Toggle/delete startup item re-fetches safety
  • Refresh on Uninstaller re-fetches safety
  • npm test passes (1891 tests)

🤖 Generated with Claude Code

dbfx and others added 3 commits March 25, 2026 05:56
Show a loading spinner instead of rendering nothing while the onboarding
IPC check completes. On slow Windows 10 machines the concurrent startup
IPC calls (settings, history, platform, etc.) queue up synchronous file
reads, delaying the onboarding response and leaving users with a blank
window.

Also fix onboarding completion not being reliably persisted — the write
was fire-and-forget so closing the app quickly could lose the flag — and
add missing gameMode to PlatformInfo defaults.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Startup toggle silently returned success even when all registry
operations failed (e.g. HKLM without admin), causing the UI to show
items as disabled until the next refresh. Now returns false when no
critical registry write succeeds, so the optimistic UI update reverts
and an error toast is shown.

Privacy toggle notification was based on intention rather than actual
post-rescan state. When the operation reported no error but the system
state didn't change, the toast still said "Activated". Now compares
pre/post state and shows an admin-required error when unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nstaller

Cloud-enriched safety analysis for startup programs and installed programs.
When linked to Kudu Cloud, each item shows a color-coded shield icon (green/amber/orange/red)
with a clickable detail panel showing the AI description and safety score.
When cloud is not linked, badges show greyed out with a prompt to link.

- Add StartupSafetyRating/StartupSafetyResult types
- Add IPC channels and preload bridge for both startup and program safety
- Add cloud agent methods to POST items and poll for ratings
- Add safety state to startup-store and uninstaller-store with push listeners
- Add shield icon badges, SafetyTooltip, expanded detail panels to both pages
- Add sort-by-safety option to both pages
- Add i18n keys for safety UI strings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: c0abbefaa9

ℹ️ 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".

Clear startupItems and cachedInstalledPrograms before renderer-triggered
safety fetches so that post-toggle/post-refresh requests re-list from
the OS instead of reusing stale snapshots.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dbfx dbfx merged commit 37bc5db into main Mar 25, 2026
9 checks passed
@dbfx dbfx deleted the feat/cloud-safety-ratings branch March 25, 2026 04:20
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: a99becda63

ℹ️ 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 +65 to +67
setSafetyRatings: (ratings) => set({
safetyRatings: Object.fromEntries(ratings.map((r) => [r.name, r]))
}),

Choose a reason for hiding this comment

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

P2 Badge Key startup safety ratings by unique item identity

This map uses only r.name as the key, but startup entries are not guaranteed to be unique by name (e.g., the same startup name can exist in both HKCU and HKLM locations). When that happens, later entries overwrite earlier ones, so one item can display/sort with another item's safety score. Use a stable composite key (such as name+source+location or an explicit id returned by the API) to avoid collisions.

Useful? React with 👍 / 👎.

selectAll: (ids) => set({ selectedIds: new Set(ids) }),
clearSelected: () => set({ selectedIds: new Set<string>() }),
setSafetyRatings: (ratings) => set({
safetyRatings: Object.fromEntries(ratings.map((r) => [r.name, r])),

Choose a reason for hiding this comment

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

P2 Badge Preserve ratings for programs sharing display names

Safety ratings are indexed only by r.name (which is populated from displayName), so two installed programs with the same display name but different publishers/versions will collide and one rating will overwrite the other. This produces incorrect badges and safety sorting for at least one program in that case; use a unique identity (for example displayName+publisher or a stable program id echoed back from the server).

Useful? React with 👍 / 👎.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant