117 lines
5.6 KiB
Markdown
117 lines
5.6 KiB
Markdown
# 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`](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)
|
|
|
|
1. **`target="_blank"` / `window.open()` handling** — no `create`-signal handler, so popups/new-window links don't work. This is the most impactful missing feature.
|
|
2. **Agent sidebar** — `tab_manager_toggle_sidebar` is a no-op; the original has a full per-window `GtkPaned` sidebar with an agent chat webview.
|
|
3. **URL search completion** — the original shows history + bookmarks + search suggestions in the URL bar; the Rust version has a plain entry.
|
|
4. **User avatar on the tab strip** — the original shows the Nostr profile picture; not implemented.
|
|
5. **Bookmark bar population** — the bar widget exists but isn't filled with bookmark buttons.
|
|
6. **Favicon population** — the favicon widget exists but isn't populated (cairo→pixbuf conversion not exposed in gdk-rs 0.18).
|
|
7. **Hamburger menu completeness** — missing Tor/FIPS toggles, security strip, Nostr signing status, and Lock Session.
|
|
8. **Multi-window close semantics** — app should stay alive when only auxiliary windows remain.
|
|
9. **Session restore CLI precedence** and **privacy mode** on shutdown.
|
|
10. **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 like `google.com` get `https://` prepended.
|
|
- **Fixed the main notebook/window storage** — the main notebook and window are now stored in `glib::thread_guard::ThreadGuard` globals, which fixes all features that depend on `tab_manager_get_main_notebook()` (keyboard shortcuts, menu identity actions, new-window, etc.). Previously these returned `None` and were silently broken.
|
|
- **New-tab button** — present via `set_action_widget` in both the main window and new windows; added an explicit `show()` to ensure visibility.
|