Skip to content

RFCs

RFCs (Request for Comments) are design documents that describe significant changes to the Modality library. They capture the motivation, design, and alternatives for architectural decisions — both proposed and already implemented.

RFCSummary
Session ClipboardStandardize cut/copy/paste at the Session level with cross-reducer and cross-modality support
Document ModalityDocument modality, DocumentComponent trait, PropertyType::Prose, Chat/Generate split, persistence renames, prose crate restructuring
Selection TraitStandardize selection and focus as traits, consumed by clipboard, AI, and undo
Layout AbstractionLayout as embedded Reducer + Component, Loro-backed children, AutoGrid spatial engine, LayoutKind (homo/hetero), lock/unlock, same-kind lossless coercion
Collaborative PresenceSync ephemeral state (selection, focus, cursors) across peers using Loro EphemeralStore
LangFuse ObservabilityAI observability via LangFuse at the AI Gateway level, with trace context headers for session/user/hierarchy grouping
Table ComponentTable as standalone Component + Reducer with taffy CSS Grid layout and per-cell rich text, integrates with Whiteboard (NativeElement) and Document Modality (block stream)
Nested Toolbar ContextStacked toolbar context system with session-level dispatch routing, trait-based blanket impls, and tupled schema+value entries
Modality ThemeTyped Theme struct on modality-core with PropertyBinding::Theme variant, macro-generated ThemeUpdate, and SetTheme intent for consistent default styling across all modalities
Component CoercionSchema-overlap-based component coercion — lossless property-preserving swaps between compatible components, with LayoutType as shape-only definition

None currently — all accepted RFCs have been implemented.

RFCSummary
Typed Component PropertiesReplace stringly-typed property maps with macro-generated typed structs for schema definition, compile-time extraction, and binding construction
Schema-Driven ToolbarAuto-generate component toolbars from PropertySchema + PropertyValue, replacing hardcoded per-element toolbar widgets
AutoGrid ReducerOrder-based CSS Grid layout engine in Rust using Taffy, with configurable axes, alignment, auto-flow, and drag/resize lifecycle
Session Undo/RedoStandardize undo/redo at the Session level with configurable grouping boundaries
Embedded Prose ReducerReplace opaque prose_bytes with live LoroText + HashMap<String, Prose> on WhiteboardEphemeral
Typed Element ComponentsReplace single WhiteboardElementComponent + JSON blob with per-element-type Components and real property bindings
Typed Reducer ErrorsPer-reducer type Error with From bound on Feedback, Effect::error() / Tx::error() sugar, composable SessionError<E> / ParentSessionError<E, ChildE>
Runtime StructRuntime<R> container, returned Effect values (Elm/Iced model), SessionState<M> extraction
Slot Hot/ColdLazy child session loading via two-state Slot enum
Markdown-Prefix ProseReplace Quill Delta with markdown prefixes in LoroText
  1. Create a new file in docs/src/content/docs/rfcs/proposals/short-name.md
  2. Fill in the sections — Summary, Motivation, Design, Alternatives, Unresolved Questions
  3. Add status: draft to the frontmatter
  4. Open a PR — discussion happens on the PR itself
  5. When status changes, update the status: field (draftacceptedimplemented) and this index