Commit Graph
15 Commits
Author SHA1 Message Date
Lotus CIandClaude Opus 5.5 71ab1afdaf feat(close): first-close choice — tray or quit — and a call guard (#5)
Build Lotus Chat Desktop / prepare (push) Successful in 10s
Build Lotus Chat Desktop / build-linux (push) Successful in 28m46s
Build Lotus Chat Desktop / build-arch (push) Successful in 14s
Build Lotus Chat Desktop / build-windows (push) Successful in 38m32s
Build Lotus Chat Desktop / update-manifest (push) Successful in 9s
Closing the window (OS close button or the custom title bar's ×) now
goes through one handler:
- in a call → always hide to the tray (a close must never drop a call);
- saved "tray" → hide; "quit" → exit the app;
- "ask" (the default until chosen) → emit `lotus-close-requested` so the
  web client shows the one-time dialog; if the page isn't listening yet,
  fall back to the tray.
The choice lives in `close-behavior` in the app config dir;
get_close_behavior / set_close_behavior / resolve_close_request back the
dialog and the Settings select.

Verified on Linux under Xvfb + openbox with real WM close requests
(wmctrl -c): tray → hidden, still running; quit → exits; unset with no
page listening → hidden; ask with the page listening → window stays,
page receives the event; quit during a call → hidden, still running.

Bump cinny (the dialog + Settings control).

Closes #5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-24 12:51:28 -04:00
Lotus CIandClaude Opus 5.5 5a9bfa8fe4 feat(native): "Mark as read" button on rich toasts (#9)
Build Lotus Chat Desktop / prepare (push) Successful in 7s
Build Lotus Chat Desktop / build-windows (push) Canceled after 32m48s
Build Lotus Chat Desktop / build-linux (push) Canceled after 32m25s
Build Lotus Chat Desktop / build-arch (push) Canceled after 0s
Build Lotus Chat Desktop / update-manifest (push) Canceled after 0s
Toasts with a room id get a Mark as read action next to Send; it emits
`lotus-notification-mark-read {roomId}` without raising the window, and
cinny marks the room read through its existing markAsRead path. Invite
toasts (no room id) get neither button.

Bump cinny to 23649f12.

Closes #9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-23 19:49:54 -04:00
Lotus CIandClaude Opus 5.5 c1ae01bf41 fix(native): toast coalescing, real reply target, Focus Assist mount query
Build Lotus Chat Desktop / prepare (push) Canceled after 0s
Build Lotus Chat Desktop / build-windows (push) Canceled after 0s
Build Lotus Chat Desktop / build-linux (push) Canceled after 0s
Build Lotus Chat Desktop / build-arch (push) Canceled after 0s
Build Lotus Chat Desktop / update-manifest (push) Canceled after 0s
- Rich toasts set a WinRT Tag (hash of the web notification tag, since
  room:thread tags exceed the 64-char limit) in a fixed Group, so a newer
  toast for the same room/thread replaces the older one instead of
  stacking; the replaced toast's keep-alive entry is dropped (#16).
- The bridge passes tag, roomId and threadId separately. The reply target
  is the real room id (+ thread), never the coalescing tag, which was
  `room:thread` for threads and `lotus-invites` for invites, so those
  replies failed silently. Toasts with no room id (invites) get no reply
  box (#17).
- New `get_focus_assist` command serves the latest Focus Assist poll so
  the web hook can hydrate on mount; the setup-time first emit was lost
  before the page listened (#15).
- Bump cinny to 3b6de2fd (the matching web-side hooks).

Closes #15, #16, #17

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-23 19:33:30 -04:00
jaredandClaude Opus 5 4d0cfaa194 feat(native): system-wide PTT/deafen via a non-consuming key poll (#2)
Build Lotus Chat Desktop / prepare (push) Successful in 3s
Build Lotus Chat Desktop / build-windows (push) Canceled after 0s
Build Lotus Chat Desktop / build-linux (push) Canceled after 0s
Build Lotus Chat Desktop / build-arch (push) Canceled after 0s
Build Lotus Chat Desktop / update-manifest (push) Canceled after 0s
PTT and deafen are DOM key handlers in cinny and only fire while the Lotus
window has focus — alt-tab into a fullscreen game and the voice controls
stop working.

New native/hotkeys.rs (Windows): `set_global_hotkeys(bindings)` starts a
thread that samples GetAsyncKeyState for the configured W3C key codes every
~8 ms while a call is joined and emits a `lotus-global-hotkey` DOM event
{id, state, ctrl, alt, meta} on each press/release transition; an empty
list stops it. Deliberately NOT RegisterHotKey / a global-shortcut plugin:
those consume the key system-wide (a bare Space PTT would stop every other
app typing spaces). `global_hotkeys_supported` reports false off Windows,
where the commands are no-ops (Linux X11 could poll XQueryKeymap later;
Wayland has no non-consuming path). HotkeyPoll state is managed
unconditionally in setup. Cargo: Win32_UI_Input_KeyboardAndMouse feature.
Cross-checked against windows 0.61 for x86_64-pc-windows-msvc; Linux
cargo check clean.

Web side: cinny 00584d78 (useCallHotkeys + Settings → Calls toggle).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-17 13:40:57 -04:00
jaredandClaude Opus 4.8 33b1a45edd fix(windows): merge taskbar icon (AUMID) + focus window on notification click
Build Lotus Chat Desktop / prepare (push) Successful in 3s
Build Lotus Chat Desktop / build-linux (push) Successful in 24m50s
Build Lotus Chat Desktop / build-windows (push) Successful in 32m26s
Build Lotus Chat Desktop / update-manifest (push) Successful in 4s
Taskbar showed two icons because the AppUserModelID was (a) set too late — after
the main window was built, so its taskbar button grouped under a mismatched
implicit AUMID — and (b) valued 'LotusGuild.LotusChat', which differs from the
bundle identifier 'org.lotusguild.lotus-chat' that Tauri's NSIS installer stamps
on its shortcuts. Fix both: set the AUMID at the top of run() before the window
is built (new set_process_aumid, split out of ensure_app_user_model_id), and
align the constant to the bundle identifier so the running window and a pinned
installer shortcut group together.

Notification click didn't raise the window: add a focus_main_window command
(reuses show_main) for the web/service-worker path, and call show_main directly
in the rich-toast Activated body-click handler.

Note: existing users who pinned the old mis-grouped icon may need to re-pin once.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 23:40:57 -04:00
jaredandClaude Opus 4.8 8479d6e768 fix(native): correct PKEY_AppUserModel_ID import (D6 CI build)
Build Lotus Chat Desktop / prepare (push) Successful in 9s
Build Lotus Chat Desktop / build-linux (push) Successful in 25m18s
Build Lotus Chat Desktop / build-windows (push) Successful in 29m40s
Build Lotus Chat Desktop / update-manifest (push) Successful in 4s
Windows CI failed: PROPERTYKEY is not in Win32::UI::Shell::PropertiesSystem.
Use the ready-made PKEY_AppUserModel_ID constant from Win32::Storage::Enhanced
Storage (same module jumplist.rs uses for PKEY_Title, feature already enabled)
instead of hand-rolling the PROPERTYKEY — drops the GUID::from_u128 dependency.
Also simplify IPersistFile::Save's fremember arg (it's bool, not BOOL).

All windows-crate symbols now verified against windows-docs-rs (PKEY_AppUser
Model_ID / IPersistFile::Save / SetCurrentProcessExplicitAppUserModelID /
CreateToastNotifierWithId).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:46:53 -04:00
jaredandClaude Opus 4.8 f9ed3d7116 feat(native): register AUMID so Windows rich toasts work (D6)
Build Lotus Chat Desktop / prepare (push) Successful in 3s
Build Lotus Chat Desktop / build-windows (push) Failing after 25m37s
Build Lotus Chat Desktop / build-linux (push) Successful in 25m29s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped
The WinRT rich toast (reply box P5-41, click-to-open-room P5-35) was inert on
Windows: CreateToastNotifier needs the process under an AppUserModelID mapped to
a Start-Menu shortcut, and none was registered — so it errored and silently fell
back to the plain plugin toast.

New native/aumid.rs (Windows-only; no-op elsewhere), called first in
native::setup: (1) SetCurrentProcessExplicitAppUserModelID("LotusGuild.LotusChat"),
(2) install/refresh a Start-Menu "Lotus Chat.lnk" carrying PKEY_AppUserModel_ID,
reusing jumplist.rs's IShellLinkW + IPropertyStore + PROPVARIANT + IPersistFile
pattern (best-effort; failures logged + swallowed). toast.rs now binds the
notifier via CreateToastNotifierWithId(AUMID).

CI-compile-only (windows runner); runtime needs a Windows build to confirm the
toast shows a reply box + opens the room. windows-crate 0.61 symbol assumptions
(IPersistFile, SetCurrentProcessExplicitAppUserModelID, PROPERTYKEY,
GUID::from_u128, CreateToastNotifierWithId) validated by CI — all mirror existing
jumplist.rs usage where possible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 22:32:37 -04:00
jaredandClaude Opus 4.8 3a48771588 fix(native): Wave-2 audit fixes (D1, D3, D5)
- D1 (HIGH): Linux no-sleep was completely non-functional — the zbus
  ScreenSaver inhibit was bound to a function-local D-Bus connection dropped on
  return, so the screensaver service auto-released it instantly. Keep a
  long-lived Connection in managed state (InhibitState { conn, cookie }) so the
  same connection holds Inhibit and issues UnInhibit; created once, reused.
- D3: tray "Do Not Disturb" desynced from the web manualDndAtom after any reload
  (custom-chrome toggle / logout) — the atom is in-memory and reset while the
  tray stayed checked. Added TrayDndState + a get_tray_dnd command so the web
  hook re-hydrates the atom on mount.
- D5: install_update now calls app.restart() after a successful install so the
  new version actually runs (Linux AppImage kept running the old binary; the UI
  hung on "installing").

CI-compile-verified (windows + linux). Web-side wiring (get_tray_dnd query,
updater terminal state) landed on cinny:lotus.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 22:32:37 -04:00
jaredandClaude Opus 4.8 22f8e1566c feat(native): Linux parity + autostart + tray DND (P6-1; no macOS)
Build Lotus Chat Desktop / prepare (push) Successful in 3s
Build Lotus Chat Desktop / build-windows (push) Successful in 23m43s
Build Lotus Chat Desktop / build-linux (push) Successful in 23m57s
Build Lotus Chat Desktop / update-manifest (push) Successful in 4s
Rounds out the native app on Linux (Windows features kept; macOS stays no-op):
- power.rs: no-sleep during calls on Linux via a zbus org.freedesktop.ScreenSaver
  Inhibit/UnInhibit (cookie held in ScreenSaverInhibit managed state).
- set_badge_count: Linux launcher badge via the Unity
  com.canonical.Unity.LauncherEntry.Update D-Bus signal (best-effort; app_uri
  = cinny.desktop per Tauri's mainBinaryName naming).
- tauri-plugin-autostart registered (+ autostart:allow-enable/disable/is-enabled
  capabilities); web toggles it from Settings.
- Tray "Do Not Disturb" CheckMenuItem → emits lotus-dnd-changed to the web,
  which ORs it into the notification quiet-gate.

zbus 5 (Linux target dep; blocking-api default). CI-compile-verified
(windows+linux); reviewer confirmed no build-breakers. Runtime to check on
Linux: DND toggle polarity, badge .desktop id.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 15:18:28 -04:00
jaredandClaude Opus 4.8 87950f623b fix(native): jump list IObjectArray/IObjectCollection are in Shell::Common
Build Lotus Chat Desktop / prepare (push) Successful in 39s
Build Lotus Chat Desktop / build-windows (push) Failing after 11m31s
Build Lotus Chat Desktop / build-linux (push) Failing after 13m4s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped
Repairs the CI Windows compile (first build to reach the Rust after the web/
case-collision failures cleared): these two COM interfaces live in
windows::Win32::UI::Shell::Common (feature Win32_UI_Shell_Common), not
System::Com nor Shell. Added the feature; corrected the import.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 08:49:07 -04:00
jaredandClaude Opus 4.8 f883781c1f fix(security+audit): strip latent RCE grants, opener allowlist, GDI leaks, CI hardening
From the deep-audit wave (reviewer-verified: capability identifiers valid, no
removed-crate references, GDI free ordering correct):

- Removed 8 never-registered plugins (clipboard-manager, fs, shell, http,
  process, os, dialog, global-shortcut) from Cargo.toml AND their capability
  grants (shell:allow-execute, unscoped fs writes, http:default, …) — verified
  the web never invokes any of them. A latent RCE-class surface is gone.
- on_new_window: only http/https/mailto reach the OS opener (file:///custom
  schemes previously bypassed the opener capability scope entirely).
- set_badge_count: freed hdc + hdc_screen on all three GDI error paths
  (leaked per badge update in a long-running tray app).
- 8s reveal failsafe gated by an AtomicBool: no longer re-shows a window the
  user closed to tray; page-load reveal now fires once only (logout reloads
  don't re-surface a tray-hidden window); recovery for a missed page-load
  event preserved.
- toast.rs: store pruned on Activated too + capped at 20 (was unbounded).
- Startup no longer panics when the bundled icon is missing (tray skipped
  gracefully); msSmartScreenProtection no longer disabled (throttling
  disables kept); rust-version corrected to 1.77.2.
- release.yml update-manifest: fails on empty signatures (was: could publish
  a manifest that traps Windows users in a failed-update loop); partial-
  failure window documented. Deleted the stale upstream tauri.yml workflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 08:49:07 -04:00
jaredandClaude Opus 4.8 64569f4736 fix(native): windows 0.61 API paths — repair the CI Windows compile
Build Lotus Chat Desktop / prepare (push) Successful in 5s
Build Lotus Chat Desktop / build-windows (push) Failing after 18m50s
Build Lotus Chat Desktop / build-linux (push) Successful in 23m40s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped
Four unresolved-import/type errors from the release build (first real compile):
- toast.rs: generic IMap moved to the windows-collections crate; read the reply
  from the ValueSet returned by UserInput() directly (HasKey/Lookup are exposed
  on the class).
- jumplist.rs: PROPVARIANT lives in Win32::System::Com::StructuredStorage (not
  windows::core); IObjectArray/IObjectCollection in Win32::System::Com (not
  UI::Shell); PKEY_Title in Win32::Storage::EnhancedStorage (feature added);
  build the title PROPVARIANT via From<&str> (VT_LPWSTR).
- smtc.rs: event registrations return a plain i64 token in windows 0.61 (the
  EventRegistrationToken newtype is gone).
- thumbbar.rs: HICON was imported inside the fn body but used in its signature —
  fully qualify the return type.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 21:18:25 -04:00
jaredandClaude Opus 4.8 e8fba393f0 fix(chrome): P5-47 — Mica vs frameless conflict broke custom window chrome
Root cause: lib.rs applies a Mica backdrop to the main window at startup;
set_custom_chrome then stripped the frame with set_decorations(false), and
Mica + frameless is a broken combination on Windows (DWM backdrop glitches
the whole surface).

- set_custom_chrome: clear_mica() before undecorating, re-apply_mica() when
  restoring the native frame; set_shadow(true) so the frameless window keeps
  its drop shadow + resize borders.
- window-state plugin: exclude StateFlags::DECORATIONS — the chrome toggle
  owns the decorated flag; restoring a saved decorated=false at startup would
  recreate the Mica-on-frameless glitch before the web side loads.

Pairs with the web-side TitleBar drag fix (explicit window_start_drag on
mousedown instead of data-tauri-drag-region) in the cinny repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 16:42:17 -04:00
jaredandClaude Opus 4.8 a923650d02 feat(native): Tier B — WinRT rich toasts (P5-41/35) + Focus Assist sync (P5-56)
- toast.rs: Windows.UI.Notifications rich toast (reply input + Send action);
  in-process Activated event → emit lotus-notification-activate {path} (click) /
  lotus-notification-reply {roomId,text}. Falls back to tauri-plugin-notification
  (WinRT error / non-Windows). The NOTIFICATION_BRIDGE now routes notifications
  carrying a roomId (tag) to show_rich_toast. Features: UI_Notifications,
  Data_Xml_Dom, Foundation_Collections.
- focus_assist.rs: SHQueryUserNotificationState poll thread → emit
  focus-assist-changed {active} on QUNS_QUIET_TIME/PRESENTATION/D3D_FULLSCREEN/BUSY.
  No new Cargo features.

CI Windows compile pending (no local Rust toolchain). Runtime caveat: WinRT toasts
need a Start-menu shortcut + matching AppUserModelID (org.lotusguild.lotus-chat);
without it CreateToastNotifier errors and the code falls back to the plugin.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 11:04:24 -04:00
jaredandClaude Opus 4.8 73d15b13d2 feat(native): Tier A desktop features (P5-46/36/44/43/49) + window chrome (P5-47)
Adds a `native/` module system (each feature = its own module exposing
`#[tauri::command]`s + optional `setup`; `emit_to_web` pushes DOM CustomEvents to
the web like `forward_deeplink`). Wired into generate_handler! + native::setup;
windows-crate feature union added to Cargo.toml.

- power.rs (P5-46): SetThreadExecutionState held on the main thread while a call
  is active; released on end. Cross-platform (no-op off Windows).
- jumplist.rs (P5-36): ICustomDestinationList "Recent Rooms" of IShellLink tasks
  launching the exe with a matrix: arg (existing deep-link handler opens the room).
- thumbbar.rs (P5-44): ITaskbarList3 ThumbBar Mute/Deafen/End (GDI HICONs) + a
  window subclass catching THBN_CLICKED → emit thumbbar-action.
- smtc.rs (P5-43): WinRT SystemMediaTransportControls via GetForWindow; ButtonPressed
  → smtc-action; call-state command. (Experimental for a non-media app.)
- network.rs (P5-49): INetworkListManager poll thread → emit network-changed.
- chrome.rs (P5-47): cross-platform window-control commands + set_custom_chrome
  (set_decorations) for the opt-in TDS titlebar.

NOT compile-verified locally (no Rust/Windows toolchain on the dev box) — this is
for the CI Windows compile pass (GitHub test.yml / Gitea windows runner). Expect a
possible fixup round (windows-crate feature/namespace paths, e.g. subclass APIs).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 11:04:24 -04:00