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 — feat(desktop): add Windows taskbar session badge by TonisOrmisson · Pull Request #43962 · anomalyco/opencode

Conversation

@TonisOrmisson

@TonisOrmisson TonisOrmisson commented Aug 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #43937

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a Windows-only numeric taskbar overlay badge for distinct sessions that are unread or need attention. It reuses the existing app notification/session state, includes pending permission and question requests, clears the relevant session when it is viewed, and preserves counts for other sessions. The Electron integration uses BrowserWindow.setOverlayIcon; non-Windows platforms and the app layout are unchanged.

This does not add broader system notifications or the TUI progress behavior discussed in #24807. #37120 remains notification-permission context only.

How did you verify your code works?

  • packages/app: focused taskbar state tests, 6 passing; bun typecheck passing.
  • packages/desktop: focused overlay count tests, 2 passing; bun typecheck passing.
  • bun run --cwd packages/desktop build passing.
  • Push hook bun turbo typecheck: 30 tasks successful.
  • Full desktop test run: 53 passing; one unrelated baseline failure because this Linux runtime lacks node:sqlite.
  • Windows taskbar rendering itself needs Windows validation.

Screenshots / recordings

These are illustrative before/after taskbar states for review; this environment cannot capture a real Windows taskbar.

Before: no taskbar badge

After: numeric taskbar badge

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@TonisOrmisson
feat(desktop): add Windows taskbar session badge
db14c65
@TonisOrmisson
TonisOrmisson requested review from Brendonovich and Hona as code owners August 21, 2026 18:55
@Enough1122

Enough1122 commented Aug 22, 2026

Copy link
Copy Markdown

AI code review — automated review for reference; please use your judgment.

  1. packages/app/src/context/taskbar-attention.ts:3-7 — cancelled and dismissed grow without bound: removePending adds every replied request ID forever and nothing ever evicts them ( sync() only prunes pending/synced). Why it matters: this lives in a long-running desktop process, so every permission/question ever seen leaks a Map/Set entry for the app's lifetime. Suggestion: when a session disappears from both pending and the sync snapshot, drop its cancelled/dismissed entries (or cap and rotate them).

  2. packages/app/src/context/taskbar-attention.ts:32-40 vs packages/app/src/context/notification.tsx:470-489 — two token encodings coexist: the event listener adds per-request tokens (permission:<id>) while taskbarAttentionSessions feeds sync() comma-joined ones (permission:<id1>,<id2>). sync()'s liveness check (active.has(token)) compares these directly, so with 2+ live requests on one session it deletes still-pending tokens added by events; the badge stays right today only because synced independently keeps the session counted. Why it matters: any future logic relying on pending (races, removePending) silently misbehaves. Suggestion: normalize both sides through requestIDs() (or track pending per request ID instead of composite strings).

  3. packages/app/src/context/notification.tsx:207-214 — clearFocusedSessionTaskbarAttention fires markViewed on every window focus for the active session, flipping persisted viewed state even when the user never saw the content (e.g., refocusing onto a different surface/tab). Why it matters: users lose unread indicators without actually reading anything, and the write hits the persisted store each time. Suggestion: only clear the taskbar badge on focus, and gate the persisted markViewed on the session view actually being visible.

  4. packages/app/src/context/notification.tsx:132-138 (and each onTaskbarAttentionChanged() call site) — every notification append / permission event triggers an immediate cross-process invoke("set-taskbar-attention") plus setOverlayIcon rasterization, with no coalescing; an error-event burst serializes into many IPC round-trips. Why it matters: wasted main-process work and potential badge flicker. Suggestion: debounce/microbatch the sync (e.g., 100ms trailing edge).

  5. Test coverage — packages/app/src/context/taskbar-attention.test.ts covers the pure state machine well, but none of the integration paths: permission.asked→replied flow, focus-triggered clearing, multi-scope dedup in syncTaskbarAttention, or the session.unseenCount===0 early-return removal in packages/app/src/pages/session.tsx:308-313. Why it matters: findings 2-3 live exactly in that untested layer. Suggestion: add component-level tests with a fake platform (setTaskbarAttention spy + controllable getWindowFocused).

Minor (not counted): packages/desktop/src/main/windows.ts:184-186 — if (!label) return is unreachable for normalized > 0; harmless dead branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TonisOrmisson TonisOrmisson closed this Aug 22, 2026
@strofimovsky strofimovsky mentioned this pull request Oct 28, 2026
[FEATURE]: Desktop (V2): unread-session app icon badge on macOS #59980
Open
@opencodejr opencodejr Bot mentioned this pull request Nov 5, 2026
[FEATURE]: Windows desktop: taskbar badge count for completed sessions and pending questions #62042
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Hona Hona Awaiting requested review from Hona
@Brendonovich Brendonovich Awaiting requested review from Brendonovich

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Desktop - Show session attention count on the Windows taskbar

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@TonisOrmisson @Enough1122
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.