/improve_plan @thoughts/shared/plans/2026-04-23-desktop-pre-release-batch.md consider…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
/improve_plan @thoughts/shared/plans/2026-04-23-desktop-pre-release-batch.md
consider the sentry env solution.
im currently thinking that perhaps we need to introduce a more-long-term env maintainbility taking inspiration from @apps/www/src/env.ts and @apps/www/next.config.ts (where next.config) basicall at build time / runtime is these are not presetn it crashes.
im wondering if t3-oss/env-core or maybe a custom solution could solve this.
this a clear full expansion of the env but i think it's important to get right now.
search t3-oss env-core on the web if neded or find how other poeple solve the env problem in electron
- User
improve_plan /improve_plan @thoughts/shared/plans/2026-04-23-desktop-pre-release-batch.md
consider the sentry env solution.
im currently thinking that perhaps we need to introduce a more-long-term env maintainbility taking inspiration from @apps/www/src/env.ts and @apps/www/next.config.ts (where next.config) basicall at build time / runtime is these are not presetn it crashes.
im wondering if t3-oss/env-core or maybe a custom solution could solve this.
this a clear full expansion of the env but i think it's important to get right now.
search t3-oss env-core on the web if neded or find how other poeple solve the env problem in electron
Assistant· claude-opus-4-7
I'll start by reading the plan, then dig into the desktop env surface and research t3-oss/env-core for Electron.
Assistant· claude-opus-4-7
Assistant· claude-opus-4-7
Before I edit, one spike question — the riskiest new assumption in this rewrite is whether
@t3-oss/env-core(ESM-only) actually loads cleanly inside the packaged main bundle produced byelectron-forge package. Web research flagged this as MED-confidence (electron-forge's Vite plugin doesn't setssr.noExternalby default; electron-vite does). If createEnv throws at app startup in production, the whole env overhaul collapses and we'd need to rework.Assistant· claude-opus-4-7
Spike CONFIRMED —
@t3-oss/env-corebundles inline into Forge's main CJS bootstrap, nossr.noExternalneeded. Now editing the plan.Assistant· claude-opus-4-7
Now update Phase F's
.env.exampleto reference the new schema, and append the Improvement Log.Assistant· claude-opus-4-7
Now update the Phase A → B dependency note (Phase B now requires Phase A's
SENTRY_DSNsecret for end-to-end validation) and append the Improvement Log.Assistant· claude-opus-4-7
Now find the end of the file and append the Improvement Log.
Assistant· claude-opus-4-7
Plan updated. Summary of what changed in Phase B and why:
Phase B title: "Forge config + Sentry DSN injection + sparkle cleanup" → "Env layer overhaul + forge config + sparkle cleanup".
Core change: the hand-rolled
parseRuntimeEnvinsrc/shared/env.ts(which silently returned{}on validation failure) is deleted. Replaced with two t3-envcreateEnvcalls:- User
commit /commit
Assistant· claude-opus-4-7
Only the plan file was modified in this session. It's currently untracked (new file). Everything else in the working tree was untouched by me.
Proposed commit:
Files:
thoughts/shared/plans/2026-04-23-desktop-pre-release-batch.md(new file,git addfor first time)
Message:
codedocs(plans): add desktop pre-release batch plan with env layer overhaul Six-phase plan to get apps/desktop from quick-wins-applied to a signed, notarized, auto-updating @lightfast/desktop@0.1.0 macOS release. Phase B replaces the hand-rolled parseRuntimeEnv (silent-fail on validation) with a t3-env-based env layer matching the apps/www convention — spike- confirmed that @t3-oss/env-core inlines cleanly into Forge's CJS main bundle, no ssr.noExternal needed. Sentry DSN baked via __SENTRY_DSN__ custom-token define per Sentry's Electron troubleshooting guidance.- User
yes
Assistant· claude-opus-4-7
Committed as
e60e081c1onfix/microfrontends-proxy-turbo29-cleanup(branch switched from the session-startfeat/desktop-clerk-loopbacksomewhere along the way — flagging in case unexpected).