docs: add docs-as-code process and one ADR per feature
docs/docs-as-code.md defines the workflow; docs/adr holds 31 ADRs (retroactive, reconstructed from code and changelog) with a template and index. docs/check-docs.sh validates ADR structure, index, cited code paths, relative links and CLAUDE.md/AGENTS.md sync.
This commit is contained in:
1 parent
ce8d777c63
commit
b292590cdc
36 files changed
+987
No files matched your search
@@ -0,0 +1,25 @@
|
||||
# 0020. A single ViewModel split into partial classes by feature
|
||||
|
||||
- **Status:** Accepted
|
||||
- **Area:** UI
|
||||
- **Recorded:** 2026-11-03 (retroactive: reconstructed from code, comments and changelog)
|
||||
|
||||
## Context
|
||||
|
||||
The UI is one `MainView` with many overlays sharing wallet, sync and connection state; many small ViewModels would need heavy cross-wiring.
|
||||
|
||||
## Decision
|
||||
|
||||
Use one `MainWindowViewModel` (CommunityToolkit.Mvvm: `[ObservableProperty]`, `[RelayCommand]`) that drives `Core` directly, split into partial classes by feature (`.Send`, `.Receive`, `.Sync`, `.Settings`, `.Wizard`, `.Contacts`, `.Update`, `.WalletInfo`, `.Donate`). New feature logic goes into the matching partial or a new one.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Shared state needs no messaging layer.
|
||||
- The class is large; discipline on partial boundaries is what keeps it navigable.
|
||||
- Heavy network work must run off the UI thread (`Task.Run`).
|
||||
|
||||
## References
|
||||
|
||||
- `src/App/ViewModels/MainWindowViewModel.cs`
|
||||
- `src/App/ViewModels/MainWindowViewModel.Send.cs`
|
||||
- `src/App/ViewModels/MainWindowViewModel.Sync.cs`
|
||||
Reference in new issue
Block a user