Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
d1a4339
feat: add native caelestia adapter
ilyaZar Oct 7, 2026
acee0bb
fix: restore native panel behavior parity
ilyaZar Oct 7, 2026
d4ab2c9
fix: complete error details and action feedback
ilyaZar Oct 7, 2026
0f17bdd
fix: render native tooltip details as plain text
ilyaZar Oct 7, 2026
51954e2
fix: guard retired controllers and validate settings
ilyaZar Oct 7, 2026
852c9d3
fix: recheck invitations and preserve selector identity
ilyaZar Oct 7, 2026
e5b14a4
fix: reject profile changes from inactive owners
ilyaZar Oct 7, 2026
0c85fee
feat: support adapter owned web ui profiles
ilyaZar Oct 7, 2026
f134d2b
feat: expose authorized actions to shell adapters
ilyaZar Oct 7, 2026
33e2e31
feat: add native dms adapter and packaging
ilyaZar Oct 7, 2026
cffbf22
style: align dms qml with omarchy formatting
ilyaZar Oct 7, 2026
ea089fb
fix: restore dms parity with current omarchy
ilyaZar Oct 7, 2026
932cda2
fix: preserve drafts and complete panel feedback
ilyaZar Oct 7, 2026
f2d434e
fix: preserve drafts and stop retired workers
ilyaZar Oct 7, 2026
218ddaf
fix: reject stale invitations and unchanged shares
ilyaZar Oct 7, 2026
11f28d3
fix: keep palette updates within the selected profile
ilyaZar Oct 7, 2026
a8b52ab
fix: render native dms folder details as plain text
ilyaZar Oct 21, 2026
33c28f7
fix: make native caelestia external text explicitly plain
ilyaZar Oct 21, 2026
0c4dd22
refactor: name omarchy ui files after panel areas
ilyaZar Oct 25, 2026
2acb40e
refactor: move omarchy panel footer into its own files
ilyaZar Oct 25, 2026
9b7a4e8
Merge branch 'dev' into feat-native-port-dms
ilyaZar Oct 25, 2026
a10d283
Merge branch 'dev' into feat-native-port-caelestia
ilyaZar Oct 25, 2026
6ad2469
test: point dropdown parity check at renamed omarchy file
ilyaZar Oct 25, 2026
043dbe7
test: point dropdown parity check at renamed omarchy file
ilyaZar Oct 25, 2026
6e5bae7
refactor: share the omarchy info pair widget name across hosts
ilyaZar Oct 25, 2026
3ffa20d
Merge branch 'dev' into feat-native-port-dms
ilyaZar Oct 25, 2026
1db9744
Merge branch 'dev' into feat-native-port-caelestia
ilyaZar Oct 25, 2026
177de86
refactor: name dms ui files after panel areas
ilyaZar Oct 25, 2026
508b45a
refactor: move dms panel footer into its own files
ilyaZar Oct 25, 2026
299ab14
docs: explain why dms settings files differ from omarchy
ilyaZar Oct 25, 2026
ed48fea
refactor: name caelestia ui files after panel areas
ilyaZar Oct 25, 2026
28df12d
refactor: move caelestia panel footer into its own files
ilyaZar Oct 25, 2026
f98ce43
docs: explain why caelestia invitation and settings files differ
ilyaZar Oct 25, 2026
5a2b33c
fix: clear caelestia qml lint warnings
ilyaZar Oct 25, 2026
cd7b7d2
fix: open caelestia overview on click and anchor it to the bar icon
ilyaZar Oct 25, 2026
dc0585d
docs: explain why caelestia has a separate bar entry file
ilyaZar Oct 25, 2026
90f6f02
fix: return to a pinned caelestia overview after hover popouts close
ilyaZar Oct 25, 2026
158287c
fix: keep the caelestia overview in place when re-pinning it
ilyaZar Oct 25, 2026
5dcfa31
fix: resolve caelestia tokens for popups through their screen parent
ilyaZar Oct 25, 2026
11045a2
fix: keep keyboard focus in a re-pinned caelestia overview
ilyaZar Oct 25, 2026
411960a
fix: stop creating the caelestia controller inside a panel binding
ilyaZar Oct 25, 2026
017e069
feat: converge caelestia header, cards, more and footer with omarchy
ilyaZar Oct 25, 2026
a7a8539
fix: tighten caelestia header name and empty invitation spacing
ilyaZar Oct 25, 2026
d44b93b
fix: size the caelestia device name by its text
ilyaZar Oct 25, 2026
d52b2e1
fix: place caelestia dropdowns on open and use omarchy confirmation w…
ilyaZar Oct 25, 2026
748f66c
fix: return focus to the caelestia control that opened a confirmation
ilyaZar Oct 25, 2026
3450874
test: cover caelestia hover contract, status precedence and counts
ilyaZar Oct 25, 2026
44f2647
feat: compact dms panel with omarchy sizes, rules and status icon
ilyaZar Oct 25, 2026
ea96ca5
fix: outline dms folder and device cards like omarchy
ilyaZar Oct 25, 2026
b74eefe
fix: compact dms form fields with captions and top-aligned side form
ilyaZar Oct 25, 2026
eb2bb16
fix: dms remove action in danger colour and caption styles; document …
ilyaZar Oct 25, 2026
0c68511
fix: keep dms panel height across folder and device tabs
ilyaZar Oct 25, 2026
00492fb
fix: keep spare dms tab height inside the cards
ilyaZar Oct 25, 2026
3b06494
fix: omarchy wording and captions for dms confirmations and sharing f…
ilyaZar Oct 26, 2026
b895301
feat: port the dms adapter to the dux shell 2.0 api
ilyaZar Oct 26, 2026
958b06d
fix: keep the dms header and footer rules visible on 2.0 themes
ilyaZar Oct 26, 2026
96fc2df
fix: open the dms folder picker above the popout and use omarchy conf…
ilyaZar Oct 26, 2026
5d069f4
fix: match omarchy footer and card wording and refresh rechecks in dms
ilyaZar Oct 26, 2026
55ee331
fix: lay out dms folder and device cards like omarchy
ilyaZar Oct 26, 2026
30ba4f2
feat: show dms side forms on their own content-sized surface
ilyaZar Oct 26, 2026
85c02ff
fix: focus the dms side form when it opens
ilyaZar Oct 26, 2026
2426fda
fix: ignore echoed text edits from dms 2.0 fields
ilyaZar Oct 26, 2026
2da6aa7
fix: focus the first field when a dms form opens, as omarchy does
ilyaZar Oct 26, 2026
270acde
fix: claim keyboard focus for the dms side form after the grab admits it
ilyaZar Oct 26, 2026
9b16928
fix: give the dms side form the keyboard while it is open
ilyaZar Oct 26, 2026
33135ba
fix: attach dms side forms to the panel and confirm over the panel
ilyaZar Oct 26, 2026
481fad5
fix: round the dms form corner that reaches past the popout
ilyaZar Oct 26, 2026
6bf2352
fix: order dms confirmation buttons and labels as omarchy does
ilyaZar Oct 26, 2026
b323e76
fix: keep outside clicks dismissing while a dms side form is open
ilyaZar Oct 26, 2026
0906440
fix: hold the keyboard in the dms side form and reclaim it after the …
ilyaZar Oct 26, 2026
ea75f01
fix: dismiss the dms popout on outside clicks while a side form is open
ilyaZar Oct 26, 2026
4262953
fix: claim the dms form keyboard only briefly
ilyaZar Oct 26, 2026
699e30e
fix: size the dms dropdown popup through implicit size
ilyaZar Oct 26, 2026
b296da4
docs: describe the dms side form surface
ilyaZar Oct 26, 2026
b6bfd28
refactor: rename the dms adapter files for dux shell
ilyaZar Oct 26, 2026
f72f929
refactor: point references at the dux shell adapter names
ilyaZar Oct 26, 2026
75541ab
fix: open dms dropdown lists below their trigger inside short forms
ilyaZar Oct 26, 2026
745a963
fix: dms focus, more details and state colours as omarchy shows them
ilyaZar Oct 26, 2026
139223d
fix: split the dms footer actions evenly so captions fit
ilyaZar Oct 26, 2026
732010c
fix: size dms button labels without a self-bound layout
ilyaZar Oct 26, 2026
41a6f4f
fix: keep single-line dms labels unwrapped
ilyaZar Oct 26, 2026
5889553
fix: fade dms action notices out after omarchy's display time
ilyaZar Oct 26, 2026
0441e7c
fix: colour dms progress with the shell's primary, as its own widgets do
ilyaZar Oct 26, 2026
5f004d1
revert: keep omarchy's status colour semantics in dms
ilyaZar Oct 26, 2026
fa2d8de
docs: record status color semantics for every adapter
ilyaZar Oct 26, 2026
5977dc6
feat: share the native adapter core and services
ilyaZar Oct 26, 2026
05753e5
build: rebuild bundled core for shared adapter services
ilyaZar Oct 26, 2026
47b9791
docs: record status color semantics for every adapter
ilyaZar Oct 26, 2026
b771cb8
Merge branch 'dev' into feat-native-port-dms
ilyaZar Oct 26, 2026
c9c3bad
Merge branch 'dev' into feat-native-port-caelestia
ilyaZar Oct 26, 2026
8806645
Merge branch 'feat-native-port-caelestia' into dev
ilyaZar Oct 26, 2026
6492202
fix: use omarchy's notice wording in the shared adapter service
ilyaZar Oct 29, 2026
9a5a102
fix: let web ui cleanup leave themes the adapter does not own
ilyaZar Nov 3, 2026
40326a4
Merge pull request #136 from omarchy-QOL/fix-webui-profile-cleanup
ilyaZar Nov 3, 2026
7d39f95
fix: focus omarchy confirmations after mouse selection
ilyaZar Nov 4, 2026
b9bba99
fix(core): serialize lifecycle changes with hydration
ilyaZar Nov 4, 2026
c768326
fix(core): allow a bounded graceful service shutdown
ilyaZar Nov 4, 2026
21a4940
fix: fit the monochrome icons to their view box
ilyaZar Nov 5, 2026
63cb74a
fix: keep the syncing file name visible during bulk syncs
ilyaZar Nov 5, 2026
1bc6009
Merge pull request #138 from omarchy-QOL/fix-syncing-file-name-visibi…
ilyaZar Nov 6, 2026
9accb07
feat: improve dialog message when unlink/link
ilyaZar Nov 6, 2026
b6bd9a3
fix: size the themed bar icon by its ring so it matches round glyphs
ilyaZar Nov 6, 2026
e4a6600
fix: draw the bar icon on whole device pixels and size branded like t…
ilyaZar Nov 6, 2026
5cab50f
fix: rescan a directory only once while its rescan runs
ilyaZar Nov 7, 2026
8444b46
Merge pull request #140 from omarchy-QOL/fix-dedupe-subdirectory-rescans
ilyaZar Nov 7, 2026
1bae4bd
build: integrate main's 0.2.7 release merge
ilyaZar Nov 7, 2026
4914fab
feat: support omarchy 4.5 on apple silicon macs
ilyaZar Nov 8, 2026
8841b3e
chore: stop tracking internal docs
ilyaZar Nov 8, 2026
6430b57
chore: stop tracking internal adapter notes
ilyaZar Nov 9, 2026
ede378d
fix: centre the sort radio dot on whole pixels
ilyaZar Nov 9, 2026
d553f6c
fix: drop the square button glyph nudge that omarchy 4.5 made redundant
ilyaZar Nov 9, 2026
14c27d6
feat: remember the folder sort and filters in omarchy settings
ilyaZar Nov 10, 2026
c6cf3e4
fix: explain missing package lists before installing syncthing
ilyaZar Nov 14, 2026
76935df
Merge branch 'dev' into feat-persist-folder-view
ilyaZar Nov 14, 2026
050e754
refactor: write omarchy settings from one parser
ilyaZar Nov 14, 2026
cfb92cb
Merge branch 'feat-persist-folder-view' into dev
ilyaZar Nov 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/docs export-ignore
/hosts/standalone export-ignore
/hosts/caelestia export-ignore
/hosts/dankmaterialshell export-ignore
/hosts/dux-shell export-ignore
/hosts/illogical-impulse export-ignore
/hosts/waybar export-ignore
/tests export-ignore
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ jobs:
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: '24'
# Merges from older branches can bring back files that are now local
# only; fail instead of publishing them again.
- name: No tracked files match .gitignore
run: |
tracked=$(git ls-files -ci --exclude-standard)
[[ -z $tracked ]] || {
printf 'tracked but ignored, run git rm --cached:\n%s\n' "$tracked"
exit 1
}
- name: Core and launcher contracts
run: >-
go -C core test -race -covermode=atomic
Expand All @@ -43,8 +52,24 @@ jobs:
use_oidc: true
- name: Installation script contracts
run: bash tests/scripts.test.sh --installation-only
- name: Install Qt controller test tools
run: |
sudo apt-get update
sudo apt-get install -y qt6-declarative-dev-tools qml6-module-qttest \
qml6-module-qtquick qml6-module-qtquick-window \
qml6-module-qtqml-workerscript
- name: DMS adapter contracts and reproducible package
run: |
bash integrations/dux-shell/assemble.sh "$GITHUB_WORKSPACE/dist/dux-shell"
bash tests/dux-shell-adapter.test.sh
- name: Device sharing form contracts
run: node --test tests/device-sharing.test.mjs
- name: Portable adapter contracts and Caelestia package
run: |
node --test tests/adapter-contract.test.mjs tests/caelestia-*.test.mjs
bash integrations/caelestia/assemble.sh "$RUNNER_TEMP/caelestia-one"
bash integrations/caelestia/assemble.sh "$RUNNER_TEMP/caelestia-two"
diff -qr "$RUNNER_TEMP/caelestia-one" "$RUNNER_TEMP/caelestia-two"
- name: Integration fixture contracts
run: go -C tests/integration test -race ./...
- name: Reproduce bundled core
Expand Down Expand Up @@ -98,3 +123,22 @@ jobs:
name: syncshell-runtime
path: ${{ runner.temp }}/syncshell-runtime.tar.gz
if-no-files-found: error

# Apple Silicon Macs, Snapdragon and NVIDIA ARM machines run Omarchy on
# aarch64, so test the core and the bundled binary on a native ARM host.
arm64:
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: core/go.mod
cache-dependency-path: core/go.sum
- name: Core contracts on aarch64
run: go -C core test -race ./...
- name: Bundled aarch64 core
run: |
sudo apt-get update
sudo apt-get install -y ripgrep
bash packaging/bundled/verify.sh
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# Local capture harness, archives, and project-only Codex workflow.
/docs/interactive/
/docs/*
!/docs/status-colors.md
/tests/live/*
!/tests/live/*.sh
/.agents/skills/
/assets/backups/
/TODO/
/test-results/
/dist/dux-shell/
/.omarchy-plugin-dev/
/assets/old-published/
/assets/README.md

# Assembled local native plugin.
/dist/caelestia/

# Local maintainer notes and checklists.
/hosts/*/NOTES.md
/integrations/dux-shell/submission.md
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
# Changelog

Notable changes to Syncshell for Omarchy are documented here.
Notable changes to Syncshell and its shell adapters are documented here.

## Unreleased

- remember the folder sort and filters across restarts: Omarchy writes them to
the new `[view]` section of `settings.toml` when the view options or the
panel close; files without it keep the defaults
- edit Omarchy's `settings.toml` in place from one parser: saves keep your
comments, quoting, CRLF line endings and symlinks, and a hand edit made
while the panel is open is no longer overwritten
- support Omarchy 4.5 on Apple Silicon Macs (M1, M2, M3 and MacBook Neo) with
the bundled aarch64 core; verify that it maps on 16K- and 64K-page kernels,
pin the x86_64 and aarch64 instruction-set baselines, and test it on a
native ARM CI runner
- ask Syncthing to rescan a directory only once while that rescan is still
running, so repeated index updates during a pull cannot pile up requests
- keep the syncing file name visible during bulk syncs: the core no longer
stalls for up to minutes on lookups and rescans for files Syncthing already
reported, and the Omarchy folder card no longer rebuilds on each update
- fit the monochrome icons' view box to the mark so the Omarchy 4.5 bar no
longer shrinks them below its built-in icons
- replace the experimental DMS adapter with native folder, device, sharing
and invitation workflows, pending desktop acceptance on DMS 2.0.0
- target DMS 2.0 (Dux Shell) only: `qs.DCommon.Widgets` controls and the 2.0
surface roles; DMS 1.6 is no longer supported
- rename the DMS adapter to `hosts/dux-shell` and `integrations/dux-shell`
after the shell's rename; the plugin id and `dms` command are unchanged
- add adapter-owned Modern and DMS-themed Web UI profiles with explicit
cleanup, and require explicit authority for Syncthing service control
- assemble a reproducible DMS package with bundled Linux workers and a Nix
recipe, without installing tools or changing bar placement

## 0.2.4 - 2026-10-19

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ If UFW is enabled, run `sudo ufw allow syncthing` to allow [device discovery and
synchronization][firewall].

The plugin supports Omarchy on Linux x86_64 and aarch64, including Apple Silicon
M1/M2 Macs running Omarchy (stable). Alpha adapters for DankMaterialShell,
Illogical Impulse, Caelestia, and Waybar are under development; they are not
officially released and WIP, but can be tested via manual installation on those
systems: see the `hosts/...` in the source. Daemon mode remains future work.
M1/M2/M3 and MacBook Neo Macs running Omarchy 4.5 or later. Alpha adapters for
Dux Shell (DMS), Illogical Impulse, Caelestia, and Waybar are under development;
they are not officially released and WIP, but can be tested via manual
installation on those systems: see the `hosts/...` in the source. Daemon mode
remains future work.

## File activity

Expand Down Expand Up @@ -306,7 +307,7 @@ shared folders.
| Shell | Status | Release plan |
| ----------------- | ------- | ---------------------- |
| Omarchy | Stable | stable since 0.1.0 |
| DankMaterialShell | Alpha | beta planned for 0.2.3 |
| Dux Shell (DMS) | Alpha | beta planned for 0.2.3 |
| Illogical Impulse | Alpha | beta planned for 0.2.4 |
| Caelestia | Alpha | beta planned for 0.2.5 |
| Waybar | Alpha | beta planned for 0.2.6 |
Expand Down
6 changes: 5 additions & 1 deletion assets/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ They were retrieved from the Syncthing repository at commit
<https://github.com/syncthing/syncthing/tree/058bcd7334839663cf569501d3ac539034d45cb5/assets/statusicons>

`mono/` holds monochrome redraws of the same four icons, tinted to the theme at
runtime by `MonoIcon.qml`. They must stay pure white on transparent: the tint
runtime by `SharedWidgetMonoIcon.qml`. They must stay pure white on transparent: the tint
multiplies the source's value channel, so anything darker comes out darker
still.

Their shared square view box hugs the mark because Omarchy normalizes the whole
image rect, so transparent margin shrinks the icon; sharing it keeps the mark in
place across states. Badges must stay inside it, hence the sync badge's scale.

Copyright belongs to the Syncthing contributors. These adapted files remain
licensed under the Mozilla Public License 2.0:

Expand Down
2 changes: 1 addition & 1 deletion assets/mono/status-default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/mono/status-notify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/mono/status-pause.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/mono/status-sync.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/aarch64/syncshell-core
Binary file not shown.
4 changes: 2 additions & 2 deletions bin/syncshell-core
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail

root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
platform="$(/usr/bin/uname -s):$(/usr/bin/uname -m)"
platform="$(uname -s):$(uname -m)"

case $platform in
Linux:x86_64) target="$root/x86_64/syncshell-core" ;;
Expand Down
Binary file modified bin/x86_64/syncshell-core
Binary file not shown.
11 changes: 11 additions & 0 deletions core/cmd/syncshell-core/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ func parseOptions(flags *flag.FlagSet, args []string) (options, bool, error) {
flags.BoolVar(&config.Discovery.InsecureTLS, "insecure-tls", false, "allow unverified TLS for this target")
flags.BoolVar(&config.DesktopAuthorized, "desktop-authorized", false,
"authorize the desktop bridge")
flags.BoolVar(&config.WebProfile.Authorized, "web-profile-authorized", false,
"authorize owned local Web UI profile installation")
flags.StringVar(&config.WebProfile.Owner, "web-profile-owner", "", "profile owner identifier")
flags.StringVar(&config.WebProfile.Bundle, "web-profile-bundle", "", "verified Web UI bundle directory")
flags.StringVar(&lifecycleKind, "lifecycle-kind", "", "authorized lifecycle kind")
flags.BoolVar(&config.Lifecycle.Authorized, "lifecycle-authorized", false, "authorize the exact lifecycle binding")
flags.StringVar(&config.Lifecycle.Unit, "lifecycle-unit", "", "exact systemd user unit")
Expand All @@ -113,6 +117,13 @@ func parseOptions(flags *flag.FlagSet, args []string) (options, bool, error) {
if flags.NArg() != 0 {
return options{}, false, errors.New("unexpected command arguments")
}
if config.WebProfile.Authorized {
if err := config.WebProfile.Validate(); err != nil {
return options{}, false, err
}
} else if config.WebProfile.Owner != "" || config.WebProfile.Bundle != "" {
return options{}, false, errors.New("Web UI profile policy requires explicit authority")
}
if lifecycleKind != "" && lifecycleKind != "systemd-user" {
return options{}, false, errors.New("unsupported lifecycle kind")
}
Expand Down
24 changes: 23 additions & 1 deletion core/internal/session/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,34 @@ func (s *Session) Act(ctx context.Context, action string, arguments ActionArgume
return s.openWebUI(ctx, arguments.DeviceID)
case "webui.set-theme":
return s.setWebUITheme(ctx, arguments.Theme)
case "webui.apply-profile":
return s.applyWebProfile(ctx, arguments)
case "webui.remove-profile":
return s.removeWebProfile(ctx)
default:
return rejected("unsupported_action", "action is not supported")
}
}

func validateActionArguments(action string, arguments ActionArguments) *ActionResult {
if action == "webui.apply-profile" {
base := arguments
base.Profile = ""
base.Palette = nil
if validation := validateActionArguments("folder.rescan-all", base); validation != nil {
return validation
}
if (arguments.Profile == "modern" && len(arguments.Palette) == 0) ||
(arguments.Profile == "themed" && len(arguments.Palette) == 12) {
return nil
}
result := rejected("invalid_action", "Web UI profile arguments are invalid")
return &result
}
if arguments.Profile != "" || len(arguments.Palette) != 0 {
result := rejected("invalid_action", "palette arguments require a profile action")
return &result
}
if arguments.CreateDirectory && action != "folder.add-existing" {
result := rejected("invalid_action", "directory creation is only valid when adding a folder")
return &result
Expand Down Expand Up @@ -101,7 +123,7 @@ func validateActionArguments(action string, arguments ActionArguments) *ActionRe
valid = folderOnly
case "folder.dismiss-pending":
valid = pendingFolderOnly
case "folder.recheck-errors", "folder.rescan-all", "folder.suggest-id",
case "folder.recheck-errors", "folder.rescan-all", "folder.suggest-id", "webui.remove-profile",
"lifecycle.start", "lifecycle.stop", "lifecycle.enable", "lifecycle.disable":
valid = empty
case "folder.add-existing":
Expand Down
12 changes: 11 additions & 1 deletion core/internal/session/actions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type actionAPI struct {
devices []syncthing.Device
pending syncthing.PendingFolders
theme string
guiAssets string
rescans int
status syncthing.FolderStatus
errors []syncthing.FolderError
Expand Down Expand Up @@ -622,6 +623,9 @@ func TestActionArgumentShapesRejectUnrelatedFields(t *testing.T) {
{"webui.open", ActionArguments{}, map[string]bool{"deviceId": true}},
{"webui.set-theme", ActionArguments{Theme: "default"},
map[string]bool{"theme": true}},
{"webui.apply-profile", ActionArguments{Profile: "modern"},
map[string]bool{"profile": true}},
{"webui.remove-profile", ActionArguments{}, map[string]bool{}},
{"lifecycle.start", ActionArguments{}, map[string]bool{}},
{"lifecycle.stop", ActionArguments{}, map[string]bool{}},
{"lifecycle.enable", ActionArguments{}, map[string]bool{}},
Expand All @@ -637,6 +641,8 @@ func TestActionArgumentShapesRejectUnrelatedFields(t *testing.T) {
"deviceId": func(value *ActionArguments) { value.DeviceID = "OTHER" },
"deviceName": func(value *ActionArguments) { value.DeviceName = "Other" },
"theme": func(value *ActionArguments) { value.Theme = "other" },
"profile": func(value *ActionArguments) { value.Profile = "modern" },
"palette": func(value *ActionArguments) { value.Palette = map[string]string{"mode": "dark"} },
}
for _, shape := range shapes {
t.Run(shape.name, func(t *testing.T) {
Expand Down Expand Up @@ -942,7 +948,11 @@ func (a *actionAPI) ServeHTTP(writer http.ResponseWriter, request *http.Request)
}
writer.WriteHeader(http.StatusOK)
case request.URL.Path == "/rest/system/paths":
a.write(writer, `{"guiAssets":"/tmp/gui","baseDir-userHome":"/tmp"}`)
assets := a.guiAssets
if assets == "" {
assets = "/tmp/gui"
}
a.writeValue(writer, map[string]string{"guiAssets": assets, "baseDir-userHome": "/tmp"})
case request.URL.Path == "/rest/config/defaults/folder":
a.write(writer, `{"id":"","label":"","path":"","paused":false,"devices":[]}`)
case request.URL.Path == "/rest/config/defaults/device":
Expand Down
Loading