Skip to content

feat(ui): add Agent Visibility preference to hide undetected agents#81

Merged
RealZST merged 5 commits into
RealZST:mainfrom
Orchardxyz:feat/agent-visibility
Jun 8, 2026
Merged

feat(ui): add Agent Visibility preference to hide undetected agents#81
RealZST merged 5 commits into
RealZST:mainfrom
Orchardxyz:feat/agent-visibility

Conversation

@Orchardxyz

Copy link
Copy Markdown
Contributor

Summary

Add Agent Visibility preference (All agents / Detected only) to hide undetected agents from Overview, Agents sidebar, and Extensions filter.

Motivation

As more agents are supported, showing all at once can feel overwhelming. This setting lets users show only detected agents to declutter the UI, without affecting Settings Agent Paths, install targets, or backend APIs.

Verification

  1. Settings → Appearance → switch to Detected only
  2. Overview and sidebar hide undetected agents; empty state when none detected
  3. Extensions agent dropdown hides undetected agents; stale filter cleared
  4. Drag-sort in Detected only mode preserves hidden agents' order
  5. npx vitest run src/stores/__tests__/ui-store.test.ts

Orchardxyz and others added 5 commits June 8, 2026 11:40
…ed state

- Relocate the All/Detected toggle from Appearance into the Agent Paths header
- "Detected only" now hides and disables undetected agents (reversible)
- Lock undetected agents' Enabled toggle while in Detected only mode
- Persist the auto-disabled snapshot so the restore survives a restart
- Add setEnabledBulk to batch-toggle agents without per-agent toasts

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Update the EN and zh-CN Overview captions to describe hiding/disabling undetected agents via the Detected only toggle, alongside the per-agent Enabled switch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Only lock undetected agents in Detected only mode; detected agents stay toggleable (disabling them is the user's call)
- Drop hover darkening on locked toggles and show a clearer "switch to All agents" tooltip
- Trim the visibility hint copy (remove the contradictory "hides")
- setEnabledBulk: use Promise.allSettled so one failed/stale agent does not drop store updates for the rest, with a generic failure toast

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The per-click handler only disabled undetected agents at the moment the user switched to "Detected only", so an agent added by a later app update (undetected, enabled by default) would show up enabled-but-locked and stay active in the backend while the user stayed in this mode.

Move the disable into an App-level effect that reconciles whenever the agent list or visibility changes, so newly-added undetected agents are disabled (and recorded in the snapshot) on launch too. The effect converges — once disabled an agent is no longer enabled. handleVisibilityChange now only restores the snapshot when switching back to "All agents".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@RealZST RealZST merged commit 6814dfe into RealZST:main Jun 8, 2026
3 checks passed
@RealZST

RealZST commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR! Pushed some changes on top:

  • 3f3ceb9 — moved the toggle into Agent Paths and made "Detected only" actually disable undetected agents, not just hide them.
    image

  • 84e36e9 — updated the README (EN + zh-CN).

  • cdfae59 — polish: no hover darkening on locked toggles, clearer tooltip/copy, resilient bulk toggle (allSettled).

  • d15c426 — keep undetected agents disabled even when a later release adds new ones.

Merged. Thanks again!

RealZST added a commit that referenced this pull request Jun 8, 2026
…val live (#82)

Follow-up to #81. Makes "Detected only" / agent-disable behaviour consistent and live.

- A disabled agent (including ones Detected only auto-disables) is now hidden everywhere — Marketplace, the Agents page, and install targets, not just the Overview. Every surface filters by enabled; the redundant per-view agentVisibility checks are removed, leaving one concept (enabled) and one owner of visibility→enabled (the reconcile). Backend "install to all detected" fallbacks skip disabled agents too.
- Agent install/removal is reflected live: runScan refetches agents on focus, and the reconcile is bidirectional (disable undetected, re-enable once detected again).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Orchardxyz

Copy link
Copy Markdown
Contributor Author

Thanks for the PR! Pushed some changes on top:

  • 3f3ceb9 — moved the toggle into Agent Paths and made "Detected only" actually disable undetected agents, not just hide them.
    image
  • 84e36e9 — updated the README (EN + zh-CN).
  • cdfae59 — polish: no hover darkening on locked toggles, clearer tooltip/copy, resilient bulk toggle (allSettled).
  • d15c426 — keep undetected agents disabled even when a later release adds new ones.

Merged. Thanks again!

Amazing improvement!

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