5.6 KiB
5.6 KiB
Rust Implementation Assessment: What's Implemented vs. Missing
Date: 2026-08-17
Scope: Current state of the Rust port (sovereign_browser_rust) compared to
the original C sovereign_browser.
Reference: plans/main-window-comparison.md
1. Status Legend
- ✅ Implemented & working
- ⚠️ Partially implemented (works but limited / placeholder)
- ❌ Not implemented
2. Login Dialog
| Feature | Status | Notes |
|---|---|---|
| 5 method tabs (Local, Seed, Read-only, NIP-46, n_signer) | ✅ | Full notebook UI |
| "No Login" button | ✅ | |
| Status/error messages | ✅ | |
| Monospace styling | ✅ | |
| Version in title | ✅ | |
| n_signer USB Serial / qrexec transports | ⚠️ | Show "not supported" message; only UNIX/TCP work (Rust signer crate limitation) |
3. Main Window & Tabs
| Feature | Status | Notes |
|---|---|---|
| Per-tab toolbar (URL, back/forward/refresh, bookmark, hamburger) | ✅ | |
| Rich tab label (favicon + title + close) | ⚠️ | Favicon widget present but not populated (cairo→pixbuf API limitation) |
| Tab context menu (right-click) | ✅ | New/Close/Close Others/Close to Right/New Window/Duplicate/Reload |
| Middle-click close | ✅ | |
| Drag-reorder | ✅ | |
| New-tab button on tab strip | ✅ | Added via set_action_widget in main.rs and new windows |
| Load-progress bar | ✅ | |
| Bookmark bar | ⚠️ | Bar widget present but not populated with bookmark buttons |
| URL search completion | ❌ | Plain entry, no history/bookmark/search suggestions |
| User avatar on tab strip | ❌ | Not implemented |
| Multi-window (Ctrl+N, context menu) | ✅ | tab_manager_new_window() |
target="_blank" / window.open() |
❌ | No create-signal handler wired |
| Active-window tracking (focus-in) | ⚠️ | New windows set active notebook, but main window doesn't track focus |
| App stays alive when aux window closes | ⚠️ | Aux window destroy doesn't quit, but main-window close always quits |
4. Menus & Chrome
| Feature | Status | Notes |
|---|---|---|
| Hamburger menu | ✅ | Open File, Reload, Stop, Switch Identity, Logout, Inspector, Sidebar, Profile, Agent, Processes, Settings, About |
| Identity menu (switch/lock/logout) | ⚠️ | Switch + Logout wired; Lock Session defined but not in menu |
| Network toggles (Tor/FIPS) | ❌ | Not in menu |
| Security strip toggle | ❌ | Not in menu |
| Nostr signing status | ❌ | Not in menu |
| Sidebar (agent chat) | ❌ | Placeholder only (tab_manager_toggle_sidebar is a no-op) |
| App theme CSS | ✅ | Red accent, adapts to theme_dark |
5. Keyboard Shortcuts
| Feature | Status | Notes |
|---|---|---|
| Ctrl+T new tab | ✅ | |
| Ctrl+N new window | ✅ | |
| Ctrl+W close tab | ✅ | |
| Ctrl+L focus URL | ✅ | |
| Ctrl+R reload | ✅ | |
| Ctrl+Tab / Ctrl+Shift+Tab | ✅ | |
| Zoom in/out/reset | ✅ | |
| Ctrl+Shift+I inspector | ✅ | |
| Ctrl+Shift+A sidebar | ⚠️ | Wired but sidebar is a no-op |
| Ctrl+Shift+M toolbars | ✅ | |
| F11 fullscreen | ⚠️ | Toggles but no state tracking (gtk-rs has no is_fullscreen getter) |
| Configurable shortcuts (settings page) | ❌ | shortcuts.rs defines defaults but they're not wired to the settings UI |
6. Session & Window Lifecycle
| Feature | Status | Notes |
|---|---|---|
| Session save/restore | ✅ | Basic (restores URLs) |
| Session restore CLI precedence | ❌ | No --no-session-restore / --url precedence logic |
| Multi-window close semantics | ⚠️ | App quits when main window closes even if aux windows remain |
| Privacy mode (clear session/history on shutdown) | ❌ | Not implemented |
7. Summary of Remaining Gaps (Priority Order)
target="_blank"/window.open()handling — nocreate-signal handler, so popups/new-window links don't work. This is the most impactful missing feature.- Agent sidebar —
tab_manager_toggle_sidebaris a no-op; the original has a full per-windowGtkPanedsidebar with an agent chat webview. - URL search completion — the original shows history + bookmarks + search suggestions in the URL bar; the Rust version has a plain entry.
- User avatar on the tab strip — the original shows the Nostr profile picture; not implemented.
- Bookmark bar population — the bar widget exists but isn't filled with bookmark buttons.
- Favicon population — the favicon widget exists but isn't populated (cairo→pixbuf conversion not exposed in gdk-rs 0.18).
- Hamburger menu completeness — missing Tor/FIPS toggles, security strip, Nostr signing status, and Lock Session.
- Multi-window close semantics — app should stay alive when only auxiliary windows remain.
- Session restore CLI precedence and privacy mode on shutdown.
- Configurable keyboard shortcuts wired to the settings page.
8. Notes on Recent Fixes
- Removed the redundant shared top-level toolbar (the "weird entry box with Settings") — each tab now has its own toolbar.
- Fixed URL loading — added
normalize_url()so bare domains likegoogle.comgethttps://prepended. - Fixed the main notebook/window storage — the main notebook and window are now stored in
glib::thread_guard::ThreadGuardglobals, which fixes all features that depend ontab_manager_get_main_notebook()(keyboard shortcuts, menu identity actions, new-window, etc.). Previously these returnedNoneand were silently broken. - New-tab button — present via
set_action_widgetin both the main window and new windows; added an explicitshow()to ensure visibility.