Commit Graph

13 Commits

Author SHA1 Message Date
jared 3be18b8e5d fix: Windows JSON patch via node, Linux AppImage via APPIMAGE_EXTRACT_AND_RUN
Build Lotus Chat Desktop / prepare (push) Successful in 8s
Build Lotus Chat Desktop / build-linux (push) Failing after 18m17s
Build Lotus Chat Desktop / build-windows (push) Failing after 20m37s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped
Windows: ConvertTo-Json outputs True/False (invalid JSON) and UTF-16
BOM, corrupting tauri.conf.json. Switch to `node -e` which round-trips
JSON correctly.

Linux: linuxdeploy is itself an AppImage and cannot execute inside
Docker without FUSE. APPIMAGE_EXTRACT_AND_RUN=1 makes it self-extract
and run as a plain binary instead.

Also fix unreachable_code warning in check_for_update.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 22:52:54 -04:00
jared 32286d03de feat: native notifications + in-app update checker
Build Lotus Chat Desktop / prepare (push) Successful in 9s
Build Lotus Chat Desktop / build-linux (push) Failing after 18m6s
Build Lotus Chat Desktop / build-windows (push) Failing after 23m47s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped
- Register tauri-plugin-notification; inject initialization script that
  patches window.Notification to route through the native plugin and
  always report permission as granted — bypasses WebView2's default deny
- Also grant COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS via existing
  PermissionRequestedEventHandler
- Register tauri-plugin-updater; add check_for_update and install_update
  commands using the pubkey/endpoint already in tauri.conf.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 20:31:25 -04:00
jared b4812e6659 feat: Windows taskbar overlay badge via ITaskbarList3
Build Lotus Chat Desktop / prepare (push) Successful in 7s
Build Lotus Chat Desktop / build-windows (push) Failing after 1m31s
Build Lotus Chat Desktop / build-linux (push) Failing after 15m17s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped
Adds set_badge_count Tauri command (Windows only). Uses CoCreateInstance
to get ITaskbarList3 and SetOverlayIcon to display a dynamically drawn
badge on the taskbar button. The badge is a 16x16 GDI bitmap: red circle,
white bold Segoe UI text, capped at "99+". Passing count=0 clears the
overlay. Uses windows = 0.61 (already a transitive dep via webview2-com).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 17:32:53 -04:00
jared ed718704ee fix(ci): add prepare job, auto-version, fix Windows build issues
- Add prepare job: computes version (4.12.{run_number}), creates/updates
  the Gitea release once — eliminates the race condition where build-windows
  and build-linux both tried to create the same release simultaneously.
- Auto-increment version: both build jobs patch tauri.conf.json with
  4.12.{run_number} before building, so every CI run produces a strictly
  increasing semver and the Tauri updater fires correctly.
- Fix double -- in Windows build command: was 'build -- --bundles nsis'
  which passed --bundles as cargo args (silently ignored), causing all
  bundle targets to build. Now 'build --bundles nsis' (single --).
- Add setup-node to Windows build: pins Node.js to .node-version like
  the Linux job already does.
- update-manifest: uses version/release_id from prepare outputs instead
  of re-fetching and parsing the release name.
- Fix window title: was "Cinny", now "Lotus Chat".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 17:02:01 -04:00
jared 4b71e80636 fix(windows): call with_webview on built window, import COREWEBVIEW2_PERMISSION_KIND type
Build Lotus Chat Desktop / build-windows (push) Successful in 27m6s
Build Lotus Chat Desktop / build-linux (push) Successful in 20m21s
Build Lotus Chat Desktop / update-manifest (push) Failing after 3s
with_webview is on WebviewWindow (the built window), not WebviewWindowBuilder.
Also import COREWEBVIEW2_PERMISSION_KIND as a type for the out-param zero-init.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 10:05:49 -04:00
jared d043f9c416 fix(windows): fix PermissionKind out-param and add AppImage support
Build Lotus Chat Desktop / build-windows (push) Failing after 23m52s
Build Lotus Chat Desktop / build-linux (push) Has been cancelled
Build Lotus Chat Desktop / update-manifest (push) Has been cancelled
- Fix COREWEBVIEW2_PERMISSION_KIND out-param pattern in PermissionRequestedEventHandler
- Add "wry" feature to tauri dep so with_webview compiles on Windows
- Build both appimage and deb on Linux for auto-update compatibility
- Commit AppRun-x86_64 binary to avoid GitHub download timeout in CI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 00:06:12 -04:00
jared eadd3bfc48 fix(windows): use webview2_com built-in handler instead of #[implement]
Build Lotus Chat Desktop / build-linux (push) Failing after 17m40s
Build Lotus Chat Desktop / build-windows (push) Failing after 22m16s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped
The previous approach used windows::core::implement to manually implement
ICoreWebView2PermissionRequestedEventHandler_Impl, but the sealed
IUnknownImpl constraint in webview2-com prevents external #[implement]
usage — you must use the crate's own pre-built handler types.

Replace with PermissionRequestedEventHandler::create() which wraps the
closure and handles COM ref-counting internally. Also removes the now-
unused windows = "0.61" direct dependency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 23:32:02 -04:00
jared 443c85c9b5 fix(windows): gate with_webview call to Windows only
Build Lotus Chat Desktop / build-linux (push) Failing after 13m50s
Build Lotus Chat Desktop / build-windows (push) Failing after 23m55s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped
with_webview is not available on Linux; break the builder chain and apply
it conditionally so the Linux build compiles without the wry feature flag.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 21:52:09 -04:00
jared 838c69f46e fix(windows): grant microphone and camera permissions in WebView2
WebView2 silently denies getUserMedia() unless a PermissionRequested
handler explicitly allows it. macOS was already covered by Info.plist;
Windows had nothing. Adds a COM event handler via with_webview that
auto-approves mic and camera requests so Element Call voice/video
works in the desktop app.

Also includes previously uncommitted changes:
- tauri.conf.json: add media-src / mediastream: to CSP
- Info.plist: macOS NSMicrophoneUsageDescription / NSCameraUsageDescription

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 18:27:12 -04:00
Krishan 2b61520524 fix: update CSP to allow reordering rooms inside space (#579)
* fix: update CSP to allow reordering rooms inside space

Fixes https://github.com/cinnyapp/cinny/issues/2949

* disable native dnd in windows configuration

* Disable drag and drop for main webview window in lib.rs

* Remove dragDropEnabled setting from tauri.conf.json

* Replace drag_drop_enabled with disable_drag_drop_handler
2026-05-23 21:52:14 +10:00
Shenwei Wang 08fcd330e1 fix: enable tauri plugin opener (#559)
* fix: enable tauri plugin opener

* fix: add remote urls to make build work on Windows

* fix: update Cargo.lock

We need tauri v2.8.0 since which supports `WebviewBuilder::on_new_window`

* fix: handle `window.open()` using `WebviewBuilder::on_new_window`

---------

Co-authored-by: Krishan <33421343+kfiven@users.noreply.github.com>
2026-04-13 17:20:44 +10:00
Shenwei Wang 89804c83ac fix: use devUrl when dev (#556) 2026-03-18 00:29:22 +11:00
Krishan d15e86a176 Update Tauri from v1 to v2 (#496)
* Upgrade tauri to v2

* update action and disable menu

* Add args to workflow step in test.yml

* Rename environment variables for Tauri signing

* Change mainBinaryName from 'Cinny' to 'cinny'

* Update linux file names to use 'Cinny' instead of 'cinny'

* Upgrade Tauri action to v0.6.1 and fix targets

Updated Tauri action version and corrected target specification.
2026-03-03 23:16:04 +11:00