Skip to content

docs: add TUI architecture design doc (R27)#104

Merged
stormer78 merged 2 commits into
mainfrom
r27-tui-architecture-doc
Jun 12, 2026
Merged

docs: add TUI architecture design doc (R27)#104
stormer78 merged 2 commits into
mainfrom
r27-tui-architecture-doc

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

What

Adds docs/design/tui-architecture.md — a one-page navigational map of the ratatui TUI for new contributors.

Covers:

  • The data-flow loop — UI emits Action over an mpsc channel → the StateHandler select! loop is the single mutator of State/ConfigState is published over a watch channel the UI renders from.
  • Key handling vs. business logic — UI pages translate KeyEvents into Actions (no Config/VTA/DIDComm access); the StateHandler and its dispatch modules own mutation.
  • The state_handler/ module layout — a table of each module's responsibility, noting protocol logic lives in openvtc-core/src/messaging.rs and MessageType in openvtc-core/src/lib.rs.
  • Off-loop work — the background-dispatch pattern (DispatchDomain/InFlight/DispatchOutcome/apply_outcome) and coalesced persistence (save_coalesce.rs, mark_dirty).
  • Three recipes — add a keybinding, add an Action, add a message type — each naming the files to edit in order.

Every file reference was grounded by reading the actual code; no code changes.

🤖 Generated with Claude Code

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>
@stormer78 stormer78 requested a review from a team as a code owner June 12, 2026 02:09
@stormer78 stormer78 merged commit a025d1c into main Jun 12, 2026
11 of 13 checks passed
@stormer78 stormer78 deleted the r27-tui-architecture-doc branch June 12, 2026 02:10
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.

1 participant