Commit 1804ccb
Yogthos
fix: duplicate Ctrl+N/P/X handlers, write->edit allowlist mirroring, dead code removal
- Remove ~122 lines of unreachable duplicate Ctrl+N/P/X match arms in
mod.rs — the early-block handler catches all three keys and continues,
making the later match arms dead code. Fix Ctrl+X in the early block
to call remove_chat + adjust chat_ui_states instead of computing
'next chat' index.
- Fix session allowlist F2 alias re-prompt loop: when the user 'always
allows' write/apply_patch, also register the pattern under the edit
alias so enforce()'s most-restrictive merge doesn't return Ask every
time. Mirrors edit→write/apply_patch in reverse direction too.
load_session_allowlist routes through add_session_allowlist so
persisted sessions also get the mirroring.
- Delete duplicate validate_write_path function body that was
copy-pasted into mod tests (shadow copy — tests weren't testing
production code).
- Rename validate_write_path → validate_path since it guards read/edit
too. Fix error messages: 'Refusing to write to' → 'Refusing to use'.
- Remove dead code: draw_search_bar (31 lines), content_cols (8 lines),
color + resolve_color import, scroll_to_line (7 lines),
set_alert_overlay_with_title (8 lines), alert_overlay_active (4 lines).
- Remove 5 #[allow(dead_code)] annotations from items that are actually
used. Replace block-level #[allow(dead_code)] on impl Renderer with
targeted annotation on just the anchor marker method.1 parent 2566862 commit 1804ccb
5 files changed
Lines changed: 185 additions & 306 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 28 | | |
35 | 29 | | |
36 | 30 | | |
| |||
90 | 84 | | |
91 | 85 | | |
92 | 86 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 87 | | |
107 | 88 | | |
108 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
609 | 625 | | |
610 | 626 | | |
611 | 627 | | |
612 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
613 | 634 | | |
614 | 635 | | |
615 | 636 | | |
| |||
1460 | 1481 | | |
1461 | 1482 | | |
1462 | 1483 | | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
1463 | 1576 | | |
1464 | 1577 | | |
1465 | 1578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
| 289 | + | |
331 | 290 | | |
332 | 291 | | |
333 | 292 | | |
334 | | - | |
335 | | - | |
| 293 | + | |
| 294 | + | |
336 | 295 | | |
337 | 296 | | |
338 | 297 | | |
339 | 298 | | |
340 | | - | |
341 | | - | |
342 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
343 | 302 | | |
344 | 303 | | |
345 | 304 | | |
346 | 305 | | |
347 | | - | |
348 | | - | |
349 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
350 | 309 | | |
351 | 310 | | |
352 | 311 | | |
353 | 312 | | |
354 | 313 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
360 | 319 | | |
361 | 320 | | |
362 | 321 | | |
363 | 322 | | |
364 | | - | |
365 | | - | |
366 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
367 | 326 | | |
368 | 327 | | |
369 | 328 | | |
370 | 329 | | |
371 | | - | |
372 | | - | |
| 330 | + | |
| 331 | + | |
373 | 332 | | |
374 | 333 | | |
0 commit comments