Commit e2fff0f
feat: ACP health check, diagnostics page and visual polish
* feat(acp): add health check, heartbeat and connection status events
- Add `ConnectionStatusEvent` and `ConnectionConfig` to `types.rs`
- Implement `heartbeat_task` to detect dead process every 15s
- Add `is_alive()` and `emit_status()` helpers to `AcpConnection`
- Refactor `AcpState` to hold `connections` and `configs` separately
- Add `acp_check_health` command for on-demand connection health check
- Emit `acp:connection-status` event on connect, disconnect and process exit
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(acp): add reactive connection status to frontend hook
- Define `AcpConnectionStatus` type (idle | connecting | connected | disconnected | reconnecting)
- Listen to `acp:connection-status` events emitted by the Rust backend
- Call `acp_check_health` when window regains visibility
- Expose `connectionStatus` from `useAcpConnection` hook
- Add `AcpConnectionStatusEvent` interface to `types/acp.ts`
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(settings): add ACP connection diagnostics page
- Add `run_diagnostics` Rust command to check platform, binary, version, GH_TOKEN and ACP connectivity
- Test ACP connection in isolation with a 10s timeout and stderr capture
- Add `DiagnosticsSettings` component with visual report and copy-to-clipboard button
- Integrate 'Diagnostics' tab into the settings window (`SettingsApp`)
- Add pt-BR and en translations for the diagnostics section
- Update home tagline and chat placeholder copy in pt-BR
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor(viewer): replace resizable panels with overlay drawers in MarkdownViewer
- Remove dependency on `ResizablePanelGroup` / `ImperativePanelHandle`
- Replace lateral panels with absolute overlay drawers controlled by boolean state
- Add floating toggle buttons to open outline (left) and review (right)
- Simplify collapse/expand logic by removing imperative refs
- Preserve auto-open behaviour when entering the 'reviewing' phase
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(ui): visual and UX adjustments across cards, grids and input components
- Increase padding and minimum height of workspace and session cards (120px)
- Use `line-clamp-2` on card titles for improved readability
- Reduce grid column count and increase gap between cards
- Add drag handle to `TerminalInput` for resizable height
- Change send shortcut from Cmd/Ctrl+Enter to Enter (Shift+Enter inserts newline)
- Show reconnect button only when connection is inactive (`disabled` prop)
- Display `acp_session_id` in the active session header
- Widen new session dialog and increase textarea to 20 rows
- Add `type="button"` to `MicButton` to prevent accidental form submission
- Reduce plan panel `minSize` from 30 to 20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(acp): only check health when window becomes visible, not hidden
The visibilitychange event fires on both hide and show transitions.
Guard with `document.hidden` so health checks only run when the
window regains focus, not when the user tabs away.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address PR review comments
- sync reviewOpen state with review.setIsPanelOpen on toggle
- block connect calls when status is 'reconnecting'
- enable comrak render.escape to prevent raw HTML pass-through (XSS)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(review): address CodeRabbit review comments
- SessionCard: use cn() utility instead of template-literal class merging
- TerminalInput: store drag listeners in ref and clean up on unmount
- TerminalInput: guard Enter-to-send with isComposing check for IME support
- DiagnosticsSettings: add explicit error state and catch block in runDiagnostics
- DiagnosticsSettings: await clipboard write before setting copied feedback
- DiagnosticsSettings: localize ACP Command/Stderr/Home/Path labels via i18n
- useAcpConnection: switch from @tauri-apps/api package imports to window.__TAURI__ globals
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(theme): add semantic success and warning design tokens
Add --success, --success-foreground, --warning, --warning-foreground CSS
variables to index.css for both light and dark themes, following the same
HSL pattern as --destructive. Register them in tailwind.config.ts so that
text-success, bg-success, text-warning, bg-warning etc. become available
as Tailwind utilities.
Replace hardcoded text-green-500 / text-yellow-500 / text-green-600
dark:text-green-400 in DiagnosticsSettings and CliInstallSettings with
the new theme-aware text-success and text-warning tokens.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(review): address CodeRabbit follow-up comments
- lib.rs: trim whitespace from gh_token before marking it as set; add USERPROFILE fallback for home_env on Windows
- useAcpConnection: add .catch() to the listen() promise chain to surface failed event-listener registration as an error state
- useAcpConnection: remove connectedRef guards from disconnect and unmount cleanup so teardown always runs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(review): address CodeRabbit follow-up comments (round 2)
- lib.rs: apply trim() to binary_path value before using it in spawn, not only
for the emptiness check; a path with leading/trailing whitespace would fail
process spawn unnecessarily
- useAcpConnection: reset connectedRef, connectionStatus and connectionError at
the top of the workspaceId effect so the UI never shows stale state from a
previous workspace while waiting for the first event from the new one
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(review): address CodeRabbit follow-up comments (round 3)
- lib.rs: fix GH_TOKEN env var check to trim whitespace before treating it as
set, matching the same treatment applied to the gh_token argument
- lib.rs: add kill_on_drop(true) to the --version subprocess so it is
terminated when the 5s timeout drops the future, preventing process leak
- useAcpConnection: consolidate connectedRef updates to a single assignment
(status === 'connected') so all status transitions (reconnecting, connecting,
etc.) keep the ref in sync, not just connected/disconnected
- useAcpConnection: add post-connect fallback health query after acp_connect
succeeds to avoid stuck 'connecting' state when the status event fires before
the listener is registered
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent b27e126 commit e2fff0f
24 files changed
Lines changed: 879 additions & 183 deletions
File tree
- apps/tauri
- src-tauri/src
- acp
- src
- components
- settings
- hooks
- locales
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| |||
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | | - | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
33 | 52 | | |
34 | 53 | | |
35 | 54 | | |
36 | 55 | | |
37 | 56 | | |
38 | 57 | | |
39 | | - | |
| 58 | + | |
40 | 59 | | |
41 | 60 | | |
42 | 61 | | |
| |||
52 | 71 | | |
53 | 72 | | |
54 | 73 | | |
| 74 | + | |
55 | 75 | | |
| 76 | + | |
56 | 77 | | |
57 | 78 | | |
58 | 79 | | |
| |||
62 | 83 | | |
63 | 84 | | |
64 | 85 | | |
65 | | - | |
| 86 | + | |
| 87 | + | |
66 | 88 | | |
67 | 89 | | |
68 | 90 | | |
| |||
75 | 97 | | |
76 | 98 | | |
77 | 99 | | |
78 | | - | |
| 100 | + | |
79 | 101 | | |
80 | 102 | | |
81 | 103 | | |
| |||
103 | 125 | | |
104 | 126 | | |
105 | 127 | | |
106 | | - | |
| 128 | + | |
107 | 129 | | |
108 | 130 | | |
109 | 131 | | |
| |||
133 | 155 | | |
134 | 156 | | |
135 | 157 | | |
136 | | - | |
| 158 | + | |
137 | 159 | | |
138 | 160 | | |
139 | 161 | | |
| |||
167 | 189 | | |
168 | 190 | | |
169 | 191 | | |
170 | | - | |
| 192 | + | |
171 | 193 | | |
172 | 194 | | |
173 | 195 | | |
| |||
196 | 218 | | |
197 | 219 | | |
198 | 220 | | |
199 | | - | |
| 221 | + | |
200 | 222 | | |
201 | 223 | | |
202 | 224 | | |
| |||
221 | 243 | | |
222 | 244 | | |
223 | 245 | | |
224 | | - | |
| 246 | + | |
225 | 247 | | |
226 | 248 | | |
227 | 249 | | |
| |||
237 | 259 | | |
238 | 260 | | |
239 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
240 | 289 | | |
241 | | - | |
| 290 | + | |
| 291 | + | |
242 | 292 | | |
243 | 293 | | |
244 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
58 | | - | |
59 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
63 | | - | |
| 74 | + | |
64 | 75 | | |
65 | 76 | | |
66 | 77 | | |
67 | 78 | | |
68 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
69 | 83 | | |
70 | 84 | | |
71 | 85 | | |
| |||
155 | 169 | | |
156 | 170 | | |
157 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
158 | 209 | | |
159 | 210 | | |
160 | 211 | | |
| |||
241 | 292 | | |
242 | 293 | | |
243 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
244 | 300 | | |
245 | 301 | | |
246 | 302 | | |
| |||
253 | 309 | | |
254 | 310 | | |
255 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
256 | 332 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
0 commit comments