1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
//! Top-level app state and the render entry points.
//!
//! [`Args`] is the bare binary's own interface; [`AppModel`] is what one
//! running yog holds of its derivation, and since
//! bl-ee0a that is deliberately very little: the `ui.json` document ([`UiState`]
//! — durable pins/collapsed/seen, written through at the gesture), the
//! per-instance [`Focus`] (RAM, §13.1), and an `Arc<`[`Snapshot`]`>` — the
//! latest *completed* derivation. Rendering reads that snapshot and nothing
//! else.
//!
//! **The frame derives nothing** (§7.2). Enumeration, the watchers, the dirty
//! routing, both sweeps, every `GitTree` re-derivation, the ball and ops
//! fetches and the liveness probes all live on [`Deriver`], which one
//! [`Worker`](derive::worker::Worker) thread drives. The frame's per-frame duty
//! is [`AppModel::refresh`]: take the newest snapshot if there is one, adopt an
//! externally-changed `ui.json`, hold the §6 acknowledgement. When the frame
//! *causes* a change (a dispatched verb, a toggled filter) it says so by
//! marking the affected root dirty — the same vocabulary the watchers use, so
//! there is one path into the derivation and no request channel beside it.
//!
//! The impl is split for the 300-line budget: [`derive`] holds the worker's
//! pass, [`focus`] the tab-bar / conversation / attention / seen-acknowledgement
//! surface, [`view`] the read surface a frame paints.
/// **Founding the model, and the one signal it sends the worker** (§7.2) — the
/// pair a caller gets, the first derivation taken synchronously, and
/// [`AppModel::mark_dirty`]. Split off this root at §12's budget on the seam
/// the doc above already draws: what a frame *owns* is declared here, how it is
/// brought into being and how it talks to the worker is there.
/// The model's read surface (§7.2) — split from this root at the cap.
use crateWorkspace;
use crateRootKind;
use crate;
use crate;
use Parser;
use PathBuf;
use Arc;
pub use Cadence;
pub use Deriver;
pub use Worker;
/// The §7.2 instrumentation lines the `workspaces` answer carries (bl-b4b5):
/// how late the derivation is, and what grew in it. Re-exported here because
/// the boundary says them and this module derives them — one wording, read at
/// the chokepoint rather than restated for a seat.
pub use stale_label;
pub use Roots;
/// The §3.1 enumeration standing in for the derivation's cached copy at the
/// boundary's intake (bl-6c9e) — re-exported here because the engine builds a
/// gesture's environment with it and this module owns the derivation.
pub use addressable;
pub use growth_label;
pub use ;
/// **The bare binary's own interface: a name, a version, and no flags**
/// (bl-7942). It carried `--workspace`, the window's startup focus, and the
/// focus went with the window (REMOTE §7). It stays a clap type so `--version`
/// and the top-level `--help` header are rendered from the manifest rather
/// than typed — the roster under that header is [`multiplex::help::COMMANDS`],
/// which is where every verb yog answers to actually lives.
/// **What one running yog holds of its own derivation** (§15 Y11, §7.2 as
/// rewritten by bl-ee0a): the roots, the durable `ui.json`, and an
/// `Arc<`[`Snapshot`]`>` — the latest *completed* derivation. Everything that
/// keeps it fresh belongs to [`Deriver`] on another thread.
///
/// It was *what a frame owns* until bl-7942, and the fields that left were all
/// one seat's: the focus, the optimistic echo folded over the derivation for
/// paint, the window's wire channels, its follow lane and its act path. What a
/// seat is looking at, and what it has fired and not yet heard back about, are
/// the seat's own (REMOTE §7, §12) and cross the boundary as gestures.
/// The roots the model watches (§7.1): every enumerated workspace, the three
/// enumeration roots (the flat names root, litany workspaces + replays), and the
/// yog state root. Missing roots are tolerated —
/// [`WatchSet::reconcile`](crate::watch::WatchSet::reconcile) skips one that fails to arm.