Fix detached-window IPC scoping and pane-transfer session loss
- capabilities/default.json: extend window scope to "pane-window-*" so detached windows can invoke/listen (fixes blank panes B2-B5). - App.tsx: memoize the destructive take_pending_window_init read at module scope so React StrictMode's double mount-effect doesn't consume the transfer payload twice and lose the adopted PTY session. - lib.rs: add `use tauri::Manager;` for Window::app_handle() in on_window_event. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
681d15fdc3
commit
bea6cf2977
4 changed files with 54 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "default",
|
||||
"description": "Default capability set for wsl-mux spike",
|
||||
"windows": ["main"],
|
||||
"windows": ["main", "pane-window-*"],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"core:event:default",
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ mod window_state;
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
// `Manager` trait must be in scope to call `.app_handle()` on the `&Window`
|
||||
// passed to the `on_window_event` closure below. Same pattern as the
|
||||
// `Emitter` trait needed for `.emit()` (see 2026-05-26 PR-1 session log).
|
||||
use tauri::Manager;
|
||||
|
||||
use crate::mcp::{McpServerHandle, McpState, PendingActions};
|
||||
use crate::pty::PtyManager;
|
||||
use crate::window_state::{PendingInits, WindowsState, MAIN_WINDOW_LABEL};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue