Skip to content

Native Rust (GPUI) BoxBox desktop client with Electrobun feature parity and benchmarks - #226

Closed
usehoplite[bot] wants to merge 17 commits into
masterfrom
hoplite/emporion-ca08fa2f
Closed

usehoplite[bot] wants to merge 17 commits into
masterfrom
hoplite/emporion-ca08fa2f

Conversation

@usehoplite

@usehoplite usehoplite Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The BoxBox desktop app runs the shared Svelte UI inside Electrobun/CEF: an 11-process Chromium stack, a 196 MiB AppImage, and more than half a gigabyte of memory for one window. This PR builds a native Rust client with GPUI that offers the Electrobun app's features, including what PR #211 adds to Open With and sorting. It also measures both apps side by side. The client lives in experiments/gpui-desktop/ and does not replace desktop/.

Solution

The client drives the same Go server the Electrobun app bundles, over the same /api/v1 and /api/v1/desktop endpoints:

  • Runtime: starts the private boxbox --desktop server with a random token, the desktop mounts and loopback readiness, and authenticates with the boxbox_desktop cookie. The server stops with the last window. Single instance: a later launch opens its path as a tab in the running window.
  • Browsing: tabs, split panes (F3), list and grid views, breadcrumbs, an editable location bar (Ctrl+L, also absolute paths), history and Alt+Up. Search starts at two characters with a 300 ms debounce. Folders refresh live from the desktop watch stream, with a 15 s poll as fallback.
  • File operations: new file or folder, rename, Move to Trash, permanent delete and properties, using the same dialogs. Ctrl+Z undoes rename and Trash.
  • Transfers: copy, cut and paste through the OS clipboard. Name conflicts offer Skip or Keep both. Background jobs show live progress over SSE and can be cancelled.
  • Drag and drop: onto folders, the other pane or sidebar places (move, or copy with Ctrl). Files dropped from other apps are copied, and items can be dragged out to other apps on X11.
  • Desktop integration: context menus (file, empty space, drive), open with the default app, Open in Terminal, favorites, removable volumes, and the Trash page with restore and a two-step permanent delete.
  • From PR feat(desktop): use BoxBox for system file selection #211: Open With shows app icons and a "Use as default" checkbox (/desktop/apps/icon, /desktop/apps/default). The default sort becomes folders first, then newest modified, then natural names.
  • Previews and settings: grid thumbnails. Previews cover images with zoom, text and code, and a PDF's first page, with ←/→ to step through files. Settings write the same /desktop/preferences file as the Electrobun app, keeping keys this client doesn't use. F1 shows the shortcuts.

Not ported yet, as listed in the README:

  • remote servers, pairing and cross-server transfers
  • PR feat(desktop): use BoxBox for system file selection #211's file chooser portal
  • appearance settings: wallpaper, accent and tint
  • editing text in previews, and media, office and notebook rendering (these open in the native app)
  • arrow-key focus movement and type-ahead
  • dragging out on Wayland, packaging, and macOS/Windows

Performance (BENCHMARKS.md)

Both apps ran the same Go server binary from the v0.3.2 AppImage, were launched straight into a 10,050-entry folder, and were measured three times on a 2-vCPU sandbox with Xvfb and software rendering. The values are medians.

GPUI client Electrobun v0.3.2
Window mapped 0.15 s 0.83 s
Folder painted and settled 1.03 s 2.14 s
Client memory (PSS) 98 MiB, 1 process 577 MiB, 11 processes
Idle CPU over 10 s 0.01 s 0.09 s
Installed size 47 MiB 714 MiB

Scroll CPU came out about the same, because both apps rasterize on the CPU in this sandbox. That row needs a rerun on real GPU hardware.

Verification

Split panes Context menu
Split panes Context menu
Open With (PR #211) Paste conflict
Open With Paste conflict
Grid thumbnails Trash
Thumbnails Trash
  • cargo test: 35 passed. cargo clippy --all-targets is clean for this crate and cargo fmt --check passes. The repository CI does not build this crate, so these ran locally.
  • Each feature was tested in the running app on Xvfb against the bundled Go server, with the filesystem checked afterwards:
    • create, rename, trash and undo, and permanent delete through the Trash page
    • copy and paste with Keep both, and a 1.5 GB copy with live progress
    • cut and move into a subfolder
    • dragging between split panes, and a Ctrl-drag copy onto a folder
    • a file created outside the app appearing on its own
    • search, and Open With with "Use as default", which wrote text/plain=gedit.desktop to mimeapps.list
    • pin and unpin favorites, settings saved to preferences.json
    • thumbnails, image and text previews, F1, Ctrl+L with /etc
    • a second launch handing off in 6 ms
  • Earlier work in this PR, still covered: drag-out over XDND tested against a test drop target, and the four Greptile review fixes.
  • Not tested:
    • Removable volumes: the sandbox has no removable devices.
    • Drops from real file managers, and drag-out to real apps.
    • App icons in Open With: the sandbox lacks PyGObject, so it showed the fallback glyph.
    • Wayland, multi-monitor and HiDPI setups.

@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
box-box Ready Ready Preview Nov 5, 2026 2:40pm UTC

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 4c52090d-eb24-4b54-8ae2-374c78d23901

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Comment thread experiments/gpui-desktop/src/pane.rs Resolved
@usehoplite

usehoplite Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed all four review threads in 3b324d5:

  • Old folder replaces drives (workspace.rs): load_active now increments the generation before the This PC early return, so any folder request still in flight is discarded once the pane moves to the root.
  • Shift-click crashes after refresh (pane.rs): finish_load now finds the same anchor and active items by path in the new listing, and clears them if those files are gone. Shift-click also ignores an anchor that's out of range. Covered by refresh_keeps_anchor_by_path, which panicked before this change.
  • Narrow windows hide filenames (file_list.rs): Name keeps at least 200px. When there isn't room, the list drops the Type column first, then Modified. Covered by narrow_widths_drop_type_then_modified.
  • Failed refresh looks successful (browser.rs): when a refresh fails but files are already showing, the files stay visible with a "Could not refresh: …" banner above them.

Checks: cargo test 11 passed, and cargo clippy --all-targets gives no warnings in this crate. In the running app at 640px wide, the list shows only Name and Size. With the server stopped, pressing refresh keeps the files and shows the banner.

… app), terminal, favorites, shared preferences

Co-authored-by: Radhey Kalra <[email protected]>
… newest first, natural ties)

Co-authored-by: Radhey Kalra <[email protected]>
…ext/code, PDF first page, open natively)

Co-authored-by: Radhey Kalra <[email protected]>
@usehoplite usehoplite Bot changed the title Add GPUI/Rust desktop experiment matching the browse UI Native Rust (GPUI) BoxBox desktop client with Electrobun feature parity and benchmarks Nov 5, 2026
@jR4dh3y
jR4dh3y marked this pull request as draft November 13, 2026 08:03
jR4dh3y added a commit that referenced this pull request Nov 13, 2026
Dialogs, the location bar and search each had hand-rolled key handling with
no IME, no mouse selection and no word movement. They now use TextField,
the input from PR #226 (GPUI's input example) scrolled to keep the caret in
view, inside the shared Input frame. Rename selects the name without its
extension.

The file menu follows fileContextMenu.ts on ContextMenu, with icons and
shortcuts. The toolbar's + opens the add menu; local folders say "Copy files
here…". Name, properties and preview dialogs use Modal. Text previews are
read-only, as editing belongs to the file's own app, so the save path is
gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
jR4dh3y added a commit that referenced this pull request Nov 13, 2026
Every launch opened another window. The first window now owns a private
Unix socket (from PR #226's instance.rs); a later launch hands it its
argument and exits, and the window opens it in a new tab and raises
itself. The socket is per user and per provider setting, so a server or
test window never takes local launches. Launch arguments may be virtual
paths, real paths or file:// URIs; a file opens its folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jR4dh3y

jR4dh3y commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Superseded by #248, which builds the native GPUI file manager out of this experiment and makes it the desktop app.

@jR4dh3y jR4dh3y closed this Nov 21, 2026

This branch was successfully deployed

1 active deployment
Preview — cc284b3d Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant