Connect native GPUI desktop workflows (ANLG-320) - #7720
Draft
devin-ai-integration[bot] wants to merge 39 commits into
Draft
devin-ai-integration[bot] wants to merge 39 commits into
devin-ai-integration[bot] wants to merge 39 commits into
Conversation
Start from the fresh workspace with published GPUI 0.2.2, an isolated canonical local library, bounded shell-neutral services and five typed lane boundaries. Reserve shared integration paths and document validation limits. Co-Authored-By: John <john@fastrepl.com>
…NLG-320) Co-Authored-By: John <john@fastrepl.com>
…ws (ANLG-320) Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
…LG-320) Generate canonical preference definitions from the shipping schema; use scoped reactive reads and queued CAS writes while preserving legacy values and independent drafts. Keep ProductPane::new compatible. Integrators can inject ProductServices with with_services, propagate set_scope, and subscribe to Scope/OpenWorkspaceSection events. Shared native/domain adapters remain required: unavailable operations return explicit errors. This lane does not claim product or visual parity. Verified Linux check, build, product/runtime tests, clippy -D warnings, Rust formatting, generated settings, and the all-target normal/build dependency closure without Tauri/WebView. Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access that start with 'DevinAI' or '@devin'.
|
Co-Authored-By: John <john@fastrepl.com>
…tions (ANLG-320) Co-Authored-By: John <john@fastrepl.com>
…(ANLG-320) Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
ANLG-320: add secure auth leases, encrypted device/recovery and replica lifecycle, workspace and billing adapters, CAS publication journals, native cloud controls and contract fixtures. Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Use the shipping Ctrl/Cmd+backslash sidebar shortcut so Ctrl/Cmd+B reaches the native editor. ANLG-320. Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
… (ANLG-320) Co-Authored-By: John <john@fastrepl.com>
…G-320) Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Intent: Connect the fresh native GPUI implementation to concrete Anarlog services and make its workspace, editor, meeting and product workflows reachable. Keep Tauri/React as the shipping default while the remaining parity and validation gates in ANLG-320 are open.
This remains a draft, not a release candidate. The five completion lanes were integrated after
e15c91f9d7854e6d779bcfe2a29b04eb6042887d; final integration and measured source:f404735b01079d76815a20969fd2696967ba3222. No GPUI implementation was transplanted from #7683. Canonical SQLite schema, TipTap/ProseMirror JSON and shipping defaults remain unchanged.Reachable native behavior
ProviderServices::{start_resolver,recovery_resolver}; meeting AI receives concrete provider/context/tool services. Secure account and API-key resolvers, subscription refresh and running local STT/LLM models feed these consumers. Native provider settings save keys to the system keyring and provider/model/base-URL choices through atomic CAS.The native normal/build dependency graph contains no Tauri, Wry, WebKit or WebView packages. The default native profile is isolated at
$HOME/.anarlog-gpui-sandbox/library.sqlite; pin storage uses its ownapp_settingskey and does not import the shipping application's file-based pin store. Cloud setup needs the documented Supabase deployment configuration; model executables/resources must be bundled or supplied throughANARLOG_NATIVE_RESOURCES.Remaining user-visible gaps and validation gates
Demo
Recorded comparison uses isolated GPUI and Tauri profiles. Neither appearance parity nor a whole-application speedup has been established.
Recorded regression coverage
The comparison exposed and drove fixes for dialog focus leaking into the editor, stale content after deletion, font variants, empty imports, shortcut collisions, first-load caret reveal, title commit/restoration and search sizing. Earlier valid passes cover Move/Delete dismissal, local CRUD and import/export, bold/italic rendering, pin/tab transitions, overflow menus, and main/standalone attachment persistence.
At
135d481114, search fits and filters at full width and 800px. CAS Retry retains the draft without overwriting a second writer; Restore refreshes both the header and sidebar, including filtered results, while preserving body, attachments and undo history. Enter/blur/Escape, rapid edits, long-title restoration, reopening/restart and first-load Ctrl+End/Home passed.A controlled failed body save then exposed a blank editor canvas with “Draft retained.” Recovery on the preserved process successfully saved the unsaved marker and both attachments, and reopening retained them; data loss was not observed. At
99f3e893dd, the failed body-save → title Restore → refused navigation flow retained readable title/body/attachments at both 800×1100 and maximized sizes. Retry cleared the error, and reopening plus a fresh process retained every marker and attachment. The blank-canvas symptom was not reproduced. Search, first-load Ctrl+End/Home and narrow long-title Escape also passed.Equivalent rich memos were compared maximized and at 800px. Their first three rows align vertically; native text remains visibly narrower, with different font shapes and chrome. Deterministic asynchronous Restore/newer-draft races and successful queued busy-title completion remain untested.
At
8975da5359, native title/search undo/redo, word movement/deletion, cut/paste, double-click/Shift+click and bidirectional dragging outside the field passed. Undo restored reversed selection; committed-title undo worked after refocusing. Search filtering and long-title scrolling/Escape passed at 800×1100. A multiline template covered empty-placeholder clicks, Unicode paste, document boundaries, line selection and drag/undo; exact Unicode text survived navigation and restart (UI copy-back). CJK/emoji glyphs were missing in that original-font pass. Focused input actions left the memo unchanged.Native typing undo remains character-granular; pasted replacement is one transaction. In the unchanged Tauri reference, Ctrl+Z did not undo the tested title edits and Escape navigated away. One rapid reference retyping attempt displayed an unexpected substring; cause and reproducibility are inconclusive. Actual OS IME, masked-input history and history-limit eviction were not tested through the UI; model tests cover composition and history limits. macOS/Windows bindings and Tauri process-restart persistence remain untested.
A separate
8975da5359pass restarted both applications with the same isolated packaged-font inventory: 53 face entries across 27 files, using DejaVu core/extra 2.37-2build1, Noto CJK 1:20220127+repack1-1 and Noto Color Emoji 2.047-0ubuntu0.22.04.1. Japanese and emoji rendered and copied back exactly; plain/bold/italic/bold-italic bodies and multiline text persisted in both apps. Memo row spacing was 28px in both; horizontal raster bounds and navigation/template controls still differ. Font provisioning changed the QA environment only.At
fc40ecdc72, a rebuilt native binary passed the recorded sidebar regression comparison. Long Unicode titles truncate to one line with timestamps visible at 200/280/360px; copy-back preserves the entire title. The default stays 200px at 800×1100 and maximized. A manually dragged 280px width scales to the 360px cap and returns to 280px. Collapse/reopen restores it; Templates stays fixed at 200px with resizing disabled. Leaving Templates restores the prior timeline width and expansion, intentionally avoiding the reference's observed route-only reset. Releasing a drag outside the window stops resizing. Search, title undo/redo/Escape and saved body/attachment persistence passed again, including a fresh process. Lower-cap recovery below 800px is covered by state tests but remains untested through the UI.Revision references for these UI passes:
0293770fb5892efbb5298d23a9c308ad25b04d3c,aa0247712489ebd687c62f0ad4a059f950ad4bbd,8902b27745,797ad1c622,0b1fc3bd58,ab4b20ca30,752fd106cf,135d481114,99f3e893dd,8975da5359,fc40ecdc72. Earlier recordings describe their tested revision, not full validation of the latest head.Cross-client note identities
Performance setup exposed a compatibility failure: Tauri reads the memo with
session_documents.id = sessions.id, while the shared Rust reader also accepts an independent document ID. Atd83aceb754, native-created notes, onboarding and generated imports use the session ID for the primary note. Summaries retain independent IDs; canonical archive imports preserve original row IDs and opaque bodies. Existing sandbox rows are not automatically rewritten.The actual Tauri
SESSION_SELECT_SQLreturned an empty native memo before the fix. New regression tests now verify this read, external edits, stale-save rejection, restart persistence, generated-import/onboarding IDs and archive identity preservation. The release UI pass also verified a native-created Unicode bold/italic memo in production-bundled Tauri, a Tauri edit back in native after exact checkpointed database transfers, and native Markdown import visibility in Tauri. The welcome-note UI path was not reached. Tauri's Close action hid its window; autosave/reopen was checked before process termination, so this is not graceful-quit evidence.Linux rendering uses an isolated process-local Mesa/LLVM/Vulkan setup; system graphics libraries were not replaced. This VM has no physical audio input device. Original-font and common-packaged-font comparisons are separate evidence; both apps use the same packaged fontconfig for the latest sidebar pass. Actual OS IME and cross-platform behavior remain unverified.
Verification
Local environment: Ubuntu 22.04, repository Rust toolchain, local PipeWire 1.0.5 SDK. The focused native workflow uses Ubuntu 24.04 and now installs GTK/AppIndicator development dependencies.
CI follow-up at
dfeef8bbb23c2b368abd9ef57b8439260a865673: the native link failed on missing-lxdo(job 106217308583), so the native workflow now installslibxdo-dev. The branch incorporates current main and formats its multiline CSStransition, resolving the formatting failure in job 106217308290. Full branch-diff dprint checks, diff whitespace checks, license-boundary checks and all 136 Node CI tests pass locally. Hosted checks are rerunning. These follow-up commits change CI and web formatting, not either desktop application's source.Native checks
Check/build/strict Clippy/formatting passed at
d83aceb754. Native tests: 214 passed, 3 optional benchmarks ignored. Local fixtures cover provider transport/configuration, secure-store boundaries, stale provider-choice rollback, recording/recovery and failed provider startup/retry, AI streaming/tools, cloud account/sync/share contracts, import/export/model adapters, standalone lifecycle helpers, sidebar proportion/route restoration, input composition, bounded undo/redo, Unicode boundaries and horizontal scrolling, canonical persistence/CAS, cross-client note identity and external-write page-cache invalidation. Full branch-diff dprint and whitespace checks passed again. Both license checks, desktop/mobile version checks and all 136 Node CI tests passed atd83aceb754.cargo test --locked -p calendar -p db-app -p db-sync -p e2ee -p export-core -p meeting-import -p model-downloaderreached 255 passed / 6 failed indb-app: all six failures initialize CloudSync and report native loader/Sqlx(WorkerCrashed)errors. The bundled extension requires GLIBC_2.38, while this VM supplies 2.35; the same loader limitation was reproduced on the untouched exact base. The new session-query equivalence test passed. The remaining domain packages were run separately and passed. Full CloudSync/db-core native suites require a compatible environment; this is not full domain-suite validation.Shipping frontend/common regression checks passed: shared UI build; desktop typecheck; 491 files / 4,699 tests; Oxlint (0 errors, 210 warnings); i18n checks; both license-boundary checks; desktop/mobile version consistency; and all 136 Node tests in the repository CI command.
Zizmor 1.30.1 completed offline: 154 errors, 81 warnings, 117 notes. Normalized findings match the exact-base workflow scan; no introduced findings were observed. Authenticated online audits were unavailable. Generator-produced OpenAPI key-order drift was verified semantically identical and excluded. Native shipping-platform builds were not run.
Release application resource observations
Report · Raw samples and provenance · Aggregate
Native
d83aceb75458e6b7e60da694c6de515be18d20c8and unchanged production-bundled Taurifc40ecdc72612447b7b8d2aac567c4e9adea11d0ran in fresh Native-1 → Tauri-1 → Native-2 → Tauri-2 order. Twelve 30-second windows included all application descendants, verified geometry and constant 15 fps recording. The Tauri fingerprint confirmsdefault,direct-distribution, no dev/devtools and empty Rust flags; its earlier literal build invocation/full inherited environment was not independently recovered. This is a Linux VM/software-renderer observation, not deployment hardware evidence.Each entry below is run 1 / run 2. PSS is the window median in MiB; CPU is the window mean where 100% equals one core.
WebKitWebProcessaccounted for 64.93–79.69% CPU. Its anomalous activity, memory drift and visible caret despite attempted chrome-based blur require a controlled follow-up; caret-free matching was not established. Do not interpret this table as a whole-app speedup. Search/open, typing/undo/reopen and document endpoints were exercised in both apps. Input and resize transitions needed corrections before sampling; all 1,002 synthetic note bodies match the seed structurally after each run. Welcome generation, archive-import UI, launch, first usable paint, input/frame latency and wakeups remain outside this evidence.Focus diagnostic on the same unchanged binaries
Diagnostic report · Evidence · Aggregate
Fresh 800×1100 runs held the required provider panel and 15 fps recording constant. Empty Tauri measured 0.23% tree CPU; focused memo measured 66.16%. Explicit desktop focus removed Tauri's caret but left tree CPU at 68.26% over 90 seconds, including 61.62% in WebKit, predominantly its main thread. WebKit's network child was approximately idle; the Tauri host's VBlankMonitor used ~0.20%. PSS ranged 603.49–612.60 MiB without monotonic growth; this bounded interval neither establishes nor excludes a leak.
Native empty/focused/unfocused CPU was 0.43% / 0.47% / 0.48%, but its caret stayed continuously visible in both focus states. That is a parity defect, not evidence of equivalent blinking efficiency. Native PSS was 125.87 MiB empty and 129.38 MiB with the memo open. All 1,002 bodies and original ABAB evidence remain intact.
Notification suppression did not remove the condition-bound provider panel; the setting was restored.
perf_event_paranoid=4, denied GDB attachment and denied kernel-stack reads prevent causal attribution. JavaScript, GC, paint, animation and graphics explanations remain unverified. Further attribution requires a permitted symbolized sampling environment; any inspector build must remain separate from production measurements. No whole-application speedup claim.Native focus corrections after the diagnostic
The shared caret controller in
21600196f8blinks only while the eligible field is focused in an active window, resets after interaction, and cancels its timer on blur/deactivation. Recorded editor, title, picker, search, provider and multiline-field checks passed; these were functional checks, not new resource measurements.The follow-up exposed a separate focus-routing failure: removing the focused note left its unrendered focus handle outside workspace key dispatch.
9a446d348erestores workspace focus through GPUI's focus-lost callback, guarded against product panels, shutdown and paused writers. Two recorded Ctrl+End → Ctrl+W → Ctrl+Shift+T cycles and focused-title close/restore passed, including editing/undo and restored caret activation.209dd215cdprevents the tab close control's default mouse-down focus transfer. Recorded independent body/title marker-and-undo checks after inactive-tab closure passed, as did repeated focused body/title close/restore, Ctrl+T/N/K and product/back field checks. All 1,002 functional fixture bodies remained exact.Corrected blinking-state resource comparison — 209dd21
Raw observations and provenance · Aggregate
Twelve accepted windows at 800×1100 used 31 observations over approximately 30 seconds each, stable process trees, canonical fixtures and continuous 15fps recording. Native binary SHA256:
ac3fa272b57b02a90a145839dd74298c9479f44208537d91b8ec02e7b1a78c84; unchanged production Tauri fc40 binary:26daed37bd7ec10845f64b3ce94eb4f0d8e0ac549c64b90e3d43e20abb2e9d69.CPU is percent of one core; paired values are the two runs. Correct blinking exposes substantial native CPU use on this software-rendered VM. Native llvmpipe workers account for 55.09% / 53.13%, while its main thread is 0.67% / 0.60%. Earlier low-CPU nonblinking native results are not equivalent evidence. Repaint/timer/renderer attribution is the next investigation; no optimization claim.
One Tauri attempt added an empty paragraph by clicking below existing text; integrity checks excluded it, and a fresh canonical copy was repeated. Accepted order is Native-1 → Tauri-1-clean → Native-2 → Tauri-2, with the excluded attempt preserved. Every accepted profile retains all 1,002 exact bodies and IDs.
External desktop clicks deactivated the measured client and hid its caret, but the WM selected a legacy SIGSTOP-paused native window, not Plasma; that target was consistent across accepted deactivated windows. Provider chrome still differs. Tauri's high WebKit activity remains unexplained. Maximized/large-note windows were not repeated; launch, first paint, key-to-paint, frame timing and wakeups remain unmeasured.
Library performance evidence
Release fixture source:
f404735b01079d76815a20969fd2696967ba3222. Raw samples, query plans, fixture hashes and environment.These historical service samples used independent note IDs. The fixture now uses canonical note IDs and fingerprints the document identity and timestamps as well as its body; the old raw results retain their original source and hashes. Preliminary GUI samples from the noncanonical fixture were rejected because Tauri displayed an empty memo.
Each isolated fixture contains 1k/10k/50k sessions, ten 1 MiB documents and 256-byte documents otherwise. It records 30 library requests and 20 saves/watch deliveries, using warm OS cache. Library requests advance by 31 rows with a 100-row limit, so the runtime distribution includes cold aligned-page loads and cache hits. Reference and optimized result IDs are checked for equivalence. Values below are milliseconds, nearest-rank p50/p95/p99.
At 50k, save p50/p95/p99 was 3.850 / 5.389 / 12.434 ms, and enqueue-to-document-watch delivery 24.016 / 26.118 / 32.536 ms. These are service microbenchmarks, not editor key-to-paint or recording latency.
The materialized ID page bounds final row projection and uses the existing primary-key index, but both SQL plans still report
SCAN sessionsandUSE TEMP B-TREE FOR ORDER BY. The uncached results do not demonstrate a speedup. Removing the scan/sort needs a separately reviewed canonical expression index, which is outside this no-schema change.The runtime cache holds at most eight aligned pages of 456 rows and an 8 MiB estimated payload. A read-only observer checks
PRAGMA data_version, invalidates on committed external writes, and avoids retaining a page changed during its query. Library work is serialized on the bounded database queue; superseded reads cancel. Runtime limits: 64 database jobs, 16 service jobs, four concurrent service workers, two Tokio workers.Link to Devin session: https://app.devin.ai/sessions/be66b7c3585d4985940bb9d2035abed9
Open in Devin Desktop: https://app.devin.ai/desktop/session/be66b7c3585d4985940bb9d2035abed9?variant=devin
Requested by: @ComputelessComputer