1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Messages flowing into the main loop from input/PTY threads and (in server
//! mode) from client connections.
use std::sync::mpsc::SyncSender;
use ratatui::crossterm::event::{KeyEvent, MouseEvent};
use crate::ids::PaneId;
use crate::ipc::protocol::ServerMessage;
pub enum AppEvent {
Key(KeyEvent),
Mouse(MouseEvent),
Paste(String),
Resize(u16, u16),
/// The given pane produced output; the screen changed.
PtyData(PaneId),
/// The given pane's child process exited.
PtyExit(PaneId),
/// A binary client attached (server mode); `frames` receives rendered frames.
ClientConnected {
id: u64,
frames: SyncSender<ServerMessage>,
cols: u16,
rows: u16,
},
/// A binary client detached.
ClientDetach {
id: u64,
},
/// A module subprocess finished; fill in its log entry.
ModuleCommandFinished {
log_id: u64,
code: Option<i32>,
out: String,
err: String,
},
/// A git-tab fetch finished; apply it to the matching `GitView`.
GitData {
view: u64,
payload: crate::git::GitPayload,
},
/// A task's quality-gate command finished (ORCH-5): exit 0 → Done, else held
/// at Review with the captured output.
TaskGateFinished {
task: String,
code: Option<i32>,
out: String,
},
}