Final Comprehensive Gap Analysis: sovereign_browser Rust Port
This document catalogs every remaining gap between the original C implementation (/home/user/lt/sovereign_browser) and the Rust port (/home/user/lt/sovereign_browser_rust). The goal is 100% feature parity.
The C hamburger menu (tab_manager.c:2562-2692) has significantly more items than the Rust version (src/tab_manager.rs:997).
| Item |
C Action |
Rust Status |
| Recents (History submenu) |
Dropdown of last 10 pages + "Clear Recents" |
❌ Missing |
| Bookmarks submenu |
Tree of bookmarks + "Manage Bookmarks…" |
❌ Missing |
| Tor-routed transport |
Check menu item (toggle Tor mode) |
❌ Missing |
| FIPS mesh |
Check menu item (toggle FIPS mode) |
❌ Missing |
| Security strip |
Check menu item (toggle SOP/CORS/certs) |
❌ Missing |
| Nostr signing status |
Clickable item showing signer status |
❌ Missing |
| Lock Session |
Sign out without closing browser |
❌ Missing |
| Download Website |
Opens site downloader |
❌ Missing |
| About |
Opens about dialog |
❌ Missing |
| Avatar button |
Circular profile picture button next to hamburger |
❌ Missing |
2. Keyboard Shortcuts Gaps
The C version defines 20+ shortcuts (shortcuts.c:24-124). The Rust version (src/shortcuts.rs:21) has 12.
Missing Shortcuts
| Action |
Shortcut |
Rust Status |
new_window |
Ctrl+N |
❌ Not in shortcut registry |
open_file |
Ctrl+O |
❌ Missing |
force_reload |
Shift+F5 |
❌ Missing |
go_back |
Alt+Left |
❌ Missing |
go_forward |
Alt+Right |
❌ Missing |
find |
Ctrl+F |
❌ Missing |
open_settings |
Ctrl+, |
❌ Missing |
open_processes |
Ctrl+Shift+Esc |
❌ Missing |
new_identity |
Ctrl+Shift+U |
❌ Missing |
toggle_fullscreen |
F11 |
❌ Missing |
toggle_sidebar |
Ctrl+Shift+A |
❌ Missing |
toggle_toolbars |
Ctrl+Shift+M |
❌ Missing |
bookmark_page |
Ctrl+D |
❌ Missing |
show_history |
Ctrl+H |
❌ Missing |
show_bookmarks |
Ctrl+B |
❌ Missing |
show_downloads |
Ctrl+J |
❌ Missing |
quit |
Ctrl+Q |
❌ Missing |
next_tab_pagedown |
Ctrl+PageDown |
❌ Missing |
prev_tab_pageup |
Ctrl+PageUp |
❌ Missing |
Missing: Ctrl+O (open_file), Ctrl+Comma (settings), Ctrl+Shift+Esc (processes), Ctrl+Shift+U (identity), Alt+Left/Right (back/forward), F5 (reload), Shift+F5 (force), Ctrl+F (find), Ctrl+D (bookmark), Ctrl+H (history), Ctrl+B (bookmarks), Ctrl+Q (quit), Ctrl+PageDown/Up (tabs), Ctrl+Shift+A (sidebar), Ctrl+Shift+M (toolbars)
Missing handle_key_press bypass for sovereign:// pages
The C version bypasses shortcut interception when sovereign:// pages are active so the page's JS can capture key combos.
3. Settings Page (sovereign://settings) Gaps
| Field |
Type |
C version (nostr_bridge.c:2940) |
Rust Status |
agent_server_enabled |
bool |
Whether agent server is on |
❌ Missing |
agent_login_timeout_ms |
number |
Login timeout |
❌ Missing |
dev_extras |
bool |
From WebKit settings |
❌ Missing |
file_access |
bool |
From WebKit settings |
❌ Missing |
universal_access |
bool |
From WebKit settings |
❌ Missing |
search_engines |
array |
List of {id, name} |
❌ Missing |
shortcuts |
array |
All shortcuts with id/label/accel |
❌ Missing |
tab_bar_position |
string |
"top"/"bottom"/"left"/"right" |
❌ Returns number |
| Feature/Key |
C handler (nostr_bridge.c:1037) |
Rust Status |
agent_server_enabled |
Toggle agent server on/off |
❌ Missing |
dev_extras |
Toggle WebKit developer extras |
❌ Missing |
file_access |
Toggle file access from file:// |
❌ Missing |
universal_access |
Toggle universal access from file:// |
❌ Missing |
shortcut.reset_all |
Reset all shortcuts to defaults |
❌ Missing |
shortcut.reset |
Reset a single shortcut |
❌ Missing |
shortcut.<action> |
Set a shortcut to a custom binding |
❌ Missing |
agent_allowed_origins |
Save allowed origins |
❌ Missing |
agent_login_timeout_ms |
Save login timeout |
❌ Missing |
Settings page HTML
The www/settings.html + settings.js expects the settings/config JSON to include search_engines, shortcuts, agent_server_enabled, dev_extras, etc. Without these fields, the page renders incompletely.
4. Agent System Gaps
5. sovereign:// Internal Page Gaps
| Page |
C Status |
Rust Status |
sovereign://settings |
Full settings with all toggles, relays, search, shortcuts |
✅ HTML served from www/settings.html, JSON endpoints need config fields |
sovereign://bookmarks |
Tree view with add/delete/create/move/rename |
✅ Implemented (src/nostr_bridge.rs:95) |
sovereign://profile |
Kind 0/3/10002 data from SQLite |
✅ Implemented (src/nostr_bridge.rs:386) |
sovereign://processes |
Layer 1 (OS) + Layer 2 (tabs) |
✅ Implemented (src/nostr_bridge.rs:99) |
sovereign://fips |
Status, peers, network, tree, directory |
✅ Served from www/fips.html + JS, backend stubs |
sovereign://agents |
Provider config, models, skills |
✅ Served from www/agents/config.html + JS |
sovereign://agents/chat |
Full chat client with markdown, conversations |
✅ Served from www/agents/chat.html + JS |
sovereign://qr |
QR code generation |
✅ Implemented (src/nostr_bridge.rs:419) |
sovereign://security |
Redirects to settings |
✅ Implemented |
sovereign://nostr/* |
NIP-07 bridge API |
✅ Implemented (src/nostr_bridge.rs:89) |
6. Network Services Gaps
7. Performance Probe Gaps
| Feature |
C Status |
Rust Status |
| Perf-probe.js injection |
Preamble + probe body injected into every non-internal page |
✅ Implemented (src/nostr_inject.rs:135) |
| probe-report endpoint |
Receives periodic probe reports |
✅ Implemented (src/nostr_bridge.rs:99) |
| tab_probe endpoint |
Drill-down for a single tab |
✅ Implemented |
| tab_action endpoint |
Reload/suspend/close tabs |
✅ Implemented |
8. Minor Gaps
| Item |
C Status |
Rust Status |
| Site downloader |
Headless webview rendering & asset bundling |
Stub (src/site_downloader.rs) |
| Favicon display |
16x16 pixbufs in tab labels |
❌ Missing (cairo API limitation) |
| Popup handler |
target="_blank" → new tab policy |
❌ WebKit create signal not hooked |
| URL history tracking |
Records visited URLs in SQLite |
❌ Not wired to load-changed signal |
| Avatar button |
Circular profile picture in toolbar |
❌ Missing |
| About dialog |
GTK dialog with version info |
❌ Missing |
Summary: What Needs to Be Done
High Priority (Blocks user experience)
- Hamburger menu parity — Add Recents (history), Bookmarks tree, Tor/FIPS toggles, Security strip toggle, Nostr signing status, Lock Session, Download Website, About, Avatar button.
- Shortcut parity — Add all missing 17 shortcuts to registry and key handler.
- Settings/config JSON — Add missing fields:
agent_server_enabled, agent_login_timeout_ms, dev_extras, file_access, universal_access, search_engines, shortcuts, tab_bar_position (string).
- Settings/set handler — Add missing features:
agent_server_enabled, dev_extras, file_access, universal_access, shortcut reset, shortcut set.
Medium Priority
- Popup handler — Hook WebKit
create signal for target="_blank".
- URL history — Wire
load-changed signal to db_add_history.
- Site downloader — Implement headless webview rendering.
Low Priority
- Favicon display — Research cairo surface conversion.
- About dialog — Simple GTK dialog.
- Avatar button — Circular profile picture.