Skip to content

AcceptedOwner sparkles:editorReviewed 2026-11-05

Editor application — Delivery plan ​

The contract owns requirements. This page is the sole milestone tracker; testing owns evidence and decisions owns unresolved design questions. A milestone is complete only when its acceptance scenarios pass in the named configurations.

Delivery dependencies ​

Arrows mean delivery prerequisites, not package imports. Shared library changes must be validated in existing consumers before app integration is accepted. Each implementation commit must build and pass its relevant tests.

Milestones ​

SliceObligationsDeliverable and acceptance gateStatus
S0 — Contract and feasibilityEAP1–EAP3, EAP9, EAP17, EAP20, EAP23–EAP24, EAP29Agreed ownership, palette test interfaces and risk experiments below; cold read, semantic review and publication validation recorded separatelypartial: contract accepted; implementation feasibility gates remain open
P — Shared command paletteEAP8–EAP11Display-independent state and catalog, shared widget view, invocation-target/context/identity/lifecycle scenarios, recording and TUI/Vulkan adapters; one public-behavior red→green slice at a timepartial: shared view/input and effective-shortcut tests pass; backend parity pending
A — Thin editor shellEAP1–EAP7, EAP27–EAP28Standard CLI/build identity, editable examples, tabs, command guide/palette and basic inspector; app recording-flow and native smoke evidencepartial: shell, tabs, examples, commands, clipboard, pointer, smoke, code presentation, undo inspector, indentation/comments and find/replace delivered; backend parity pending
H — Highlighting and presentationEAP12–EAP16Shared per-line highlighted presentation with editor decorations, revision-safe background work, themes and generated settings; active-line and preview/cancel scenariospartial: highlighting, theme and language pickers, generated settings and the document-font choice delivered; drawing the document in its own face pending
U — Layout and inputEAP17–EAP20Shared layout-backed navigation/hit-testing, Unicode corpus, terminal touch extraction and live IME on required native targetspartial: bidi/wrap layout drives drawing, hits and motion; Unicode corpus replayed through the app; live GNOME preedit and caret rectangles verified; candidates, Android IME and touch pending
F — Real documentsEAP21–EAP25UTF-8 fidelity, safe desktop saves, system document access on Android, conflict and dirty-close decisions; fault/provider tests and real-device evidencepartial: native open/save/conflict and dirty-close tests pass; live close/provider acceptance pending
R — Session recoveryEAP26Owner-accepted checkpoint/loss policy, versioned settings/session storage, dirty-buffer recovery and interruption/corruption tests; no implicit writes to originalspartial: native checkpoint/restore, exit and versioned settings verified; lifecycle/resource limits and device latency pending
V — Acceptance and measurementsEAP2, EAP27–EAP30 and all earlier obligationsRequired target matrix, 1/10 MiB and long-line workloads, independent adversarial review, docs and per-commit build checkspartial: document workloads measured; per-edit work on 10 MiB and 1 MiB lines, device runs and final review pending

Next slice: document workflows ​

The palette's approved test interfaces remain in testing §2. Its shared implementation is available; complete backend/input parity remains an acceptance gate.

  1. Open/Save/Save As now use the common command policy. Background saves capture revisions, compare destination bytes with the saved baseline and require informed replacement consent. Complete native dialog captures and failure/focus acceptance alongside dirty-close integration.
  2. Save/Discard/Cancel now handles tab closure and deliberate exit, with a shared native close hook. Complete live close-button, in-flight failure and cross-focus clipboard acceptance; preserve per-document consent.
  3. Add Android document-provider access/grants and the native IME experiments. Their actual guarantees remain separate from the native POSIX adapter.
  4. Native recovery now includes durable revision display, continuous-edit scheduling, corruption/failure checks, explicit restore and orderly-exit decisions. Finish TUI/nonvetoable lifecycle, resource limits and actual one-second/device measurements under EAD11.

Generated font/settings controls, code-editor presentation and conveniences, shared Unicode layout/touch input and workload acceptance remain required. The native file work does not replace their delivery gates.

Remaining implementation sequence ​

This sequence covers the remaining accepted scope, not just the current checkpoint. Correctness failures found while validating an earlier slice take precedence over the next feature. The milestone gates above remain authoritative; a library preparation commit does not close an app or device acceptance gate.

  1. Shared layout and input geometry (U, S0). LayoutContext now supplies one byte-keyed cell-grid result for drawing, visual caret movement, row edges, wrapped vertical motion and pointer hits in the app, and computes the IME caret area with affinity; the drawn caret area reaches the host (Wayland set_cursor_rectangle). Remaining: the Unicode corpus replay through the app, the real-font GPU comparison of rendered hits, and bounded long-paragraph work (each query lays out its whole paragraph; scrolling and the IME area lay out at most a viewport of lines; measure under V before claiming the 1 MiB single-line workload). Shaped proportional flow stays with sparkles:text-layout.
  2. Generated settings and document fonts (H). Delivered (testing §6, 2026-11-16): font discovery, preparation and the fuzzy finder moved from text-lab into sparkles.ui_app.font_library, with real family members and the document font's controls from sparkles.font.families (FTD47–FTD51); the app's generated pane over one EditorSettings subject, the family picker (monospace, with show-all), the bounded DocumentFont controls, their persistence and the visible report of unsupported controls. Remaining: drawing the document in that face — a widget subtree painted in the document face with its own cell metrics, applying line height, letter spacing and ligatures — per-style coordinates for a variable family's bold, and fontconfig on the package's library path. Document typography stays independent of interface typography.
  3. Editor presentation and tools (A, H). Line numbers, current-line treatment, indentation guides, bracket matching and trailing-whitespace marks are drawn, each switchable (testing §6, 2026-11-16). Complete the undo-branch inspector, indentation/autoindent, language-aware commenting and the accepted editing actions through the common command policy.
  4. Find and replace (A, V). Literal and regex search/replace, case and whole-word switches, match selection, protected spans and pattern/work limits are delivered (testing §6, 2026-11-16). Remaining: measure the bounded search on the 1/10 MiB workloads before claiming responsive large-document behavior.
  5. Live composition and touch (U). Complete desktop and Android preedit, cancel/commit, focus and candidate placement with real input methods. Extract reusable terminal selection geometry/gestures, then implement editor handles, crossing, edge scrolling and selection actions. Verify Android keyboard insets and gesture ownership on actual devices.
  6. Android documents and remaining file workflows (F). Build the editor APK/native entry, system document access/open-with, retained grants and provider save semantics. Test revocation, cancellation, failed writes, conflicts and informed weaker replacement. Finish native close/save requests that arrive during in-flight operations and remaining focus races.
  7. Session settings, lifecycle and resource bounds (R). Persist the accepted settings alongside tabs/selections with explicit version handling. Bound archive discovery/retained restore state and complete nonvetoable lifecycle handling. Measure acknowledged one-second recovery on the supported devices; preserve failed/unconfirmed states and original files.
  8. Frontend parity and capability reporting (P, A, U). Finish Lantern prefix timing/wakeups, palette/menu/touch integration and effective binding agreement. Exercise TUI and Vulkan on narrow/wide layouts and make actual unsupported host/input/font capabilities visible.
  9. Workload and device acceptance (V). Run the 1 MiB, 10 MiB and 1 MiB single-line workloads, Unicode corpus and sustained edits/font changes. Profile before optimizing; report input, CPU/GPU frame, presentation and retained-memory measurements separately. A 120 Hz claim requires measured 8.33 ms deadline behavior on a named device/refresh mode.
  10. Review and delivery (V). Run the requested independent adversarial review with agy and Argon Medium, repair findings and rerun affected checks. Complete the Nix artifact, screenshots/diagnostics, documentation and per-commit build validation. Rebase/series cleanup follows repository policy and the owner's applicable authorization; pushing remains a separately authorized action.

The last independent review attempt was quota-blocked; final review is pending. Desktop native clipboard, storage and recovery evidence already recorded in testing.md does not replace the remaining Wayland/Android, layout, IME or device-performance gates.

Library extraction ​

The app keeps the wiring: EditorApp, the command catalog, the CLI, the examples, the session record's schema and its scenario tests. Code that any editing surface needs moves to the library that owns its concern, extending what is already there rather than adding a second copy. Each step moves its tests with it, keeps the app's scenario tests green, and updates the specs and evidence citations that name the moved code. Branch refactor/editor-lift-libs, stacked on feat/editor-showcase.

StepFrom (apps/editor/src)ToStatus
X1document_text.d: BOM, line-ending detection, Enter's endingsparkles.base.text.envelope: TextEnvelope, LineEnding; enterEnding generic over any text with lineOf/lineEnd/byteAtdelivered
X2document_files.d: atomic create-only save, durability receipt, no-follow regular readsparkles.base.vfs.write (VFO9 gains a create-only disposition and a directory-sync receipt) and the VFS's no-follow readdelivered
X3document_io.d, session_checkpoint.d, session_runtime.d: ticketed RawCpuPool jobssparkles.event_horizon.job_queue: bounded submit, ticket, in-order completion, shutdown; DocumentIo stays in the app over itdelivered
X4rowPrefix, visualRowIndex, totalVisualRows and Document's cache fieldssparkles.ui.editor.layout: a row index beside LayoutContextdelivered
X5statusPosition's cached grapheme columnsparkles.ui.editor.presentation: the caret's line and column, cached per text and headdelivered
X6decimalDigits, lineLabel, the numbering loopsparkles.ui.components.gutter: a line-number channeldelivered
X7session_directory, session_archive, the generic half of session_checkpoint/session_runtime, tools/*-fault*a new sparkles:recovery: leased private directories, numbered immutable generations, a coalescing background writer over opaque bytes; record, snapshot and discovery stay in the appdelivered
X8ClipboardRead, routeClipboard, receivePaste, clipboardOwnerValidsparkles.ui_app: a clipboard router that joins paste chunks and delivers each reply only to the owner that askeddelivered
X9RowHit, DisplayedFrame's rows, placeCaretAt, drawnCaretAreasparkles.ui.components.editor: hit testing and drag selection over the painted rowsdelivered
X10find_bar.d and the find bar's viewsparkles.ui.editor.search (state, FindOption) and a find-bar componentdelivered
X11undoRows, travelToa history component over sparkles.text_buffer.historydelivered
X12documentMarks, findMarks, trailing-whitespace marks; PresentationSettings, EditingSettingssparkles.ui.editor.presentation (TextMark, bracketMarks, trailingWhitespaceMarks, matchMarks); EditingSettings stays, since IndentOptions is the library's form; toggle enums staydelivered
X13pointer(): pixel-to-cell conversion, touch slop, the palette's touch panningsparkles.ui_app (pointer cells, slop) and sparkles.ui.components.command_palette (touch panning)delivered

X2 precedes X3 and X7 (the archive writes through the VFS). The rest are independent.

Design decisions ​

Modal dialogs and hit identities, the document font and the document/tab model needed design before they could move. They were settled with the owner and are written into the specs that own each concern:

  • Dialogs are ordinary popup-band overlays, modal by MDL1, with a toolkit layout preset (title, body, buttons); a reply carries the overlay's generational handle and a stale one is dropped (MDL12, MDL13). The editor's dialogEpoch goes away.
  • Hit ids come from one registry keyed by component tag and instance, stable across frames while the key is asked for (INP27, INP28). The hand-picked bases go, and with them the collision between the editor's undoHitBase and the terminal's toolHit.
  • The document font is a font-role scope on a widget subtree, measured by the one layout pass (GLY13), replacing the single specimen slot.
  • Documents and tabs are dock panes through one workspace adapter shared with hue; a pane is a view onto a document identified by DocumentId, the editor gains splits, and the session is one record over the dock layout value (DCK16–DCK18, EAP4, EAP26, EAP31).
MilestoneScopeAcceptance gateStatus
M-aThe hit-id registry; every hand-picked hit base in the toolkit, the editor, hue and the terminal moved onto itno hit-id constant remains outside the registry; a test asks for two keys and asserts disjoint blocks, and a press held across a frame that adds a control keeps its iddone
M-bOverlay handles and the dialog preset; the editor's dialogs porteda recording test answers a closed dialog with its stale handle and asserts the reply is dropped; save-before-close and go-to-line open through the presetplanned
M-cThe font-role scope; the editor's document drawn in its own facecaret, hit and selection rectangles inside a code scope use the scope's cell metrics at two zoom levels; the TUI draws unchangedplanned
M-dDocumentId, the workspace adapter, editor splits and the one session record; hue adopts the adapterone conformance test runs the adapter's scenarios against the editor and hue; two panes on one document share undo; a split session restores; compact width collapses and restoresplanned

M-a precedes M-b and M-d, whose dialogs and tabs take registry ids. M-c is independent of both and may run alongside them. M-d is not complete until hue passes the same conformance test as the editor.

Bounded feasibility experiments ​

Each experiment records its checked revision, command or procedure, result, limit and decision in testing's evidence ledger. A negative result blocks only the named slice; it is not implementation evidence for a promised capability.

QuestionExperimentDecision criterion and blocked gate
Can one layout drive bidi movement, wrapping and hit-testing?A short mixed-direction paragraph with paired punctuation, wrapped rows and ambiguous carets; compare independently worked positions and native rendered hitsAgree on byte/grapheme/visual positions and affinity without separate renderer-specific movement; blocks U
Can highlighted spans retain editor decorations?Edit, select and compose inside one highlighted line, then deliver an older highlighting resultSyntax and decorations coexist; old work is rejected; blocks H
Can native IME provide live composition?Real desktop and Android CJK input: update/cancel/commit preedit, move focus, resize above keyboard and reposition candidatesObserve the preedit and one committed revision, with usable candidate/caret placement; conversion replay alone fails the gate; blocks U
What guarantees can storage adapters offer?Desktop replacement plus a real Android provider: permission revocation, failed write, external modification and cancellationState the commit point and conflict/atomicity guarantees per adapter; preserve dirty contents through failure; blocks F and R
What bounds keep long work cancellable?1/10 MiB files, one 1 MiB line, adversarial search pattern and sustained edits while highlighting queues fillSelect explicit work/queue limits and cancellation service bounds without truncation or frame-thread whole-document work; blocks V and applicable search/highlight delivery

Resume checkpoint ​

  • Contract: owner-confirmed Q1–Q22, written on branch feat/editor-showcase.
  • Implementation base: 755e1b9101 on origin/main, after PR 715; editor specification commit b5ea7fddd. The worktree remains separate from the font-rendering worktree.
  • Completed scope: shared palette core/view/input/shortcut discovery; the Vulkan/TUI editor shell, independent tabs, editable examples, syntax/editor decoration overlay, background highlighting and theme preview; exact in-memory document envelopes and per-selection Enter conventions. Native file primitives, syscall-fault checks and CLI-open integration are at the current validation checkpoint. Native Save/Save As and overwrite decisions pass app tests, as do dirty-close decisions and the shared native close hook. Native background recovery, retention, startup restore/adoption and exit flush pass tests and a live X11 process-interruption round trip. Background language discovery and per-tab manual overrides pass app/library tests. The cell-grid bidi/wrap layout context drives document drawing, hits and motion. Generated settings/fonts, complete recovery acceptance and the Unicode corpus, real-font hits, touch and IME remain open.
  • Evidence and reviews: testing §6.
  • Next executable action (2026-11-16): drawing the document in its chosen face (a widget subtree with its own cell metrics), incremental row counts and windowed span production for 10 MiB files and 1 MiB lines, then the device gates: Android live IME, keyboard insets, providers and lifecycle on the tablet, candidates with a candidate-producing input method, and touch selection. Presentation, the undo inspector, indentation and comments, find/replace, generated and persisted settings, the font choice, the Unicode corpus replay and the workload measurements are delivered (testing §6, 2026-11-16).
  • Owner policies: visual bidi movement/collapse, convention-aware Enter and one-second recovery checkpoints are accepted in EAD9–EAD11. Layout, storage and scheduling implementations still require their acceptance tests.