docs: add TUI architecture design doc (R27)#104
Merged
Conversation
Add `docs/design/tui-architecture.md`: a one-page navigational guide to the ratatui TUI. Covers the single-mutator data flow (UI emits `Action` over an mpsc channel → the `StateHandler` loop is the sole mutator of `State` → `State` published over a `watch` channel the UI renders from), where key handling lives vs. business logic, the `state_handler/` dispatch-module layout, the background-dispatch pattern (`DispatchDomain`/`InFlight`/`DispatchOutcome`/`apply_outcome` + coalesced `save_coalesce.rs`), and three contributor recipes — add a keybinding, add an Action, add a message type — each naming the files to edit in order. Every file reference is grounded by reading the actual code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
docs/design/tui-architecture.md— a one-page navigational map of the ratatui TUI for new contributors.Covers:
Actionover an mpsc channel → theStateHandlerselect!loop is the single mutator ofState/Config→Stateis published over awatchchannel the UI renders from.KeyEvents intoActions (noConfig/VTA/DIDComm access); theStateHandlerand its dispatch modules own mutation.state_handler/module layout — a table of each module's responsibility, noting protocol logic lives inopenvtc-core/src/messaging.rsandMessageTypeinopenvtc-core/src/lib.rs.DispatchDomain/InFlight/DispatchOutcome/apply_outcome) and coalesced persistence (save_coalesce.rs,mark_dirty).Every file reference was grounded by reading the actual code; no code changes.
🤖 Generated with Claude Code