Commit 7bcdc19
fix(wix): Start menu shortcut becomes smart launcher, not setup-only
The Start menu shortcut had Arguments='setup' which forced the setup
wizard every time the user clicked it. After someone successfully
completed setup, clicking the shortcut to launch the camera dashboard
re-prompted for Node ID + API key + URL — making it look like
credentials weren't being saved when in fact they were saved fine,
the shortcut just always took the explicit setup path.
Root cause in main.rs:261:
let needs_setup = match &args.command {
Some(Commands::Setup { .. }) => true, // always true
Some(Commands::Run { .. }) | None => /* check creds */,
...
};
`Commands::Setup` unconditionally re-runs the wizard. The bare
invocation (`None` arm) is the smart path — it checks Config::load
for existing credentials and runs the node if they're present, or
falls through to the wizard if not.
Fix: drop the Arguments='setup' attribute on the Start menu shortcut
so clicking it invokes the binary with no subcommand. The bare path
then handles both first-launch (no creds → wizard → run) and every-
launch-after (creds present → straight to dashboard).
Also renamed the shortcut from "SourceBox Sentry CloudNode Setup"
(implies setup-only behaviour) to "SourceBox Sentry CloudNode"
(reflects its new role as a normal app launcher). Shortcut Id
changed from ShortcutSetup → ShortcutLauncher; the WiX Component
Guid is unchanged so the upgrade chain still recognises this as the
same shortcut row, just renamed.
The MSI Finish-dialog LaunchSetup CustomAction (top of wxs) is
unaffected — it's a separate code path that explicitly passes
`setup` because the Finish dialog needs to spawn a fresh console.
That path correctly forces the wizard on first install.
Operators who genuinely want to RECONFIGURE (change Node ID, point
at a different Command Center, etc.) can run
`sourcebox-sentry-cloudnode setup` from any console — the explicit
subcommand still forces the wizard, by design.
Bumps version to 0.1.33.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d86a132 commit 7bcdc19
3 files changed
Lines changed: 28 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
339 | 358 | | |
340 | 359 | | |
341 | 360 | | |
342 | 361 | | |
343 | | - | |
344 | | - | |
345 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
346 | 365 | | |
347 | | - | |
348 | 366 | | |
349 | 367 | | |
350 | 368 | | |
| |||
0 commit comments