|
1 | 1 | # PLANNING.md β BigLinux WebApps v4.0.0 Full Audit |
2 | 2 |
|
3 | | -> Generated: 2025-06-23 | Updated: 2025-06-24 (post-fix) |
| 3 | +> Generated: 2025-06-23 | Updated: 2025-06-25 (Phase 2 fixes applied) |
4 | 4 | > Codebase: 26 .rs files, ~5100 LOC, 3 crates |
5 | 5 | > Tooling: cargo clippy, cargo fmt, cargo audit, manual review, GTK4/Adwaita audit, Orca a11y audit |
6 | 6 |
|
@@ -453,3 +453,43 @@ A11y issues: ~20 β target 0 (Phase A+B+C) |
453 | 453 | - **Browser detection caching:** `detect_browsers()` spawns external processes (flatpak list, xdg-settings). Results should be cached for the app session since installed browsers don't change during a single run. |
454 | 454 | - **shell_split() limitations:** Custom tokenizer doesn't handle escaped quotes (`\"`) or heredoc-style strings. Document this or switch to `shell-words` crate. |
455 | 455 | - **ZIP path traversal:** Current `canonicalize()` check is correct but `canonicalize()` requires the path to exist. Consider using `Path::components()` check for `..` segments as additional defense. |
| 456 | + |
| 457 | +--- |
| 458 | + |
| 459 | +## 11. Phase 2 Fixes Applied (2025-06-25) |
| 460 | + |
| 461 | +All changes verified: cargo build β
, cargo clippy 0 warnings β
, 35/35 tests β
|
| 462 | + |
| 463 | +### Security |
| 464 | +| ID | Fix | File | Details | |
| 465 | +|----|-----|------|---------| |
| 466 | +| SEC-02 | β
Zip bomb protection | service.rs | `Read::take(50MB)` limit per extracted file + cleanup on oversize | |
| 467 | + |
| 468 | +### Code Quality |
| 469 | +| ID | Fix | File | Details | |
| 470 | +|----|-----|------|---------| |
| 471 | +| QUALITY-02 | β
Signal handler leak | webapp_dialog.rs | `favicon_flow.connect_child_activated` moved out of detect handler β wired once | |
| 472 | +| QUALITY-06 | β
Atomic JSON writes | service.rs | Write `.json.tmp` β `fs::rename()` β no corruption on crash | |
| 473 | + |
| 474 | +### UX |
| 475 | +| ID | Fix | File | Details | |
| 476 | +|----|-----|------|---------| |
| 477 | +| UX-01 | β
Validation feedback | webapp_dialog.rs | Error CSS class + `grab_focus()` on empty/invalid fields | |
| 478 | +| UX-02 | β
Save error display | webapp_dialog.rs | `adw::Banner` error message, dialog stays open | |
| 479 | +| UX-05 | β
Skip auto-detect on template | webapp_dialog.rs | `skip_auto_detect` Cell flag β no redundant favicon fetch | |
| 480 | + |
| 481 | +### Polish |
| 482 | +| ID | Fix | File | Details | |
| 483 | +|----|-----|------|---------| |
| 484 | +| POLISH-03 | β
Geometry save accuracy | viewer/window.rs | Use `window.width()/height()` for non-maximized, `default_size()` fallback for maximized | |
| 485 | +| POLISH-05 | β
Cancel debounce on close | webapp_dialog.rs | `connect_destroy` cancels pending `SourceId` timer | |
| 486 | +| POLISH-06 | β
Context menu action group leak | viewer/window.rs | Action group created once, action takes URI as `String` param β reused per right-click | |
| 487 | + |
| 488 | +### Phase 3 β High+Medium Priority (2025-06-25) |
| 489 | + |
| 490 | +| ID | Fix | File | Details | |
| 491 | +|----|-----|------|---------| |
| 492 | +| 2.6 | β
Permission prompt system | viewer/window.rs | Camera/mic/geolocation β `adw::AlertDialog` prompt, decision persisted in `permissions.json`, other perms auto-granted | |
| 493 | +| 2.3 | β
Background I/O threads | manager/window.rs | Import/export run on `std::thread::spawn`, result polled via `glib::timeout_add_local` | |
| 494 | +| 3.5 | β
Collapse Behavior section | webapp_dialog.rs | New webapps: Behavior group hidden, "Advanced Settingsβ¦" button reveals it | |
| 495 | +| 3.9 | β
Split service.rs | service/ | 735L monolith β 4 modules: mod.rs(249), browser.rs(126), io.rs(130), migration.rs(255) | |
0 commit comments