GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE]: Desktop (V2): unread-session app icon badge on macOS · Issue #59980 · anomalyco/opencode

[FEATURE]: Desktop (V2): unread-session app icon badge on macOS #59980

New issue
Copy link
New issue
Copy link
Open
Open
[FEATURE]: Desktop (V2): unread-session app icon badge on macOS#59980
Copy link

Description

@strofimovsky
strofimovsky
opened on Oct 28, 2026
Issue body actions

Problem

OpenCode’s tab unread indicators aren’t visible when I’m using another app. I’d like a red count on the macOS app icon, particularly in Cmd-Tab, like Codex.

Proposed behavior

Count distinct unread sessions open in tabs across all windows, using the same unread condition as the existing tab indicator. A session open in two windows counts once; zero clears the badge. Sessions not open in tabs are excluded.

Possible implementation

Each window reports unread session keys (server + session ID) through a window RPC. The main process combines them and calls app.setBadgeCount(n), removing a window’s contribution on window destruction or renderer loss. The renderer can report through an optional platform method from the tab strip.

Initial scope is macOS desktop, not Windows overlays or PWA; inbox-only layout is excluded.

Feasibility check

A local POC on macOS 27.0.1 with Electron 44.10.0 confirmed that app.setBadgeCount(3) alone returned true and showed a red 3 in Cmd-Tab. Dock appearance was not visually verified, and existing notification authorization was not inspected.

OpenCode 1.19.5 exposes navigator.setAppBadge, but its visible effect was not captured. This is API feasibility evidence, not a working OpenCode implementation.

Related requests

#43937 and #44076 closed as stale; related earlier PRs #43962, #44388, #53675, #54355. #51400 concerns a separate Ubuntu notification-counter bug.

Design questions

  • Is this approach acceptable for V2 desktop?
  • Should this be a setting, and if so enabled by default?
  • Should Linux support be included or kept separate?

I’m happy to submit a PR after design approval.

Reacted by Eric

Activity

  1. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    Thanks for the detailed proposal and for checking it's feasible. You're asking for a red count on the macOS app icon in V2 desktop (Dock and Cmd-Tab) showing how many distinct sessions open in tabs are unread, using the same condition as the tab indicator and clearing at zero. Maintainers will consider it, including your design questions: the window-RPC/main-process approach, whether it should be a setting and on by default, and whether to include Linux. It's probably best to wait for their input before opening a PR.

    This needs the Electron main process and the desktop tab state, so it can't be built as an OpenCode plugin.

    Related items:

    • [FEATURE]: Desktop - Show session attention count on the Windows taskbar #43937: earlier request for a session attention count on the Windows taskbar (closed as not planned)
    • [FEATURE]: Taskbar state indicators - running / awaiting confirmation / completed #44076: taskbar state indicators for running / awaiting confirmation / completed (closed as not planned)
    • feat(desktop): add native Windows taskbar badge #44388, feat(app): show unread session count on PWA taskbar badge #53675, feat(app): show session attention count on the V2 PWA badge #54355: earlier closed PRs for a Windows taskbar badge and a PWA badge
    • desktop: notification counter on Ubuntu dock increments every turn and never clears #51400: separate open bug where the Ubuntu dock notification counter never clears
  2. sciencefl commented on Nov 17, 2026

    @sciencefl
    sciencefl
    on Nov 17, 2026
    More actions

    Confirming this is still not implemented on OpenCode Desktop 2.3.0 (macOS 27.2.1, arm64), and adding what I found in the shipped bundle in case it saves time.

    I inspected /Applications/OpenCode.app/Contents/Resources/app.asar from the current release build:

    • app.setBadgeCount — 0 occurrences
    • app.dock.setBadge — 0 occurrences
    • requestUserAttention (Dock bounce) — 0 occurrences
    • The only app.dock reference is app.dock.downloadFinished() inside the bundled electron-download-manager, unrelated to session attention
    • The 13 badgeCount strings come from that downloader and from bundled Chrome DevTools protocol definitions, not from OpenCode's own logic

    So this is not a hidden setting or a missing entitlement: there is no badge code path to enable. Contents/Info.plist also has no NSUserNotificationAlertStyle.

    Two details that make the gap feel bigger than it looks:

    1. The desktop notifier returns early when the window is focused (if (focused) return), so while the app is in the foreground nothing is emitted at all — reasonable, but it means the notification path can never serve as a substitute for a persistent count.
    2. System notifications are constructed with silent: true; audible feedback is a separate set of switches under Settings → General → Sounds. None of the notification switches (Agent / Permissions / Questions / Errors) expose or imply a count.

    On the count definition, I'd align with #62042 (the Windows taskbar request): one contribution per distinct session, from a completion, a pending question, or a pending permission request; cleared when that session is viewed or the request resolved; other sessions keep their contribution; zero removes the badge. Both platforms could then share a single "sessions needing attention" reducer in the desktop layer instead of growing two independent implementations.

    Is this still intended to be worked on? If the answer is no, closing it deliberately would be more useful than letting the inactivity bot decide.

  3. ericmp33 commented on Nov 18, 2026

    @ericmp33
    ericmp33
    on Nov 18, 2026
    More actions

    +1. In addition to system notifications, it would be very helpful to have a Dock icon badge/count on macOS for unread replies or sessions needing attention, so pending activity is visible when the app is not in focus.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.