Add temp-local-stack option to the debug environment switcher#28
Add temp-local-stack option to the debug environment switcher#28IliaMManolov wants to merge 2 commits into
Conversation
electron-builder races itself creating the GitHub release: the dmg and zip artifacts finish near-simultaneously, PublishManager's async publisher cache misses for both, two GitHubPublisher instances are created, and both POST /releases for the same tag. The loser fails with 422 "Published releases must have a valid tag", killing the job after a successful notarization and leaving a half-uploaded release without the update-channel yml (all 7 demo release runs failed this way). Pre-create the release as a draft before electron-builder runs so every publisher instance finds and reuses it, then flip it public once all assets (including beta.yml/latest.yml) are uploaded. This also makes publishing atomic: auto-updaters never see a partially-uploaded release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds "temp-local-stack" to DEBUG_ENV_NAMES so the Developer > Switch Environment menu can point the app at the Railway-hosted offline stack (local-stack-backend in the edison-watch demo project). URLs resolve via the shared TEMP_LOCAL_STACK_CONFIG (Edison-Watch/shared#18). The two hardcoded env-name checks are replaced with an isDebugEnvName() guard derived from DEBUG_ENV_NAMES. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
1 issue found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/main/infra/setupConfig.ts">
<violation number="1" location="src/main/infra/setupConfig.ts:27">
P1: Selecting `temp-local-stack` can persist the new env without actually resolving its Railway URLs, because the locked `@edison-watch/shared@0.1.0` does not contain that config. Updating the shared package/lockfile with the companion config keeps the new menu option from silently pointing at the previous environment.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| export const DEBUG_ENV_NAMES = ["demo", "release", "dev"] as const; | ||
| // "temp-local-stack" = Railway-hosted offline stack (local-stack-backend in the | ||
| // edison-watch demo project); URLs come from the shared TEMP_LOCAL_STACK_CONFIG. | ||
| export const DEBUG_ENV_NAMES = ["demo", "release", "dev", "temp-local-stack"] as const; |
There was a problem hiding this comment.
P1: Selecting temp-local-stack can persist the new env without actually resolving its Railway URLs, because the locked @edison-watch/shared@0.1.0 does not contain that config. Updating the shared package/lockfile with the companion config keeps the new menu option from silently pointing at the previous environment.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/main/infra/setupConfig.ts, line 27:
<comment>Selecting `temp-local-stack` can persist the new env without actually resolving its Railway URLs, because the locked `@edison-watch/shared@0.1.0` does not contain that config. Updating the shared package/lockfile with the companion config keeps the new menu option from silently pointing at the previous environment.</comment>
<file context>
@@ -22,15 +22,21 @@ if (DRY_RUN) console.log("[dry-run] Dry-run mode enabled - config files will not
-export const DEBUG_ENV_NAMES = ["demo", "release", "dev"] as const;
+// "temp-local-stack" = Railway-hosted offline stack (local-stack-backend in the
+// edison-watch demo project); URLs come from the shared TEMP_LOCAL_STACK_CONFIG.
+export const DEBUG_ENV_NAMES = ["demo", "release", "dev", "temp-local-stack"] as const;
export type DebugEnvName = (typeof DEBUG_ENV_NAMES)[number];
</file context>
What
Adds a
temp-local-stackoption to Developer > Switch Environment that points the app at the Railway-hosted instance of the offline local stack (local-stack-backendin theedison-watchproject'sdemoenvironment,https://local-stack-backend-demo.up.railway.app), so devs can test against the shared offline stack without running docker locally.Companion to Edison-Watch/shared#18, which defines the
TEMP_LOCAL_STACK_CONFIGURLs this option resolves to; this PR needs a shared package version containing that change.Changes
"temp-local-stack"added toDEBUG_ENV_NAMES; the menu radio item,env:changedrenderer reload, MCP re-apply, and URL resolution all come from the existing generic code.getBuildDefaultEnv,getDebugEnvOverride) are replaced with anisDebugEnvName()guard derived fromDEBUG_ENV_NAMES, so future env additions are one-line.temp-local-stack (railway offline).useAuth's env sync only special-casesdev, so the new name flows through tolocalStorageand the sharedCONFIGSlookup.Notes
admin@localadopts the owner row.Verified
npm run typecheck(node + web) passes with the rebuilt shared package. The auth path was smoke-tested end-to-end against the live Railway instance (signup, password grant,get-api-key).🤖 Generated with Claude Code
Summary by cubic
Adds a new
temp-local-stackoption to Developer > Switch Environment so devs can point the app at the shared Railway offline stack without running Docker. Also fixes a GitHub Releases race by pre-creating a draft release and publishing only after assets upload, making releases reliable.New Features
temp-local-stacktoDEBUG_ENV_NAMESwith menu label "temp-local-stack (railway offline)".isDebugEnvName()derived fromDEBUG_ENV_NAMES.TEMP_LOCAL_STACK_CONFIG(requires updated shared package).Bug Fixes
electron-builderrelease race by pre-creating a draft inrelease.ymlandrelease-demo.yml.publish=true) to ensurebeta.yml/latest.ymlare present and avoid partial releases.Written for commit fb917af. Summary will update on new commits.