Skip to content

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

Draft
JSKitty wants to merge 1116 commits into
masterfrom
gpui
Draft

JSKitty wants to merge 1116 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

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

JSKitty commented Nov 19, 2026

Copy link
Copy Markdown
Author

The red vector-core check on 13a5d1c is a flake that this PR didn't cause. community::v2::service::tests::control_sync::a_relay_that_caps_open_sessions_is_never_written_off_and_every_plane_still_compares failed at control_sync.rs:1740. That commit only touched GPUI dev tooling, and the same check passes on 9248431, which has the same vector-core.


Generated by Claude Code

Comment thread .github/workflows/fdroid.yaml Fixed
claude and others added 9 commits November 21, 2026 17:30
…pills

- Timeline pages sort by ms time, and a send that settles later moves past
  messages that arrived meanwhile, so the preview and open chat agree
- Each copy of an animated picture tracks its own shown frame
- Scroll holds by row key across relayouts
- Reaction counts roll; a chat's existing reactions settle instead of popping in
- Hover fades blend the flip frame (no one-frame truncation flicker)
- Search renders go links as pills; capped footer arguments fixed
- Thumbhash blurs decode at 64 px
- Sync Report probes base rekey addresses
- cosmic-text vendored: weight axis read once

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
A Refounding whose seed snapshot never arrived was dated by this device's
sever mark, so a device that adopted it late (a re-sync, a fresh login)
showed an old lockdown as minutes old. Each adoption now keeps the
rotation's own send time, the earliest chunk's, and the audit prefers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The category named "warning", which no icon file is; the Settings nav and the
phone list each mapped it to vector_warning, and the start menu's search did
not, so every Danger Zone result there drew no glyph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The search field moved its caret on the arrows, so the menu's own key handler
never saw them. In nav mode the field hands Up, Down, Enter and Escape to the
menu: the arrows step the selection, Enter opens it, Escape closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The drag wrapper and the tile took the title's unwrapped width, so a long name
spilled past its grid cell into the next tile's. Both now fill the cell, and
the title's existing ellipsis applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ackage]

Recent bakes stay, so going back to a chat paints its wallpaper on the first
frame. A blurred bake sits at a half or quarter of the pane, which the GPU
stretches back; a JPEG decodes straight to the size a cover keeps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
…ir wallpaper [package]

A chat's saved wallpaper keeps its bakes beside it, so the first open after a
launch reads one back instead of decoding the photo. Dim is a shade drawn over
the picture, so the slider never rebakes; a blurred bake keeps a decode sized
to it. A changed, edited or removed wallpaper takes its bakes with it, from
disk and from memory, and the first open of a session sweeps what's left over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetJnzXvEeXAvSsgvs1
claude and others added 30 commits December 3, 2026 03:17
A new vector-translate crate: Firefox Translations models run by a vendored
fxtranslate (NEON/i8mm and AVX2 kernels picked at run time), a Rust port of
fastText's lid.176 language ID, the pinned model catalogue, and a store that
only installs files whose sha256 matches. Models come from Blossom by hash,
Mozilla's CDN as fallback.

In the app: Translate / Hide Translation in an incoming message's menu, a
card under the message, and Settings > Message Translation to pick the
target language and add or remove languages. Outgoing messages are never
translated.

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

ggml keeps its Metal devices in a function's static, torn down at exit, and
asserts there that none of its buffers live. The quit hook freed the cached
Whisper context only if its lock was free, so quitting while a transcription
held it left the buffers alive and exit aborted (SIGABRT in
__cxa_finalize_ranges, ggml-metal-device.m:1040, seen on a real quit).
The quit hook now waits up to 2 s for the transcription to let go, frees
the context and keeps the lock until exit, so one still loading its model
can't start ggml again; if the transcription still runs, the process leaves
with _exit(0) instead of aborting (SQLite's WAL is safe either way).
VECTOR_WHISPER_EXIT_WAIT=0 restores the old hook.

Fixture (devctl whisper: a real transcription, then devctl quit 0.02-0.3 s
into it): old hook 3/3 aborted with the same assert; new hook 0/10.
devctl gains whisper:<file> and quit for this check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
whisper.cpp's abort callback now reads WHISPER_ABORT, which the GPUI quit hook
sets before freeing the context: the pass stops at its next check and lets go
of the lock, so quit neither waits on it nor reaches the _exit fallback.
The same flag is checked on beam retries. (Shared whisper.rs: the Tauri app
gains the flag, unset.)

Fixture, quitting 0.15-0.5 s into a real transcription of a 67 s voice note:
quit took 525-861 ms waiting; 124-136 ms aborting (the same as an idle
quit, 141 ms). No ggml assert in either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GPUI_MEDIA_CENSUS=1 now also counts every main-thread stretch over 20 ms:
frame callbacks with each part's share (frame callbacks, render, layout,
prepaint, paint, the frame-hold wait alone, layer placement, overlay draw,
platform draw, other), foreground tasks by where they were spawned, and
input dispatch. Printed every 10 s of activity with the redraw census;
counts and times only. Off, it costs a bool read per frame.

Fixture, a minute of hovers, flings and chat switches: 1 frame over 20 ms
(20.6 ms, at the first chat open), no long tasks, no slow input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he display's rate

The overlay layer was drawn again at every present while shown, each time
waiting on the GPU and making the window's present join the compositor's
transaction (waitUntilScheduled). It is now drawn only when a hash of its
primitives changes.

The hitch census measures against the display's own frame interval (8.3 ms
at 120 Hz; GPUI_HITCH_MS overrides), counts frames over 2x and 4x, files
each over-budget frame under its largest part, and splits the drawable wait
and the transaction's present wait out of platform draw.

Fixture at 120 Hz, a minute of hovers, flings and switches: frames over 8.3 ms
in the hover windows 11-17 -> 3-5. Flings: over-budget frames are the
drawable wait (display pacing); presented gaps match the oldest baseline
(about 120 fps, p95 11 ms, ~1% missed in both). Chat switches vs that
baseline: worst draw 53 -> 5-6 ms, 0 missed frames in both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The translation replaces the message's text instead of opening a card under
it. A pill after the text names the language it came from; clicking it shows
the original and back. A missing model is offered as one "Get Spanish · 35 MB"
pill, and the privacy note moves into its tooltip and Settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetewSnHme2qMS8Ufo7
Each download wrote back the whole message as it was when it began, so
the second attachment to finish reverted the first to a download box
whose old id no longer matched anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RewFYMcPssdUBkyeVBq
Detection reads each message as written and in lower case, picks only
languages with models, and leans on what its writer usually writes: each of
their recent messages that is clear on its own is a vote. "Bom dia", "vc vem
hj?" and "Acordei passando mal dnv" now come out Portuguese from someone who
writes Portuguese, while a clear sentence keeps its own language. A weak
guess never names a language without models or offers a download.

Translate on one message translates the whole run the timeline groups with
it. tests/greetings.tsv and writers.tsv hold the short-message checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetewSnHme2qMS8Ufo7
…ame what they wait on

A transcription loads the small model into about 470 MB of heap and Metal buffers (fixture,
3.3 s note: footprint 63 -> 660 MB, malloc 19 -> 488 MB), and it stayed until the 3-minute
maintenance unload, 180-225 s later. GPUI now lets it go once no note has used it for 60 s
(VECTOR_WHISPER_LINGER_SECS; 0 keeps only the maintenance unload), so a burst still reuses it.
After unload: 105-203 MB footprint, malloc 45.7 MB, flat across 6 load/unload cycles. A reload
costs 280-324 ms of context init off the main thread (first load 88-142 ms).
Races: a note at the unload (+/-100 ms), quits from unload-50 to +300 ms and mid-transcription:
15/15 clean; 20-quit runs at 60 s and 3 s linger: 0 bad of 40, 0 crash reports.

The hitch census adds "holds over B ms": per page-open hold site, how many waited past the
frame budget, the longest, and the slowest image type or wait site inside it.

devctl gains xdcopen:<package> and xdcclose for Mini App benches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch slow frame's view

Every press and release on any element with an id refreshed the whole window, so each click
re-prepainted every pane twice. Now only an element with an active style redraws, and only its
own view (VECTOR_ACTIVE_REFRESH=1 restores the window refresh). Fixture channel, 16 clicks:
whole-pane re-prepaints 18 -> 3, draw p95 3.25 -> 2.44 ms (repeat 3.16 -> 2.60). Hover sweep
unchanged (p95 1.82 ms, 0 over 8.33). Shots after 14 clicks match a forced full redraw and the
old build, apart from animated emoji phase.

JSKitty's census showed 471 lone prepaint frames over 8.33 ms in 2 h, in windows of clicks
(div.rs press/release refreshes) and list scrolls. The hitch census now adds "frames over B ms
by own prepaint": per slow frame, the view whose own prepaint (children excluded) was largest,
panes named by role, and the keyed rows the frame built.

GPUI suite 441 ok, i18n 29 ok, 20-quit 0 bad of 20, no crash reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o the heap

After a model's first use, a background thread (Darwin background band) writes an aligned
copy beside it: the original's bytes in order behind a header naming the source (size, mtime,
SHA-256), each tensor's data padded to a 64-byte offset. It is written to a part file, synced,
read back against the source's digest and renamed; any failure leaves only the original. A
note before the copy exists uses the old loader. whisper.cpp patch 0014 maps an aligned file
whole and hands Metal (and a default CPU buffer) the weights where they lie, through
buffer_from_host_ptr; other buffer types copy from the mapping. Plain models load as before,
so Tauri, Android and the web build are unchanged (they never write an aligned copy).
VECTOR_WHISPER_ALIGNED=0 turns it off; VECTOR_WHISPER_ALIGNED_LAYOUT=replace removes the
original once the copy is verified (default: side by side, pending the layout decision).
VECTOR_WHISPER_DIR points tests at model copies.

small-q8_0, 3.3 s note, fixture: footprint after a transcription 917 -> 367 MB, 10 s later
496 -> 204 MB (the linger now costs ~140 MB of state, not ~430 MB); context init 304 -> 94 ms
under load (36 ms idle); conversion 4.4 s. Transcripts identical (text, timestamps,
confidences) on a 10-clip corpus in 7 languages. Unload races (a note at the unload, quits
0-300 ms after it, mid-transcription): 10/10 clean; 20-quit at 3 s and 60 s linger: 0 bad of
40, no crash reports. Converter tests (padding, digest, stale source, truncated source) pass
in src-tauri; the patch syntax-checks for Android and the no-mmap path. GPUI suite 441 ok,
i18n 29 ok.

devctl's whisper prints the test file's transcript, for loader equivalence checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… press refresh

Since a press no longer refreshes the whole window (fe722dc), a handler must notify for what
it changes. An audit of every on_click/on_mouse_down/on_mouse_up/on_action listener (direct
field writes, and methods that never reach a notify, followed transitively) found two that
didn't: the login password eye (its icon would keep the old state while the field already
had focus) and the slim layout's search bar leaving a chat. Both notify now.

Click sweep on fixtures (every accessibility-tree clickable on 9 screens, two levels deep from
the channel, DM and Community; after each click a shot, then a shot after a forced full
redraw): 279 elements clicked; 29 differ, and the same 29 differ with the old whole-window
refresh (VECTOR_ACTIVE_REFRESH=1), all animation phase or timed highlights. Differences new
with fe722dc: 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… back to

For testing that path on purpose: with the mapped loader, transcripts on the 10-clip corpus
match the copy loader's, and quits mid-transcription stay clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One timer armed for the soonest invite end drops it from the list, its
dot and an open Details popup, and purges the row; window activation
rechecks after sleep. Accept on an invite that ended removes it quietly.
VECTOR_INVITE_ENDS=<secs> fixture sets each invite's end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetKW9tE9uuy5J7PHTN
…model from then on

The aligned copy (.vwal) now replaces its original by default: written to a part file, synced,
read back against the source digest and renamed, and only then is the .bin removed, so a crash
at any step leaves one usable model. A conversion needs the model's size plus 512 MB free or is
skipped with a log line; a quit mid-write removes the part file. New downloads convert as they
land. The model list, the downloaded check, delete, re-download and switching all take the
.vwal as the model; with its original gone it loads even with VECTOR_WHISPER_ALIGNED=0 (copied
out, patch 0014's copy mode) and on the CPU path. Conversion runs only on macOS, where Metal
maps the weights; repacked CPU weights would copy anyway (VECTOR_WHISPER_ALIGNED_LAYOUT=side
keeps the original beside the copy).

Checked on test model copies: transcripts identical to the old loader on a 10-clip corpus,
mapped, in copy mode and on CPU. Killed mid-conversion: the .bin and a part file stay, the
next launch finishes the copy and removes both. Low disk (a 450 MB volume, 187 MB free): skipped,
.bin kept. Delete from settings removes the .vwal and the list shows it gone; a model switch
(small <-> base) converts each on first use. 20-quit with conversions in play, twice: 0 bad of
40, no crash reports, no part file left. GPUI suite 441 ok, i18n 29 ok, converter tests 2 ok.

devctl: wuse:<model>:<file>, wdelete:<model>, wmodels for model-management checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e community's own history

A burst now counts only joins from the last 72 hours, within at most 10
minutes, and must beat both 1.5x the community's busiest window before then
and 20x its 30-day average rate. The console marks a heuristic-only
conviction as a suspect only once it reaches Flagged; provable rules and
cohort raids act as before.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RewchqfpxDyUAXCWpxd
URLs in a bio are clickable and Vector links show as pills, on the profile page and the
mini profile. Each bio's parse is held per profile and look, reused while its text and
lookups answer the same; a Vector link's pill is resolved again and compared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6Res3F5MzhQQpkoTEGb9
Asking to translate means the reader doubts the message is theirs, so their
language is named only when the text alone leans that way. From someone who
mostly writes English, "Bom dia" and "Pesquisa oq significa tocar" now come
out Portuguese instead of "Already in English".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetewSnHme2qMS8Ufo7
In a Community channel, detection reads each message alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetewSnHme2qMS8Ufo7
Raid detection keeps gpui's reading (f63a412 narrows #117's recent burst by the
plain densest window), so engine.rs and raid.rs stay as on gpui; master brings the
README's new XMR address.

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

Below Flagged, only a cited deterministic conviction pre-selects a member,
so a join burst and the newcomer facts it arms ask for a look. Lines under
eight letters never form a cohort, and the short-text bar rises to 24
letters, so newcomers greeting alike are not a raid. Scenario tests run
whole communities through the default policy and the console.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RewchqfpxDyUAXCWpxd
The chat's ⋯ menu turns it on per chat (an account setting). Incoming
messages then translate as they show: the newest on opening, what scrolls
into view, and what arrives, each once. Only translations and model offers
show; a message already in the reader's language stays as it is. Every
sender's language mix comes from your DM with them, in Communities too; with
no DM, a message is read alone. The worker keeps the last 16 senders' mixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qq6RetewSnHme2qMS8Ufo7
…eports carry the time

The 10 s memory census walked malloc's zones twice and asked Metal for its allocations on the UI
thread: on JSKitty's data that task ran 344 times over 8.3 ms in 6.5 h, up to 16 ms, and on
fixtures 1.1-2.5 ms (now 1.2-1.6 ms, the cheap UI counts alone). memprobe::mem() runs on the
background executor and walks the zones once.

Each hitch, redraw and memory report is preceded by "census at HH:MM:SSZ", so a read can line
the windows up with whatever else ran on the machine then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ession's hitch tally

Settings › Danger Zone › Performance (test builds only):
- Run Benchmark drives the client for about a minute on the account's own data, read only.
  It opens quiet chats, flings a timeline, opens and closes the emoji picker, switches the
  list's tabs, opens a Community and slides its drawer and the rail, then rests 10 s. Only
  chats and Communities with nothing unread are opened, and nothing is sent or remembered.
- Session Report shows the hitch census kept in memory since launch (`gpui::hitch::keep`),
  with no env var and nothing on disk.

Both reports carry counts and timings only. Each report gives:
- the device, GPU and refresh rate;
- memory;
- per stretch, the draws' p95, worst and count over budget, present time, gaps between
  frames on screen and missed refreshes;
- the census lines.

The report shows in a scrolling sheet with Share (ACTION_SEND text, no file) and Copy.

Launching with `--ez io.vectorapp.BENCH true` starts the benchmark and logs the report;
the emulator smoke now does this on the fixtures.

The census also counts drawable waits over 100 ms. Under GPUI_MEDIA_CENSUS, each such wait
logs when it happened, whether it was warmed, the rest before it and the layer size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ight

A frame drawn while the window is covered, minimised, on another Space, under a sleeping
display or behind the lock screen is held back. The compositor may hold every drawable then,
and nextDrawable blocks the main thread for up to its one-second timeout. The latest frame is
presented once the window is back in sight.

- A drawable warmed off the main thread is waited for at most 50 ms. A frame that would wait
  longer is skipped and presented again on the next turn.
- The drawable is prewarmed only while the window is in sight.
- Any input or activation marks the window in use for 2 s: it draws whatever AppKit reports
  of its sight, and any held-back frame is shown at once. A missed "back in sight" can't leave
  it stale.
- VECTOR_DRAWABLE_GATE=0 restores the old behaviour.
- Under the census, each change of sight is logged.
- devctl gains dev:fullscreen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mapped loader checks whether the model's first 8 MB are resident. If they aren't, it reads
the whole file sequentially before init, as copy mode would. Init then finds the weights in
memory instead of faulting them in a page at a time. Warm, only the residency check runs.

small-q8_0, 5× each, ctx init:
- cold: 168 → 71 ms (copy mode 97–103 ms);
- warm: 30–37 → 36–38 ms;
- reload: 18–24 → 19–24 ms.

VECTOR_WHISPER_WILLNEED=0 leaves the weights to fault in, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eads instead of decoding

An avatar or other still decoded from a large source to the size it is drawn is kept as a
small sealed bake. A later open reads the bake instead of decoding the source again.

What a bake is keyed to:
- the source file's size and mtime: a changed source names a new bake and drops the old;
- the source's presence: a gone source drops its bakes;
- an animation's first frame is baked apart from the whole picture.

Only sources over 96 KB, or that took 4 ms to decode, are baked.

Where bakes live, and their bound:
- the signed-in account's folder, so logout and account deletion take them;
- Clear Cache removes them;
- capped at 32 MB, trimmed to 24 MB least recently read first;
- VECTOR_FIT_BAKES=0 turns them off.

Big-avatar Community open, three fresh launches (18 × 6.6 MB PNG avatars):
- launch 1: the hold settles in 43.6 ms;
- launches 2–3: 0.2–0.3 ms; the worst frame drops from 63–65 ms to 18–20 ms;
- pixels are identical.

Held frames also say what they waited on:
- the census hold label names each picture load's format, source size, decoded size and
  queue/load time;
- VECTOR_HOLD_TRACE=1 prints every load and wait of a held frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re counted apart

- From the drawables' presented times, the census and the session report now count two
  things: refreshes missed between frames in motion, and frames never shown. That is what the
  eye sees.
- A frame over budget only because it waited up to two refreshes for a drawable is "paced by
  the display", not over budget. A longer wait still counts as a stall.

A bake's read time is refreshed at most once a day: the LRU cap needs no finer grain, and an
open no longer writes dozens of mtimes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t the whole window

A root notify per step redrew every pane, so bench numbers for scrolling counted rail, side and
members rebuilds no real scroll makes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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