You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1d3aa18
Browse filesBrowse the repository at this point in the historyBrowse files
docs: release v0.2.1 and align the support matrix with the SDK
Update the documentation site and its package metadata to v0.2.1, matching
the SDK release.
Version and packages:
- `package.json` and `package-lock.json` (root and `packages[""]`) move to
0.2.1; the dependency entries in the lockfile are untouched.
- The Chinese and English home pages state the current version as v0.2.1.
Platform support matrix, aligned with the SDK's real behaviour:
- The matrix now carries 13 rows instead of 7: accent colour, notification
icon and notification actions are listed separately, and the session
column is split into lock, logout, suspend/hibernate and
reboot/shutdown — logout is best-effort on XFCE and the tiling
compositors.
- A ❌ grade is added for "the platform has no such concept", which the
previous ⚠️-only scale could not express.
- Theme detection on Hyprland, Sway and generic X11 downgrades from ✅ to
⚠️, and the ⚠️ section records that the read answers `Theme::Unknown`
when every probe comes up empty.
- Both matrices close with a reminder that the runtime answer comes from
`capabilities()` / `support_level()`, never from the table.
`SupportLevel` and `UdaError`, corrected against the source:
- `SupportLevel` is `Full` / `Partial(reason)` / `None`; `Partial` carries
its reason and `reason()` returns it. The pages previously described
`Restricted(reason)` and `Unsupported`, neither of which exists.
- `UdaError::Unsupported` and `UdaError::FeatureUnsupported` are both
wrong; the variant is `NotSupported`. The `UdaError` example in the
contributing guide is rewritten against `uda-core/src/error.rs`, which
has `NotSupported`, `DetectionFailed`, `CommandFailed`, `Io` and
`Internal`.
Wallpaper and the portal:
- The wallpaper backend does not use the XDG Desktop Portal:
`org.freedesktop.portal.Wallpaper` exists but is never called, so that
chain starts at Tier 2. Wake locks likewise use
`org.freedesktop.ScreenSaver.Inhibit` rather than
`org.freedesktop.portal.Inhibit`, and appearance detection is the only
module that engages Tier 1. The pages that still claimed every Linux
feature tries the portal first are corrected.
Documents v0.2.0 wherever the statement is historical — which release
fixed a given defect — since that remains accurate.
Copy file name to clipboardExpand all lines: src/content/docs/en/guides/capability-and-fallback.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,16 @@ UDA's contract: **every feature reports its support level**, so the application
16
16
| Variant | Meaning | What your app should do |
17
17
|---|---|---|
18
18
|`SupportLevel::Full`| fully supported | use it normally |
19
-
|`SupportLevel::Partial`| available in a degraded form (a limited set of monitors, modes or formats)| use it, but do not promise the missing part to the user |
19
+
|`SupportLevel::Partial(reason)`| available in a degraded form (a limited set of monitors, modes or formats), **with the reason attached**| use it, but do not promise the missing part to the user; `reason` can be shown to the user verbatim|
20
20
|`SupportLevel::None`| not available | hide the entry, or explain why |
21
21
22
-
`Partial` carries no reason string. When a backend needs to say *why*, it returns a typed `UdaError` at call time instead — the diagnostic text travels with the error, not with the capability level.
22
+
The reason is read through `SupportLevel::reason()`, which returns `Option<&str>`:
When all three service tiers fail there is **no panic** and no bare `io::Error` — the caller gets a `UdaError::Unsupported` carrying a diagnosis.
62
+
When all three service tiers fail there is **no panic** and no bare `io::Error` — the caller gets a `UdaError::NotSupported` carrying a diagnosis.
57
63
58
64
The actual chain for wallpaper, which does not use the portal:
59
65
@@ -82,7 +88,7 @@ let level = manager.support_level(TrayFeature::Tooltip);
82
88
83
89
matchlevel {
84
90
SupportLevel::Full=> { /* draw the tooltip field */ }
85
-
SupportLevel::Partial=> { warn!("tooltip is degraded on this backend") }
91
+
SupportLevel::Partial(reason)=> { warn!("tooltip is degraded on this backend: {reason}") }
86
92
SupportLevel::None=> { /* hide it */ }
87
93
}
88
94
```
@@ -95,6 +101,8 @@ For features that are not tray-related, the same information is exposed per modu
95
101
96
102
A backend publishes `Partial` only when it can genuinely deliver a degraded behaviour — Linux double-click synthesis, or a tooltip longer than the soft cap. An absent flag is a plain `None`, never a guess. This keeps "advertised" equivalent to "deliverable".
97
103
104
+
Because `Partial` carries its reason, the degradation must be describable in one sentence. A backend that cannot say why the feature is degraded does not publish `Partial` — it either delivers the feature or reports `None`.
105
+
98
106
## See also
99
107
100
108
-[Fallback engine](/en/internals/fallback-engine/) — how each tier probes and decides
Copy file name to clipboardExpand all lines: src/content/docs/en/guides/troubleshooting.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Run inside a graphical session, or set the variables explicitly:
28
28
XDG_CURRENT_DESKTOP=GNOME XDG_SESSION_TYPE=wayland WAYLAND_DISPLAY=wayland-0 cargo run --example 01_appearance
29
29
```
30
30
31
-
### Everything is `Unsupported` under SSH
31
+
### Everything is `NotSupported` under SSH
32
32
33
33
No session bus means no portal, no DE IPC and no notifications. Wake locks and wallpaper cannot work either. This is degradation working as designed, not a bug.
34
34
@@ -54,7 +54,7 @@ The SDK resolves in this order: an explicit `library_path` → the `UDA_LIBRARY`
54
54
55
55
### `Feature not supported: Neither feh nor nitrogen`
56
56
57
-
**Symptom**: `UdaError::Unsupported` whose message lists every CLI tool name.
57
+
**Symptom**: `UdaError::NotSupported` whose message lists every CLI tool name.
58
58
59
59
**Cause**: Tier 1 (the portal) and Tier 2 (GNOME/KDE/Hyprland/Sway IPC) are unavailable, and the Tier 3 `PATH` probe found none of the tools either.
Copy file name to clipboardExpand all lines: src/content/docs/en/index.mdx
+4-7Lines changed: 4 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,14 +25,11 @@ Shipping a cross-platform desktop app today means writing the same feature sever
25
25
UDA replaces that fragmentation with one **capability-driven** Rust API: it probes the environment, selects an available backend, and degrades gracefully instead of failing.
26
26
27
27
<CardGrid>
28
-
<Cardtitle="Portal-first"icon="rocket">
29
-
Every Linux feature tries the XDG Desktop Portal before touching anything distro-specific.
30
-
</Card>
31
28
<Cardtitle="Cascading fallback"icon="random">
32
-
A strict tier chain: Portal → native DE IPC → CLI tools → a strongly typed `UdaError::Unsupported`.
29
+
A strict tier chain: XDG Desktop Portal → native DE IPC → CLI tools → a strongly typed `UdaError::NotSupported`. Wallpaper and wake locks start at Tier 2; appearance detection is the only module that engages the portal.
33
30
</Card>
34
31
<Cardtitle="Capability-driven"icon="magnifier">
35
-
Features advertise `SupportLevel::Full` / `Restricted` / `Unsupported`, so your app can branch before it breaks.
32
+
Features advertise `SupportLevel::Full` / `Partial(reason)` / `None`, so your app can branch before it breaks — and explain a degradation instead of guessing at it.
36
33
</Card>
37
34
<Cardtitle="Zero heavy dependencies"icon="puzzle">
38
35
Pure Rust `zbus` on Linux, `windows-rs` on Windows. No Qt, no GTK, no bundled toolkit.
@@ -47,9 +44,9 @@ UDA replaces that fragmentation with one **capability-driven** Rust API: it prob
47
44
| C-ABI (`include/uda.h`) | C/C++, or anywhere a stable ABI matters |
48
45
| Python / Node.js SDKs |`examples/python/uda.py` (ctypes) and `examples/nodejs/uda.js` (koffi) — no native build step |
49
46
50
-
## Version 0.2.0
47
+
## Version 0.2.1
51
48
52
-
The 0.2.0 release covers: light/dark appearance detection, wallpaper management with fill modes and multi-monitor targeting, native notifications with icons, urgency and actions, keep-awake locks, **system tray** with a cross-platform menu model, **media control** with metadata read and playback commands, and **session & power lifecycle** (lock, logout, suspend, hibernate, reboot, shutdown).
49
+
The 0.2.1 release covers: light/dark appearance detection, wallpaper management with fill modes and multi-monitor targeting, native notifications with icons, urgency and actions, keep-awake locks, **system tray** with a cross-platform menu model, **media control** with metadata read and playback commands, and **session & power lifecycle** (lock, logout, suspend, hibernate, reboot, shutdown).
53
50
54
51
Per-desktop coverage is listed in the [platform support matrix](/en/reference/platform-support/).
Copy file name to clipboardExpand all lines: src/content/docs/en/internals/contributing.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,8 @@ The last one matters more than it looks: `crates/uda-platform-windows/src/lib.rs
20
20
21
21
## The three principles
22
22
23
-
1.**Capability-driven architecture (never panic).** No `.unwrap()` or `.expect()` on a system call, a D-Bus invocation or an environment variable. Every feature exposes a `SupportLevel` check — `Full`, `Restricted(reason)` or `Unsupported` — and degrades gracefully before returning an error.
1.**Capability-driven architecture (never panic).** No `.unwrap()` or `.expect()` on a system call, a D-Bus invocation or an environment variable. Every feature exposes a `SupportLevel` check — `Full`, `Partial(reason)` or `None` — and degrades gracefully before returning an error.
Copy file name to clipboardExpand all lines: src/content/docs/en/internals/fallback-engine.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,10 @@ description: How each of the four tiers probes, decides, and what it returns whe
9
9
Tier 1 XDG Desktop Portal
10
10
Tier 2 Native DE D-Bus / IPC
11
11
Tier 3 CLI tools (probe PATH)
12
-
Tier 4 UdaError::Unsupported (typed error)
12
+
Tier 4 UdaError::NotSupported (typed error)
13
13
```
14
14
15
-
When all three service tiers fail there is **no panic** and no bare `io::Error` — the caller receives a `UdaError::Unsupported` carrying a diagnosis. This is the mechanical form of AGENTS.md Principle 1: never assume a capability, always degrade.
15
+
When all three service tiers fail there is **no panic** and no bare `io::Error` — the caller receives a `UdaError::NotSupported` carrying a diagnosis. This is the mechanical form of AGENTS.md Principle 1: never assume a capability, always degrade.
16
16
17
17
## Tier 1 — XDG Desktop Portal
18
18
@@ -55,7 +55,7 @@ Every portal call runs inside a timeout, because the portal may present a consen
55
55
56
56
## Tier 4 — typed error
57
57
58
-
The final tier is not a workaround, it is a **contract**: `UdaError::Unsupported("...")` with a message naming the tier chain that was tried. A host can render it verbatim, or match on the type to hide the feature entirely.
58
+
The final tier is not a workaround, it is a **contract**: `UdaError::NotSupported("...")` with a message naming the tier chain that was tried. A host can render it verbatim, or match on the type to hide the feature entirely.
59
59
60
60
## What the caller sees
61
61
@@ -65,8 +65,8 @@ The tiers are internal. A host observes only:
65
65
|---|---|
66
66
|`Ok(...)`| some tier answered |
67
67
|`SupportLevel::Full`| Tier 1 or 2 answered, with no known limitation |
68
-
|`SupportLevel::Restricted(reason)`|only a later, weaker tier answered|
69
-
|`UdaError::Unsupported`| all four tiers are exhausted |
68
+
|`SupportLevel::Partial(reason)`|available, but in a degraded form, with the reason attached|
69
+
|`UdaError::NotSupported`| all four tiers are exhausted |
`✅` verified against the real backend · `⚠️` best-effort, or needs an extra component · `❌` the platform has no such concept.
25
+
26
+
[^toast]: A Store-installed runtime shows the notification source as the host's package family name — see `docs/internals/notification_specs.md` §3.1.
27
+
[^actions]: In an unpackaged host, action buttons degrade to a read-only text card — see §3.2.
33
28
34
29
## What ⚠️ means in practice
35
30
36
-
The exact answer is always available at runtime through `capabilities()` / `support_level()` — never assume from this table.
31
+
The symbols are only a static hint. **The real answer at runtime** always comes from `capabilities()` / `support_level()` — never assume from this table:
37
32
38
33
| Entry | What the fallback does | Reported as |
39
-
|---|---|---|
40
-
| Theme on Hyprland / Sway / X11 | No system-wide colour scheme; reads GSettings if a GTK app has written a value |the read returns `Theme::Unknown`|
41
-
| Notifications on tilers / X11 |`org.freedesktop.Notifications` works, but actions and images depend on the installed daemon | actions are rendered only if the daemon supports them |
42
-
|WakeLock on tilers / X11 |Calls `org.freedesktop.ScreenSaver.Inhibit`; there is no CLI fallback, so an absent service fails the call |`UdaError` (connection failure) |
43
-
| Tray on XFCE | SNI works through the AppIndicator-compatible watcher, but no native double-click event |`SupportLevel::None` for `DoubleClick`|
34
+
|------|----------|----------|
35
+
| Theme detection on Hyprland / Sway / X11 | No system-wide colour scheme; reads GSettings if a GTK app has written a value |`Theme::Unknown` when every probe comes up empty|
36
+
| Notifications on tilers / X11 |`org.freedesktop.Notifications` works, but actions and images depend on the installed daemon | actions render only if the daemon supports them |
37
+
|Wake lock on tilers / X11 |The call fails outright when the ScreenSaver service is absent | a `UdaError` (connection failure); this module has no graded report|
38
+
| Tray on XFCE | SNI works through the AppIndicator-compatible watcher, but there is no native double-click event |`DoubleClick` reports `SupportLevel::None`|
44
39
45
40
## Reporting from a host application
46
41
@@ -53,18 +48,102 @@ let level = manager.support_level(TrayFeature::DoubleClick);
53
48
54
49
matchlevel {
55
50
SupportLevel::Full=> { /* draw the double-click action */ }
56
-
SupportLevel::Partial=> { warn!("double click is degraded on this backend") }
51
+
SupportLevel::Partial(reason)=> { warn!("double click is degraded on this backend: {reason}") }
57
52
SupportLevel::None=> { /* hide it */ }
58
53
}
59
54
```
60
55
61
56
From a C host the same information is available through `uda_session_capabilities` and the module `capabilities()` functions.
The Linux side of logout depends on the DE providing a D-Bus method; on an unrecognised desktop the capability bit for that action is false.
116
+
117
+
## Cases that are not `Full`
118
+
119
+
`SupportLevel` has exactly three variants: `Full`, `Partial(reason)` and `None`. `Partial` must carry its reason — a host that wants to explain a degradation to the user should not have to guess why.
120
+
121
+
| Feature × environment | Level | Reason |
122
+
|-------------|------|------|
123
+
| Theme detection × Wayland tiling |`Partial`| no standard query path; every probe comes up empty |
| Notification actions × Windows unpackaged |`Partial`| needs an MSIX-registered COM activator |
126
+
| Tray × XFCE |`None`| SNI has no double-click event, so the feature is not reported |
127
+
| Wake lock × Wayland tiling |`None`| the call fails outright when ScreenSaver is absent; there is no CLI fallback |
128
+
129
+
## Version requirements
130
+
131
+
| Environment | Minimum version |
132
+
|------|----------|
133
+
| Windows | 10 (toasts are complete on 10/11) |
134
+
| GNOME | 42 |
135
+
| KDE Plasma | 5 |
136
+
| XFCE | 4.14+ |
137
+
| Rust | 1.70 |
138
+
| Python | 3.9 |
139
+
| Node.js | 16 |
140
+
63
141
## Not yet covered (Phase 3)
64
142
65
143
Global shortcuts, the multi-format clipboard with change listening, audio endpoint routing and display brightness are in progress — see [`plans/phase3_plan.md`](https://github.com/UniDesktop/SDK/blob/develop/plans/phase3_plan.md).
66
144
67
145
## See also
68
146
69
-
-[Capability and fallback](/en/guides/capability-and-fallback/) — how the tier chain works
70
-
-[Troubleshooting](/en/guides/troubleshooting/) — what to do when a feature reports `Unsupported`
147
+
-[Capability and fallback](/en/guides/capability-and-fallback/)— how the tier chain works
148
+
-[Troubleshooting](/en/guides/troubleshooting/) — what to do when a feature reports `NotSupported`
149
+
-[Notifications](/en/guides/notification/) — the two Windows limitations
0 commit comments