Skip to content

Your Android phone and your Windows PC, working as one. Local-first, end-to-end encrypted, no account.

fix(windows): no Widgets board entry for a widget that can't render (#85)

Beea0c33faff5db
diff --git a/desktop/app/i18n/nectarlink_de.ts b/desktop/app/i18n/nectarlink_de.ts
index 0f34c4f..c60c484 100644
--- a/desktop/app/i18n/nectarlink_de.ts
+++ b/desktop/app/i18n/nectarlink_de.ts
@@ -9110,19 +9110,16 @@ Voraussetzungen
<context>
<name>Widget</name>
<message>
- <location filename="rust_strings.h" line="494"/>
<source>No phone connected</source>
- <translation>Kein Gerät verbunden</translation>
+ <translation type="vanished">Kein Gerät verbunden</translation>
</message>
<message>
- <location filename="rust_strings.h" line="495"/>
<source>No recent clipboard items</source>
- <translation>Keine aktuellen Einträge in der Zwischenablage</translation>
+ <translation type="vanished">Keine aktuellen Einträge in der Zwischenablage</translation>
</message>
<message>
- <location filename="rust_strings.h" line="496"/>
<source>Not available</source>
- <translation>Nicht verfügbar</translation>
+ <translation type="vanished">Nicht verfügbar</translation>
</message>
</context>
</TS>
diff --git a/desktop/app/i18n/nectarlink_zh_CN.ts b/desktop/app/i18n/nectarlink_zh_CN.ts
index d49939f..7c02528 100644
--- a/desktop/app/i18n/nectarlink_zh_CN.ts
+++ b/desktop/app/i18n/nectarlink_zh_CN.ts
@@ -9106,19 +9106,16 @@ What it needs
<context>
<name>Widget</name>
<message>
- <location filename="rust_strings.h" line="494"/>
<source>No phone connected</source>
- <translation>未连接手机</translation>
+ <translation type="vanished">未连接手机</translation>
</message>
<message>
- <location filename="rust_strings.h" line="495"/>
<source>No recent clipboard items</source>
- <translation>没有最近的剪贴板内容</translation>
+ <translation type="vanished">没有最近的剪贴板内容</translation>
</message>
<message>
- <location filename="rust_strings.h" line="496"/>
<source>Not available</source>
- <translation>不可用</translation>
+ <translation type="vanished">不可用</translation>
</message>
</context>
</TS>
diff --git a/desktop/app/i18n/rust_strings.h b/desktop/app/i18n/rust_strings.h
index 239eeaf..3f7f63a 100644
--- a/desktop/app/i18n/rust_strings.h
+++ b/desktop/app/i18n/rust_strings.h
@@ -491,7 +491,4 @@ static const char *const nectarlink_rust_strings[] = {
QT_TRANSLATE_NOOP("Updater", "Your phone reconnects on its own."), // desktop/app/src/updater.rs
QT_TRANSLATE_NOOP("Webcam", "Starting camera on %1…"), // desktop/app/src/bridge/webcam.rs
QT_TRANSLATE_NOOP("Webcam", "Streaming %1 × %2 · %3 fps from %4"), // desktop/app/src/bridge/webcam.rs
- QT_TRANSLATE_NOOP("Widget", "No phone connected"), // desktop/app/src/win/widget.rs
- QT_TRANSLATE_NOOP("Widget", "No recent clipboard items"), // desktop/app/src/win/widget.rs
- QT_TRANSLATE_NOOP("Widget", "Not available"), // desktop/app/src/win/widget.rs
};
diff --git a/desktop/app/i18n/template/nectarlink.ts b/desktop/app/i18n/template/nectarlink.ts
index d1b06eb..b5545c9 100644
--- a/desktop/app/i18n/template/nectarlink.ts
+++ b/desktop/app/i18n/template/nectarlink.ts
@@ -8819,22 +8819,4 @@ What it needs
<translation type="unfinished"></translation>
</message>
</context>
-<context>
- <name>Widget</name>
- <message>
- <location filename="../rust_strings.h" line="494"/>
- <source>No phone connected</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../rust_strings.h" line="495"/>
- <source>No recent clipboard items</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../rust_strings.h" line="496"/>
- <source>Not available</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
</TS>
diff --git a/desktop/app/src/win/widget.rs b/desktop/app/src/win/widget.rs
index cb8acac..c4a7ca5 100644
--- a/desktop/app/src/win/widget.rs
+++ b/desktop/app/src/win/widget.rs
@@ -1,375 +1,15 @@
// SPDX-License-Identifier: GPL-3.0-or-later
-//! Windows 11 Widgets Board provider (`NectarlinkPhoneStatus`): renders an
-//! Adaptive Card v1.5 snapshot of the primary paired phone (connection status,
-//! battery level, latest clipboard preview, and quick actions) and dispatches
-//! `Action.Execute` verbs (`ring`, `send_clipboard`, `take_photo`, `open_app`)
-//! to the running NectarLink instance.
+//! The Windows 11 Widgets board: no NectarLink widget yet (#85). A provider
+//! needs the Windows App SDK and a registered package; until it's built, the
+//! package doesn't offer one, and `--widget-provider` (from a package that an
+//! older version registered) exits.
-#![allow(unsafe_code, dead_code)]
+use std::{path::Path, process::ExitCode};
-use crate::i18n::tr;
-use std::{
- fs,
- io::Write,
- path::{Path, PathBuf},
- process::ExitCode,
-};
-
-use nectarlink_core::LinkState;
-use serde::{Deserialize, Serialize};
-use serde_json::json;
-use windows::{
- Win32::{
- Foundation::{CLASS_E_NOAGGREGATION, E_INVALIDARG, E_POINTER},
- System::Com::{
- CLSCTX_LOCAL_SERVER, COINIT_MULTITHREADED, CoInitializeEx, CoRegisterClassObject,
- CoRevokeClassObject, CoUninitialize, IClassFactory, IClassFactory_Impl, REGCLS_MULTIPLEUSE,
- },
- },
- core::{BOOL, GUID, IUnknown, Interface, Ref, implement},
-};
-
-use crate::{core_host, launch::Request, win::single_instance};
-
-/// Command-line flag passed by Windows WidgetService when activating our
-/// out-of-process COM Widget Provider.
pub const ARG: &str = "--widget-provider";
-/// Widget definition ID declared in `desktop/installer/AppxManifest.xml`.
-pub const WIDGET_ID: &str = "NectarlinkPhoneStatus";
-
-/// COM `CLSID` for the NectarLink Windows Widgets provider
-/// (`{9C4E1A22-8F3B-4D09-A6E2-1D8F5C3B9E04}`).
-pub const CLSID: GUID = GUID::from_u128(0x9C4E1A22_8F3B_4D09_A6E2_1D8F5C3B9E04);
-
-const STATE_FILE: &str = "widget-state.json";
-
-/// Snapshot of the primary phone's state rendered by the Windows Widget.
-#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)]
-#[serde(default, rename_all = "camelCase")]
-pub struct WidgetState {
- pub connected: bool,
- pub phone_name: String,
- pub battery_level: Option<u8>,
- pub battery_charging: bool,
- pub last_clip_preview: String,
-}
-
-/// Path to `<data_dir>/widget-state.json`.
-pub fn state_snapshot_path(data_dir: &Path) -> PathBuf {
- data_dir.join(STATE_FILE)
-}
-
-/// Writes `state` atomically to `<data_dir>/widget-state.json`.
-pub fn write_snapshot_file(data_dir: &Path, state: &WidgetState) -> std::io::Result<()> {
- fs::create_dir_all(data_dir)?;
- let path = state_snapshot_path(data_dir);
- let tmp = path.with_extension("json.tmp");
- {
- let mut file = fs::File::create(&tmp)?;
- file.write_all(serde_json::to_string_pretty(state)?.as_bytes())?;
- file.sync_all()?;
- }
- fs::rename(&tmp, &path)
-}
-
-/// Reads `<data_dir>/widget-state.json`, falling back to [`WidgetState::default`]
-/// if missing or unreadable.
-pub fn read_snapshot_file(data_dir: &Path) -> WidgetState {
- let path = state_snapshot_path(data_dir);
- fs::read_to_string(path).ok().and_then(|s| serde_json::from_str(&s).ok()).unwrap_or_default()
-}
-
-/// Captures the current phone connection, battery, and clipboard state from the
-/// running desktop hub and writes `<data_dir>/widget-state.json`.
-pub fn write_state_snapshot(data_dir: &Path) {
- let last_clip_preview = core_host::node()
- .and_then(|n| n.clipboard_history(None).into_iter().next())
- .map(|c| truncate_preview(&c.text, 120))
- .unwrap_or_default();
- let snapshot = core_host::host().hub.read(|s| {
- let chosen = s
- .devices
- .iter()
- .find(|d| matches!(d.link, LinkState::Online { .. }))
- .or_else(|| s.devices.first());
- match chosen {
- Some(d) => WidgetState {
- connected: matches!(d.link, LinkState::Online { .. }),
- phone_name: d.info.name.clone(),
- battery_level: d.battery.as_ref().map(|b| b.level),
- battery_charging: d.battery.as_ref().is_some_and(|b| b.charging),
- last_clip_preview,
- },
- None => WidgetState {
- connected: false,
- phone_name: String::new(),
- battery_level: None,
- battery_charging: false,
- last_clip_preview,
- },
- }
- });
- if let Err(e) = write_snapshot_file(data_dir, &snapshot) {
- tracing::debug!(error = %e, "can't write widget state snapshot");
- }
-}
-
-fn truncate_preview(text: &str, max_chars: usize) -> String {
- let clean: String = text.split_whitespace().collect::<Vec<_>>().join(" ");
- if clean.chars().count() <= max_chars {
- clean
- } else {
- let mut s: String = clean.chars().take(max_chars.saturating_sub(1)).collect();
- s.push('…');
- s
- }
-}
-
-/// Renders an Adaptive Card v1.5 JSON payload for `state`.
-pub fn render_adaptive_card(state: &WidgetState) -> String {
- let title = if state.phone_name.trim().is_empty() {
- tr!("Widget", "No phone connected")
- } else {
- state.phone_name.trim().to_owned()
- };
- let status_badge = if state.connected { "Connected" } else { "Offline" };
- let status_color = if state.connected { "Good" } else { "Subtle" };
- let battery_text = match state.battery_level {
- Some(level) if state.battery_charging => format!("{level}% · Charging"),
- Some(level) => format!("{level}%"),
- None => tr!("Widget", "Not available"),
- };
- let clip_text = if state.last_clip_preview.trim().is_empty() {
- tr!("Widget", "No recent clipboard items")
- } else {
- truncate_preview(&state.last_clip_preview, 120)
- };
-
- let card = json!({
- "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
- "type": "AdaptiveCard",
- "version": "1.5",
- "body": [
- {
- "type": "ColumnSet",
- "columns": [
- {
- "type": "Column",
- "width": "stretch",
- "items": [
- {
- "type": "TextBlock",
- "text": title,
- "weight": "Bolder",
- "size": "Medium",
- "wrap": true
- }
- ]
- },
- {
- "type": "Column",
- "width": "auto",
- "items": [
- {
- "type": "TextBlock",
- "text": status_badge,
- "color": status_color,
- "weight": "Bolder",
- "size": "Small"
- }
- ]
- }
- ]
- },
- {
- "type": "FactSet",
- "facts": [
- {
- "title": "Battery",
- "value": battery_text
- }
- ]
- },
- {
- "type": "TextBlock",
- "text": clip_text,
- "size": "Small",
- "isSubtle": true,
- "wrap": true,
- "maxLines": 2
- }
- ],
- "actions": [
- {
- "type": "Action.Execute",
- "title": "Ring phone",
- "verb": "ring"
- },
- {
- "type": "Action.Execute",
- "title": "Send clipboard",
- "verb": "send_clipboard"
- },
- {
- "type": "Action.Execute",
- "title": "Take photo",
- "verb": "take_photo"
- },
- {
- "type": "Action.Execute",
- "title": "Open NectarLink",
- "verb": "open_app"
- }
- ]
- });
+pub fn write_state_snapshot(_dir: &Path) {}
- serde_json::to_string(&card).unwrap_or_else(|_| "{}".into())
-}
-
-/// Maps an Adaptive Card `Action.Execute` verb (`"ring"`, `"send_clipboard"`,
-/// `"take_photo"`, `"open_app"`) to a [`Request`] and queues it for the primary
-/// NectarLink instance when `data_dir` is provided.
-pub fn handle_action_verb(verb: &str, data_dir: Option<&Path>) -> Result<(), String> {
- let request = match verb.trim() {
- "ring" => Request::Task { action: "find-phone".into() },
- "send_clipboard" => Request::Task { action: "send-clipboard".into() },
- "take_photo" => Request::Task { action: "take-photo".into() },
- "open_app" => Request::Show,
- other => return Err(format!("unknown widget action verb: {other}")),
- };
- if let Some(dir) = data_dir {
- crate::launch::queue(dir, &request).map_err(|e| e.to_string())?;
- single_instance::wake(dir);
- }
- Ok(())
-}
-
-#[implement(IClassFactory)]
-struct WidgetClassFactory {
- data_dir: PathBuf,
-}
-
-impl std::fmt::Debug for WidgetClassFactory {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("WidgetClassFactory").field("data_dir", &self.data_dir).finish()
- }
-}
-
-impl IClassFactory_Impl for WidgetClassFactory_Impl {
- fn CreateInstance(
- &self,
- punkouter: Ref<'_, IUnknown>,
- riid: *const GUID,
- ppvobject: *mut *mut std::ffi::c_void,
- ) -> windows::core::Result<()> {
- if ppvobject.is_null() {
- return Err(E_POINTER.into());
- }
- unsafe { *ppvobject = std::ptr::null_mut() };
- if !punkouter.is_null() {
- return Err(CLASS_E_NOAGGREGATION.into());
- }
- if riid.is_null() {
- return Err(E_INVALIDARG.into());
- }
- let state = read_snapshot_file(&self.data_dir);
- let _card_json = render_adaptive_card(&state);
- let provider: IUnknown = WidgetClassFactory { data_dir: self.data_dir.clone() }.into();
- unsafe { provider.query(riid, ppvobject).ok() }
- }
-
- fn LockServer(&self, _flock: BOOL) -> windows::core::Result<()> {
- Ok(())
- }
-}
-
-/// Runs the out-of-process COM Widget Provider server when launched with
-/// `--widget-provider`.
-pub fn run_provider(data_dir: &Path) -> ExitCode {
- let initialized = unsafe { CoInitializeEx(None, COINIT_MULTITHREADED) }.is_ok();
- let factory: IClassFactory = WidgetClassFactory { data_dir: data_dir.to_path_buf() }.into();
- let reg = unsafe { CoRegisterClassObject(&CLSID, &factory, CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE) };
- match reg {
- Ok(cookie) => {
- let state = read_snapshot_file(data_dir);
- let _card = render_adaptive_card(&state);
- tracing::info!(widget = WIDGET_ID, "registered Windows Widgets COM provider");
- unsafe {
- let _ = CoRevokeClassObject(cookie);
- }
- }
- Err(e) => {
- tracing::warn!(error = %e, "can't register Windows Widgets COM provider");
- }
- }
- if initialized {
- unsafe { CoUninitialize() };
- }
+pub fn run_provider(_data_dir: &Path) -> ExitCode {
ExitCode::SUCCESS
}
-
-#[cfg(test)]
-mod tests {
- use super::*;
-
- #[test]
- fn adaptive_card_renders_connected_and_offline_states_with_actions() {
- let connected = WidgetState {
- connected: true,
- phone_name: "Pixel 9 Pro".into(),
- battery_level: Some(85),
- battery_charging: true,
- last_clip_preview: "https://nectarlink.dev/docs".into(),
- };
- let card_str = render_adaptive_card(&connected);
- let parsed: serde_json::Value = serde_json::from_str(&card_str).unwrap();
- assert_eq!(parsed["type"], "AdaptiveCard");
- assert_eq!(parsed["version"], "1.5");
- assert!(card_str.contains("Pixel 9 Pro"));
- assert!(card_str.contains("Connected"));
- assert!(card_str.contains("85% · Charging"));
- assert!(card_str.contains("https://nectarlink.dev/docs"));
-
- let actions = parsed["actions"].as_array().unwrap();
- let verbs: Vec<&str> = actions.iter().filter_map(|a| a["verb"].as_str()).collect();
- assert_eq!(verbs, vec!["ring", "send_clipboard", "take_photo", "open_app"]);
-
- let offline = WidgetState::default();
- let offline_str = render_adaptive_card(&offline);
- assert!(offline_str.contains("No phone connected"));
- assert!(offline_str.contains("Offline"));
- assert!(offline_str.contains("No recent clipboard items"));
- }
-
- #[test]
- fn snapshot_file_round_trips_and_action_verbs_queue_requests() {
- let dir = tempfile::tempdir().unwrap();
- let state = WidgetState {
- connected: true,
- phone_name: "Galaxy S24".into(),
- battery_level: Some(42),
- battery_charging: false,
- last_clip_preview: "OTP 123456".into(),
- };
- write_snapshot_file(dir.path(), &state).unwrap();
- assert_eq!(read_snapshot_file(dir.path()), state);
-
- handle_action_verb("ring", Some(dir.path())).unwrap();
- handle_action_verb("send_clipboard", Some(dir.path())).unwrap();
- handle_action_verb("take_photo", Some(dir.path())).unwrap();
- handle_action_verb("open_app", Some(dir.path())).unwrap();
- assert!(handle_action_verb("invalid_verb", None).is_err());
-
- let queued = crate::launch::drain(dir.path());
- assert_eq!(
- queued,
- vec![
- Request::Task { action: "find-phone".into() },
- Request::Task { action: "send-clipboard".into() },
- Request::Task { action: "take-photo".into() },
- Request::Show,
- ]
- );
- }
-}
diff --git a/desktop/installer/AppxManifest.xml b/desktop/installer/AppxManifest.xml
index 35b0ca1..3fa140d 100644
--- a/desktop/installer/AppxManifest.xml
+++ b/desktop/installer/AppxManifest.xml
@@ -2,12 +2,10 @@
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
- xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10"
- xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
- IgnorableNamespaces="uap uap3 uap10 com desktop rescap">
+ IgnorableNamespaces="uap uap10 desktop rescap">
<Identity
Name="Nectarlink.Desktop"
@@ -58,39 +56,6 @@
<desktop:Extension Category="windows.toastNotificationActivation">
<desktop:ToastNotificationActivation ToastActivatorCLSID="7B9E0E64-5C5A-4E8B-9D31-5A4C2B10F6E1" />
</desktop:Extension>
- <com:Extension Category="windows.comServer">
- <com:ComServer>
- <com:ExeServer Executable="nectarlink-desktop.exe" Arguments="--widget-provider" DisplayName="Nectarlink Widget Provider">
- <com:Class Id="9C4E1A22-8F3B-4D09-A6E2-1D8F5C3B9E04" DisplayName="NectarlinkWidgetProvider" />
- </com:ExeServer>
- </com:ComServer>
- </com:Extension>
- <uap3:Extension Category="windows.appExtension">
- <uap3:AppExtension Name="com.microsoft.windows.widgets" DisplayName="Nectarlink" Id="NectarlinkWidgets" PublicFolder="Widgets">
- <uap3:Properties>
- <WidgetProvider>
- <ProviderIcons>
- <Icon Path="Assets\Square44x44Logo.png" />
- </ProviderIcons>
- <Activation>
- <CreateInstance ClassId="9C4E1A22-8F3B-4D09-A6E2-1D8F5C3B9E04" />
- </Activation>
- <Definitions>
- <Definition Id="NectarlinkPhoneStatus" DisplayName="Phone Status" Description="Phone battery, connection status, clipboard preview, and quick actions">
- <Capabilities>
- <Capability>
- <Size Name="medium" />
- </Capability>
- <Capability>
- <Size Name="large" />
- </Capability>
- </Capabilities>
- </Definition>
- </Definitions>
- </WidgetProvider>
- </uap3:Properties>
- </uap3:AppExtension>
- </uap3:Extension>
</Extensions>
</Application>
</Applications>
diff --git a/desktop/installer/nectarlink.nsi b/desktop/installer/nectarlink.nsi
index 6b8859f..1155818 100644
--- a/desktop/installer/nectarlink.nsi
+++ b/desktop/installer/nectarlink.nsi
@@ -231,10 +231,9 @@ Section "Install"
CreateShortCut "$SMPROGRAMS\${DISPLAY}.lnk" "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}" 0 "" "" "Your phone, on your PC"
CreateShortCut "$DESKTOP\${DISPLAY}.lnk" "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}" 0 "" "" "Your phone, on your PC"
- ; The Windows Share sheet and Widgets board need the app's sparse package
- ; registered, which Windows allows for an unsigned one only with Developer
- ; Mode on. Why it didn't register goes to sparse-package.log (#84).
- CreateDirectory "$INSTDIR\Widgets"
+ ; The Windows Share sheet needs the app's sparse package registered, which
+ ; Windows allows for an unsigned one only with Developer Mode on. Why it
+ ; didn't register goes to sparse-package.log (#84).
Delete "$INSTDIR\sparse-package.log"
nsExec::Exec 'powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "try { Add-AppxPackage -Register \"$INSTDIR\AppxManifest.xml\" -ExternalLocation \"$INSTDIR\" -ErrorAction Stop } catch { $$_ | Out-File -Encoding utf8 \"$INSTDIR\sparse-package.log\" }"'
@@ -289,7 +288,6 @@ Section "Uninstall"
Delete "$INSTDIR\nectarlink_vcam.dll"
Delete "$INSTDIR\AppxManifest.xml"
RMDir /r "$INSTDIR\Assets"
- RMDir "$INSTDIR\Widgets"
Delete "$INSTDIR\sparse-package.log"
Delete "$INSTDIR\update.log"
Delete "$INSTDIR\uninstall.exe"
diff --git a/docs/PLAN.md b/docs/PLAN.md
index ba21cac..ce12fc5 100644
--- a/docs/PLAN.md
+++ b/docs/PLAN.md
@@ -228,7 +228,7 @@ current Android.
### 3.12 Platform & ecosystem
| Feature | Tier |
|---|---|
-| Tray app, start on login, jump list, global hotkeys, Windows Widgets board widget: tray app, start on login, taskbar jump list, and global hotkeys ship for unpackaged installs (done); Windows Widgets board provider **requires signed MSIX/sparse package identity or Windows Developer Mode (Send-to menu and Explorer context menu ship for unpackaged installs)** | P0/P1 |
+| Tray app, start on login, jump list, global hotkeys, Windows Widgets board widget: tray app, start on login, taskbar jump list, and global hotkeys ship for unpackaged installs (done); Windows Widgets board provider **not built yet: it needs the Windows App SDK and package identity (#85)** | P0/P1 |
| Android Quick Settings tiles, home-screen widgets (Glance), share target, Direct Share to PC (done) | P0/P1 |
| **CLI** (`nectarlink send file.pdf`, `nectarlink clip`, `nectarlink notify`, `nectarlink notify-when`) and local authenticated API for scripts and PowerToys Command Palette (done) | P1 |
| Tablet as second screen (IddCx virtual monitor): deferred (requires an WHQL-signed UMDF/IddCx indirect display driver) | P2 |
diff --git a/docs/guide/desktop-surfaces.md b/docs/guide/desktop-surfaces.md
index 47ecdf6..6204b8b 100644
--- a/docs/guide/desktop-surfaces.md
+++ b/docs/guide/desktop-surfaces.md
@@ -155,4 +155,4 @@ For power users who use **PowerToys Command Palette**, **AutoHotkey**, **Raycast
## Limits
- **Global Hotkey Conflicts**: If another Windows application has already registered `Ctrl+Alt+Space`, `Ctrl+Alt+S`, `Ctrl+Alt+C`, or `Ctrl+Alt+D` as a system-wide hotkey, you can assign any non-conflicting `Ctrl`/`Alt`/`Shift`/`Win` key combination in **Settings › Shortcuts & Rules**.
-- **Windows Widgets Board Provider (`NectarlinkPhoneStatus`)**: NectarLink includes a Windows App SDK Widget Provider (`desktop/app/src/win/widget.rs`), plus the taskbar **Jump List** that works on all installs. Appearing inside the Windows 11 `Win+W` Widgets board requires the app's sparse package manifest to be registered with a trusted code-signing certificate or Windows Developer Mode enabled. On Android, the **PC quick actions** home-screen widget works on all devices out of the box.
+- **No Windows Widgets board widget yet**: NectarLink doesn't offer a widget in the Windows 11 `Win+W` Widgets board. The taskbar **Jump List** works on all installs, and on Android the **PC quick actions** home-screen widget works on all devices.
diff --git a/docs/guide/known-limitations.md b/docs/guide/known-limitations.md
index 24f7683..fd12be8 100644
--- a/docs/guide/known-limitations.md
+++ b/docs/guide/known-limitations.md
@@ -10,7 +10,7 @@ NectarLink aims to be completely transparent about what works out of the box, wh
| **Clipboard: Automatic background phone-to-PC sync** | At `Standard` and `Assist`, copying text on your phone does not send it to your PC automatically in the background. | Android 10 and newer block background apps from reading the system clipboard unless they run as the foreground app, the active keyboard (IME), or the `shell` user (`UID 2000`). | Enable the **`Elevated`** power level once (Wireless Debugging) for automatic background phone-to-PC clipboard sync, or tap the **Send clipboard** Quick Settings tile, share sheet target, or widget. |
| **Notifications: Sensitive text & OTPs on Android 15+** | At `Standard` and `Assist`, Android 15 and newer may redact notification text containing two-factor authentication codes from third-party notification listeners. | Android 15's Enhanced Confirmation Mode withholds sensitive notification content unless the listener holds the privileged `RECEIVE_SENSITIVE_NOTIFICATIONS` appop. | Enable the **`Elevated`** power level once. NectarLink's shell helper automatically grants `RECEIVE_SENSITIVE_NOTIFICATIONS` to NectarLink. |
| **Messages: Third-party chat app threads** | Unified Conversations from WhatsApp, Signal, Telegram, and RCS show messages that arrive while connected and let you reply via `RemoteInput`, but cannot load older historical chat databases or start a brand-new thread with a contact who has not messaged you. | Android sandboxes each third-party chat app's internal SQLite database and does not expose a public API for reading historical third-party messages or RCS databases. | Open the chat app directly on your PC in its own **`app window`** (`Elevated` on Android 11+) when you need to browse old chat history or start a new chat. |
-| **Windows Integration: System Share sheet (`Win+Share`) & Widgets board (`Win+W`)** | File Explorer's right-click **Send to** menu, Explorer context menu, taskbar **Jump List**, drag-and-drop, and `--share` CLI work on all installs, but appearing in the Windows 11 `Win+Share` popup and `Win+W` Widgets board requires package identity. | Windows 11 requires `windows.shareTarget` and `com.microsoft.windows.widgets` COM extensions to belong to a package signed with a trusted code-signing certificate (or have Windows Developer Mode enabled). | Use File Explorer's right-click **Send to** menu, drag files to the `Shelf` (`Ctrl+Alt+S`), or turn on Windows Developer Mode and run setup again. If NectarLink still isn't in the Share sheet, `sparse-package.log` in its install folder says why. |
+| **Windows Integration: System Share sheet (`Win+Share`)** | File Explorer's right-click **Send to** menu, Explorer context menu, taskbar **Jump List**, drag-and-drop, and `--share` CLI work on all installs, but appearing in the Windows 11 `Win+Share` popup requires package identity. There's no `Win+W` Widgets board widget yet. | Windows 11 requires the `windows.shareTarget` extension to belong to a package signed with a trusted code-signing certificate (or have Windows Developer Mode enabled). | Use File Explorer's right-click **Send to** menu, drag files to the `Shelf` (`Ctrl+Alt+S`), or turn on Windows Developer Mode and run setup again. If NectarLink still isn't in the Share sheet, `sparse-package.log` in its install folder says why. |
| **Mirroring: `FLAG_SECURE` windows** | Banking apps, password managers, and DRM-protected streaming video apps render black when mirrored at `Standard` or `Assist`. | Android's window compositor strips `FLAG_SECURE` layers from standard `MediaProjection` virtual displays to protect credentials and DRM video. | Normal apps and the Android home screen render normally as soon as you leave the protected window. |
| **Mirroring: `Elevated` `/dev/uhid` and `REMOTE_SUBMIX` on some OEM ROMs** | On some non-AOSP OEM Android ROMs, virtual physical keyboard/gamepad registration (`/dev/uhid`) or internal audio capture for apps that block playback capture (`REMOTE_SUBMIX`) may be denied to `shell` (`UID 2000`). | Custom OEM SELinux policies sometimes restrict `/dev/uhid` or `AUDIO_SOURCE_REMOTE_SUBMIX` to `system` (`UID 1000`) or `root` rather than `shell` (`UID 2000`). | NectarLink detects the permission denial automatically and falls back cleanly to standard `InputManager` key/touch injection and standard Android 10+ `AudioPlaybackCapture`. |
| **Webcam: 4K sensor support and 8-bit SDR color** | 4K (`2160p`) webcam streaming requires a physical phone camera sensor and hardware encoder that support 3840x2160 at 30 fps. Video is streamed in 8-bit SDR (`NV12` / `RGB32`), not 10-bit HDR. | Emulators and some front-facing phone cameras max out at 1080p. Windows Media Foundation virtual cameras in video conferencing apps expect standard 8-bit SDR formats (`NV12` / `RGB32`), so 10-bit HDR is omitted to avoid tone-mapping mismatches. | Use **1080p** or **720p** if your phone's selected camera lens does not support 4K capture. |
@@ -31,8 +31,8 @@ Starting in Android 10, `ClipboardManager.getPrimaryClip()` returns `null` whene
- If you stay at `Standard` or `Assist`, you can send your phone's clipboard with one tap from the **Send clipboard** Quick Settings tile (which briefly brings a transparent NectarLink activity to the front to read the clip and closes immediately), the Android share sheet, the home-screen widget, or the app.
- If you enable `Elevated` via Wireless Debugging, NectarLink's local shell helper (`UID 2000`) registers a system clipboard listener through Binder (`IClipboard`) so everything you copy on your phone arrives on your PC automatically in the background, while still honoring Android 13+'s `EXTRA_IS_SENSITIVE` flag to never copy passwords.
-### 3. Windows Sparse Package Identity for `Win+Share` and `Win+W` Widgets
+### 3. Windows Sparse Package Identity for `Win+Share`
Unpackaged Win32/Qt applications on Windows 11 can register File Explorer context menus, `Send to` shortcuts, taskbar Jump Lists, global hotkeys, Notification Center toasts, Cloud Files (`cfapi`) sync roots, and Media Foundation virtual cameras (`MFCreateVirtualCamera`). All of those work out of the box in NectarLink.
-However, Windows 11 restricts two shell extension points (`windows.shareTarget` in the system `Win+Share` dialog and `com.microsoft.windows.widgets` in the `Win+W` Widgets board) to applications that carry an MSIX or sparse Appx package identity signed by a certificate in the machine's Trusted People / Trusted Root store (or registered while Windows Developer Mode is turned on). NectarLink ships the complete implementation and `AppxManifest.xml` for both extensions, and documents this requirement honestly so users on standard unsigned builds know why `Send to` and the `Shelf` are the primary sharing entry points.
+However, Windows 11 restricts the system `Win+Share` dialog (`windows.shareTarget`) to applications that carry an MSIX or sparse Appx package identity signed by a certificate in the machine's Trusted People / Trusted Root store (or registered while Windows Developer Mode is turned on). NectarLink ships the share target and its `AppxManifest.xml`, and on standard unsigned builds `Send to` and the `Shelf` are the primary sharing entry points. A `Win+W` Widgets board widget isn't built yet: it also needs the Windows App SDK.