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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
//! Message types for the Elm Architecture
/// All possible user actions and system events
#[derive(Debug, Clone)]
pub enum Message {
// === Navigation ===
/// Select a review from the list
SelectReview(String),
/// Go back to previous screen
Back,
// === List Navigation ===
/// Move selection up in list
ListUp,
/// Move selection down in list
ListDown,
/// Page up in list
ListPageUp,
/// Page down in list
ListPageDown,
/// Go to first item
ListTop,
/// Go to last item
ListBottom,
// === File Sidebar ===
/// Move down in sidebar tree
NextFile,
/// Move up in sidebar tree
PrevFile,
/// Jump to first sidebar item
SidebarTop,
/// Jump to last sidebar item
SidebarBottom,
/// Select file by index
SelectFile(usize),
/// Select sidebar item by row index (mouse click)
ClickSidebarItem(usize),
/// Activate current sidebar item (Enter)
SidebarSelect,
// === Diff/Content Pane ===
/// Move cursor up one row
CursorUp,
/// Move cursor down one row
CursorDown,
/// Move cursor to first row
CursorTop,
/// Move cursor to last row
CursorBottom,
/// Toggle visual line selection mode (Shift+V)
VisualToggle,
/// Scroll content up
ScrollUp,
/// Scroll content down
ScrollDown,
/// Scroll to top
ScrollTop,
/// Scroll to bottom
ScrollBottom,
/// Scroll up by half a page
ScrollHalfPageUp,
/// Scroll down by half a page
ScrollHalfPageDown,
/// Scroll up by 10 lines
ScrollTenUp,
/// Scroll down by 10 lines
ScrollTenDown,
/// Page up in content
PageUp,
/// Page down in content
PageDown,
/// Jump to next thread
NextThread,
/// Jump to previous thread
PrevThread,
/// Expand a thread to show comments
ExpandThread(String),
/// Collapse expanded thread
CollapseThread,
// === Focus ===
/// Toggle focus between panes
ToggleFocus,
// === Actions ===
/// Resolve a thread
ResolveThread(String),
/// Reopen a resolved thread
ReopenThread(String),
// === Filter/View ===
/// Cycle review list status filter (All → Open → Closed → All)
CycleStatusFilter,
/// Activate search input on review list
SearchActivate,
/// Append character to search input
SearchInput(String),
/// Delete last character from search input
SearchBackspace,
/// Delete last word from search input
SearchDeleteWord,
/// Clear search input text (stay in search mode)
SearchClearLine,
/// Clear and deactivate search
SearchClear,
/// Toggle between unified and side-by-side diff view
ToggleDiffView,
/// Toggle file sidebar visibility
ToggleSidebar,
/// Toggle diff line wrapping
ToggleDiffWrap,
/// Open current file in editor
OpenFileInEditor,
// === Command Palette ===
ShowCommandPalette,
HideCommandPalette,
CommandPaletteNext,
CommandPalettePrev,
CommandPaletteUpdateInput(String),
CommandPaletteInputBackspace,
CommandPaletteDeleteWord,
CommandPaletteExecute,
// === Commenting ===
/// Open inline multi-line comment editor (a)
StartComment,
/// Open $EDITOR for comment (Shift+A)
StartCommentExternal,
EnterCommentMode,
CommentInput(String),
CommentInputBackspace,
CommentNewline,
CommentCursorUp,
CommentCursorDown,
CommentCursorLeft,
CommentCursorRight,
CommentHome,
CommentEnd,
CommentWordLeft,
CommentWordRight,
CommentDeleteWord,
CommentClearLine,
SaveComment,
CancelComment,
// === Theme Selection ===
ShowThemePicker,
ApplyTheme(String),
// === System ===
/// Terminal resize event
Resize {
width: u16,
height: u16,
},
/// Periodic tick for animations/refresh
Tick,
/// Request to quit
Quit,
/// No-op (ignore event)
Noop,
}