Skip to content

vector-gpui: native GPUI client (experiment) - #102

Draft
JSKitty wants to merge 857 commits into
masterfrom
gpui
Draft

JSKitty wants to merge 857 commits into
masterfrom
gpui

Conversation

@JSKitty

@JSKitty JSKitty commented Nov 11, 2026

Copy link
Copy Markdown

Requested by JSKitty · project thread

A long-lived experiment branch: Vector drawn natively with GPUI instead of a webview, aiming for exact parity in layout, palette, fonts and features with the Tauri client. It isn't meant to merge any time soon; the PR is here so the diff and discussion stay in one place.

What's in this first cut

  • crates/vector-gpui: its own workspace and lockfile, so it never touches the Tauri client's dependency graph. The only shared-file change is excluding it from crates/Cargo.toml. GPUI is pinned to Zed f8cfc7e.
  • The widescreen shell: window chrome with client-side decorations, the rail (Messages, New Messages, Communities, Collapse, account), the chat list (virtualised uniform_list) and the open chat (virtualised list with date and NEW dividers). The NEW divider stays put while the chat is open.
  • The composer: real text input with selection, clipboard and IME. Enter sends a local echo; the send pipeline isn't wired up yet.
  • Types come straight from vector-core (SerializableChat, SlimProfile, Message). data.rs mirrors the JS derivations (getName, chatPreviewText, timeAgo, unread counts), and each helper names the function it copies.
  • Icons are compiled in from src/icons, so an icon changed in the Tauri client arrives here on the next build. Rubik is cut from the shipped variable font into static weights; Inter is bundled too.

Parity harness (reference/)

capture.mjs boots the real frontend in Chromium through its debug hot-reload path, using mock-tauri.js and the same fixtures.json. It needs no Rust, account or network. It saves a screenshot plus every element's box, font, colour and border. shot.sh renders vector-gpui under Xvfb, and compare.py puts the two side by side with a diff.

On the 1200×760 chat screen, 1.8% of pixels differ by more than 24/255. Most of that is text anti-aliasing; the remaining offsets are about 1px.

Numbers (release build, Linux, software Vulkan)

  • Window on screen 45 ms after launch.
  • About 42 MB of private anonymous memory. Total RSS is 155 MB here, but ~70 MB of that is Mesa's software renderer (libLLVM, lavapipe), which a real GPU driver doesn't load.
  • Binary is 27.8 MB stripped, including 4.4 MB of fonts.

Known gaps

  • Only the widescreen layout so far, not slim or the Centre Console.
  • No live account yet: it reads fixtures, not vector-core's DB or relays.
  • GPUI has no letter-spacing, so the NEW label spaces its letters by hand.
  • Ellipsis truncation differs slightly from CSS: CSS keeps the trailing space before ….

Generated by Claude Code

@JSKitty JSKitty self-assigned this Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

JSKitty commented Nov 11, 2026

Copy link
Copy Markdown
Author

The claude check failed, but the cause isn't this PR. The Claude Code workflow runs on every opened PR, and it stops at its environment validation because ANTHROPIC_API_KEY is empty in the job: no API key, OAuth token or federation rule is set for the repo. The same job failed on the fix-audio-crackling PR 40 minutes earlier for the same reason. This PR doesn't touch .github/, and adding a repo secret is beyond what a PR can do, so there's no fix to port here. It goes green when a maintainer adds ANTHROPIC_API_KEY (or CLAUDE_CODE_OAUTH_TOKEN) to the repository secrets. Alternatively, dropping the bare pull_request trigger from .github/workflows/claude.yml stops it running unasked.


Generated by Claude Code

Comment thread .github/workflows/gpui.yaml Fixed
Comment thread .github/workflows/publish.yaml Fixed

JSKitty commented Nov 13, 2026

Copy link
Copy Markdown
Author

The vector-core failure on b72983b is community::v2::service::tests::a_mint_whose_delivery_lost_a_part_leaves_nobody_out ("the part a relay dropped served nobody"). It comes from master and isn't caused by this PR: the only vector-core file this branch changes is text_color.rs. The test is flaky on master's code: it failed 1 of 6 local runs at the merged master tip. A likely cause is that which recipients end up in the dropped second part depends on iteration order, so sometimes that part holds none of the writers the assertion expects. Leaving it for the master side rather than patching community code on this branch.


Generated by Claude Code

JSKitty commented Nov 14, 2026

Copy link
Copy Markdown
Author

The build (macos-26-intel) failure on 6942f69 has no failed step and no log (the job log returns BlobNotFound), so it looks like the runner was lost rather than a build or test error. That commit is superseded, and CI is running on the current head 3a2d305.


Generated by Claude Code

JSKitty commented Nov 14, 2026

Copy link
Copy Markdown
Author

vector-core on 2560e5b failed in control_sync::a_relay_that_caps_open_sessions_is_never_written_off_and_every_plane_still_compares (its first assert, with 24 concurrent reconciles against an 8-session cap). That commit only touches the vendored GPUI in crates/vector-gpui, and the test and the transport it covers are unchanged from master. It passes 6 out of 6 times locally, so this looks like a timing flake in a master test, not this PR's change.


Generated by Claude Code

JSKitty commented Nov 14, 2026

Copy link
Copy Markdown
Author

build (macos-26-intel) on ce4c294 failed in the Tests step with "The hosted runner lost communication with the server". Build passed, and there is no log (BlobNotFound). This is the same runner loss as on 6942f69, not a code failure. The newer pushes (9b3b16f, e5d3370) run the job again.


Generated by Claude Code

JSKitty commented Nov 15, 2026

Copy link
Copy Markdown
Author

The vector-core test failure on 10ca012 (control_sync::a_relay_that_caps_open_sessions_is_never_written_off_and_every_plane_still_compares) isn't caused by that commit, which only touches crates/vector-gpui (code highlighting). The test hit two "too many open negentropy sessions" refusals under its cap, which looks timing-dependent on a loaded runner. The next push (b9d7ce0) reruns the suite.


Generated by Claude Code

JSKitty commented Nov 15, 2026

Copy link
Copy Markdown
Author

CodeQL's two new high alerts on 752bdc2/56616efd ("Access of invalid pointer", crates/vector-gpui/vendor/gpui_windows/src/platform.rs:1107 and :2001) are in upstream Zed code that came in with the verbatim vendoring of gpui_windows at the pinned rev (a0f3fd0); our only change there is the open dialog's file-type filter. Both dereference a CREDENTIALW that CredReadW just filled: the first after an explicit null check, the second in an upstream test. Neither is reachable with an invalid pointer, so I'm leaving them as they are and not patching upstream code for it.


Generated by Claude Code

JSKitty commented Nov 15, 2026

Copy link
Copy Markdown
Author

The vector-core failure on 7a4ebb0 is community::v2::service::tests::a_mint_whose_delivery_lost_a_part_leaves_nobody_out ("the part a relay dropped served nobody", service.rs:30010), a timing-sensitive relay test. The only vector-core change since the last green run is a defaulted MediaSource::remote() (returns false, used only by the GPUI stream reader), which no community code calls, so this is not from this PR. The next run on 689115a will retry it.


Generated by Claude Code

}

// SAFETY: `CredReadW` succeeded, so this points to a valid `CREDENTIALW` until `CredFree` below.
let result = unsafe { username_and_password(&*credentials) };

let mut credentials: *mut CREDENTIALW = std::ptr::null_mut();
unsafe { CredReadW(target_name, CRED_TYPE_GENERIC, None, &mut credentials) }.unwrap();
let result = unsafe { username_and_password(&*credentials) };

JSKitty commented Nov 15, 2026

Copy link
Copy Markdown
Author

Windows build on b16933a fails one new test, backend::stream::tests::a_reader_in_two_distant_regions_fetches_each_byte_once: a read there timed out after 45 s, while the test passes on macOS. It is a real intermittent stall in the region-aware stream fetcher (a waiting read that never gets served), not a flake to retry. The single-task fetch loop is being replaced with per-connection tasks, and that change will carry the fix along with a repeated run of this test.


Generated by Claude Code

JSKitty commented Nov 16, 2026

Copy link
Copy Markdown
Author

The vector-core failure on a365815 is community::v2::service::tests::control_sync::a_relay_that_caps_open_sessions_is_never_written_off_and_every_plane_still_compares. It isn't from this commit: a365815 changes only crates/vector-gpui/src/emoji.rs, and the same vector-core code passed on the commit before it (7bbd8ea), so it looks like that test is timing-sensitive on the runner. The other 2893 tests passed.


Generated by Claude Code

JSKitty commented Nov 16, 2026

Copy link
Copy Markdown
Author

The Tests failure on d748a88 is community::v2::service::tests::a_mint_whose_delivery_lost_a_part_leaves_nobody_out in vector-core ("the part a relay dropped served nobody"). It isn't from this push: d748a88 changes only crates/vector-gpui, and the same vector-core tree passed Tests on ba90624 an hour earlier. It looks like a timing-dependent test, so I'm leaving it alone here.


Generated by Claude Code

JSKitty commented Nov 17, 2026

Copy link
Copy Markdown
Author

The build (macos-26-intel) failure on ca099ef is infrastructure, not code: GitHub's annotation says the hosted runner lost communication with the server mid-build, after 75 minutes. The run for the current head (46776a2) is in progress and covers the same code.


Generated by Claude Code

JSKitty commented Nov 17, 2026

Copy link
Copy Markdown
Author

The vector-core failure on 96d65fa (a_sibling_that_wins_the_tie_over_the_held_head_holds_a_mint_back) is a rare flake in master's own test, not this PR: it grinds 1000 random rumors for an id below the held head's and unwraps the find, which comes up empty about 1 run in 1000 when the head's id happens to be small. This branch doesn't touch that file. I've rerun the failed job.


Generated by Claude Code

JSKitty commented Nov 18, 2026

Copy link
Copy Markdown
Author

The red vector-core job on bf4107b is one master test, not this PR's code: control_sync::a_relay_that_caps_open_sessions_is_never_written_off_and_every_plane_still_compares failed the same way on master's own run at 32dcb9a (run 44124478117), and this branch's diff to master doesn't touch community/transport.rs, plane_neg.rs or that test. It passed every one of over 100 local runs, many of them in parallel or pinned to one core.

Likely cause, proposed rather than pushed since it changes core timing: plane_neg::reconcile's CloseGuard sends NEG-CLOSE from a spawned task, while LiveTransport::reconcile drops its neg_permits permit as soon as the call returns. The next waiter can send its NEG-OPEN before those closes reach the socket, so under a starved runtime the relay briefly counts more than NEG_SESSIONS_PER_RELAY sessions and answers "too many open negentropy sessions". Proposed fix: acquire with acquire_owned() and move the permit into CloseGuard, dropping it only after the NEG-CLOSE send_msg completes.


Generated by Claude Code

…ugh t::

The three copies of the direct-connection prompt are one function, and an unknown network
has its own sentence rather than a phrase slotted into the named one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
Its left column's places are the active language's words, so search finds them as shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
… Community through t::

The empty search state matches Tauri's: centred, a brighter query that ellipsises, and the
App Store button that carries the query over. A message passed by reference counts as used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
A lost-audio share is one message with its number in it, and a picture's size is passed whole
so a 1920-wide picture never reads with a thousands separator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
The Web Previews explainer's network advice is its own sentence per case, and the networks
it offers are joined by the language's own "or".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
…nels and roles

A section's label and its search words are messages, so a translation can add the words its
readers search by. The labels are looked up each time they are shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
Storage, relays and media servers, the clock, security, updates, the voice model
and call devices all go through t:: now; select choices build once per language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
The network pills and card, Tor and its bridges and circuits, I2P and its outproxies, and
the notice over the chat list all go through t:: now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
…or-i18n

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
…r text from vector-i18n

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
Results holding images or videos show up to three thumbnails under the
snippet, cropped to fit; a downloaded picture opens in the fullscreen
viewer, a video or undownloaded picture jumps to its message. Only rows
near the viewport decode, at thumbnail size, under their own cache key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
Search thumbnails decode an animation's first frame only and are let go
when the panel closes. The picture viewer opened from a result draws
above the panel and takes Escape first. Kind icons keep the name and
time on one baseline and drop to the digits' middle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
Each voice member's weak link to us shows on their tile while it is in
trouble (loss, or a round trip well past its usual), held a few seconds
past recovery; when most links struggle at once the stage and the bar say
our connection is unstable instead. A tile's hover names the round trip
against its usual, the loss and the route.

Marking a chat, channel or Community read takes its newest contact
message from the database, so never-opened and muted channels are caught
up too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
"Jump to present" and the unread jump pill took every mouse event under
them, so the wheel over them never reached the timeline; they now block
clicks and hover only. Closing search sweeps its thumbnails off the GPU
once a frame without them has drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
The shell's CameraFeed opens Camera2 (front for calls, back for scanning)
and hands each YUV_420_888 frame to Rust while its image is held; Rust
copies the planes into I420, turns them upright by the sensor and display
rotation, and feeds the same pipelines the desktop camera does. The
CAMERA permission is asked on first use; a phone without a camera still
installs. nokhwa is now desktop-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
`adb shell setprop debug.vector.fixtures 1` starts a test build on the
desktop's fixture store, so logged-in screens can be checked on an
emulator with no account or relay traffic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
A blocked permission, a camera that never answered and one that failed to
open each show their own message instead of a generic one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
…vsync

A frame that already took a whole vsync interval, or the first after idle, now
draws straight away through a looper eventfd instead of waiting for the next
choreographer callback, which only added up to a frame of latency. Frames that
keep up stay on vsync. The frame summary counts the frames drawn early.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
GpuiView serves GPUI's AccessKit tree as virtual views through
accesskit_android's low-level adapter, so screen readers see the same
buttons, labels, fields and sliders as on desktop. Explore by touch goes to
the adapter only while touch exploration is on, a placeholder tree from before
the window opened is dropped once it does, and GPUI stops building trees when
every accessibility service goes off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
The profile switcher, scan, New, clear-search, the rail's Messages door and a
chat's back arrow carry Tauri's labels. On Android an empty field is named by
its placeholder, which accesskit_android otherwise drops.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
- No update banner on Android; the title strip it hangs from isn't there, so
  CHROME_H is 0 and the account switcher sits flush under the profile header.
- "Sign in on another device": the code shrinks to fit beside its copy
  button on a narrow card, and the close cross has a finger-sized target.
- Whisper Model, the theme picker and a role's channel access give way on a
  narrow pane; the language list's status lines wrap.
- Picked images compress again: the desktop's Android path reads its picker
  cache before a content URI, so a picked file waits there while it
  compresses. A failed precompress is logged.
- A tap off a text field drops the keyboard, as a page blurs its field; the
  composer's own buttons and an open picker or attach panel keep it.
- Back: a focused field or the message list no longer keeps Escape from the
  layers, and the security flow's cards close (or hold) on Back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
A press and hold opens whatever a right click would, before any tooltip,
and the tap it began never fires. A sideways touch pan no longer scrolls a
vertical list, so it is free to be a swipe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
The keyboard goes when no field has focus any more, and a dialog's close
button keeps its finger-sized target beside a long title at phone width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
The Communities rail, a channel's drawer and the details sheet follow the
finger and settle by fling or distance from wherever they are mid-slide. A
DM or one-channel community swipes right to pull the chat list back over
it, and leaves the chat when let go past halfway. Swipe a message left to
reply, with the chip igniting past the trigger and a spring back short of
it. The system back gesture gives way on the bands these swipes start in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
The Actions cache entry that held it was evicted once the repo's caches
passed 10 GB, and Gradle made a new key, so the next APK would not install
over the last. GPUI_ANDROID_DEBUG_KEYSTORE holds it for good; without the
secret the cache still serves, with a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
Leaving a chat for the list, or a Community for a DM, left no chat open, so
the next chat opened inherited the composer: its text and a pending reply
to a message from elsewhere. The composer now remembers whose it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
A window at rest draws nothing, so the pictures on screen stopped counting
as used and were dropped from the cache and the atlas. The first redraw
afterwards, a hover included, painted them blank for a frame and loaded
them again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
0.6.0-1: Android version code 60001, shown as "v0.6.0 Preview 1".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
A packaged build's default fixtures path is the build machine's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
The shade covers only what the drawer leaves showing, and the drawer's
shadow is a gradient strip at its edge rather than a blurred box under the
whole drawer: translucent pixels are what a tiled phone GPU pays for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
…ions

A hover fill eased to zero was still submitted and blended over its whole
row, and an idle window kept redrawing a 3D preview's pedestal spin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
A key typed after tapping off a field brought the soft keyboard back with
nothing to type into.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
A devctl build without its own data dir handed `dev:` to a running Vector,
and a bare binary from a shell stayed behind the front app, drawing nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
Hover fills easing out sit a hair above zero alpha for a while.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
…aseline

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
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.

3 participants