Skip to content

Agent output panel#36

Merged
sid597 merged 64 commits intomainfrom
agent-output-panel
Apr 7, 2026
Merged

Agent output panel#36
sid597 merged 64 commits intomainfrom
agent-output-panel

Conversation

@sid597
Copy link
Copy Markdown
Owner

@sid597 sid597 commented Apr 7, 2026

No description provided.

sid597 and others added 30 commits June 27, 2025 17:53
…duh we calculate the position again and again which is totally wrong
Major architectural refactor to decouple high-frequency input handling from
Electric's reactive graph, resolving main-thread blocking and GC thrashing.
Changes:
- Architecture: Switched from "Push" (Event-driven) to "Pull" (Atomic Sampling).
  Scroll inputs now mutate a raw atom bypassing the Electric DAG, which is
  sampled by a requestAnimationFrame loop. This enables true V-Sync at 120Hz/240Hz.
- Memory: Implemented "Zero Allocation" rendering path in editor.cljs.
  Hoisted all Float32Array and clj->js object creation out of the hot loop
  into the setup phase. Mutating existing buffers instead of creating new ones
  eliminated GC spikes.
- Logic: Implemented "Render on Invalidation".
  The render loop now sleeps (0% CPU) when idle and is woken up only by input
  events, preventing battery drain while maintaining instant responsiveness.
- Modules:
  - app.client.webgpu.editor: Low-level, zero-alloc GPU command encoder.
  - app.client.webgpu.loop: Input scheduler, HUD, and RAF manager.
  - app.electric-flow: Lifecycle management and resource loading.
- UX: Added performance HUD to track CPU dispatch time and FPS.
- Fix: Synced Canvas DOM attributes to window pixel ratio to fix blurry text.
- Fix: Added user-select: none to prevent text highlighting during scroll.
  Implement interactive caret with full keyboard navigation:
  - Blinking caret (530ms interval) rendered as 2px white rectangle
  - Arrow key navigation with line wrapping at boundaries
  - Home/End keys for line start/end movement
  - Vim-style sticky column - preserves desired column position when
    moving vertically through short or empty lines
  - Auto-scroll viewport to keep caret visible with 1-line padding
  - Reset caret blink on any navigation for visual feedback

  Technical details:
  - Caret reuses selection rect system: when sel-start == sel-end,
    renders caret instead of selection highlight
  - State tracks :sel-start, :sel-end, :desired-col, :caret-visible
  - Keyboard events flow through Missionary mix into state reducer
  - Hit-testing clamps to actual line lengths for accurate positioning
mplement full text editing capabilities with real-time re-tokenization:
  - Typing: Insert printable characters at caret position
  - Backspace: Delete character before cursor, join lines at line start
  - Enter: Split current line, create new line below cursor
  - Live re-tokenization: Watch !lines atom, re-parse and update GPU on change
  - Mutable text buffer: Store lines as vector of strings in atoms
  - Auto-scroll: Viewport follows caret during editing operations

  Technical implementation:
  - Extended keyboard handler to capture char-input, backspace, enter events
  - Added !lines, !line-lengths, !text-geo atoms for mutable state
  - Text update flow watches !lines, triggers tokenize-fn → layout-fn → GPU update
  - All line-length references updated to use @!line-lengths atom
  - start-loop! signature extended to receive lines, tokenize-fn, layout-fn, atlas
 - Add bracket matching: highlights matching brackets (parens, brackets, braces)
    when cursor is on or near a bracket using Lezer parse tree

  - Add code folding: multi-line Clojure forms can be collapsed/expanded
    via clickable indicators in left gutter (gold=expanded, blue=folded)

  - Implement visual/logical line mapping to handle hidden lines correctly:
    * layout-tokens returns line-mapping for visual↔logical conversion
    * Hit-test uses visual→logical mapping for accurate cursor placement
    * Caret/selection rendering uses logical→visual mapping for positioning
    * All fold regions detected from Lezer parse tree (List, Vector, Map, Set)

  - Add 40px gutter for fold indicators with smart positioning

  Architecture: folding affects every component (layout, hit-test, rendering),
  so we maintain two coordinate systems: logical (buffer) and visual (screen).
- Ctrl+K toggles command panel at bottom of screen
- Focus routing: keyboard input goes to active region (editor or panel)
- Command panel features:
  - Background rect at fixed screen position
  - Text input with blinking caret
  - Placeholder text when empty ("Type a task...")
  - Blue prompt prefix ("> ")
  - Left/Right arrow navigation
  - Backspace/Delete support
  - Enter submits command and closes panel
  - Escape closes panel
  - Click to position cursor
- Separate text rendering flows for editor vs command panel
  to avoid re-tokenizing editor on every panel keystroke
  Features:
  - Settings panel (Ctrl+G) with font selector and parameter sliders
  - Font switching with manifest-based configuration
  - Sharpness control (-0.2 to +0.2) for MSDF edge crispness
  - Pixel snapping to DPR-aligned grid for sharper text
  - Diagnostics overlay toggle for debugging render params

  Architecture fixes:
  - Replace m/ap + m/?< with m/latest to prevent flow cancellation
  - Use m/eduction + deref for event filtering (avoids fork cancellation)
  - Consistent char-width (0.56) across cursor, layout, and hit-testing

  Rendering improvements:
  - MSDF shader clamps screenPxRange >= 1.0 (fixes blurry quotes)
  - Regenerated font atlas at size 128 (was 64) for better glyph detail
  - Atlas size read from JSON instead of hardcoded value

  Files changed:
  - loop.cljs: settings panel, font switching, reactive architecture
  - editor.cljs: MSDF shader params, shape-text with snap-step
  - electric_flow.cljc: manifest defaults alignment
  - font_atlas.png/json: regenerated at higher resolution
  Features:
  - Theme selector in settings panel (Ctrl+G → Tab → ←/→)
  - 6 themes: Gruvbox Dark/Light, Rosé Pine, Kanagawa, Cyberdream, Classic Dark
  - Live theme switching via reactive pipeline

  GPU changes (Zed pattern):
  - Per-glyph colors in instance buffer (8 → 12 floats per glyph)
  - Vertex shader passes color to fragment
  - Fragment shader uses per-instance color instead of uniform

  Architecture:
  - Extract themes to themes.cljc (avoids circular dependency)
  - Colors flow: layout-tokens → shape-text → GPU buffer → shader
…ptimization

  - File explorer sidebar (Ctrl+B): imperative DOM + HTTP API for browsing
    and opening files from the server filesystem, open by default
  - Fix canvas viewport: use ResizeObserver on canvas element instead of
    window.innerWidth so text renders correctly when sidebar is visible
  - Cached <fold-state and <bracket-match flows: fold detection and bracket
    matching now only recompute on document changes, not on every blink tick
  - Two-level identical? dirty checking in render reducer: idle frames skip
    all work via O(1) pointer compare instead of deep structural equality
  - Viewport-scoped text processing: large files (>500 lines) only tokenize
    visible ~50 lines instead of the full document
  - Data-level viewport culling replaces GPU-level culling in draw-frame
  - Removed dead flows using banned m/ap+m/?< pattern
…and improve

  MSDF text rendering

  - Track currently open file in sidebar with highlight and breadcrumb
  - Switch default font to DejaVu Sans Mono at 19px (matches kitty 14pt)
  - Regenerate MSDF atlas (size=64, pxRange=16) for even glyph coverage
  - Set sharpness to 0.05 for proper stroke weight
  - Darken gruvbox background and brighten foreground to match nvim contrast
  - Boost delimiter alpha and restore original comment colors for readability
  - Seed sidebar with initial file on startup via server-resolved paths
…ssion-id persistence

  Declare $$agent-runs-pstate and $$cli-sessions-pstate for storing AI
  interaction metadata and per-file session-ids. Add :agent-run and
  :update-cli-session topology cases. Add CliProcessTaskGlobal,
  provider-default-argv (with --resume injection), parse-claude-json-output,
  and cli-exec-future in objects. Wire foreign PState bindings and add
  get-cli-session, update-cli-session, submit-agent-run helpers in util-fns.
  Fix !subscribe to emit initial value instead of Failure(Pending).
…nd Rama session integration

  POST /api/agent/run spawns CLI processes (claude, codex, gemini) with
  configurable timeout and process tree cleanup. Looks up stored session-id
  from Rama before execution for --resume, parses Claude JSON output to
  extract new session-id, and persists it back to Rama for next invocation.
  Adds /api/agent/run-status for polling run state.

   Add agent command panel UI with multi-provider support and output rendering

  Parse /provider and /run commands from command panel input. Submit prompts
  via POST to /api/agent/run with editor context (cursor, selection,
  viewport, file path). Render agent output with status-colored text
  (running/complete/failed/timeout) in combined-text-ops. Show dynamic
  [CLAUDE]>/[CODEX]> prompt prefix based on active provider.
  missing seed data loads

  Rama's dataflow macro cannot inline Java static method calls — wrap
   in
  now-ms helper. Fix local-transform> to place termval inside path
  vector.
  Comment out load-events calls for dg-nodes and dg-edges EDN files
  that
  don't exist on this machine.
…nd dismiss

  Replace the fixed 180px agent output panel with a fully interactive surface.
  Panel now sizes to content (capped at 50% viewport), wraps long lines at
  viewport edge, and supports mouse-wheel scrolling with software clipping.
  Escape dismisses cmd-panel and agent output as one unit.

  Rendering:
  - Rewrite <cmd-panel-rects to 3-slot vector [agent-bg, cmd-bg, caret] with
    zero-size invisible rects for absent elements (stable GPU instance indices)
  - Rewrite draw-frame! draw order: agent-bg → cmd-bg → text → caret
  - Viewport clipping in <combined-text-ops: only emit render ops where text
    baseline falls within panel bounds (no GPU scissor — software clip only)

  New pure helpers:
  - compute-agent-panel-h: shared by rect-layout and text-ops for height consistency
  - wrap-line: character-based line wrapping to viewport width
  - cmd-prompt-text / cmd-text-start-x: shared cursor alignment (fixes drift)

  Scroll routing:
  - !agent-scroll-y and !mouse-y atoms for panel-local scroll state
  - Wheel consumer hit-tests mouse position against agent panel bounds,
    routes delta to agent-scroll-y (clamped) or editor scroll-y accordingly
  - Scroll resets on new agent output, preserved during response streaming

  Bug fixes:
  - Cursor alignment: replace hardcoded text-x=60 with cmd-text-start-x
  - Focus race: guard file-load focus reset with (when-not cmd-panel visible)
  - Enter behavior: submit + keep panel open for follow-up, empty Enter closes
  - 1-frame blank box: gate cmd-bg draw on (< editor-lines total-lines)
sid597 and others added 29 commits March 1, 2026 00:23
  layout engine, and fix sidebar readability

  editor.cljs:
  - Upgrade rect shader from flat 8-float quads to
  28-float SDF rich quads
    (per-corner radii, borders, gradients via Inigo
  Quilez sd_rounded_box)
  - Add shadow pipeline: separate vertex/fragment
  shaders, Gaussian CDF
    falloff via erf_approx, 20 floats/shadow (80 bytes),
  3x blur expansion
  - Rect stride 32 → 112 bytes, shadow stride 80 bytes
  - init-shadow-system, update-shadows,
  grow-shadow-buffer fns
  - Rect buffer auto-grow (grow-rect-buffer with capacity
   tracking)

  electric_flow.cljc:
  - Remove DOM sidebar (div, CSS,
  sidebar-bg/border/text/width constants)
  - Canvas now full 100vw (single child, no flex wrapper)
  - Wire shadow system into GPU pipeline initialization

  loop.cljs:
  - Rect tree scene graph: rt-node, tree->rects,
  tree->text-ops,
    tree->shadows, hit-test, dispatch-event
  - Layout engine: layout-children, resolve-layout,
  resolve-text-layout,
    normalize-padding (CSS-style shorthand)
  - Design tokens (dt): colors, spacing, radii, shadows,
  font-sizes
    (Linear/shadcn dark theme)
  - Component library: ui-card, ui-badge, ui-button,
  ui-divider,
    ui-progress, ui-scrollbar, ui-tabs, ui-tooltip,
  ui-panel,
    ui-panel-header, ui-panel-content, ui-panel-footer,
  ui-panel-group,
    ui-list-item, ui-checkbox, ui-priority-dot
  - WebGPU-native sidebar (build-sidebar-tree): replaces
  DOM sidebar,
    file tree with indent guides, hover/select/scroll,
  back nav
  - Screen 1 intake list (build-intake-tree,
  build-right-detail):
    grouped ticket list, drag-and-drop state machine,
  right detail pane
  - Flow state machine: /mock command, intake as default
  start node,
    re-bootstrap from intake
  - Fix sidebar char-advance: compute from sidebar font,
  not editor's
  - Replace invisible Unicode (▸▾←…) with ASCII (> v <
  ..)
  - Sidebar font matches main panel font-size
… h-scroll coordinates

== Sidebar Simplification (Session 28) ==
- Removed ui-tabs (Files/Review/UI) — sidebar is file-explorer only, no tab bar
- Removed :review-packs and :components cond branches from build-sidebar-tree
- Consolidated !sidebar-state from 18 keys to 7 (removed :mode, 6 :review-pack-*, 3 :component-*)
- Deleted fetch-component-registry!, fetch-review-packs!, fetch-review-pack-summary!,
  build-review-pack-canvas-model, node-by-id, compact-text
- Removed :tab click handler and component-mode click block
- ~540 lines removed, file went from 6275 to 5735 lines

== 3-Pane File Layout (Session 28) ==
- New build-file-layout fn: Editor (40%) | Chat (30%) | Preview (30%) for any open file
- Activates when (some? current-file) — any open file, not just components
- Chat pane shows agent-output trail via trail->chat-nodes when trail is non-empty
- Preview pane shows build-empty-state placeholder
- Wired into both <editor-rects and <combined-text-ops with file-open? gating
- Replaced build-component-layout with generalized build-file-layout

== Flow Start Gating (Session 28) ==
- initial-flow-state returns {:node :idle} instead of {:node :intake}
- flow-canvas-active? (#{:intake :arrange}) returns false for :idle
- Ticket list only appears after /bootstrap (/dg) command
- Command panel visible on load, focus on command panel (not editor)

== UI Excellence Phase 1 — Rendering Integrity (Session 29) ==
- Normalized char-width to 0.56 across electric_flow.cljc (was 0.60 — caused cursor drift)
- Fixed text clipping in <combined-text-ops: per-glyph truncation for grouped ops
- Fixed tree->text-ops: added clip-right truncation for text beyond clip bounds
- Typography hierarchy: typo-title (20px/1.0), typo-subtitle (16px/0.9),
  typo-body (14px/0.85), typo-caption (12px/0.6)
- Applied typography constants to all pane headers, sidebar, intake tree, right-detail

== UI Excellence Phase 2 — Space & Depth (Session 29) ==
- Added :surfaces key to design_tokens.cljc: 9 elevation tokens
  (sunken, base, elevated, hover, active, text-primary, text-secondary, text-muted, accent)
- Removed 1px full-height pane dividers — replaced by surface color contrast
- New !active-pane atom (:editor | :chat | :preview) wired through m/watch into
  <editor-rects (23 args) and <combined-text-ops (22 args)
- Focus indicator: 2px bottom accent underline (40px wide) on focused pane header
- Click handler determines pane from rel-x, Cmd+1/2/3 keyboard shortcuts via parse-key-event
- Pane headers: 32px -> 36px height, 12px -> 16px padding (4px grid rhythm)
- build-empty-state reusable helper: centered icon + headline + description
- Chat header: status accent bars (blue=streaming, green=complete, red=failed)
- Bottom clip: editor text ops filtered to not bleed into cmd-panel/status-bar zone

== Horizontal Scroll (Session 29, fixed Session 30) ==
- >wheel now emits {:dy :dx :shift?} maps instead of bare numbers
- New !scroll-x atom: shift+wheel or trackpad dx, clamped >= 0, editor pane only
- Session 30 fix: split into two coordinate systems to prevent contamination:
  - layout-x (unscrolled) for gutter, line numbers, fold indicators
  - editor-lx = layout-x - scroll-x (scrolled) for editor code text only
  - clip-sub clips text to [layout-x, code-w] with left-trim + right-truncate
  - compute-editor-rects takes :gutter-lx kwarg so fold indicators stay fixed
  - Scroll events restricted to editor pane area (mouse-x < editor-right)

== Server Changes ==
- thinking_delta and signature_delta event parsing in stream event handler
- thinking-start block type support in content_block_start
- Component library registry endpoint (/api/components/registry)
- Extract preview overlay div in electric_flow.cljc

== Other ==
- deps.edn: added :test alias with extra-paths ["test"]
- Ctrl+V paste: removed .preventDefault so browser fires native paste event
- /extract and /hardcode slash commands for component extraction pipeline
  - Markdown block parser with inline spans (bold, code, links) and
    8 block types: headers, code blocks, lists, callouts, tables
  - Chat pane: 40/55/5 proportions, warm dark bg, scroll + viewport pin
  - Trail renderer: grouped blocks, tool cards, click-to-navigate
  - Vertical text clipping (was right-only)
  - Sidebar: ASCII-only glyphs, uniform filename colors
  - Fix char-width sync 0.60 -> 0.56 across electric_flow and loop
- Move drag-select to raw DOM listeners to avoid Missionary event
  buffering resetting !dragging? atom mid-dispatch
- Fix missing paren that caused editor cursor placement on every
  click when a file was open (chat clicks passed through to editor)
- Correct chat scroll width from 0.3 to 0.55 matching shell layout
- Clamp selection rects to editor pane boundary (viewport-w)
- Clean up all debug instrumentation
…rects

Add missing hovered-row-idx arg to build-intake-tree calls in runtime.
Add run-scroll-y, detail-scroll-y atoms and compute-run-text-ops,
compute-run-rects to combined-text-ops and editor-rects call sites.
Includes dg_flow run/review screen compute fns and event updates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sidebar truth (project, expanded-dirs, selected-file) now lives in Rama
PState, flows through Electric to the client, and drives the UI.

Server: $$sidebar-pstate with 4 event handlers (dir-toggle, file-select,
project-select, project-back). Server-side atom bridges Rama truth to
Electric via e/watch. HTTP endpoint /api/sidebar/action for event emission.

Client: fire-and-forget POST to Rama with optimistic local updates.
Electric subscription syncs committed truth back. Startup hydration from
persisted Rama state with dir-cache and file content rehydration.

Sidebar IDs changed from positional (:entry-0) to domain identity
(:e//path/to/file.cljs) using (keyword prefix path).

Shared sidebar scene: render flow caches resolved tree in !sidebar-scene,
hit-testing and text ops read from the same cached tree instead of
rebuilding independently.
… 1.6.0)

foreign-proxy-async fails in test IPC regardless of path strategy:
- Root path [] → RocksDBWrapper serialization failure in callback envelope
- Per-key paths → WorpResolveTimeout / connection manager collapse

Server-side atom mirror (!sidebar-truth-atom) is proven stable. Updated by
emit-sidebar-event! after each Rama write, watched by Electric via e/watch.
Also fixes proxy-callback to return nil (correct regardless).
- Split monolithic !sidebar-state into !sidebar-truth, !sidebar-overlay, and !sidebar-ui.
- Implemented live reconciliation between truth and optimistic overlay.
- Added in-flight deduplication caches to fetch-dir! and fetch-file! to prevent duplicate/stale requests.
- Fixed file selection visual updates to derive from truth+overlay immediately instead of waiting for file content to load.
- Re-architected sidebar rect generation and text ops to depend on a structurally hashed !sidebar-scene, completely removing hover interactions from the text invalidation path.
- Updated back-navigation sentinels to properly drop when overwritten by Rama truth.
…n, local world

Phase 0: Ownership freeze — classified all 49 runtime atoms into truth/overlay/ephemeral/derived/transitional/GPU categories.

Phase 1A: Settings Rama slice — $$settings-pstate, server atom mirror, Electric bridge, HTTP endpoint, client persistence watch with initial-load suppression. Persists font-size, line-height, theme-id, etc. across reload.

Phase 1B: Agent trail Rama slice — $$agent-trails-pstate, client-side emit on run completion, restore last trail on reload. Trail data (reasoning blocks, tool calls) survives page refresh.

Phase 1C: Workspace action boundary — workspace_actions.cljs as central dispatch. All !active-pane (4 sites) and !sidebar-visible (2 sites) mutations now route through named semantic actions instead of scattered atom swaps.

Phase 2A: Artifact selection model — !selected-artifact as semantic intent ({:kind :file :path ...}). !current-file kept as transitional I/O shim for 40+ readers. select-artifact! and clear-artifact! coordinate selection, content loading, and pane normalization.

Phase 2B: Effective local world — !effective-local-world derived from 7 input atoms via watches. :mode field (:file-workspace/:flow-intake/:flow-run/:editor) replaces ~20 scattered layout-branching checks. Single deref answers "what world is the user in?"
…eanup

Phase 2B fixes:
- clear-artifact! normalizes active-pane to :editor (no impossible :chat+:editor combos)
- Project switch (home-dir click) clears !selected-artifact so local world doesn't report stale file

Phase 2C: Flow-state Rama slice
- $$flow-session-pstate + :flow/save-state topology
- Server atom mirror, Electric bridge, HTTP endpoint, client emit
- Persist on any persistent field change (not just :node transitions)
- Restore on load: reconstruct :selected from :batch :lanes for UI consistency
- Persists: :node, :tickets, :batch, :active-lane-idx, :runs, :decisions, :session-id, :history
Phase 3A: derive semantic pane descriptions from workspace mode.
Each mode produces a :panes vector in !effective-local-world:
- :file-workspace → main(40%) + trail(55%) + preview(5%)
- :flow-intake → full-width intake canvas
- :flow-run → full-width run/review canvas
- :editor → full-width standalone editor

Pane descriptors carry :pane/id, :role, :artifact-ref, :content,
:width-pct — enough for consumers to compose layout from data
instead of hardcoded branches.
Phase 3A: Pane descriptors derived in !effective-local-world.
Phase 3B: Split semantics — :split field describes co-presence arrangement.
Phase 3C: Workflow entry/exit as workspace actions — enter-workflow!,
exit-workflow! coordinate substrate consequences. :bootstrapping treated
as flow-active so /bootstrap failure stays in workflow context.

Consumer migration (Codex): all 8 consumer files now read mode, pane
widths, and layout branching from !effective-local-world instead of
raw flow-canvas-active?/!current-file checks:
- shell.cljs: build-file-layout reads pane widths from descriptors
- render.cljs: world snapshot watches !effective-local-world
- editor_compute.cljs: rect mode from local-world semantics
- combined_text.cljs: text ops, status bar, agent panel from local-world
- cmd_panel.cljs: command panel visibility from local-world
- keyboard.cljs: escape, toggle, focus-pane use local-world
- scroll.cljs: wheel routing uses local-world mode + pane widths
- mouse.cljs: drag-select, click routing, hit testing from local-world

Helper fns: local-world-mode, local-world-flow?, local-world-intake?,
local-world-run?, local-world-file-workspace?, pane-descriptor,
pane-width-pct.
…path

Phase 4A: classify editor events — committed (char, backspace, delete,
enter, paste, cut, tab) vs ephemeral (navigation, copy, undo/redo).

Phase 4B: wire direct committed path through Rama + measure latency.
Editor updates locally first (zero user latency), then fire-and-forget
to Rama in background.

Measurement result: avg 7.5ms, p95 ~13ms, max 20.7ms.
Server (Rama write): 4-5ms. Network (localhost): 2-4ms.
Well under the 50ms viability threshold (6x margin).

Decision: direct committed editing through Rama is the architecture.
No hybrid model, no local-until-save, no batching needed.
Review fixes for Phase 4B:
- :undo/:redo reclassified as committed (they change document content)
  and now fire save-editor-doc! to Rama
- :cut now fires save-editor-doc! (was missing)
- Raw DOM paste handler now fires save-editor-doc! (was bypassing
  the keyboard handler's Rama path)
- :fold/:unfold docstring clarified: committed but persisted via
  !folded-lines (per-file), not !editor-doc — deferred to Phase 7
tree->rects now carries :id from source nodes for keyed identity.
New keyed-diff-update-pool! manages slots by identity: allocate for
new IDs, update changed rects, free removed IDs — same lifecycle as
e/for-by but in pure Missionary context.

Measurement result (sidebar with 50-300 items):
- Hover (1 write): 0.1-0.3ms
- File select (2 writes): 0.2-0.5ms
- Dir expand (30+ new rects): 0.7-0.9ms
- Dir collapse (21 frees): 0.5ms
- All cases: O(changed), not O(total)

Gate passed: per-slot keyed-diff approach is viable for Phase 6.
…e 7)

Phase 7: persist selected-artifact, active-pane, sidebar-visible to Rama.
Reload restores coherent workspace state.

- $$workspace-truth-pstate + :workspace/save-truth topology
- Server atom mirror, Electric bridge, HTTP endpoint, client emit
- Debounced persist (16ms) prevents intermediate states from
  sequential atom mutations in workspace actions
- Restore uses ws/set-active-pane! to sync focus + caret (not raw reset!)
- Clears !current-file on non-file/nil artifact restore
- !sidebar-visible initialized from workspace truth BEFORE
  install-sidebar-watch!, so hidden sidebar stays hidden on reload
- File read error (including >1MB) rolls back selection in all three
  layers: local atoms, committed sidebar truth, workspace truth
…dirty-present)

Phase 6A: Editor rects differential — ordered-diff-update-pool! with stable :id/:z
Phase 6B: Region-split text buffers — content vs chrome flows, cursor-only isolation
Phase 6C: Per-source shadow pools — editor and sidebar shadows in separate pools
Phase 6D: Handle-checked API + gpu-mount — generation counters, Electric mount contract
Phase 6E: Dirty-present strategy — one-shot RAF, persistent render target, scissor + clear-quad

Buffer pool generalized: configurable floats-per-item + pack-fn (rects=28, shadows=20).
…on, centralize scroll reset

Remove 8 unused PStates from Rama topology (nodes, dg-nodes, dg-edges,
dg-pages, components, node-ids, node-ids-inview, dg-node-ids) and their
associated topology cases, foreign handles, dead writer functions, and
HTTP/Roam/task-global helpers from objects.cljc.

Fix settings panel hint text truncation (:to 38 on 42-char string) by
using (count str) instead of hardcoded bounds. Centralize detail-scroll-y
reset via add-watch on !flow-state so all selection paths (mouse, keyboard,
/flow-select) are covered. Remove 8 high-frequency debug console.log calls
from scroll consumer.
GPU memory observability module (gpu_budget.cljs) that tracks WebGPU
buffer/texture allocations by subsystem with console-first reporting.
Buffer pool wired with tracker params. Viewport resize uses
window.innerWidth fallback for reliable dimensions. Dev server
gets request/response logging.
Slug shaders (analytical Bezier curve rendering) for resolution-independent
text at any zoom level. Font manifest drives asset loading with per-font
backend selection (MSDF or slug). DejaVu Sans Mono added as default font
with slug data. Renderer refactored: font-assets map replaces separate
atlas/bitmap params, backend dispatch in shape-text and init-text-system.
GPU budget integration across renderer, render consumer, and runtime state.
@sid597 sid597 merged commit e16df8d into main Apr 7, 2026
1 check failed
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.

2 participants