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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
//! **The asker**: one pass over the standing question set.
//!
//! The questions nest. Every channel is asked for its own roster — and, while
//! the decision queue is open, for what is asking on it (bl-f0ef), and, while
//! the trail is open, for what has crossed its boundary (bl-4c48) — which is
//! what makes all three a **union across channels**, composed here
//! rather than anywhere on the wire. The aimed wall is asked for its
//! conversations, and — while the tuning pane is open on it — for what its
//! roles are set to, and — while the login pane is open on it — for what it
//! can sign in to (bl-e3c5). The selected conversation is asked for its
//! transcript,
//! and — while the records pane is open on it — for its steps, its worktree's
//! files (bl-2cf7), its spine and the config commit governing it (bl-b52c),
//! and the wall's lineages a workflow mark can name (bl-ed20).
//!
//! **The roles read is standing rather than one-shot**, which is what lets
//! every control on that pane state the engine's fact instead of this end's
//! prediction: a tuning act is composed, sent, and read back on the next beat.
//! A pane that wrote its own row would be holding a second opinion about a file
//! it does not own, and the three writes go through a `litany config` that can
//! refuse.
//!
//! **A channel that will not answer costs only itself.** Each leg reports its
//! own outcome, so a box holding three channels with one engine down still gets
//! the two that are up — REMOTE §8.2's *"a refusal is one entry's, never the
//! set's"*, one layer above the file it was written about.
use Path;
use Value;
use down;
/// The questions that name one workspace, asked of the aimed wall.
use crate;
use crateChannel;
/// Ask everything the last frame said to ask — the selected conversation's
/// reads first, then the questions about every channel, then the rest of the
/// focus.
///
/// **Split in two at the design-time budget on the seam the module's own doc
/// draws** (bl-5c53): [`fanned`], once per channel, is the reads whose subject
/// is *every channel this box holds*, and [`focused`] is the nest under the aim. One
/// grows when a channel-wide op lands a pane; the other when a pane about a
/// focus does.
///
/// **That seam is the wire's own** ([`crate::verbs::Verb::addresses_a_workspace`]):
/// a question with no workspace field has no way to name a channel, so it goes
/// down every one and the pane is the union; a question with one goes down the
/// aimed wall's alone. A pane that asks at BOTH widths therefore appears in
/// both halves — which is a fact about its four ops rather than a special case
/// (`crate::ui::board`, DESIGN §4.31).
///
/// **A selection is answered at the next leg, not at the next pass** (bl-1f22).
/// Selecting a conversation empties its transcript, and over a dialed wire one
/// pass of roster fans is seconds — so a selection that waited its turn showed
/// an empty pane for all of them. Before every leg the pass re-reads the
/// standing set, and a selection it has not asked about yet is asked about
/// then, down the one channel it names. The pass's own first leg is the same
/// rule with nothing asked so far, which is what puts the selection's reads
/// ahead of the fan; no leg is skipped for it, so the sweep still visits every
/// channel.
/// **The selection this pass has asked about**: the channel and wall it is on,
/// and its id. A pair rather than the id alone, because a selection moves when
/// either half does.
type Asked = ;
/// **Ask the selection's reads if the selection has moved since `asked`**,
/// and answer what is now asked about.
///
/// The standing set is read fresh here rather than taken from the pass's start:
/// it is the whole of how a click made mid-pass is seen before the pass ends.
/// **The nest under the aim**: the aimed wall's questions and the panes keyed
/// on it — [`wall`]'s. The selected conversation's are [`caught_up`]'s.
/// **The questions that name no workspace**, asked of one channel — the caller
/// asks them of every channel this box holds, which is what makes each pane
/// above the union.
/// **A question addressed at a WORKSPACE**, which is the ordinary path: the
/// envelope carries the address the roster handed out, and
/// [`route`](crate::seat::route) resolves it over this box's entries and
/// rewrites it to the host's spelling at the one place that mapping is spent.
pub
/// **A read's failure is the channel's own relationship**, whichever leg
/// produced it, and it says nothing about whether the request crossed:
/// re-asking is free (REMOTE §3: *"a read is answered in place, and asking
/// twice is asking once"*), so a standing question needs no arm for a fact it
/// would do nothing with. The whole set is asked again on the next beat.
pub