CharDesk Docs

Algorithm Routes

Project-specific computation invariants, authorities, and evidence.

HEAD a63778e

Load the invariant that selects the implementation and nearest deterministic test:

ConcernProject invariantAuthority and evidence
ANSI/Unicode text and Canvas cellsThis is the LLM–human communication boundary; syntax, cell layout, Canvas adaptation, and serialization form one semantic round trip.LLM–Human Text Protocol
Canvas coordinates@chardesk/rendering owns Cell/viewport projection. Anchored zoom preserves the screen anchor; host snapping resolves a wide grapheme to its leading cell.viewport.ts, coordinates.ts, and canvas-coordinates.test.ts
Frame and render schedulingOne scheduler coalesces keyed work and unions layer invalidation bits. Render inputs invalidate only the affected background, scratch, or overlay layer.FrameScheduler.ts, CanvasRenderManager.ts, scheduler tests, and render tests
Camera and edge scrollThe camera owns imperative viewport queues, constraints, and animation cancellation. Fit consumes viewport insets; eligible edge drag pans through the shared frame scheduler after its delay.CanvasCameraManager.ts, CanvasEdgeScrollManager.ts, camera tests, and edge-scroll tests
Static-grid selection@chardesk/cell-core owns range normalization, row spans, clipping, and Cell-footprint expansion. The Selection domain owns active-cell and product transitions.range.ts, static-grid.ts, and staticGridModel.test.ts
Static-grid text inputA local input session owns its explicit origin. Enter and bounded wrapping return to that column; Cell content never implies a line or paragraph.static-grid-input-session.ts and staticGridInputSession.test.ts
Static-grid deletionOne directional delete plan resolves Range priority, Cell targets, wide-grapheme anchors, and finite bounds. Canvas applies the plan as one document mutation and interaction transition.static-grid-deletion.ts and staticGridDeletionCommands.test.ts
Slide deck and boundsSizes use positive integer columns and rows. Grid normalization canonicalizes, deduplicates, sorts, and removes overflow; resize reports and crops cells outside the new finite bounds.grid.ts, deck.ts, and slides.test.ts
Retired Structured inputLegacy nodes are decoded and rendered once into deterministic CellPlane entries. No scene identity, layer behavior, or collaboration contract survives migration.migrateLegacyStructuredDocument.ts and its nearest migration test

Canvas/Yjs mutation, projection, history, and persistence direction remain owned by State and data flows.