Skip to content

feat(desktop): show the release channel in the app name and icon - #424

Merged
nixuuu merged 1 commit into
devfrom
feat/channel-identity
Nov 9, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/channel-identity

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 9, 2026

Copy link
Copy Markdown
Member

Installed builds now identify their release channel as Canopy (Nightly), Canopy (Beta) or Canopy. Nightly uses the original tree in moonlit teal with stars and a crescent; Beta uses golden-green foliage against a dusk sky. Stable artwork remains unchanged. The committed Sharp generator preserves the tree, rounded silhouette, bevel and gloss and produces all native/web assets reproducibly.

Platform identity and updates

Platform Changes with the installed channel Stays fixed
macOS CFBundleDisplayName, ICNS, app menu, About panel, window title canopy.app, CFBundleName=Canopy, productName, executable, bundle ID, helper identities, updater cache
Windows / NSIS Shortcut names, uninstall display name, ICO, window title Install directory, productName, executable, appId/GUID, installer registry identity, updater cache
Linux Desktop entry Name, PNG, window title Desktop filename, StartupWMClass, deb package name, installation path, existing artifactName pattern
Mobile Native display name, iOS icon, Android adaptive layers, splash per EAS channel/profile iOS bundle ID, Android package name, canopy://
Web Gateway-channel favicon, Apple touch icon, manifest name, page titles Manifest id/start URL and application routes

All desktop channels keep app.canopy.desktop, canopy:// and the explicitly pinned Canopy userData directory. The Electron internal name also stays Canopy: Electron uses it for existing Keychain/Secret Service encryption keys. CFBundleName stays fixed because Electron uses it to locate helpers. Display fields change independently. The pinned electron-builder/electron-updater implementations retain the same replacement target; NSIS migrates the previous shortcut name from its registry state. Changing the preferred update channel only changes presentation after the next build is installed.

Web resolves the running gateway's version channel, with a bounded lookup, short cache and build/runtime fallback. It does not confuse an update preference with the currently running channel. Native mobile names, launcher icons and splash require the next IPA/APK build; OTA updates cannot change them. No EAS builds or releases were triggered.

Verification

  • Passed locally: bun install, bun run gen:check, bun run typecheck, bun run lint, bun run format:check and bun run --cwd apps/web build.
  • Actual electron-builder AppInfo/config and six public Expo profile resolutions: 2 tests, 126 assertions. They protect names/assets, userData, appId, scheme, install filenames, crypto identity and native IDs.
  • Nightly Linux x64 AppImage and deb built locally. Both extracted desktop entries show Name=Canopy (Nightly), stable Icon=canopy / StartupWMClass=Canopy / canopy://, and their installed icon bytes match the committed Nightly PNG. No publication.
  • Regeneration produces identical asset hashes. Final 16/32 px icons inspected on light/dark Dock mockups; 512/128/64 px comparisons also inspected. No UI tests added or run.
  • macOS/Windows native installation and cross-channel updates were reviewed in configuration and pinned upstream code, but were not executed on this Linux host.

Additional mobile-wide ESLint reports existing errors in unchanged React source; focused lint of app.config.ts passes. The required root lint and workspace typechecks pass.

Full-suite gate and known shared-machine load

Several agents share this development machine. Load-related timing failures are a known condition in this session and vary between runs. The full-suite acceptance gate is CI on isolated runners. These integration tests and their gateway implementation are unchanged in this PR; no liveness stabilization, test exclusions or timeout changes are committed.

The completed local run, bun run check:tmp --timeout 30000 --isolate --parallel=1, reported 1,920 pass, 156 skip, 1 fail across 343 files / 2,077 tests. Temporary-directory cleanup passed (nothing left in the temp dir). Its failure was the legacy-heartbeat assertion below; a fresh whole-file rerun passed that assertion but failed the event-gap assertion instead. Earlier default/shared-process runs were stopped after failures; cleanup also completed. All earlier computer-move failures passed in the completed isolated run.

Observed failures across local attempts:

Unchanged test file Failing test name Observed assertion or timeout
tests/integration/agent-plugins.test.ts upstream update uses a frozen diff candidate; changing the catalog never silently updates enabled code Default 5,000 ms test timeout. Passed in subsequent runs.
tests/integration/agent-skills.test.ts new versions, rollback and per-machine pins preserve additional local files Default 5,000 ms test timeout. Passed in subsequent runs.
tests/integration/computer-moves.test.ts a thread moves with its history and files; the old home redirects and a third computer sees the new owner Line 289: eventual mirrored-thread presence expected true, received false.
tests/integration/computer-moves.test.ts a bot moves with its conversation, routines and reminders: nothing fires twice or is lost; accounts are flagged RPC rejected with failed_precondition: target laptop unreachable.
tests/integration/computer-moves.test.ts a thread with a running turn is refused, and stays fully usable on its home RPC rejected with failed_precondition: target laptop unreachable.
tests/integration/computer-moves.test.ts interrupted before the decision: the link drops or either side restarts, and the move rolls back to one home RPC rejected with failed_precondition: target laptop unreachable.
tests/integration/computer-moves.test.ts interrupted after the decision: the move rolls forward through restarts and link drops, idempotently Line 677: expected move state committed, received aborted.
tests/integration/computer-moves.test.ts move everything: every thread and bot goes to the new laptop; shared and local-only configuration are listed Line 844: expected no unfinished/error moves ([]), received seven entries, including running/queued-turn errors.
tests/integration/linked-thread-liveness.test.ts an older home without heartbeat frames is periodically revalidated Line 443: subscriptions expected greater than 16, received 16 after the recovered title arrived.
tests/integration/linked-thread-liveness.test.ts an event sequence gap replaces the base with an authoritative snapshot Line 230 on fresh whole-file rerun: dropped expected true, received false.

Copy audit (§8)

Canopy → Canopy (Nightly) / Canopy (Beta) identifies the installed/running build; stable remains Canopy. Names use the existing glossary, sentence case, short labels and no trailing punctuation. Existing page-title context remains intact. About/Open/Quit menu labels retain their conventional action wording. Channel names provide an explicit text cue in addition to color. No new errors, empty states, confirmations, duplicated explanatory copy or humor. All three fixed names were checked in comparison sheets and light/dark Dock mockups, including 16/32 px; no page layout or responsive controls changed.

@nixuuu
nixuuu merged commit 40fe3ac into dev Nov 9, 2026
9 checks passed
@nixuuu
nixuuu deleted the feat/channel-identity branch November 9, 2026 16:25
nixuuu added a commit that referenced this pull request Nov 9, 2026
### Rebase verification — 2026-11-09

The five-layer stack is rebased onto `dev` at
`2580ed75cdfc162e98e125b7c4d0b24eb81901b7`, including #418 and
#421–#426. All PRs remain ready for review. The measurements below
describe the original baseline; this section records the current
integration verification.

The attachment route now passes `If-None-Match` through #421's shared
response helper. Gateway authorization/read succeeds before a 304 is
possible; qualified IDs, thumbnail fallback, bounded preview/truncation,
sanitized public failures and `no-store` errors are retained. Mobile
image caching retains public error messages and reconnect retries.
Session startup, replacement pairing, unpair and revocation retain all
four caches: transcript, bot, archived sidebar and images. The
branch/worktree panel, channel identity and sheet gesture changes remain
intact.

Passed on the rebased top branch: `bun install`, `bun run gen:check`,
full `bun run typecheck`, root `bun run lint`, `bun run format:check`
and the production web build. Final focused `check:tmp`: **27 passed, 0
failed, 334 assertions across 7 files**, no temp leftovers (images,
immutable HTTP, transcript/archive/bot caches, two-gateway linked
previews and composer choices). Coverage includes a matching old ETag
returning 404 after ownership changes and 409 while the home is
unavailable, with `no-store` and no ETag; image/archive caches are wiped
together and late callbacks cannot restore them.

EAS CLI **27.4.1**, production profile, before/after the image-cache and
preparation layers and on the final top branch: **unchanged relative to
the latest dev baseline**:

- iOS: `bf3156a1bd878e10c0b0be25d4c194a837fb1b7e`
- Android: `d638e5f7b7fa87f54ccc0715c5fe150b8c0ad3ae`

These differ from the original measurement hashes below because #424
already changed native branding/configuration on dev. This stack adds no
native dependency/configuration change. Final production Hermes exports
passed sequentially with one Metro worker: iOS **9,971,620 B**, Android
**9,961,323 B**. These include the newly merged client features; the
earlier performance comparisons below retain their original baseline.
Expo Doctor: **20/20**. An additional Expo ESLint check of the conflict
files reports the same pre-existing `react-hooks/set-state-in-effect`
finding in `useImage.ts` on both this head and unmodified `origin/dev`;
session cleanup has no Expo ESLint findings. The required root oxlint
check passes.

No full local test run was started, as requested for the overloaded
shared machine. The earlier full-run timeout below is historical;
**GitHub CI is the current full-suite merge gate**. No native builds,
EAS builds, OTA publication or UI test suites were added. Previous
on-device profiling gaps remain.

---

Adds a repeatable Bun client CPU harness and a real-time browser
workload using the existing development renderer fixture. Pure mobile
timeline preparation can be imported without loading React Native
modules. A disposable launcher owns its PostgreSQL, gateway and BFF and
cleans them up by identity.

| Metric / capability | Before | After | Method / environment |
|---|---|---|---|
| Deterministic large snapshot | Dev renderer fixture | CLI harness:
1,000 turns, 7,099 items, 14,085,915 protobuf bytes | Bun 1.4.4, Linux
x86_64 |
| CPU measurements | Manual | Warmed median/p95 for reducer, feed,
mobile preparation, markdown and cache | `bun
scripts/bench/client-js.ts` |
| Session workload | Manual visits | Actual 30-minute run, 200 deltas
per visit at 25/s, heap/DOM/long-task samples | Chromium 156, one
1280×800 tab |
| Bundle accounting | Build output only | Deduplicated static JS/CSS
import closure, raw and gzip | `bun scripts/bench/bundle-sizes.ts` |

This is measurement tooling, not a committed UI test suite or an
optimization claim. Results belong in PR descriptions, not repository
files. The renderer fixture measures remount through two animation
frames, not cold thread navigation or browser TTI. Its handler samples
decode protobuf JSON objects and reduce them; they exclude EventSource
and string JSON parsing. The later tooling layer adds measurements over
the real network path.

Mobile fingerprints before/after extraction match on both platforms (EAS
CLI 27.4.1 production): iOS `2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3`,
Android `c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d`. Both platform
exports succeeded. Whole-stack verification is recorded on the top PR.

Polish documentation describes measurement commands, limitations,
cleanup and on-device profiling. No application UI copy changes, native
builds, secrets, screenshots or measurement result files are included.
nixuuu added a commit that referenced this pull request Nov 9, 2026
### Rebase verification — 2026-11-09

The five-layer stack is rebased onto `dev` at
`2580ed75cdfc162e98e125b7c4d0b24eb81901b7`, including #418 and
#421–#426. All PRs remain ready for review. The measurements below
describe the original baseline; this section records the current
integration verification.

The attachment route now passes `If-None-Match` through #421's shared
response helper. Gateway authorization/read succeeds before a 304 is
possible; qualified IDs, thumbnail fallback, bounded preview/truncation,
sanitized public failures and `no-store` errors are retained. Mobile
image caching retains public error messages and reconnect retries.
Session startup, replacement pairing, unpair and revocation retain all
four caches: transcript, bot, archived sidebar and images. The
branch/worktree panel, channel identity and sheet gesture changes remain
intact.

Passed on the rebased top branch: `bun install`, `bun run gen:check`,
full `bun run typecheck`, root `bun run lint`, `bun run format:check`
and the production web build. Final focused `check:tmp`: **27 passed, 0
failed, 334 assertions across 7 files**, no temp leftovers (images,
immutable HTTP, transcript/archive/bot caches, two-gateway linked
previews and composer choices). Coverage includes a matching old ETag
returning 404 after ownership changes and 409 while the home is
unavailable, with `no-store` and no ETag; image/archive caches are wiped
together and late callbacks cannot restore them.

EAS CLI **27.4.1**, production profile, before/after the image-cache and
preparation layers and on the final top branch: **unchanged relative to
the latest dev baseline**:

- iOS: `bf3156a1bd878e10c0b0be25d4c194a837fb1b7e`
- Android: `d638e5f7b7fa87f54ccc0715c5fe150b8c0ad3ae`

These differ from the original measurement hashes below because #424
already changed native branding/configuration on dev. This stack adds no
native dependency/configuration change. Final production Hermes exports
passed sequentially with one Metro worker: iOS **9,971,620 B**, Android
**9,961,323 B**. These include the newly merged client features; the
earlier performance comparisons below retain their original baseline.
Expo Doctor: **20/20**. An additional Expo ESLint check of the conflict
files reports the same pre-existing `react-hooks/set-state-in-effect`
finding in `useImage.ts` on both this head and unmodified `origin/dev`;
session cleanup has no Expo ESLint findings. The required root oxlint
check passes.

No full local test run was started, as requested for the overloaded
shared machine. The earlier full-run timeout below is historical;
**GitHub CI is the current full-suite merge gate**. No native builds,
EAS builds, OTA publication or UI test suites were added. Previous
on-device profiling gaps remain.

---

Obrazy mobilne są pobierane dopiero po wejściu do widocznego okna osi
czasu. Powrót do historii lub otwarcie viewerów korzysta z prywatnych,
niezmiennych plików zamiast ponownego RPC i base64.

Cache rozdziela parowania (owner-bound device id + pin), pełne
kwalifikowane identyfikatory komputerów i rzeczywiste warianty
thumbnail/full. Blob lub załącznik bez miniatury dzieli pełny wariant
pomiędzy listą i viewerem, bez powtórnego odczytu. Pliki i katalogi mają
nazwy SHA256; limit dysku to 200 MiB / 2048 wpisów, indeks URI w pamięci
ma budżet 24 MiB ważony bajtami obrazu. To nie ogranicza natywnych
bitmap. Wspólne żądania są anulowane po odejściu ostatniego odbiorcy.
Forget, revocation i ponowne parowanie zamykają cache i usuwają pliki;
spóźniona odpowiedź nie odtwarza danych. Brak nowych modułów natywnych
lub uprawnień galerii.

Załączniki w listach i wysłane chipy używają miniatur; viewer pełnego
wariantu. GetThreadBlob nie udostępnia miniatur: jego podglądy nadal
używają obrazu źródłowego. BFF zachowuje private/immutable, dodaje ETag
SHA256 reprezentacji i 304 po autoryzacji; błędy API mają no-store.
Istniejące loading="lazy" i odrębne URL ?thumbnail/?preview pozostają
zachowane. Zmiana nie ingeruje w routing linked previews 409.

| Metryka | Przed | Po | Metoda / środowisko |
|---|---:|---:|---|
| Żądania: 20 miniatur, dwa przejścia + ponowne otwarcie | 60 | 20 | bun
scripts/bench/image-cache.ts, Bun 1.4.4 Linux; symulowane montowania,
rzeczywisty HTTP + filesystem |
| Bajty odpowiedzi | 983 040 | 327 680 | 20 deterministycznych miniatur
po 16 KiB, ten sam scenariusz |
| Restart cache / ponowne otwarcie, to samo parowanie | 20 / 327 680 B |
0 / 0 B | nowa instancja cache, zachowany prywatny dysk |
| Fingerprint iOS | 2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3 |
identyczny | eas-cli 27.4.1, production, przed/po |
| Fingerprint Android | c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d |
identyczny | eas-cli 27.4.1, production, przed/po |
| Bundle Hermes iOS, cały stos względem pierwotnego dev | 9 900 217 B |
9 927 705 B | expo export, produkcyjny JS/assets, bez builda natywnego |
| Bundle Hermes Android, cały stos względem pierwotnego dev | 9 889 662
B | 9 917 398 B | expo export, produkcyjny JS/assets, bez builda
natywnego |

Rzeczywista przeglądarka Chromium 156, produkcyjny BFF + gateway,
prywatny seed 1000 tur / 500 wątków, 1280×800: 20 PNG 256×256 w dwóch
wiadomościach. Pierwsze przejście pobrało 20 miniatur / 803 816 B treści
(809 816 B Resource Timing transferSize). Drugie przejście: 0 żądań
sieciowych / 0 B; ponowne otwarcie: 0 / 0 B, 20 wpisów z cache. Web już
miał private/immutable, więc nie przypisujemy tej zmianie oszczędności
ponownego transferu w web. To pomiar po zmianie; historycznego before w
browserze dla obrazów nie zarejestrowano. Seed tego przebiegu miał
ręcznie uzupełniony katalog załączników workera; narzędzie w #415 teraz
zgłasza go przy hello.

Browser potwierdził: loading="lazy", ?thumbnail, różne ETag dla
thumbnail/full/preview, 304 z poprawnym If-None-Match i 404 z no-store
bez ETag. Sprawdzono telefon 390×844 w dark i desktop 1280×800 w light;
bez poziomego overflow, obrazy poprawnie zdekodowane. Serwery i browser
zamknięte przed pełnymi testami.

Weryfikacja: install, gen:check, pełny typecheck, root lint,
format:check, web build i eksporty Expo obu platform przeszły. Expo
Doctor: 20/20 kontroli. Końcowe 5 testów cache/HTTP (39 asercji)
obejmuje izolację, restart, LRU, brak pliku po usunięciu przez OS,
retry, współbieżność, ponowne użycie pełnego wariantu i wipe przy późnej
odpowiedzi; przeszły również w pełnym przebiegu. Dodatkowy Expo ESLint
dla zmienionych plików wskazuje istniejące już set-state-in-effect w
useImage; nowe wskazania refs zostały poprawione i sprawdzone ponownie.

Pierwotny końcowy pełny check:tmp zakończył się 1919 pass / 161 skip / 1
fail, 22 240 asercji, 1050.58 s, bez pozostałości temp. Pozostał
niezmieniany test composer-shell „Stop during a shell steer kills its
group and persists the failed delivery” — anulowanie RPC po 10 s.
Wcześniejszy przebieg miał też błędy ask-user i thread-mirror-deltas;
wszystkie trzy pliki przeszły następnie osobno razem (42 pass / 0 fail,
226 asercji, 38.70 s). Nie zmieniano timeoutów ani asercji. W pierwotnym
przekazaniu pełna bramka pozostawała nierozstrzygnięta, a stos był
draftem.

Harness nie mierzy renderera React Native ani RPC. Na urządzeniu
pozostają: widoczność wewnątrz wysokiej tury, szybki scroll/anulowanie,
bitmapy i filesystem Expo, viewer/restart/unpair/revocation; instrukcje
w docs/client-performance.md. Brak buildów natywnych, EAS i publikacji
OTA. Copy audit: bez nowych tekstów UI.
nixuuu added a commit that referenced this pull request Nov 9, 2026
### Rebase verification — 2026-11-09

The five-layer stack is rebased onto `dev` at
`2580ed75cdfc162e98e125b7c4d0b24eb81901b7`, including #418 and
#421–#426. All PRs remain ready for review. The measurements below
describe the original baseline; this section records the current
integration verification.

The attachment route now passes `If-None-Match` through #421's shared
response helper. Gateway authorization/read succeeds before a 304 is
possible; qualified IDs, thumbnail fallback, bounded preview/truncation,
sanitized public failures and `no-store` errors are retained. Mobile
image caching retains public error messages and reconnect retries.
Session startup, replacement pairing, unpair and revocation retain all
four caches: transcript, bot, archived sidebar and images. The
branch/worktree panel, channel identity and sheet gesture changes remain
intact.

Passed on the rebased top branch: `bun install`, `bun run gen:check`,
full `bun run typecheck`, root `bun run lint`, `bun run format:check`
and the production web build. Final focused `check:tmp`: **27 passed, 0
failed, 334 assertions across 7 files**, no temp leftovers (images,
immutable HTTP, transcript/archive/bot caches, two-gateway linked
previews and composer choices). Coverage includes a matching old ETag
returning 404 after ownership changes and 409 while the home is
unavailable, with `no-store` and no ETag; image/archive caches are wiped
together and late callbacks cannot restore them.

EAS CLI **27.4.1**, production profile, before/after the image-cache and
preparation layers and on the final top branch: **unchanged relative to
the latest dev baseline**:

- iOS: `bf3156a1bd878e10c0b0be25d4c194a837fb1b7e`
- Android: `d638e5f7b7fa87f54ccc0715c5fe150b8c0ad3ae`

These differ from the original measurement hashes below because #424
already changed native branding/configuration on dev. This stack adds no
native dependency/configuration change. Final production Hermes exports
passed sequentially with one Metro worker: iOS **9,971,620 B**, Android
**9,961,323 B**. These include the newly merged client features; the
earlier performance comparisons below retain their original baseline.
Expo Doctor: **20/20**. An additional Expo ESLint check of the conflict
files reports the same pre-existing `react-hooks/set-state-in-effect`
finding in `useImage.ts` on both this head and unmodified `origin/dev`;
session cleanup has no Expo ESLint findings. The required root oxlint
check passes.

No full local test run was started, as requested for the overloaded
shared machine. The earlier full-run timeout below is historical;
**GitHub CI is the current full-suite merge gate**. No native builds,
EAS builds, OTA publication or UI test suites were added. Previous
on-device profiling gaps remain.

---

Reuses prepared timeline entries for unchanged turns, makes sibling item
grouping linear, and avoids encoding/writing an identical immutable
snapshot repeatedly. New snapshot revisions still serialize and persist;
failed writes remain retryable, eviction allows a later resave, and
unpair/close fences remain intact.

| Metric | Before | After | Method / environment |
|---|---:|---:|---|
| Prepare 5,000 sibling items, median / p95 | 39.198 / 43.052 ms | 1.954
/ 3.728 ms | Bun 1.4.4, 10 samples after 5 warmups |
| Save the same immutable 14,085,915-byte snapshot, median | 30.218 ms |
<0.001 ms | Warm duplicates; in-memory storage adapter, no disk |
| Save a new immutable snapshot, median | 28.767 ms | 28.841 ms | Same
adapter; serialization still required |
| Cold cache load/decode, median | 21.348 ms | 20.932 ms | New cache per
sample, same encoded bytes; no disk |
| iOS Hermes bundle | 9,900,217 B | 9,901,992 B | Sequential `expo
export --platform ios` |
| Android Hermes bundle | 9,889,662 B | 9,891,426 B | Sequential `expo
export --platform android` |

CPU harness: deterministic 1,000-turn / 7,099-item snapshot on Linux
x86_64, Ryzen 5 5600X, shared 15.5 GiB machine. The before and after
control runs were consecutive while repository checks ran; this is not
an exclusive-CPU lab result. The grouping instrumentation retains
999/1,000 group arrays after one item changes. That is reference
retention, not a measured React render count.

Native fingerprints, EAS CLI 27.4.1, production profile, before = after:
- iOS: `2a0ef03a2a0fda8e7fad2e3df8609803d2edbda3`
- Android: `c5c880ae8d0f5d7bc867fcbaf8f756b2ca56a07d`

Only JS/TS changes; no native build, dependency, EAS build or OTA
publication. The exports establish bundle sizes, not runtime FPS.

Validation: durable bounded mobile cache integration cases passed (4
tests, 34 assertions), including retry, concurrent duplicate saves, disk
eviction/resave and close fencing. Whole-stack checks are recorded on
the top PR. No UI tests or changed UI copy.

Additional Expo ESLint check: 18 errors and 1 warning on both the frozen
baseline and this branch, all in unchanged files (effects/ref rules and
Expo Updates namespace imports). The required root oxlint check is
clean. These existing Expo lint findings were not suppressed or folded
into this performance change.

The table records the isolated preparation change measured before the
image-cache layer was added. Original cumulative final Hermes sizes,
including that layer: iOS 9,927,705 B and Android 9,917,398 B; both
native fingerprints were identical to that baseline. The image-cache
measurements and limitations are in #419. Original full-suite status is
recorded on #416: one unchanged composer-shell timeout remained
unresolved at that handoff.

On-device work remains: React Native commit/render counts, Hermes JS/UI
frame times, real filesystem read/write latency, variable-height
FlatList window tuning, and native bitmap/process memory after repeated
image-viewer visits. `docs/client-performance.md` gives the workload and
profiling procedure. This layer leaves FlatList settings and image
viewer behavior unchanged relative to #419.
nixuuu added a commit that referenced this pull request Nov 9, 2026
### Rebase verification — 2026-11-09

The five-layer stack is rebased onto `dev` at
`2580ed75cdfc162e98e125b7c4d0b24eb81901b7`, including #418 and
#421–#426. All PRs remain ready for review. The measurements below
describe the original baseline; this section records the current
integration verification.

The attachment route now passes `If-None-Match` through #421's shared
response helper. Gateway authorization/read succeeds before a 304 is
possible; qualified IDs, thumbnail fallback, bounded preview/truncation,
sanitized public failures and `no-store` errors are retained. Mobile
image caching retains public error messages and reconnect retries.
Session startup, replacement pairing, unpair and revocation retain all
four caches: transcript, bot, archived sidebar and images. The
branch/worktree panel, channel identity and sheet gesture changes remain
intact.

Passed on the rebased top branch: `bun install`, `bun run gen:check`,
full `bun run typecheck`, root `bun run lint`, `bun run format:check`
and the production web build. Final focused `check:tmp`: **27 passed, 0
failed, 334 assertions across 7 files**, no temp leftovers (images,
immutable HTTP, transcript/archive/bot caches, two-gateway linked
previews and composer choices). Coverage includes a matching old ETag
returning 404 after ownership changes and 409 while the home is
unavailable, with `no-store` and no ETag; image/archive caches are wiped
together and late callbacks cannot restore them.

EAS CLI **27.4.1**, production profile, before/after the image-cache and
preparation layers and on the final top branch: **unchanged relative to
the latest dev baseline**:

- iOS: `bf3156a1bd878e10c0b0be25d4c194a837fb1b7e`
- Android: `d638e5f7b7fa87f54ccc0715c5fe150b8c0ad3ae`

These differ from the original measurement hashes below because #424
already changed native branding/configuration on dev. This stack adds no
native dependency/configuration change. Final production Hermes exports
passed sequentially with one Metro worker: iOS **9,971,620 B**, Android
**9,961,323 B**. These include the newly merged client features; the
earlier performance comparisons below retain their original baseline.
Expo Doctor: **20/20**. An additional Expo ESLint check of the conflict
files reports the same pre-existing `react-hooks/set-state-in-effect`
finding in `useImage.ts` on both this head and unmodified `origin/dev`;
session cleanup has no Expo ESLint findings. The required root oxlint
check passes.

No full local test run was started, as requested for the overloaded
shared machine. The earlier full-run timeout below is historical;
**GitHub CI is the current full-suite merge gate**. No native builds,
EAS builds, OTA publication or UI test suites were added. Previous
on-device profiling gaps remain.

---

Adds synthetic seeded data and a scripted worker so client measurements
can use a real gateway/BFF/EventSource path without inference or an
existing developer stack. The worker only produces synthetic answers;
credentials stay in process memory. Scripts clean up their own
servers/container and require a disk-backed TMPDIR.

| Metric / coverage | Before | After | Method / environment |
|---|---|---|---|
| Private database dataset | Empty | 500 threads; one with 1,000 turns
and 7,099 items | New disposable PostgreSQL only |
| Very long single answer | Moderate fixture answers | Last answer
repeated 64 times; configurable 1–100 in dev fixture | `answerRepeat=64`
|
| Streaming producer | In-process synthetic updates | 200 deltas at 25/s
over worker → gateway → BFF → SSE | Scripted worker, no CLI/model |
| Snapshot handler coverage | JSON-object decoder/reducer | Actual
EventSource arrival + string JSON parse + protobuf decode + state apply
| `probeThreadSnapshot(id,20)` |
| Navigation coverage | Renderer remount | SPA thread paint/focus-ready
proxy | `probeThreadNavigation(path)` |
| Bundle attribution | SvelteKit node numbers | Route names, all
layouts, shell and deduplicated JS/CSS closure | Generated SvelteKit
manifests |

`probeThreadStream(id)` sends a message and is intended exclusively for
the disposable synthetic thread. Both probes request incremental SSE,
ignore heartbeat frames when waiting for the first snapshot, and stream
completion follows the submitted turn's terminal state (including
coalesced updates). The seed gives threads a provider session identity
so submitted turns can start. BFF coalescing reduces the number of
delivered messages. Handler timing excludes rendering; the normal thread
page can remain subscribed to inspect the same stream. A sampled run
delivered 49 coalesced delta messages in 8.10 seconds, with handler
median / p95 of 0.2 / 0.3 ms on Chromium 156, Linux x86_64, 1280×800. It
generated 200 producer deltas at 25/s without inference.

This layer adds measurement coverage, not a production performance
claim. Navigation paint/focus readiness is not browser TTI. Cold FCP
depends on build/cache state. Native render counts, native UI frames,
filesystem latency and image bitmap memory still require an on-device
profile. No UI test suite was added. Polish `docs/client-performance.md`
documents commands and limits; whole-stack verification and measured
browser results are recorded on the top PR.

Fresh-launch verification after the tooling correction: a newly created
disposable database and production BFF accepted one synthetic message,
delivered 45 coalesced `itemDelta` events plus `itemCompleted` /
`turnFinished`, and persisted the turn as completed. No manual database
updates were needed. The bounded SSE capture intentionally stopped at
its 15-second curl deadline after completion; that deadline is not a
stream failure.
nixuuu added a commit that referenced this pull request Nov 9, 2026
### Rebase verification — 2026-11-09

The five-layer stack is rebased onto `dev` at
`2580ed75cdfc162e98e125b7c4d0b24eb81901b7`, including #418 and
#421–#426. All PRs remain ready for review. The measurements below
describe the original baseline; this section records the current
integration verification.

The attachment route now passes `If-None-Match` through #421's shared
response helper. Gateway authorization/read succeeds before a 304 is
possible; qualified IDs, thumbnail fallback, bounded preview/truncation,
sanitized public failures and `no-store` errors are retained. Mobile
image caching retains public error messages and reconnect retries.
Session startup, replacement pairing, unpair and revocation retain all
four caches: transcript, bot, archived sidebar and images. The
branch/worktree panel, channel identity and sheet gesture changes remain
intact.

Passed on the rebased top branch: `bun install`, `bun run gen:check`,
full `bun run typecheck`, root `bun run lint`, `bun run format:check`
and the production web build. Final focused `check:tmp`: **27 passed, 0
failed, 334 assertions across 7 files**, no temp leftovers (images,
immutable HTTP, transcript/archive/bot caches, two-gateway linked
previews and composer choices). Coverage includes a matching old ETag
returning 404 after ownership changes and 409 while the home is
unavailable, with `no-store` and no ETag; image/archive caches are wiped
together and late callbacks cannot restore them.

EAS CLI **27.4.1**, production profile, before/after the image-cache and
preparation layers and on the final top branch: **unchanged relative to
the latest dev baseline**:

- iOS: `bf3156a1bd878e10c0b0be25d4c194a837fb1b7e`
- Android: `d638e5f7b7fa87f54ccc0715c5fe150b8c0ad3ae`

These differ from the original measurement hashes below because #424
already changed native branding/configuration on dev. This stack adds no
native dependency/configuration change. Final production Hermes exports
passed sequentially with one Metro worker: iOS **9,971,620 B**, Android
**9,961,323 B**. These include the newly merged client features; the
earlier performance comparisons below retain their original baseline.
Expo Doctor: **20/20**. An additional Expo ESLint check of the conflict
files reports the same pre-existing `react-hooks/set-state-in-effect`
finding in `useImage.ts` on both this head and unmodified `origin/dev`;
session cleanup has no Expo ESLint findings. The required root oxlint
check passes.

No full local test run was started, as requested for the overloaded
shared machine. The earlier full-run timeout below is historical;
**GitHub CI is the current full-suite merge gate**. No native builds,
EAS builds, OTA publication or UI test suites were added. Previous
on-device profiling gaps remain.

---

Reduces allocations while retaining unchanged feed rows and loads the
bot settings editor only when it is first opened. Provider discovery and
the dynamic import run concurrently; the existing loading/error dialog,
generation fence and close animation remain in place. Web and the
Electron renderer share this build.

| Metric | Before | After | Method / environment |
|---|---:|---:|---|
| FeedBuilder unchanged 1,000-turn history, median / p95 | 25.829 /
37.331 ms | 16.725 / 31.636 ms | 30 Bun samples after 5 warmups; shared
machine with checks running |
| Initial shell JS, raw / gzip | 1,049,359 / 376,536 B | 978,327 /
348,632 B | Production static import closure |
| Thread route JS, raw / gzip | 1,602,296 / 565,283 B | 1,567,887 /
552,802 B | `/threads/[threadId]`, shell + layouts + page, deduplicated
|
| General settings JS, raw / gzip | 1,078,406 / 389,672 B | 1,007,374 /
361,768 B | `/settings/general`, same accounting |
| Bot conversation JS, raw / gzip | 1,230,361 / 443,477 B | 1,201,264 /
433,818 B | `/bots/[botId]`, same accounting |
| Initial shell CSS, raw / gzip | 241,576 / 39,106 B | 240,383 / 38,685
B | Production static import closure |
| Renderer remount, two-frame proxy | 20.3 ms | 17.8 ms | One warmed run
per revision, isolated 1,000-turn fixture |
| Streaming update + render/layout, mean / p95 | 18.58 / 24.6 ms | 12.89
/ 17.3 ms | Same fixture and deterministic 200 updates; not network
latency |
| Scroll frame mean / max | 16.67 / 16.8 ms | 16.66 / 16.8 ms | 80
scroll steps; zero frames over threshold in either run |
| Production cold first paint / FCP | 128 / 300 ms | 128 / 264 ms |
Single sample per origin, cold HTTP cache, 500-thread sidebar |
| Production first feed + focus-ready observation | 1,044.9 ms | 668 ms
| Tool-attachment upper bound, single sample; not precise TTI |
| Real SSE delta handler, median / p95 | 0.2 / 0.3 ms | 0.3 / 0.4 ms |
One ~8.2-second turn, 200 producer deltas at 25/s, JSON.parse + decode +
reducer only |

Environment: Bun 1.4.4, Linux x86_64, Ryzen 5 5600X, shared 15.5 GiB
memory, Chromium 156 at 1280×800. JS data: 1,000 turns, 7,099 items,
14,085,915 protobuf bytes. CPU comparisons use identical deterministic
input; no exclusive-CPU claim. Dynamic imports and highlighter grammars
are excluded from initial static closure totals.

The browser samples are descriptive measurements on a shared machine,
not statistically significant navigation or SSE speedup claims. BFF
coalescing delivered 49 delta messages before and 36 after in the
sampled network turns. The SSE reducer was not optimized here. Initial
real snapshots were 24-turn pages, not all 1,000 turns; their sampled
payloads differ after synthetic turns, so no snapshot speedup is
claimed.

Visual verification: real seeded thread with a 64× long answer, desktop
1280×800 and phone 390×844, light and dark, streaming, anchored
composer, lazy bot editor initial open/close/reopen and error display.
No horizontal document overflow observed. A visible completed answer
retained exactly the same viewport y coordinate (-465.664 px) throughout
a subsequent 8.2-second streamed turn while reading history. The fixture
stayed at zero bottom gap after streaming. Motion code and tokens are
unchanged; reduced-motion emulation was not available through the shared
browser tool and was not runtime-verified.

The existing timeline virtualizer limits mounted articles, but a single
huge answer still creates all its Markdown DOM and the 500-row sidebar
eventually mounts in full (26,215 total elements in the settled seeded
production page). The isolated fixture's mounted element count was 164
before / 114 after at sampled positions; variable visible rows make this
unsuitable as a DOM-reduction claim. These are remaining candidates, not
fixed problems in this PR.

Original validation: `bun install`, `gen:check`, full `typecheck`, root
`lint`, `format:check`, production web build and both Expo exports
passed. The original final full `check:tmp` finished with 1,919 pass /
161 skip / 1 fail, 22,240 assertions, 1,050.58 seconds, no temp
leftovers. The unchanged composer-shell test “Stop during a shell steer
kills its group and persists the failed delivery” hit a 10-second RPC
cancellation in both original final full runs; its focused retry passed.
At that handoff, the full gate was unresolved and the stack was draft.
No timeout, assertion or backend changes were made to obtain a pass. No
UI test suite was added.

| Actual 30-minute session | Before | After | Method / limitation |
|---|---:|---:|---|
| Duration | 1,801.418 s | 1,801.638 s | Same 1,000-turn fixture, 25
producer updates/s within each visit |
| Completed cycles / updates | 204 / 40,800 | 187 / 37,400 | Shared
host; the full test suite ran during the after-session |
| Handler median / p95 | 1.3 / 2.6 ms | 2.1 / 3.7 ms | Protobuf
JSON-object decode + reducer; excludes network/render |
| Long tasks / total duration | 1,444 / 131.895 s | 3,894 / 305.815 s |
Includes reset, stream and scroll; unequal concurrent load |
| Chromium heap counter, first → last | 109 → 364 MB | 342 → 462 MB |
Coarse/cached counter; no forced GC, different starting heaps |
| DOM first / last / range | 688 / 563 / 533–752 | 554 / 686 / 516–725 |
Entire isolated fixture page |

The long run was worse under its recorded conditions; it is not evidence
of a performance win. The concurrent suite took 1,580 seconds versus
1,029 seconds in the earlier successful run, confirming substantially
different observed runtime conditions without proving the cause of
either result. Heap counter growth cannot establish retained memory or
the absence of leaks; a DevTools memory profile with controlled GC
remains necessary. No memory improvement is claimed.

A subsequent short control without the full suite, using the same
1,000-turn fixture (after first, then before), recorded:

| Short session metric | Before | After | Method / limitation |
|---|---:|---:|---|
| Duration / cycles / updates | 126.187 s / 13 / 2,600 | 124.428 s / 14
/ 2,800 | One ~2-minute sample each; no own test suite, shared host |
| Long tasks / total duration | 174 / 16.882 s | 32 / 6.642 s | About
13.4 vs 2.3 long tasks/cycle; no exclusive-CPU claim |
| Handler median / p95 | 0.7 / 1.5 ms | 2.1 / 3.4 ms | Reducer timing
remains worse in this sample; no handler win claimed |

The short control did not reproduce the long-task regression and does
not establish long-session memory stability. A controlled CPU/memory
profile remains open before claiming an overall long-session
improvement. The paired Bun harness and bundle accounting are the
primary evidence for this change.

Failure follow-up: unchanged ask-user, composer-shell and
thread-mirror-deltas files passed together (42 tests, 226 assertions, 0
failures, clean temp directory, 38.70 seconds). The subsequent full run
passed ask-user and mirror cases but repeated the composer-shell
timeout. This does not establish the cause or make the full gate green.

The final stack includes the focused image-cache layer #419. Browser
validation on that final stack: 20 real thumbnails, 803,816 body bytes
on first pass, zero additional network requests/body bytes on a second
pass or reopening the thread. Existing web immutable caching already
provided repeat reuse; no additional web transfer improvement is
claimed. ETag/304, distinct variants and no-store 404 were observed.
Mobile final Hermes bundles are iOS 9,927,705 B / Android 9,917,398 B,
with unchanged production fingerprints. Final route bundle accounting is
identical to the table above.

The five focused cache and immutable HTTP checks passed (39 assertions),
including in the final full run. Expo Doctor passed 20/20 checks. All
owned benchmark servers and browser tabs were closed before the final
full checks.

Copy audit: no changed application UI text. No UI test suite was added.
Polish documentation records row equality, lazy loading and the
measurement method. This does not change FlatList tuning, markdown
parsing, native image memory, Electron main-process caches or
synchronization semantics.
nixuuu added a commit that referenced this pull request Nov 9, 2026
nixuuu added a commit that referenced this pull request Nov 9, 2026
The nightly iOS icon placed the complete rounded desktop artwork inside
a second scene, producing two frames, two moons and an undersized tree.
Generate mobile artwork directly from the bare, channel-graded tree:
opaque 1024×1024 RGB iOS scenes with a 70%-width tree, Android
foregrounds reduced 14% from the 66 dp safe-circle fit on the 108 dp
canvas, leaving at least 8% of the visible mask diameter between the
tree and every edge, and decoration placement that clears both the tree
and launcher masks.

Add the Android 13+ monochrome layer through Expo's existing config
support. Splash screens now use the bare tree on the channel background
in light and dark mode. Desktop icons, favicons and other web artwork
remain byte-for-byte unchanged.

**Native release:** these assets and config change the runtime
fingerprint. The icons and splash arrive with the next native build
triggered by the release pipeline; OTA cannot update existing launcher
icons. No EAS builds were run.

Fixes: #424

Validation:
- `bun install --frozen-lockfile` and `bun run gen:check` passed.
- `bun test scripts/channel-identity.test.ts`: 3 passed, including
RGB/no-alpha iOS output, tree scale/placement, Android visible-mask
margins and moon clearance, monochrome alpha and all EAS channel
profiles.
- `bun run typecheck`, `bun run lint` and `bun run format:check` passed.
- `bun run --filter @canopy/web build` passed; regeneration was
byte-for-byte identical by SHA-256.
- `CANOPY_CHANNEL={nightly,beta,stable} bunx expo config --type public`
resolved each channel's icon, adaptive layers and bare-tree splash. Full
local `check:tmp` was intentionally omitted on the shared machine; CI
remains the full-suite gate. No UI tests.

Reproduce assets and simulated mask previews with `bun
scripts/icons/channel-icons.ts --previews <directory>`. Local preview
artifacts (outside the repository):
- `/var/tmp/canopy-mobile-icons/mobile-previews.html` — overview.
-
`/var/tmp/canopy-mobile-icons/{nightly,beta,stable}-ios-{1024,180,120,87,60}.png`.
-
`/var/tmp/canopy-mobile-icons/{nightly,beta,stable}-android-{circle,squircle,rounded-square}.png`.
- `/var/tmp/canopy-mobile-icons/iphone-home-row.png` and
`/var/tmp/canopy-mobile-icons/testflight-large.png`.
- `/var/tmp/canopy-mobile-icons/expo-config-{nightly,beta,stable}.txt` —
resolved Expo configs.

Copy audit: no user-facing app text changed. The mask images are
simulated previews, not device screenshots.
nixuuu added a commit that referenced this pull request Nov 9, 2026
Dragging from a sheet's grabber or noninteractive header did nothing
after #425, while dragging Updates' refresh button could close it.
Shared chrome only requested the responder on movement; it never
explicitly claimed the initial touch. The handle was also only 28 dp
tall.

This change requests touch start in the **bubbling** phase on the shared
native drag-area View. A descendant Pressable gets first refusal, so
header buttons retain normal taps. Move capture takes over only for one
finger moving more than 6 dp vertically, with vertical travel greater
than horizontal travel. The grabber now occupies a full-width, 44 dp
zone with the visible pill centered and excluded from hit testing.

Acquiring the responder alone does not start a drag. Position work and
keyboard dismissal wait for deliberate vertical movement; a tap or
horizontal movement on plain chrome leaves both alone. The responder
factory remembers whether acquisition happened through move capture
because RN resets `dy` on grant. Existing gesture math, springs, exit
lifecycle, backdrop tracking, keyboard-first dismissal and accessibility
actions are preserved.

Fixes: #425

### Scope and responder review

- Shared `SheetDragArea` forwards handlers directly to a native View.
`SheetSurface`, `PickerSheet`, Updates and every other marked header
inherit the fix without per-screen handlers. The grabber uses the same
path. No gesture handlers were added to scrollable content.
- Inspected the shared surfaces, all grabber/header wiring and #425's
description/diff. The viewport's `pointerEvents="box-none"` leaves
children interactive; the sheet extension is below the surface and has
`pointerEvents="none"`. The existing translucent Android Modal and
safe-area layout remain unchanged.
- Reviewed [RN responder
bubbling/capture](https://reactnative.dev/docs/gesture-responder-system),
[PanResponder lifecycle](https://reactnative.dev/docs/panresponder), and
installed RN 0.88.1's `PanResponder.js` and Fabric responder
implementation. RN supports move negotiation without an existing
responder, so the refresh-button symptom is consistent with missing
initial acquisition on native chrome, rather than proof that move
negotiation always requires a child responder. Physical-device
reproduction was unavailable.
- JS/TS implementation only; no dependencies, native modules, assets,
app config or runtime policy changed. Updated the existing Polish mobile
documentation. No UI copy changed; copy audit is not applicable.

### Validation

- `bun install --frozen-lockfile` and `bun run gen:check` passed.
- `bun test tests/integration/mobile-sheet-gesture.test.ts`: **5 passed,
0 failed, 51 assertions**. Pure decision coverage includes initial
chrome acquisition, control/content exclusion, taps/jitter, vertical
direction and dominance, configurable threshold and multiple fingers;
existing distance/fling/rubber-band/re-grab coverage also passes.
- `bun run typecheck`, `bun run lint` and `bun run format:check` passed.
Expo ESLint passed for all three changed mobile source files.
- `bun run --filter @canopy/web build` passed.
- No full local `check:tmp`, UI tests, device/simulator runs, native
builds or OTA publication. CI is the full-suite gate; the device checks
below remain **unperformed**.

### OTA fingerprint comparison

Generated on clean current `dev`
(`04a871be3b18c4abf15910ec31d0071e69795d73`) before editing and on the
final implementation, from `apps/mobile`, for **both** platforms:

```sh
bunx [email protected] fingerprint:generate --platform ios --build-profile production --json --non-interactive
bunx [email protected] fingerprint:generate --platform android --build-profile production --json --non-interactive
```

| Platform | Current dev | This change |
| --- | --- | --- |
| iOS | `bf3156a1bd878e10c0b0be25d4c194a837fb1b7e` |
`bf3156a1bd878e10c0b0be25d4c194a837fb1b7e` |
| Android | `d638e5f7b7fa87f54ccc0715c5fe150b8c0ad3ae` |
`d638e5f7b7fa87f54ccc0715c5fe150b8c0ad3ae` |

Both runtime fingerprints are unchanged from current dev, including
#424's baseline changes. This supports OTA compatibility with that
runtime.

### Manual checks required on iOS and Android

Run the interaction checks for each applicable sheet in this matrix,
separately on iOS and Android. Include light/dark, a phone and a wide
window, and short/typical/long titles. These are instructions, not
claimed results.

| Sheet family | Coverage |
| --- | --- |
| Choice pickers | Model, effort, project, worker, provider/profile and
permission choices |
| Action menus | Thread actions, queued-message actions, attachment menu
and text actions |
| System sheets | Updates, connection details and gateway-update details
|
| Forms | Goal, side thread, queued-message editor, thread secrets,
search, quote editor and settings inputs |
| Full details | Thread, bot and other details/settings presented
through `SheetSurface`/`Sheet` |

| Interaction | Steps and expected result |
| --- | --- |
| Grabber | Start on the pill, then in the blank area near either side
of its full-width 44 dp zone. Drag slowly down. Each start must move the
sheet; a stationary tap must not start a drag. |
| Header empty area | Start on title text and on blank space in the
header row, away from controls. Move vertically beyond 6 dp. The sheet
must follow; horizontal movement and movement of 6 dp or less must not
begin a drag. |
| Header button drag | In Updates, start on Check now, then drag down
beyond 6 dp with vertical dominance. Repeat on a header close/action
button in a full sheet. The sheet must take over and the button action
must not fire on release. Disabled header controls must not create dead
drag zones. |
| Header button tap | Tap Check now or another enabled header action
without dragging. Its action must run once, with no sheet movement.
Repeat with small finger jitter. Tapping Close must use the normal exit
exactly once. |
| Keyboard open | In a searchable model picker and an editable form,
focus the input and type. A tap on plain chrome must leave the keyboard
alone. The first vertical drag must dismiss only the keyboard and keep
the sheet still for the rest of that touch; release, then drag again to
move/dismiss the sheet. Verify the draft remains intact. |

| Motion/lifecycle | Steps and expected result |
| --- | --- |
| Distance and fling | Without the keyboard, release a slow drag below
28% of sheet height: spring back. Release beyond 28%: dismiss. Fling
down after at least 8 dp at roughly 900 dp/s or faster: dismiss even
below 28%. Once active, slow downward travel must follow 1:1 and the
backdrop must track position. |
| Reversal and interruption | Drag up: bounded rubber-band resistance.
Reverse sharply upward before release: cancel dismissal. Re-grab during
spring-back: no position jump. Interrupt a gesture with OS controls or
Android back: no stuck sheet or stale gesture overwriting an exit. |
| Reduced motion and accessibility | Enable reduced motion: automatic
slides/springs become instant while dragging still works. With
VoiceOver/TalkBack, invoke the grabber's Close action and verify
dismissal; check accessibility escape where available. |
| Scroll and native Modal | Scroll content at the top and midway: native
scrolling must remain independent. Open/close repeatedly and
rotate/fold: no blocked hit areas, safe-area offsets or transparent
seams. On Android verify backdrop tap and back dismissal. |
nixuuu added a commit that referenced this pull request Nov 23, 2026
## What changed

Generate 16 pt and 32 pt macOS app icons using RGB and alpha-mask ICNS slots at 1× and Retina PNG slots at 2×. Regenerate the ICNS asset used by each desktop release channel from its existing artwork.

Thanks @kubaul for reporting the corrupted Canopy thumbnail in Raycast.

## Diagnosis

The published v0.8.0-nightly.4 macOS ZIP has the expected `app.canopy.desktop` bundle identifier and `CFBundleIconFile=icon.icns`. Its packaged icon matches the committed Nightly ICNS byte for byte. The small PNG payloads are valid in isolation, but the bundle contains `icp4`, `icp5` and `icp6` PNG slots. macOS has been observed to scramble these small representations when reading an application icon. The reporter sees the correct icon in Finder and the corrupted thumbnail in Raycast. The Raycast result's target and the affected versions are still pending, so the exact Raycast lookup and cache behavior remain unverified. [macOS bundle icon compatibility report](idesis-gmbh/png2icons#1)

## Verification

- Linux thread worker, commit `1867cd65`: `bun run check:tmp ./scripts/channel-identity.test.ts` passed (4 tests, 501 assertions). The new test failed against the original ICNS files. The expected RGB, alpha and Retina artwork are checked against each channel's source PNGs.
- On Linux, an independent Pillow decode of all 12 small representations matched the artwork pixel for pixel. The 128–1024 px ICNS payloads are byte-identical to the previous output in all channels, and regeneration is deterministic. Scripts typecheck, focused lint, formatting and diff checks passed.
- [macOS arm64 CI](https://github.com/itsoltech/canopy/actions/runs/45142112244/job/137583196262) passed: Apple's `iconutil` exported all four small representations for each channel. The installed bundle's thumbnail still needs a check in Raycast on a Mac, alongside Finder and Spotlight.

Fixes: #424
nixuuu added a commit that referenced this pull request Nov 23, 2026
## What changed

Canopy Desktop's startup and recovery screen now uses the official icon
for the installed Stable, Beta, or Nightly build. The sandboxed preload
exposes the icon path from the same build channel used by Electron
packaging. The local frontend serves it before a gateway connection is
available. Previously the startup screen always loaded the Stable
artwork, including on Beta and Nightly.

Thanks to @sstrzeminski for reporting the issue and sharing the startup
screenshot from
[0.8.0-nightly.4](https://github.com/itsoltech/canopy/releases/tag/v0.8.0-nightly.4).

Fixes: #424

## Verification

- On `nix-hetzner-1` at `18939b24`, built the Linux x64 desktop runtime
and produced unpacked Electron packages for Nightly, Beta, and Stable.
The packages share the renderer and contain their respective shell
builds.
- Launched the packaged Electron application with isolated profiles and
an Xvfb display. Verified the Nightly icon during configured local
startup while PostgreSQL was starting and verified all three icons on
the remote recovery screen without a reachable gateway. Chromium decoded
each image at 64 × 64 and the served bytes matched the official asset.
The Nightly first-run mode chooser also loaded.
- Ran `bun run check:tmp ./scripts/channel-identity.test.ts` (4 passing
tests, including platform icon configuration), focused lint, formatting
for the edited source files, and `git diff --check`. GitHub CI covers
the repository gate. Native macOS and Windows launch were outside this
Linux run.
nixuuu added a commit that referenced this pull request Nov 23, 2026
The macOS 0.8.0-nightly.7 ZIP contains the Nightly sidebar SVG. Its
SvelteKit asset table advertises Brotli and gzip versions, but desktop
packaging replaces the built channel directory with source assets and
drops both compressed files. The desktop package now copies the complete
web build, including the exact bytes its asset table describes.

macOS now uses the shell's channel name in the bundle localizations and
sets the running Dock icon from the installed channel artwork on launch.
A content-based ICNS filename gives Finder a fresh resource path when
the image changes. The updater keeps its existing installation path,
bundle ID and user data directory.

## Verification

- Reproduced the broken sidebar in Chromium using the web runtime and
client files from the published macOS ZIP. With the corrected Electron
resource copying applied to the original macOS CI runtime, the same
sidebar decoded the Nightly SVG at 24 CSS pixels. Brotli, gzip and
uncompressed responses all matched the source artwork.
- Repacked the original Linux CI runtime and ran the focused
paired-remote Desktop integration test against it. The release smoke now
reads and compares the decoded icon using both compressed encodings.
- Replayed electron-builder metadata and the packaging hook against the
macOS ZIP. All 55 bundle localizations had the Nightly name and the
referenced ICNS matched the intended artwork. The channel identity and
packaging suites passed 14 tests. The Desktop typecheck and scoped lint
passed.
- The macOS release runner will check how Finder resolves the name and
decode the installed ICNS and PNG. Visual confirmation on a Mac with an
existing Dock item remains pending.

## Copy audit

Dock label on Nightly changes from “canopy” to “Canopy (Nightly)”,
reusing the existing installed-channel display name.

Fixes: #1149
Fixes: #424
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