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 — fix(desktop): close the oldest Windows toast when the cap evicts it by Hona · Pull Request #65421 · anomalyco/opencode

Conversation

@Hona

@Hona Hona commented Nov 21, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Issue for this PR

No linked issue. Follow-up to #65325, raised while reading its merged diff.

Type of change

  • Bug fix

What does this PR do?

Main keeps at most 40 Windows toasts it can take back. Past that, it dropped the oldest from its map without closing it, so that toast stayed in the notification center, and an answer to its request could no longer take it back.

Now the evicted toast is closed too (dismiss(oldest)), so every toast still in the notification center is one an answer takes back. Windows keeps far fewer toasts per app than 40 anyway, so in practice the evicted one has usually left already.

A toast the person dismisses by hand still stays in the map until it is replaced, answered or evicted. Windows reports a toast that timed out into the notification center the same way, and that one must stay so an answer can take it back. Closing an already-dismissed toast does nothing.

Windows only: the toasts in this map are posted only on Windows.

How did you verify your code works?

  • Read against show/dismiss: eviction now goes through dismiss, which closes and forgets the toast; the new toast is added after.
  • CI runs the desktop type check and unit tests.
  • Not tested: 41 toasts on a real Windows desktop.

Screenshots / recordings

Not captured: the change only shows once a 41st toast is posted while 40 are unanswered.

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
@Hona
fix(desktop): close the oldest Windows toast when the cap evicts it
b4592f3
opencodejr[bot]
opencodejr Bot reviewed Nov 21, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The fix looks correct. Sending the evicted toast through dismiss closes it and forgets it, so a toast that drops out of the map no longer stays in the notification center. I checked it by reading the code against show/dismiss. tsc -b and the desktop notification tests pass. I couldn't run it on Windows.

Public API: unchanged.

The 3-line comment above the cap check isn't needed for this one-line fix. Most of it describes the code or the map's general behaviour, so it can be dropped to keep the change minimal.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/desktop/src/main/notifications/index.ts Resolved

Uh oh!

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

@Hona
fix(desktop): drop the comment on the toast cap
40486d4
opencodejr[bot]
opencodejr Bot reviewed Nov 21, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

My earlier point is addressed: the extra comment is gone, so the fix is now a single line. It still looks correct when read against show/dismiss, and tsc -b passes. I couldn't run it on Windows.

Public API: unchanged.

No new concerns.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Hona
Hona merged commit 375f654 into dev Nov 21, 2026
10 checks passed

Uh oh!

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

@Hona
Hona deleted the toast-eviction branch November 21, 2026 18:35
@BrewTestBot BrewTestBot mentioned this pull request Nov 23, 2026
opencode 2.4.0 Homebrew/homebrew-core#327368
Merged
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
opencode 2.4.0 amrkmn/homebrew-tap#1251
Closed
1 task
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
feat: opencode release v2.4.0 sprisa/opencode-server#95
Merged
@scottames-github-bot scottames-github-bot Bot mentioned this pull request Nov 27, 2026
chore(deps): update ⬆️ mise-packages scottames/dots#1181
Merged
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

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.

Uh oh!

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

1 participant

@Hona
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.