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.
| RFC | Summary |
|---|---|
| Session Clipboard | Standardize cut/copy/paste at the Session level with cross-reducer and cross-modality support |
| Document Modality | Document modality, DocumentComponent trait, PropertyType::Prose, Chat/Generate split, persistence renames, prose crate restructuring |
| Selection Trait | Standardize selection and focus as traits, consumed by clipboard, AI, and undo |
| Layout Abstraction | Layout as embedded Reducer + Component, Loro-backed children, AutoGrid spatial engine, LayoutKind (homo/hetero), lock/unlock, same-kind lossless coercion |
| Collaborative Presence | Sync ephemeral state (selection, focus, cursors) across peers using Loro EphemeralStore |
| LangFuse Observability | AI observability via LangFuse at the AI Gateway level, with trace context headers for session/user/hierarchy grouping |
| Table Component | Table 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 Context | Stacked toolbar context system with session-level dispatch routing, trait-based blanket impls, and tupled schema+value entries |
| Modality Theme | Typed Theme struct on modality-core with PropertyBinding::Theme variant, macro-generated ThemeUpdate, and SetTheme intent for consistent default styling across all modalities |
| Component Coercion | Schema-overlap-based component coercion — lossless property-preserving swaps between compatible components, with LayoutType as shape-only definition |
Accepted
Section titled “Accepted”None currently — all accepted RFCs have been implemented.
Implemented
Section titled “Implemented”| RFC | Summary |
|---|---|
| Typed Component Properties | Replace stringly-typed property maps with macro-generated typed structs for schema definition, compile-time extraction, and binding construction |
| Schema-Driven Toolbar | Auto-generate component toolbars from PropertySchema + PropertyValue, replacing hardcoded per-element toolbar widgets |
| AutoGrid Reducer | Order-based CSS Grid layout engine in Rust using Taffy, with configurable axes, alignment, auto-flow, and drag/resize lifecycle |
| Session Undo/Redo | Standardize undo/redo at the Session level with configurable grouping boundaries |
| Embedded Prose Reducer | Replace opaque prose_bytes with live LoroText + HashMap<String, Prose> on WhiteboardEphemeral |
| Typed Element Components | Replace single WhiteboardElementComponent + JSON blob with per-element-type Components and real property bindings |
| Typed Reducer Errors | Per-reducer type Error with From bound on Feedback, Effect::error() / Tx::error() sugar, composable SessionError<E> / ParentSessionError<E, ChildE> |
| Runtime Struct | Runtime<R> container, returned Effect values (Elm/Iced model), SessionState<M> extraction |
| Slot Hot/Cold | Lazy child session loading via two-state Slot enum |
| Markdown-Prefix Prose | Replace Quill Delta with markdown prefixes in LoroText |
Proposing an RFC
Section titled “Proposing an RFC”- Create a new file in
docs/src/content/docs/rfcs/proposals/short-name.md - Fill in the sections — Summary, Motivation, Design, Alternatives, Unresolved Questions
- Add
status: draftto the frontmatter - Open a PR — discussion happens on the PR itself
- When status changes, update the
status:field (draft→accepted→implemented) and this index