Commit Graph

3156 Commits

Author SHA1 Message Date
Aiden McClelland
7335e52ab3 fix: daemon lifecycle cleanup and error logging improvements
- Refactor HealthDaemon to use a tracked session (AbortController + awaitable
  promise) instead of fire-and-forget health check loops, preventing health
  checks from running after a service is stopped
- Stop health checks before terminating daemon to avoid false crash reports
  during intentional shutdown
- Guard onExit callbacks with AbortSignal to prevent stale session callbacks
- Add logErrorOnce utility to deduplicate repeated error logging
- Fix SystemForEmbassy.stop() to capture clean promise before deleting ref
- Treat SIGTERM (signal 15) as successful exit in subcontainer sync
- Fix asError to return original Error instead of wrapping in new Error
- Remove unused ExtendedVersion import from Backups.ts
2026-03-20 13:50:57 -06:00
Aiden McClelland
b54f10af55 fix: rsync backup bugs and optimize flags for encrypted CIFS targets
- Fix restoreBackup using backupOptions instead of restoreOptions
- Add missing await on preRestore/postRestore hooks
- Remove -c (checksum) flag that forced full reads on every run
- Add --partial to keep partially transferred files on interruption
- Add --inplace to avoid temp-file+rename metadata churn
- Add --timeout=300 to prevent hangs on stalled mounts
2026-03-20 11:56:53 -06:00
Matt Hill
0549c7c0ef fix build 2026-03-20 08:50:54 -06:00
Matt Hill
2a8d8c7154 alpha.22 2026-03-20 08:37:36 -06:00
Matt Hill
03d7d5f123 Merge branch 'fix/wifi' of github.com:Start9Labs/start-os into fix/wifi 2026-03-20 08:23:14 -06:00
Matt Hill
2fd674eca8 bump tor 2026-03-20 08:23:12 -06:00
waterplea
0e9c90f2c0 chore: fix icons in marketplace 2026-03-20 11:16:45 +04:00
Matt Hill
bca2e4d630 feat: add restart button to start-tunnel settings page
Adds a VPS restart button to the settings page, above logout. Shows a
spinner while the RPC completes, then a dialog telling the user to wait
1-2 minutes and refresh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 23:27:21 -06:00
Alex Inkin
f41fc75024 chore: make service icons not round and add wifi lock badge (#3139)
* chore: make service icons not round and add wifi lock badge

* chore: comments
2026-03-19 18:18:25 -06:00
Matt Hill
56cb3861bc fix build 2026-03-19 18:00:22 -06:00
Matt Hill
2999d22d2a fix: RunAction task re-evaluation compared against partial input, not full config
Bug: After running an action (e.g. bitcoin's autoconfig), update_tasks was
called with the submitted form input — which for task-triggered actions is
filtered to only the task's fields (e.g. {zmqEnabled: true}). Other services'
tasks targeting the same action were then compared against this partial via
is_partial_of, so any task wanting a field NOT in the submission (e.g.
{blocknotify: "curl..."}) would incorrectly become active, even though the
full config still satisfied it.

This caused a cycling bug: running LND's autoconfig (zmqEnabled) would
activate Datum's task (blocknotify), and vice versa, despite the merge
correctly preserving both values in the config.

Fix: After running an action, fetch the full current config via
get_action_input (same as create_task and recheck_tasks already do) and
compare tasks against that.

The one-liner fix would have been to add a get_action_input call in the
RunAction handler. Instead, we extracted eval_action_tasks on
ServiceActorSeed — a single method that both RunAction and recheck_tasks
now call — because the duplication between these two sites is exactly how
this bug happened: recheck_tasks fetched the full config, RunAction didn't,
and they silently diverged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:43:08 -06:00
Matt Hill
bb745c43cc fix: createTask with undefined input values fails to create task
Bug: Setting a task input property to undefined (e.g. { prune: undefined })
to express "this key should be deleted" resulted in no task being created.
JSON.stringify strips undefined values, so { prune: undefined } serialized
as {}, and is_partial_of({}, any_config) always returns true — meaning
input-not-matches saw a "match" and never activated the task.

Fix (two parts):
- SDK: coerce undefined to null in task input values before serialization,
  so they survive JSON.stringify and reach the Rust backend
- Rust: treat null in a partial as matching a missing key in the full
  config, so tasks correctly deactivate when the key is already absent

Assumption: null and undefined/absent are semantically equivalent for
StartOS config values. Input specs produce concrete values (strings,
numbers, booleans, objects, arrays) — null never appears as a meaningful
distinct-from-absent value in real-world configs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:28:04 -06:00
Matt Hill
de9a7e4189 fix types 2026-03-19 13:38:40 -06:00
Matt Hill
8fbcf44dec fix 2026-03-19 11:54:28 -06:00
Matt Hill
97b3b548c0 fix type 2026-03-19 11:42:43 -06:00
Matt Hill
6c72a22178 SDK beta.62: fix dynamicSelect crash on empty values, add smtpShape
- Guard z.union() against empty arrays in dynamicSelect/dynamicMultiselect
  by falling back to z.string() (fixes zod v4 _zod TypeError)
- Add smtpShape: typed zod schema for store file models, replacing
  smtpInputSpec.validator which caused cross-zod-instance errors
- Bump version to 0.4.0-beta.62

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 11:30:37 -06:00
Aiden McClelland
d7c394ef33 chore: update generated TS bindings 2026-03-19 01:07:45 -06:00
Aiden McClelland
96dcd126db feat: support restoring backups from a different server 2026-03-19 01:07:37 -06:00
Aiden McClelland
e4b0f56fa7 fix: use tmpfs and lazy unmounts in chroot-and-upgrade 2026-03-19 01:07:23 -06:00
Aiden McClelland
3ef99eca87 fix: allow private access to vhost targets on public gateways 2026-03-19 00:41:48 -06:00
Aiden McClelland
f64c543747 fix: add sudo to prune scripts and truncate b3sum in update-squashfs 2026-03-19 00:13:33 -06:00
Aiden McClelland
292a914307 fix: use shared futures for ACME cert acquisition with 2m timeout 2026-03-19 00:06:34 -06:00
Aiden McClelland
9a58568053 fix: send TLS alerts on handshake timeout and unrecognized SNI 2026-03-19 00:06:25 -06:00
Aiden McClelland
34e01d4223 fix: increase RPC connect timeout from 30s to 60s 2026-03-18 23:49:44 -06:00
Aiden McClelland
427c38f23b feat: add tunnel restart command 2026-03-18 23:49:29 -06:00
Aiden McClelland
d669aa9afb fix: retry BLKRRPART on busy device during OS install 2026-03-18 23:48:49 -06:00
Aiden McClelland
bcdeabfe85 fix: clap CLI definitions and manpage generation
- add #[group(skip)] to all Parser-derived structs
- fix conflicts_with and arg definitions for correct CLI behavior
- refactor bin entry points to support manpage generation
2026-03-18 23:48:13 -06:00
Aiden McClelland
b1b7d2fa70 feat: add xml file helper to SDK 2026-03-18 23:47:17 -06:00
Aiden McClelland
476b10c413 chore: update dependencies and build scripts 2026-03-18 23:47:05 -06:00
Matt Hill
6e56682c11 better wifi ux 2026-03-18 16:52:47 -06:00
Aiden McClelland
9ed6c1263c fix: derive wifi interface dynamically from gateway info instead of detecting at startup
Remove static wifi_interface/ethernet_interface fields from RpcContextSeed. Instead, look up
the wifi interface from the DB (populated by gateway sync) and check ethernet connectivity
by querying gateway entries. This ensures the wifi manager always uses the correct interface
even if network devices change after boot.
2026-03-18 16:01:41 -06:00
Matt Hill
5cf70dc8f5 fix staging docs ref 2026-03-18 15:57:08 -06:00
Matt Hill
1358937fa9 fix private domain dns ip and hide private domaains for wg gateways 2026-03-18 15:55:56 -06:00
Matt Hill
0e9d4f5d53 better wifi page 2026-03-18 14:16:18 -06:00
Matt Hill
59550d6f5e dont hide header if table members 2026-03-18 13:52:20 -06:00
Aiden McClelland
68c3d87c5e Merge pull request #3133 from Start9Labs/bugfix/alpha.20
Bugfixes for alpha.20
v0.4.0-alpha.21
2026-03-17 15:19:24 -06:00
Matt Hill
24c1f47886 move skip button to left 2026-03-17 15:12:22 -06:00
Aiden McClelland
1b9fcaad2b fix: use proper mount types for proc/sysfs/efivarfs in chroot scripts
Replace bind mounts with typed mounts (mount -t proc, mount -t sysfs,
mount -t efivarfs) for /proc, /sys, and efivars in chroot environments.
2026-03-17 15:11:22 -06:00
Aiden McClelland
900d86ab83 feat: preserve volumes on failed install + migrate ext4 to btrfs
- COW snapshot (cp --reflink=always) of package volumes before
  install/update; restore on failure, remove on success
- Automatic ext4→btrfs conversion via btrfs-convert during disk attach
  with e2fsck pre-check and post-conversion defrag
- Probe package-data filesystem during setup.disk.list (on both disk
  and partition level) so the UI can warn about ext4 conversion
- Setup wizard preserve-overwrite dialog shows ext4 warning with
  backup acknowledgment checkbox before allowing preserve
2026-03-17 15:11:16 -06:00
Matt Hill
c1a328e5ca remove redundant success message 2026-03-17 11:51:16 -06:00
Matt Hill
2903b949ea fix notification display in marketplace 2026-03-17 08:55:50 -06:00
Aiden McClelland
8ac8dae6fd fix: set /media/startos permissions to 750 root:startos in image build 2026-03-16 21:29:01 -06:00
Aiden McClelland
0e8dd82910 chore: re-add raspberrypi to CI 2026-03-16 20:16:07 -06:00
Aiden McClelland
873922d9e3 chore: fix mac build 2026-03-16 20:10:51 -06:00
Aiden McClelland
c9ce2c57b3 chore: bump sdk to 0.4.0-beta.61 2026-03-16 20:10:09 -06:00
Aiden McClelland
6c9cbebe9c fix: correct argument order in asn1_time_to_system_time
The diff() method computes `compare - self`, not `self - compare`.
The reversed arguments caused all cert expiration times to resolve
to before the unix epoch, making getSslCertificate callbacks fire
immediately and infinitely on every registration.
2026-03-16 20:10:02 -06:00
Aiden McClelland
dd9837b9b2 refactor: convert service callbacks to DbWatch pattern
Convert getServiceInterface, listServiceInterfaces, getSystemSmtp, and
getServiceManifest from manual callback triggers to DbWatchedCallbacks.
getServiceManifest now always returns the installed manifest.
2026-03-16 20:09:10 -06:00
Aiden McClelland
7313693a9e fix: use lazy umount in chroot-and-upgrade 2026-03-16 20:08:59 -06:00
Aiden McClelland
66a606c14e fix: prevent consts from triggering after leaving effect context 2026-03-16 20:07:59 -06:00
Matt Hill
7352602f58 fix styling for table headers and show alert for language change 2026-03-16 18:55:15 -06:00