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
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
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7716307e54
commit
c1ae01bf41
+13
-7
@@ -70,14 +70,19 @@ const NOTIFICATION_BRIDGE: &str = r#"(function(){
|
||||
var opts=options||{};
|
||||
try{
|
||||
var body=opts.body!=null?String(opts.body):undefined;
|
||||
// cinny tags message notifications with the roomId (options.tag) and the
|
||||
// in-app route (options.data.path). When present, route to the rich WinRT
|
||||
// toast (click-opens-room + quick reply); otherwise a plain toast.
|
||||
var roomId=opts.tag!=null?String(opts.tag):undefined;
|
||||
var path=(opts.data&&opts.data.path!=null)?String(opts.data.path):undefined;
|
||||
if(roomId){
|
||||
// cinny coalesces notifications by options.tag and carries the in-app
|
||||
// route + real Matrix ids in options.data. Anything tagged goes to the
|
||||
// rich WinRT toast (coalescing + click-opens-room); only a real room id
|
||||
// gets a reply box. The tag is NOT a room id — thread toasts tag
|
||||
// `room:thread`, invites 'lotus-invites' (cinny-desktop #17).
|
||||
var data=opts.data||{};
|
||||
var tag=opts.tag!=null?String(opts.tag):undefined;
|
||||
var roomId=data.roomId!=null?String(data.roomId):undefined;
|
||||
var threadId=data.threadId!=null?String(data.threadId):undefined;
|
||||
var path=data.path!=null?String(data.path):undefined;
|
||||
if(tag||roomId){
|
||||
window.__TAURI_INTERNALS__.invoke('show_rich_toast',{
|
||||
title:String(title),body:body,roomId:roomId,path:path
|
||||
title:String(title),body:body,tag:tag,roomId:roomId,threadId:threadId,path:path
|
||||
}).catch(function(){});
|
||||
}else{
|
||||
window.__TAURI_INTERNALS__.invoke('send_notification',{
|
||||
@@ -519,6 +524,7 @@ pub fn run() {
|
||||
native::chrome::window_start_drag,
|
||||
native::chrome::window_close,
|
||||
native::toast::show_rich_toast,
|
||||
native::focus_assist::get_focus_assist,
|
||||
native::hotkeys::global_hotkeys_supported,
|
||||
native::hotkeys::set_global_hotkeys,
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user