Conversation
…dded welcome wizard step, auto-start tunnel on setup complete)
There was a problem hiding this comment.
Pull request overview
This PR updates SysDeck’s first-run and startup experience by removing the setup-key gate, adding a browser “welcome” step to onboarding, auto-starting the Cloudflare relay after setup (when opted in), and reducing Windows console flashing by spawning child processes without creating a new window.
Changes:
- Frontend: replaced the setup-token gate with a new Welcome step and adjusted the setup step flow.
- Backend: introduced
new_command/new_tokio_commandwrappers to spawn child processes silently on Windows, and auto-start the tunnel after setup completion when opted in. - Project hygiene/docs: added a Keep-a-Changelog
CHANGELOG.md, adjusted CI triggers fordev, and updated README setup documentation.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates onboarding + setup API documentation (currently needs alignment with the new no-setup-key flow). |
| frontend/src/pages/Setup.tsx | Adds Welcome step and updates step indicator / step transitions for the setup wizard. |
| CHANGELOG.md | Introduces a changelog documenting 1.0.0–1.1.0 changes. |
| backend/tests/common/mod.rs | Updates test app state construction after removing setup token from AppState. |
| backend/src/tunnel.rs | Switches tunnel spawning to the new silent tokio command helper. |
| backend/src/telemetry.rs | Uses the silent command helper for PowerShell WMI polling on Windows. |
| backend/src/setup.rs | Prevents password setup after setup completion; auto-starts tunnel after finishing setup when opted in. |
| backend/src/script.rs | Uses silent command helpers for process killing and script execution to prevent console flashing. |
| backend/src/process.rs | Uses silent command helper for taskkill on Windows. |
| backend/src/power.rs | Uses silent command helper for OS power-management commands. |
| backend/src/network.rs | Uses silent command helper for network probing commands (including PowerShell). |
| backend/src/main.rs | Removes setup-key banner and replaces startup console output with a new box-drawing banner + Enter-to-open behavior. |
| backend/src/lib.rs | Removes setup_token from AppState; adds new_command / new_tokio_command helpers; updates registry startup commands to use the helper. |
| backend/src/hardware.rs | Uses silent command helper for PowerShell and shutdown invocations. |
| .github/workflows/ci.yml | Expands CI triggers to include the dev branch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+91
to
98
| pub fn new_tokio_command<S: AsRef<std::ffi::OsStr>>(program: S) -> tokio::process::Command { | ||
| let mut cmd = tokio::process::Command::new(program); | ||
| #[cfg(target_os = "windows")] | ||
| { | ||
| cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW | ||
| } | ||
| cmd | ||
| } |
Comment on lines
+142
to
+143
| 5. Generates a one-time **Setup Key** printed to the console window. This key acts as a security token to verify physical/owner access to the host machine. | ||
| 6. Opens your browser to the first-run Setup Wizard, where you must enter this Setup Key to unlock configuration steps (admin credentials, TOTP, and remote access relay). |
Comment on lines
266
to
+268
| | POST | `/api/setup/totp` | Generate TOTP secret (step 2) | | ||
| | POST | `/api/setup/verify-totp` | Verify TOTP code (step 3) | | ||
| | POST | `/api/setup/recovery-codes` | Generate recovery codes (step 4) | | ||
| | POST | `/api/setup/relay` | Set Cloudflare relay opt-in (step 4) | |
Comment on lines
+92
to
+107
| let needs_setup = { | ||
| let conn = state.db.lock().await; | ||
| db::is_setup_complete(&conn).map(|c| !c).unwrap_or(true) | ||
| }; | ||
|
|
||
| if !needs_setup { | ||
| tracing::warn!(handler = "api_password_handler", "setup already complete"); | ||
| return ( | ||
| StatusCode::BAD_REQUEST, | ||
| Json(serde_json::json!({ | ||
| "success": false, | ||
| "error": "Setup is already completed" | ||
| })), | ||
| ) | ||
| .into_response(); | ||
| } |
Comment on lines
+313
to
+318
| if flow.relay_opt_in { | ||
| let ts = state.tunnel_state.clone(); | ||
| tokio::spawn(async move { | ||
| let _ = crate::tunnel::TunnelState::start(ts).await; | ||
| }); | ||
| } |
Comment on lines
+420
to
+434
| tokio::task::spawn_blocking(move || { | ||
| let mut buf = String::new(); | ||
| // Returns Ok(0) on EOF (stdin closed by FreeConsole) or Ok(n) on Enter. | ||
| let _ = std::io::stdin().read_line(&mut buf); | ||
|
|
||
| #[cfg(windows)] | ||
| { | ||
| detach_splash_console(); | ||
| open_dashboard_once(); | ||
| } | ||
| #[cfg(not(windows))] | ||
| { | ||
| let _ = open::that(format!("http://localhost:{}", port)); | ||
| } | ||
| }); |
…_command on non-Windows platforms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed
Fixed