Skip to content

fix(desktop): release builds keep profile-switch publications — nanostores 1.4.2 (salvage #89690) - #89875

Merged
teknium1 merged 5 commits into
mainfrom
fix/nanostores-batch-142
Aug 19, 2026
Merged

fix(desktop): release builds keep profile-switch publications — nanostores 1.4.2 (salvage #89690)#89875
teknium1 merged 5 commits into
mainfrom
fix/nanostores-batch-142

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Release (minified) desktop builds get their profile-switch publications back: bumps nanostores 1.4.0 → 1.4.2 everywhere it's pinned. Salvaged from #89690 (@royzhrxy-glitch) with authorship preserved — his find, from a minified bundle diff.

Root cause (verified in an isolated repro AND our own build artifacts): nanostores 1.4.0 annotates batch() with /* @__NO_SIDE_EFFECTS__ */. Rollup honors it during vite build and deletes any result-unused batch(...) call — callback included — from release bundles. Dev builds and vitest run unminified, which is why the #89483 series tested green while shipping a dead profile switcher (#89622), and why the just-merged #89797's $connection descriptor sync (the #46651 half) was dead code in packaged builds. 1.4.2 removes the annotation from batch (it stays on the pure creation functions, where it's correct).

Changes

  • apps/desktop/package.json, apps/bootstrap-installer/package.json, ui-tui/package.json: nanostores 1.4.0 → 1.4.2 (+ lock entries)
  • apps/desktop/src/store/nanostores-batch-guard.test.ts (contributor's): CI fails if a purity annotation ever returns to batch
  • contributors/emails/: attribution mapping

Validation

Result
Isolated repro (same source, vite build) 1.4.0: batched publication ERASED from bundle · 1.4.2: present
Our minified profile-*.js after bump batch() publication present (was absent on 1.4.0)
Live E2E on the bumped minified build switches land (warm 0.3s / cold 1.2s), interleave last-click-wins, descriptor resolves for the switched profile
Targeted vitest (guard + lease + profile suites) 19/19

Infographic

Not included: FAL image account balance exhausted at PR time (User is locked. Exhausted balance). Can be added via gh pr edit after top-up.

royzhrxy-glitch and others added 2 commits August 19, 2026 01:29
…stores 1.4.2)

nanostores 1.4.0-1.4.1 annotate batch() @__NO_SIDE_EFFECTS__. Rollup
(via vite build) honors that and erases a result-unused batch(...) call
as dead code -- callback included. Since d57f94a/053eb7aab/4e520f085
moved the gateway-switch publication (activate() +
+ ) inside batch(), packaged desktop builds lost the entire
publication: clicking a profile in the rail did nothing at all.

Dev builds and vitest run unminified, so only the packaged app broke.

nanostores 1.4.2 removes the annotation from batch() (it stays on the
creation functions, where it is correct). Bump all three pinned copies
(apps/desktop, apps/bootstrap-installer, ui-tui) and add a regression
test asserting the installed nanostores never re-annotates batch.
@teknium1
teknium1 requested a review from a team August 19, 2026 08:30
@teknium1 teknium1 closed this Aug 19, 2026
@teknium1 teknium1 reopened this Aug 19, 2026
@alt-glitch alt-glitch added type/bug Something isn't working P1 High — major feature broken, no workaround comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) area/profiles Multi-profile isolation, HERMES_HOME scoping sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Aug 19, 2026
@teknium1
teknium1 merged commit 5a3410e into main Aug 19, 2026
53 of 54 checks passed
@teknium1
teknium1 deleted the fix/nanostores-batch-142 branch August 19, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping comp/desktop Electron desktop app (apps/desktop/*) comp/tui Terminal UI (ui-tui/ + tui_gateway/) P1 High — major feature broken, no workaround sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants