Skip to content

fix(desktop): point auto-update at the fork and bundle the notification icon - #172

Merged
quickbeard merged 2 commits into
mainfrom
desktop-updater-icon
Aug 10, 2026
Merged

quickbeard merged 2 commits into
mainfrom
desktop-updater-icon

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Issue for this PR

Closes #

Type of change

  • Bug fix

What does this PR do?

Two independent fixes found while reading through packages/desktop.

Auto-update pointed at upstream. electron-builder.config.ts shipped upstream's release feeds unchanged: beta read anomalyco/opencode-beta, prod read anomalyco/opencode. A packaged CoDev Code build would therefore have checked upstream's GitHub releases and offered OpenCode builds as CoDev updates. Both channels now read quickbeard/codev-code. rpm.packageName is left alone — it names the installed Linux package, not a publish target.

Two consequences, both inert while the fork ships no desktop build, both written into the DIVERGENCES row so whoever turns desktop releases on hits them:

  • Upstream separated beta and prod by repo, so each owned its own latest.yml. With one repo they now share it. Splitting them needs publish.channel and a change to src/main/updater.ts, which hardcodes autoUpdater.channel = "latest" client-side — a config-only split would silently break beta.
  • codev-code is private, and electron-updater cannot read a private repo's releases without a token an app can't ship. Real desktop releases need a public releases repo or a different provider.

Notification icon was a remote fetch. src/renderer/index.tsx passed https://opencode.ai/favicon-96x96-v3.png as the notification icon, so every notification made a request to a host the app otherwise never contacts, rendered iconless offline, and drew an upstream-branded mark. It now uses ./favicon-96x96-v3.png — the same relative form src/renderer/index.html already uses for <link rel="icon">, resolved against the renderer origin (oc://renderer/ packaged, the vite dev server otherwise). The file comes from the renderer's publicDir (packages/app/public), whose favicon-96x96-v3.png symlinks to the rebranded mark in packages/ui/src/assets/favicon/.

packages/app/src/entry.tsx has the same remote-icon bug for the web UI and is deliberately not touched here — separate surface, separate change.

How did you verify your code works?

  • bun typecheck in packages/desktop — clean.
  • bun test in packages/desktop — 63 pass / 0 fail across 13 files.
  • Confirmed the icon path resolves to a real served file rather than trusting the string: favicon-96x96-v3.png is emitted at out/renderer/favicon-96x96-v3.png by the renderer build, the built index.html already loads it as ./favicon-96x96-v3.png, and the path passes the containment check in the oc:// protocol handler (src/main/windows.ts).

Not verified: I did not launch a packaged build and trigger a live notification to watch the icon paint, and the updater change cannot be exercised end-to-end because nothing publishes desktop releases yet.

Screenshots / recordings

None — no visual change to any screen. The only rendered difference is the OS notification icon, which needs a packaged build to capture.

Checklist

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

Both edited files are upstream files, so DIVERGENCES.md is updated in the same PR: the electron-builder.config.ts row gains the publish repoint, the stale "publish targets preserved deliberately" clause is dropped from the desktop-rebrand row, a new row covers the notification icon, and the rebrand-gaps bullet no longer lists the desktop icon among the remaining remote opencode.ai/favicon* sources. CHANGELOG.md gets an entry per fix under Unreleased → Desktop.

🤖 Generated with Claude Code

quickbeard and others added 2 commits August 10, 2026 08:57
…on icon

The packaged beta and prod builds pointed electron-updater at upstream's
anomalyco/opencode-beta and anomalyco/opencode releases, so a CoDev Code
install would have offered upstream OpenCode builds as its own updates.
Both channels now read quickbeard/codev-code.

Desktop notifications also fetched their icon from
https://opencode.ai/favicon-96x96-v3.png on every notification: no icon
offline, a request per notification to a host the app has no other reason
to contact, and an upstream-branded mark. It now uses the bundled asset
via the same relative path index.html already uses for its favicon.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@quickbeard
quickbeard merged commit 558ff4b into main Aug 10, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the desktop-updater-icon branch August 10, 2026 02:00
quickbeard added a commit that referenced this pull request Aug 10, 2026
PR #10 pinned the favicon to what was then the TUI banner accent, moving
the mark and the default-theme secondary together from #EE0033 to the
banner cyan #00cdcd. The banner has since moved to the navy/red wordmark
and the cyan accent is gone, leaving the favicon as the only #00cdcd in
the tree. On desktop the mismatch was visible: the dock icon is the red
C on white while the window and (since #172) notification icons were the
cyan C on near-black.

The set is now generated from the same geometry as the app icon by
generate-icons.ts, so the dock icon, the tab, notifications, the
`codev --mini` badge and the landing page icon are one mark in one red.
favicon-v3.svg is the hand-written 512-unit source of that geometry.

The tab and .ico icons keep the rounded tile so they read as an app
icon. apple-touch-icon and the two maskable manifest icons are square
and full-bleed: iOS and PWA launchers apply their own mask, and a
pre-rounded icon leaves transparent corners that render black.

Known cost: on a dark tile cyan was ~9.4:1 at 16px against red's ~4.2:1,
so the tab icon is less punchy than it was. Accepted so the brand reads
consistently. site.webmanifest is untouched — its theme_color and
background_color describe the PWA's chrome and splash, not the icon.

generate-icons.ts also skips iconutil off macOS now, leaving the
committed .icns alone, so the rest of the assets regenerate anywhere.

Co-authored-by: Quickbeard <quickbeard@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant