cornfield 0.36.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,13 +33,13 @@
33
33
  </button>
34
34
 
35
35
  <!-- The View switch: one of the three is on (aria-pressed); Fit is the small button at its end -->
36
- <div class="hx-view" role="group" aria-label="View">
37
- <button type="button" id="preset-map-btn" class="hx-view-btn" data-action="preset-map" aria-pressed="true" title="The map: every node, in its place">Map</button>
36
+ <div class="hx-view" role="group" aria-label="View" data-corn="view-switch">
37
+ <button type="button" id="preset-map-btn" class="hx-view-btn" data-corn="preset-map" data-action="preset-map" aria-pressed="true" title="The map: every node, in its place">Map</button>
38
38
  <!-- The data-flow preset: browser -> servers -> API -> tables -> services -> outside, animated -->
39
39
  <button type="button" id="preset-dataflow-btn" class="hx-view-btn" data-action="preset-dataflow" aria-pressed="false" data-corn-string="dataFlow" title="Show only how data moves: browser, app servers, API, tables, services, outside systems" data-corn="preset-dataflow">Flow</button>
40
40
  <!-- The House preset (explorer/house.js, spec 0029): the floor plan with its devices, machines and people, the software around it -->
41
41
  <button type="button" id="preset-house-btn" class="hx-view-btn" data-action="preset-house" aria-pressed="false" data-corn-string="house" title="Show the house: each floor's rooms with their devices and machines, the people beside it, the software around it" data-corn="preset-house">House</button>
42
- <button type="button" id="fit-btn" class="hx-view-fit" data-action="fit" title="Fit to the screen" aria-label="Fit to the screen" data-corn-kind="icon">
42
+ <button type="button" id="fit-btn" class="hx-view-fit" data-corn="fit-button" data-action="fit" title="Fit to the screen" aria-label="Fit to the screen" data-corn-kind="icon">
43
43
  <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M2 6V2h4M10 2h4v4M14 10v4h-4M6 14H2v-4" /></svg>
44
44
  </button>
45
45
  </div>
@@ -50,7 +50,7 @@
50
50
 
51
51
  <!-- Interactive section toggles and the legend -->
52
52
  <div id="legend-dropdown" class="hx-menu glass" hidden data-corn="layers-menu">
53
- <div class="hx-menu-title hx-menu-head">
53
+ <div class="hx-menu-title hx-menu-head" data-corn="menu-title">
54
54
  <span>Section Toggles</span>
55
55
  <span class="hx-menu-links">
56
56
  <button type="button" class="hx-textbtn hx-textbtn--accent" data-action="layers-all" data-corn-kind="quiet">All</button>
@@ -58,38 +58,38 @@
58
58
  <button type="button" class="hx-textbtn" data-action="layers-none" data-corn-kind="quiet">None</button>
59
59
  </span>
60
60
  </div>
61
- <p id="layers-preset-note" class="hx-note" hidden>The data-flow view shows its own tiers and ignores these toggles. Switch it off to use them.</p>
61
+ <p id="layers-preset-note" class="hx-note" data-corn="notice" hidden>The data-flow view shows its own tiers and ignores these toggles. Switch it off to use them.</p>
62
62
  <div id="layer-toggles-container" class="hx-toggles"></div>
63
63
  <div id="flow-legend" hidden></div>
64
- <div id="cloud-legend" class="hx-menu-section" hidden></div>
64
+ <div id="cloud-legend" class="hx-menu-section" data-corn="menu-section" hidden></div>
65
65
 
66
66
  <!-- What the marks of agent runs mean, while there are runs on the map (runs-map.js) -->
67
- <div id="runs-legend" class="hx-menu-section" hidden>
68
- <div class="hx-menu-title"><span>Agent runs</span></div>
67
+ <div id="runs-legend" class="hx-menu-section" data-corn="menu-section" hidden>
68
+ <div class="hx-menu-title" data-corn="menu-title"><span>Agent runs</span></div>
69
69
  <div class="hx-legend-row"><span class="hx-run-swatch hx-run-swatch--flight" aria-hidden="true"></span><span>In flight: a pulsing ring (still under reduced motion)</span></div>
70
70
  <div class="hx-legend-row"><span class="hx-run-swatch hx-run-swatch--collision" aria-hidden="true"></span><span>Collision: dashed ring, ⚠ and the words, where two open runs change one node</span></div>
71
71
  </div>
72
72
 
73
73
  <!-- What a proposal's marks mean, while one is open (proposal.js) -->
74
- <div id="proposal-legend" class="hx-menu-section" hidden>
75
- <div class="hx-menu-title"><span>Proposal marks</span></div>
76
- <div class="hx-legend-row"><span class="hx-mark-dot hx-mark-dot--added"></span><span>Added: dashed ring</span></div>
77
- <div class="hx-legend-row"><span class="hx-mark-dot hx-mark-dot--changed"></span><span>Changed: solid ring</span></div>
78
- <div class="hx-legend-row"><span class="hx-mark-dot hx-mark-dot--removed"></span><span>Removed: faded ring, label struck through</span></div>
79
- <div class="hx-legend-row"><span class="hx-mark-dot hx-mark-dot--edit"></span><span>Your edit: dotted ring</span></div>
74
+ <div id="proposal-legend" class="hx-menu-section" data-corn="menu-section" hidden>
75
+ <div class="hx-menu-title" data-corn="menu-title"><span>Proposal marks</span></div>
76
+ <div class="hx-legend-row"><span class="hx-mark-dot hx-mark-dot--added" data-corn="mark-dot" data-corn-state="added"></span><span>Added: dashed ring</span></div>
77
+ <div class="hx-legend-row"><span class="hx-mark-dot hx-mark-dot--changed" data-corn="mark-dot" data-corn-state="changed"></span><span>Changed: solid ring</span></div>
78
+ <div class="hx-legend-row"><span class="hx-mark-dot hx-mark-dot--removed" data-corn="mark-dot" data-corn-state="removed"></span><span>Removed: faded ring, label struck through</span></div>
79
+ <div class="hx-legend-row"><span class="hx-mark-dot hx-mark-dot--edit" data-corn="mark-dot" data-corn-state="edit"></span><span>Your edit: dotted ring</span></div>
80
80
  </div>
81
81
 
82
- <div class="hx-menu-section">
83
- <div class="hx-menu-title">
82
+ <div class="hx-menu-section" data-corn="menu-section">
83
+ <div class="hx-menu-title" data-corn="menu-title">
84
84
  <span>Connections</span>
85
85
  <span class="hx-faint hx-mono">Click node to focus</span>
86
86
  </div>
87
87
  <div class="hx-legend-row hx-legend-row--split">
88
- <span class="hx-legend-label"><span class="hx-swatch-line hx-swatch-solid"></span>Solid</span>
88
+ <span class="hx-legend-label"><span data-corn="swatch" class="hx-swatch-line hx-swatch-solid"></span>Solid</span>
89
89
  <span class="hx-faint hx-mono">Parent-Child / Hub</span>
90
90
  </div>
91
91
  <div class="hx-legend-row hx-legend-row--split">
92
- <span class="hx-legend-label"><span class="hx-swatch-line hx-swatch-dashed hx-swatch-indigo"></span>Dotted</span>
92
+ <span class="hx-legend-label"><span data-corn="swatch" class="hx-swatch-line hx-swatch-dashed hx-swatch-indigo"></span>Dotted</span>
93
93
  <span class="hx-faint hx-mono">Usage &amp; Dependency</span>
94
94
  </div>
95
95
  </div>
@@ -99,7 +99,7 @@
99
99
  <!-- The live layer's chip (explorer/live.js, spec 0029): shown once a live layer is on; a dot on a phone, its line on tap -->
100
100
  <div id="live-wrap" class="hx-menu-wrap hx-live" data-tone="idle" hidden>
101
101
  <button type="button" id="live-chip" class="hx-btn hx-live-chip" aria-haspopup="true" aria-expanded="false" aria-label="Live layer" data-corn="live-chip">
102
- <span class="hx-live-chip-dot" aria-hidden="true"></span>
102
+ <span class="hx-live-chip-dot" data-corn="live-dot" aria-hidden="true"></span>
103
103
  <span id="live-chip-text" class="hx-only-wide hx-live-chip-text"></span>
104
104
  </button>
105
105
  <div id="live-menu" class="hx-menu hx-menu--live glass" role="status" hidden data-corn="live-menu"></div>
@@ -108,14 +108,14 @@
108
108
 
109
109
  <div class="hx-header-right">
110
110
  <!-- Search: a field with its key hint on a desktop; an icon that opens the search bar on a phone -->
111
- <button type="button" id="mobile-search-toggle" class="hx-hdr-icon hx-only-mobile" data-action="toggle-mobile-search" aria-label="Open Search" title="Search nodes" data-corn-kind="icon">
111
+ <button type="button" id="mobile-search-toggle" class="hx-hdr-icon hx-only-mobile" data-corn="mobile-search-button" data-action="toggle-mobile-search" aria-label="Open Search" title="Search nodes" data-corn-kind="icon">
112
112
  <svg viewBox="0 0 16 16" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="7" cy="7" r="4.5" /><path d="M10.5 10.5L14 14" /></svg>
113
113
  </button>
114
114
 
115
115
  <div class="hx-search" role="search" data-corn="search">
116
116
  <svg class="hx-search-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="7" cy="7" r="4.5" /><path d="M10.5 10.5L14 14" /></svg>
117
117
  <input type="text" id="node-search" class="hx-search-input" placeholder="Search..." data-corn-string-placeholder="searchPlaceholder" aria-label="Search nodes" aria-keyshortcuts="/" data-corn="search-input" />
118
- <kbd class="hx-kbd" aria-hidden="true">/</kbd>
118
+ <kbd class="hx-kbd" data-corn="search-key" aria-hidden="true">/</kbd>
119
119
  <div id="search-status" class="hx-search-status" role="status" aria-live="polite" data-corn="search-status"></div>
120
120
  </div>
121
121
 
@@ -128,20 +128,20 @@
128
128
  <!-- The one account menu (explorer/account-menu.js): who, Theme, Freeform layout, Review tokens, Proposals, the links, Sign out, and what powers it -->
129
129
  <div class="hx-menu-wrap hx-account">
130
130
  <button type="button" id="account-btn" class="hx-account-btn" aria-expanded="false" aria-controls="account-menu" aria-label="Account menu" data-corn="account-button">
131
- <span id="account-initial" class="hx-avatar" aria-hidden="true"></span>
131
+ <span id="account-initial" class="hx-avatar" data-corn="avatar" aria-hidden="true"></span>
132
132
  <svg class="hx-account-caret" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M4 6l4 4 4-4" /></svg>
133
133
  </button>
134
134
 
135
135
  <div id="account-menu" class="hx-menu hx-account-menu glass" hidden data-corn="account-menu">
136
- <p id="account-who" class="hx-account-who" hidden></p>
136
+ <p id="account-who" class="hx-account-who" data-corn="account-who" hidden></p>
137
137
 
138
- <div class="hx-account-row">
138
+ <div class="hx-account-row" data-corn="account-row">
139
139
  <span id="theme-label" class="hx-account-label">Theme</span>
140
140
  <!-- System, Dark or Light (theme.js keeps aria-pressed) -->
141
141
  <div class="hx-account-seg" role="group" aria-labelledby="theme-label" data-corn="theme-toggle">
142
- <button type="button" class="hx-account-seg-btn" data-action="set-theme" data-choice="system" aria-pressed="true">System</button>
143
- <button type="button" class="hx-account-seg-btn" data-action="set-theme" data-choice="dark" aria-pressed="false">Dark</button>
144
- <button type="button" class="hx-account-seg-btn" data-action="set-theme" data-choice="light" aria-pressed="false">Light</button>
142
+ <button data-corn="theme-option" type="button" class="hx-account-seg-btn" data-action="set-theme" data-choice="system" aria-pressed="true">System</button>
143
+ <button data-corn="theme-option" type="button" class="hx-account-seg-btn" data-action="set-theme" data-choice="dark" aria-pressed="false">Dark</button>
144
+ <button data-corn="theme-option" type="button" class="hx-account-seg-btn" data-action="set-theme" data-choice="light" aria-pressed="false">Light</button>
145
145
  </div>
146
146
  </div>
147
147
  <!-- The named themes of the config (`theme.names`): filled and shown by explorer/theme-names.js; hidden when there are none -->
@@ -149,7 +149,7 @@
149
149
 
150
150
  <button type="button" id="freeform-toggle-btn" class="hx-account-item" role="switch" aria-checked="false" data-action="toggle-freeform" title="Drag nodes anywhere, instead of the orbit that clusters them by parent" data-corn="layout-toggle">
151
151
  <span>Freeform layout</span>
152
- <span class="hx-switch" aria-hidden="true"></span>
152
+ <span class="hx-switch" data-corn="switch" aria-hidden="true"></span>
153
153
  </button>
154
154
  <button type="button" id="reset-positions-btn" class="hx-account-item hx-account-item--sub" data-action="reset-positions" title="Put the dragged nodes back in their orbit" hidden data-corn-kind="quiet">Reset positions</button>
155
155
 
@@ -194,43 +194,43 @@
194
194
  <div id="sheet-dock" class="hx-dock" data-corn="dock">
195
195
  <!-- The open proposal, a toolbar: title, counts, Before / Diff / After, Play, Edit, Send back, Approve, ⋯ (proposal.js, review.js, whatif.js, scenario-ui.js) -->
196
196
  <section id="proposal-bar" class="hx-proposal-bar glass" aria-label="Open proposal" hidden data-corn="proposal-bar">
197
- <p id="proposal-message" class="hx-proposal-message" role="status" hidden></p>
197
+ <p id="proposal-message" class="hx-proposal-message" data-corn="message" role="status" hidden></p>
198
198
  <div id="proposal-ways" class="hx-proposal-ways" role="group" aria-label="Ways on" data-corn="proposal-ways" hidden></div>
199
199
  <div id="proposal-body">
200
- <div class="hx-proposal-head" role="group" aria-label="Proposal actions">
201
- <strong id="proposal-title" class="hx-proposal-name"></strong>
200
+ <div class="hx-proposal-head" data-corn="proposal-head" role="group" aria-label="Proposal actions">
201
+ <strong id="proposal-title" class="hx-proposal-name" data-corn="proposal-title"></strong>
202
202
  <a id="proposal-source" class="hx-proposal-source" data-corn="proposal-source" hidden></a>
203
203
  <div class="hx-proposal-counts">
204
- <button type="button" id="proposal-chip" class="hx-proposal-chip" data-action="toggle-proposal-changes" aria-expanded="false"></button>
205
- <button type="button" id="proposal-mode" class="hx-proposal-mode" data-action="toggle-proposal-mode" data-peek-ok aria-expanded="false" aria-controls="proposal-seg" title="Before, Diff or After"></button>
204
+ <button type="button" id="proposal-chip" class="hx-proposal-chip" data-corn="proposal-counts" data-action="toggle-proposal-changes" aria-expanded="false"></button>
205
+ <button type="button" id="proposal-mode" class="hx-proposal-mode" data-corn="proposal-mode" data-action="toggle-proposal-mode" data-peek-ok aria-expanded="false" aria-controls="proposal-seg" title="Before, Diff or After"></button>
206
206
  </div>
207
- <div id="proposal-seg" class="hx-seg" role="group" aria-label="Compare">
208
- <button type="button" class="hx-seg-btn" data-action="proposal-view" data-view="before" aria-pressed="false" data-corn-string="before">Before</button>
209
- <button type="button" class="hx-seg-btn" data-action="proposal-view" data-view="diff" aria-pressed="true" data-corn-string="diff">Diff</button>
210
- <button type="button" class="hx-seg-btn" data-action="proposal-view" data-view="after" aria-pressed="false" data-corn-string="after">After</button>
207
+ <div id="proposal-seg" class="hx-seg" data-corn="compare" role="group" aria-label="Compare">
208
+ <button data-corn="compare-option" type="button" class="hx-seg-btn" data-action="proposal-view" data-view="before" aria-pressed="false" data-corn-string="before">Before</button>
209
+ <button data-corn="compare-option" type="button" class="hx-seg-btn" data-action="proposal-view" data-view="diff" aria-pressed="true" data-corn-string="diff">Diff</button>
210
+ <button data-corn="compare-option" type="button" class="hx-seg-btn" data-action="proposal-view" data-view="after" aria-pressed="false" data-corn-string="after">After</button>
211
211
  </div>
212
212
  <div class="hx-proposal-tools">
213
- <button type="button" id="proposal-play" class="hx-btn" aria-expanded="false" aria-controls="proposal-scenarios" title="Play one of this proposal's scenarios on the map" hidden>Play</button>
214
- <button type="button" id="proposal-edit" class="hx-btn" aria-expanded="false" aria-controls="whatif" title="Try a change: add a node or an edge, reword a scenario">Edit</button>
213
+ <button data-corn-kind="secondary" type="button" id="proposal-play" class="hx-btn" aria-expanded="false" aria-controls="proposal-scenarios" title="Play one of this proposal's scenarios on the map" hidden>Play</button>
214
+ <button data-corn-kind="secondary" type="button" id="proposal-edit" class="hx-btn" aria-expanded="false" aria-controls="whatif" title="Try a change: add a node or an edge, reword a scenario">Edit</button>
215
215
  </div>
216
216
  <div class="hx-proposal-actions">
217
- <button type="button" class="hx-btn" data-review="notes" data-peek-ok title="Send it back to the drafting agent with a note and your edits" data-corn-string="sendBack">Send back</button>
217
+ <button data-corn-kind="secondary" type="button" class="hx-btn" data-review="notes" data-peek-ok title="Send it back to the drafting agent with a note and your edits" data-corn-string="sendBack">Send back</button>
218
218
  <button type="button" class="hx-btn hx-btn--approve" data-review="approved" data-peek-ok title="Sign this proposal off" data-corn-kind="approve" data-corn-string="approve">Approve</button>
219
219
  </div>
220
220
  <div class="hx-proposal-more">
221
221
  <button type="button" id="proposal-more" class="hx-btn hx-btn--icon" data-action="toggle-proposal-more" aria-haspopup="menu" aria-expanded="false" aria-controls="proposal-more-menu" aria-label="More" data-corn-kind="icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><circle cx="3" cy="8" r="1.5"/><circle cx="8" cy="8" r="1.5"/><circle cx="13" cy="8" r="1.5"/></svg></button>
222
- <div id="proposal-more-menu" class="hx-proposal-more-menu glass" role="menu" aria-label="More" hidden>
222
+ <div id="proposal-more-menu" class="hx-proposal-more-menu glass" data-corn="proposal-menu" role="menu" aria-label="More" hidden>
223
223
  <button type="button" role="menuitem" class="hx-btn hx-btn--quiet" data-action="close-proposal" title="Close the proposal and go back to the map" data-corn-kind="quiet" data-corn-string="closeProposal">Close</button>
224
224
  </div>
225
225
  </div>
226
226
  </div>
227
227
  <p id="proposal-summary" class="hx-proposal-summary" hidden></p>
228
- <details id="proposal-errors" class="hx-proposal-errors" hidden>
229
- <summary id="proposal-errors-count"></summary>
228
+ <details id="proposal-errors" class="hx-proposal-errors" data-corn="proposal-errors" hidden>
229
+ <summary data-corn="summary" id="proposal-errors-count"></summary>
230
230
  <ul id="proposal-errors-list"></ul>
231
231
  <p class="hx-faint">The map shows what it can.</p>
232
232
  </details>
233
- <div id="proposal-changes" class="hx-proposal-changes" hidden></div>
233
+ <div id="proposal-changes" class="hx-proposal-changes" data-corn="proposal-changes" hidden></div>
234
234
  </div>
235
235
  </section>
236
236
 
@@ -239,53 +239,53 @@
239
239
  <aside id="forge-panel" class="hx-forge glass" aria-label="Work" inert hidden data-corn="work-panel">
240
240
  <div class="hx-forge-body" data-corn="forge-panel">
241
241
  <div class="hx-forge-top" data-corn="work-top">
242
- <div class="hx-forge-head">
243
- <h2 id="forge-title" class="hx-drawer-title" tabindex="-1">Work</h2>
242
+ <div class="hx-forge-head" data-corn="work-head">
243
+ <h2 id="forge-title" class="hx-drawer-title" data-corn="work-title" tabindex="-1">Work</h2>
244
244
  <button type="button" class="hx-btn hx-btn--quiet" data-action="refresh-forge" title="Ask the forge again" data-corn-kind="quiet">Refresh</button>
245
245
  <button type="button" class="hx-close" data-action="close-forge" aria-label="Close" data-corn-kind="icon">✕</button>
246
246
  </div>
247
247
  <div class="hx-forge-tabs" role="group" aria-label="Show" data-corn="tabs">
248
- <button type="button" class="hx-forge-tab" data-forge-kind="specs" aria-pressed="true" title="The proposals: what a change would add, change and remove" data-corn="tab"><span data-corn-string="tabSpecs">Specs</span><span class="hx-forge-count" data-corn="count" hidden></span></button>
249
- <button type="button" class="hx-forge-tab" data-forge-kind="pulls" aria-pressed="false" title="Pull requests" data-corn="tab"><span data-corn-string="tabPulls">PRs</span><span class="hx-forge-count" data-corn="count" hidden></span></button>
250
- <button type="button" class="hx-forge-tab" data-forge-kind="issues" aria-pressed="false" data-corn="tab"><span data-corn-string="tabIssues">Issues</span><span class="hx-forge-count" data-corn="count" hidden></span></button>
251
- <button type="button" class="hx-forge-tab" data-forge-kind="threads" aria-pressed="false" title="Ideas and spec conversations, with the nodes they mention" data-corn="tab"><span data-corn-string="tabThreads">Threads</span><span class="hx-forge-count" data-corn="count" hidden></span></button>
252
- <button type="button" class="hx-forge-tab" data-forge-kind="work" aria-pressed="false" title="Agent runs, and the work grouped by issue and proposal with agent-made work marked" data-corn="tab"><span data-corn-string="tabRuns">Runs</span><span class="hx-forge-count" data-corn="count" hidden></span></button>
248
+ <button type="button" class="hx-forge-tab" data-forge-kind="specs" aria-pressed="true" title="The proposals: what a change would add, change and remove" data-corn="tab"><span data-corn-string="tabSpecs">Specs</span><span class="hx-forge-count" data-corn="count"></span></button>
249
+ <button type="button" class="hx-forge-tab" data-forge-kind="pulls" aria-pressed="false" title="Pull requests" data-corn="tab"><span data-corn-string="tabPulls">PRs</span><span class="hx-forge-count" data-corn="count"></span></button>
250
+ <button type="button" class="hx-forge-tab" data-forge-kind="issues" aria-pressed="false" data-corn="tab"><span data-corn-string="tabIssues">Issues</span><span class="hx-forge-count" data-corn="count"></span></button>
251
+ <button type="button" class="hx-forge-tab" data-forge-kind="threads" aria-pressed="false" title="Ideas and spec conversations, with the nodes they mention" data-corn="tab"><span data-corn-string="tabThreads">Threads</span><span class="hx-forge-count" data-corn="count"></span></button>
252
+ <button type="button" class="hx-forge-tab" data-forge-kind="work" aria-pressed="false" title="Agent runs, and the work grouped by issue and proposal with agent-made work marked" data-corn="tab"><span data-corn-string="tabRuns">Runs</span><span class="hx-forge-count" data-corn="count"></span></button>
253
253
  <button type="button" class="hx-forge-tab" data-forge-kind="deploys" aria-pressed="false" data-corn="tab"><span data-corn-string="tabDeploys">Deploys</span><span class="hx-forge-count" data-corn="count" hidden></span></button>
254
254
  </div>
255
255
  </div>
256
256
  <div id="forge-bar" class="hx-forge-bar">
257
257
  <p id="forge-status" class="hx-forge-status hx-faint"></p>
258
- <button type="button" id="forge-filter-chip" class="hx-forge-chip" data-action="toggle-filters" aria-expanded="false" aria-controls="forge-filter-box" hidden>Filter<span class="hx-forge-count" data-corn="count" hidden></span></button>
258
+ <button data-corn="filter-chip" type="button" id="forge-filter-chip" class="hx-forge-chip" data-action="toggle-filters" aria-expanded="false" aria-controls="forge-filter-box" hidden>Filter<span class="hx-forge-count" data-corn="count" hidden></span></button>
259
259
  </div>
260
- <div id="forge-filter-box" class="hx-forge-controls" hidden>
260
+ <div id="forge-filter-box" class="hx-forge-controls" data-corn="filters" hidden>
261
261
  <div id="forge-work-filters" class="hx-forge-work-filters" hidden>
262
- <label class="hx-forge-toggle"><input type="checkbox" id="forge-work-agents" /> Agent-made only</label>
263
- <label class="hx-forge-toggle"><input type="checkbox" id="forge-work-finished" /> Include merged and closed</label>
262
+ <label class="hx-forge-toggle" data-corn="check-field"><input data-corn="control" type="checkbox" id="forge-work-agents" /> Agent-made only</label>
263
+ <label class="hx-forge-toggle" data-corn="check-field"><input data-corn="control" type="checkbox" id="forge-work-finished" /> Include merged and closed</label>
264
264
  </div>
265
265
  <div id="forge-filters" class="hx-forge-filters">
266
- <label class="hx-forge-field" data-corn="field">State<select id="forge-state" class="hx-forge-select"></select></label>
267
- <label class="hx-forge-field" data-corn="field">Label<select id="forge-label" class="hx-forge-select"></select></label>
268
- <label class="hx-forge-field" data-corn="field">Author<select id="forge-author" class="hx-forge-select"></select></label>
269
- <label class="hx-forge-field hx-forge-field--text" data-corn="field">Search<input type="search" id="forge-text" class="hx-forge-input" placeholder="Title, number, label" autocomplete="off" /></label>
266
+ <label class="hx-forge-field" data-corn="field">State<select data-corn="control" id="forge-state" class="hx-forge-select"></select></label>
267
+ <label class="hx-forge-field" data-corn="field">Label<select data-corn="control" id="forge-label" class="hx-forge-select"></select></label>
268
+ <label class="hx-forge-field" data-corn="field">Author<select data-corn="control" id="forge-author" class="hx-forge-select"></select></label>
269
+ <label class="hx-forge-field hx-forge-field--text" data-corn="field">Search<input data-corn="control" type="search" id="forge-text" class="hx-forge-input" placeholder="Title, number, label" autocomplete="off" /></label>
270
270
  </div>
271
271
  </div>
272
272
  <p id="forge-notice" class="hx-forge-notice" hidden data-corn="notice"></p>
273
273
  <p id="forge-act-note" class="hx-forge-notice" hidden data-corn="notice"></p>
274
274
  <!-- Release notes (forge-panel.js), reached from the PRs list: the pull requests merged since a tag, grouped by the map; copy them, or have the forge keep them as a draft release -->
275
275
  <section id="forge-notes" class="hx-forge-notes" aria-label="Release notes" hidden>
276
- <button type="button" class="hx-forge-back" data-action="close-notes"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" aria-hidden="true"><path d="M10 3L5 8l5 5"/></svg><span class="hx-forge-back-text">All pull requests</span></button>
277
- <h3 id="notes-title" class="hx-forge-notes-title" tabindex="-1">Release notes</h3>
278
- <label class="hx-forge-field" data-corn="field">Since tag<select id="notes-since" class="hx-forge-select"></select></label>
279
- <label class="hx-forge-field" data-corn="field">Draft, in Markdown<textarea id="notes-preview" class="hx-forge-preview" rows="14" readonly spellcheck="false"></textarea></label>
276
+ <button data-corn="back" type="button" class="hx-forge-back" data-action="close-notes"><svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" aria-hidden="true"><path d="M10 3L5 8l5 5"/></svg><span class="hx-forge-back-text">All pull requests</span></button>
277
+ <h3 id="notes-title" class="hx-forge-notes-title" data-corn="detail-title" tabindex="-1">Release notes</h3>
278
+ <label class="hx-forge-field" data-corn="field">Since tag<select data-corn="control" id="notes-since" class="hx-forge-select"></select></label>
279
+ <label class="hx-forge-field" data-corn="field">Draft, in Markdown<textarea data-corn="control" id="notes-preview" class="hx-forge-preview" rows="14" readonly spellcheck="false"></textarea></label>
280
280
  <div class="hx-forge-actions">
281
- <button type="button" id="notes-copy" class="hx-btn" data-action="copy-notes">Copy</button>
281
+ <button data-corn-kind="secondary" type="button" id="notes-copy" class="hx-btn" data-action="copy-notes">Copy</button>
282
282
  <button type="button" id="notes-post" class="hx-btn hx-btn--approve" data-action="post-notes" aria-expanded="false" aria-controls="notes-confirm" data-corn-kind="approve">Post as draft …</button>
283
283
  </div>
284
284
  <p id="notes-message" class="hx-forge-msg" hidden data-corn="message"></p>
285
- <div id="notes-confirm" class="hx-forge-confirm" role="group" aria-labelledby="notes-confirm-title" hidden>
285
+ <div id="notes-confirm" class="hx-forge-confirm" data-corn="confirm-form" role="group" aria-labelledby="notes-confirm-title" hidden>
286
286
  <h3 id="notes-confirm-title" class="hx-forge-confirm-title">Post as a draft release</h3>
287
287
  <p id="notes-confirm-words"></p>
288
- <label class="hx-forge-field" data-corn="field">Tag for the draft<input type="text" id="notes-tag" class="hx-forge-input" autocomplete="off" spellcheck="false" /></label>
288
+ <label class="hx-forge-field" data-corn="field">Tag for the draft<input data-corn="control" type="text" id="notes-tag" class="hx-forge-input" autocomplete="off" spellcheck="false" /></label>
289
289
  <div class="hx-forge-actions">
290
290
  <button type="button" id="notes-confirm-yes" class="hx-btn hx-btn--approve" data-action="confirm-notes" data-corn-kind="approve">Create the draft</button>
291
291
  <button type="button" class="hx-btn hx-btn--quiet" data-action="cancel-notes" data-corn-kind="quiet">Cancel</button>
@@ -299,26 +299,26 @@
299
299
  <p id="forge-runs-runner" class="hx-forge-meta" hidden></p>
300
300
  <p id="forge-runs-note" class="hx-forge-notice" hidden data-corn="notice"></p>
301
301
  <p id="forge-runs-trigger" class="hx-forge-notice" hidden data-corn="notice"></p>
302
- <div id="forge-runs-totals" role="group" aria-label="Tokens and cost the runners reported" hidden></div>
302
+ <div id="forge-runs-totals" data-corn="run-totals" role="group" aria-label="Tokens and cost the runners reported" hidden></div>
303
303
  <ul id="forge-runs-hand" class="hx-forge-meta" aria-label="Requests written by hand that started nothing" hidden></ul>
304
304
  <ul id="forge-runs-list" class="hx-forge-files" aria-label="Runs"></ul>
305
305
  </section>
306
306
  <section id="forge-detail" class="hx-forge-detail" aria-label="Selected pull request" hidden></section>
307
307
  <ul id="forge-list" class="hx-forge-list" aria-label="Results"></ul>
308
308
  <!-- The foot of the list: Release notes… on the PRs list, New idea on Specs (and Threads) -->
309
- <div id="forge-foot" class="hx-forge-foot">
310
- <button type="button" id="notes-open" class="hx-btn" data-action="open-notes" hidden>Release notes …</button>
309
+ <div id="forge-foot" class="hx-forge-foot" data-corn="work-foot">
310
+ <button data-corn-kind="secondary" type="button" id="notes-open" class="hx-btn" data-action="open-notes" hidden>Release notes …</button>
311
311
  <!-- New idea (forge-panel.js): opens an issue with the threads label as you, on the forge; the thread itself lives there -->
312
312
  <section id="forge-idea" class="hx-forge-notes" aria-label="New idea" data-corn-string-aria-label="newIdea" hidden>
313
313
  <div class="hx-forge-actions">
314
314
  <button type="button" id="idea-open" class="hx-btn hx-btn--approve" data-action="idea-open" aria-expanded="false" aria-controls="idea-form" data-corn-kind="approve"><span data-corn-string="newIdea">New idea</span> …</button>
315
315
  </div>
316
316
  <p id="idea-message" class="hx-forge-msg" role="status" hidden data-corn="message"></p>
317
- <div id="idea-form" class="hx-forge-confirm" role="group" aria-labelledby="idea-form-title" hidden>
317
+ <div id="idea-form" data-corn="confirm-form" class="hx-forge-confirm" role="group" aria-labelledby="idea-form-title" hidden>
318
318
  <h3 id="idea-form-title" class="hx-forge-confirm-title" data-corn-string="newIdea">New idea</h3>
319
319
  <p id="idea-words"></p>
320
- <label class="hx-forge-field" data-corn="field">Title<input type="text" id="idea-title" class="hx-forge-input" maxlength="256" autocomplete="off" /></label>
321
- <label class="hx-forge-field" data-corn="field">What is the idea?<textarea id="idea-body" class="hx-forge-preview hx-thread-compose" rows="6" maxlength="20000" spellcheck="true"></textarea></label>
320
+ <label class="hx-forge-field" data-corn="field">Title<input data-corn="control" type="text" id="idea-title" class="hx-forge-input" maxlength="256" autocomplete="off" /></label>
321
+ <label class="hx-forge-field" data-corn="field">What is the idea?<textarea data-corn="control" id="idea-body" class="hx-forge-preview hx-thread-compose" rows="6" maxlength="20000" spellcheck="true"></textarea></label>
322
322
  <div class="hx-forge-actions">
323
323
  <button type="button" id="idea-send" class="hx-btn hx-btn--approve" data-action="idea-send" data-corn-kind="approve">Open the idea</button>
324
324
  <button type="button" class="hx-btn hx-btn--quiet" data-action="idea-cancel" data-corn-kind="quiet">Cancel</button>
@@ -335,8 +335,8 @@
335
335
  <div class="hx-drawer-body">
336
336
  <div class="hx-drawer-head">
337
337
  <div class="hx-drawer-id">
338
- <p class="hx-kicker"><span id="drawer-badge" data-corn="badge">Atom</span><span id="drawer-host"></span><span id="drawer-diff" class="hx-diffpill" hidden></span></p>
339
- <h2 id="drawer-title" class="hx-drawer-title">&lt;pop-button&gt;</h2>
338
+ <p class="hx-kicker"><span id="drawer-badge" data-corn="badge">Atom</span><span id="drawer-host" data-corn="node-host"></span><span id="drawer-diff" class="hx-diffpill" data-corn="diff-pill" hidden></span></p>
339
+ <h2 id="drawer-title" class="hx-drawer-title" data-corn="node-title">&lt;pop-button&gt;</h2>
340
340
  </div>
341
341
  <button type="button" class="hx-close" data-action="close-drawer" aria-label="Close" data-corn-kind="icon">✕</button>
342
342
  </div>
@@ -348,11 +348,11 @@
348
348
  </div>
349
349
  </div>
350
350
 
351
- <div class="hx-drawer-foot">
352
- <a id="drawer-file-btn" class="hx-open" href="#" target="_blank" rel="noreferrer" hidden>Open file ↗</a>
353
- <a id="drawer-open-btn" class="hx-open" href="#" target="_blank" rel="noreferrer" hidden>Open route ↗</a>
354
- <button type="button" id="drawer-run-btn" class="hx-btn hx-foot-btn" data-action="start-run" data-corn-string="startRun" hidden>Start a run</button>
355
- <button type="button" class="hx-btn hx-btn--quiet hx-foot-btn" data-action="copy-spec" data-corn-string="copySpec">Copy Spec</button>
351
+ <div class="hx-drawer-foot" data-corn="node-foot">
352
+ <a data-corn="open-link" id="drawer-file-btn" data-corn-kind="primary" class="hx-open" href="#" target="_blank" rel="noreferrer" hidden>Open file ↗</a>
353
+ <a data-corn="open-link" id="drawer-open-btn" data-corn-kind="primary" class="hx-open" href="#" target="_blank" rel="noreferrer" hidden>Open route ↗</a>
354
+ <button data-corn-kind="secondary" type="button" id="drawer-run-btn" class="hx-btn hx-foot-btn" data-action="start-run" data-corn-string="startRun" hidden>Start a run</button>
355
+ <button data-corn-kind="quiet" type="button" class="hx-btn hx-btn--quiet hx-foot-btn" data-action="copy-spec" data-corn-string="copySpec">Copy Spec</button>
356
356
  <p id="copy-spec-result" class="hx-forge-result" data-corn="result" hidden></p>
357
357
  </div>
358
358
  </aside>
@@ -379,10 +379,10 @@
379
379
  <!-- The confirm step of landing a pull request, starting a spec and opening a build issue (forge-panel.js): a modal dialog over a scrim; the focus stays in it while it is open -->
380
380
  <div id="forge-confirm" class="hx-confirm-scrim" hidden data-corn="dialog-scrim">
381
381
  <div class="hx-confirm glass" role="dialog" aria-modal="true" aria-labelledby="forge-confirm-title" aria-describedby="forge-confirm-body" data-corn="confirm-dialog">
382
- <h2 id="forge-confirm-title" class="hx-confirm-title"></h2>
382
+ <h2 id="forge-confirm-title" class="hx-confirm-title" data-corn="dialog-title"></h2>
383
383
  <div id="forge-confirm-body"></div>
384
384
  <div class="hx-confirm-actions">
385
- <button type="button" class="hx-btn" data-action="forge-confirm-cancel">Cancel</button>
385
+ <button data-corn-kind="secondary" type="button" class="hx-btn" data-action="forge-confirm-cancel">Cancel</button>
386
386
  <button type="button" class="hx-btn hx-btn--approve" data-action="forge-confirm-go" data-corn-kind="approve" data-corn-string="landIt">Land it</button>
387
387
  </div>
388
388
  </div>
@@ -391,25 +391,25 @@
391
391
  <!-- Start an agent (forge-panel.js): kind, profile, a brief, and a confirm step; a modal dialog over a scrim, the focus stays in it -->
392
392
  <div id="agent-start" class="hx-confirm-scrim" hidden data-corn="dialog-scrim">
393
393
  <div class="hx-confirm glass" role="dialog" aria-modal="true" aria-labelledby="agent-start-title" aria-describedby="agent-start-words" data-corn="agent-dialog">
394
- <h2 id="agent-start-title" class="hx-confirm-title" data-corn-string="startAgent">Start an agent</h2>
394
+ <h2 id="agent-start-title" class="hx-confirm-title" data-corn="dialog-title" data-corn-string="startAgent">Start an agent</h2>
395
395
  <p id="agent-start-about" class="hx-forge-meta"></p>
396
396
  <p id="agent-start-runner" class="hx-forge-meta" hidden></p>
397
397
  <p id="agent-retry-note" class="hx-forge-meta" hidden></p>
398
- <form id="agent-start-form" class="hx-forge-confirm" novalidate>
399
- <label class="hx-forge-field" data-corn="field">Kind of run<select id="agent-kind" class="hx-forge-select"></select></label>
400
- <label id="agent-profile-field" class="hx-forge-field" hidden data-corn="field">Profile<select id="agent-profile" class="hx-forge-select"></select></label>
401
- <fieldset id="agent-limits-edit" class="hx-forge-field hx-forge-limits"><legend>Limits, hints for the runner (one left blank takes the config's, if any)</legend>
402
- <label class="hx-forge-field" data-corn="field">Minutes<input type="number" id="agent-limit-minutes" class="hx-forge-input" min="0" step="any" inputmode="decimal" /></label>
403
- <label class="hx-forge-field" data-corn="field">Turns<input type="number" id="agent-limit-turns" class="hx-forge-input" min="0" step="1" inputmode="numeric" /></label>
404
- <label class="hx-forge-field" data-corn="field">Cost<input type="number" id="agent-limit-cost" class="hx-forge-input" min="0" step="any" inputmode="decimal" /></label>
405
- <label class="hx-forge-field" data-corn="field">Tokens<input type="number" id="agent-limit-tokens" class="hx-forge-input" min="0" step="1" inputmode="numeric" /></label>
398
+ <form id="agent-start-form" class="hx-forge-confirm" data-corn="confirm-form" novalidate>
399
+ <label class="hx-forge-field" data-corn="field">Kind of run<select data-corn="control" id="agent-kind" class="hx-forge-select"></select></label>
400
+ <label id="agent-profile-field" class="hx-forge-field" hidden data-corn="field">Profile<select data-corn="control" id="agent-profile" class="hx-forge-select"></select></label>
401
+ <fieldset id="agent-limits-edit" class="hx-forge-field hx-forge-limits" data-corn="field"><legend>Limits, hints for the runner (one left blank takes the config's, if any)</legend>
402
+ <label class="hx-forge-field" data-corn="field">Minutes<input data-corn="control" type="number" id="agent-limit-minutes" class="hx-forge-input" min="0" step="any" inputmode="decimal" /></label>
403
+ <label class="hx-forge-field" data-corn="field">Turns<input data-corn="control" type="number" id="agent-limit-turns" class="hx-forge-input" min="0" step="1" inputmode="numeric" /></label>
404
+ <label class="hx-forge-field" data-corn="field">Cost<input data-corn="control" type="number" id="agent-limit-cost" class="hx-forge-input" min="0" step="any" inputmode="decimal" /></label>
405
+ <label class="hx-forge-field" data-corn="field">Tokens<input data-corn="control" type="number" id="agent-limit-tokens" class="hx-forge-input" min="0" step="1" inputmode="numeric" /></label>
406
406
  </fieldset>
407
- <label class="hx-forge-field" data-corn="field">Brief for the runner<textarea id="agent-brief" class="hx-forge-preview" rows="6" maxlength="20000" spellcheck="true"></textarea></label>
408
- <label id="agent-force-field" class="hx-forge-toggle" hidden><input type="checkbox" id="agent-force" /> Ask for another run on purpose</label>
407
+ <label class="hx-forge-field" data-corn="field">Brief for the runner<textarea data-corn="control" id="agent-brief" class="hx-forge-preview" rows="6" maxlength="20000" spellcheck="true"></textarea></label>
408
+ <label id="agent-force-field" class="hx-forge-toggle" data-corn="check-field" hidden><input data-corn="control" type="checkbox" id="agent-force" /> Ask for another run on purpose</label>
409
409
  <p id="agent-start-words" class="hx-confirm-note"></p>
410
410
  <p id="agent-start-msg" class="hx-forge-msg hx-forge-msg--bad" role="alert" hidden data-corn="message" data-corn-state="failure"></p>
411
411
  <div class="hx-confirm-actions">
412
- <button type="button" class="hx-btn" data-action="agent-start-cancel">Cancel</button>
412
+ <button data-corn-kind="secondary" type="button" class="hx-btn" data-action="agent-start-cancel">Cancel</button>
413
413
  <button type="submit" class="hx-btn hx-btn--approve" id="agent-start-go" data-corn-kind="approve" data-corn-string="askRunner">Ask the runner</button>
414
414
  </div>
415
415
  </form>
@@ -419,26 +419,26 @@
419
419
  <!-- Review tokens (review-tokens.js): make one (shown once), list them, revoke; a modal dialog over a scrim, the focus stays in it -->
420
420
  <div id="tokens-dialog" class="hx-confirm-scrim" hidden data-corn="dialog-scrim">
421
421
  <div class="hx-confirm glass" role="dialog" aria-modal="true" aria-labelledby="tokens-title" aria-describedby="tokens-intro" data-corn="tokens-dialog">
422
- <h2 id="tokens-title" class="hx-confirm-title" tabindex="-1">Review tokens</h2>
422
+ <h2 id="tokens-title" class="hx-confirm-title" data-corn="dialog-title" tabindex="-1">Review tokens</h2>
423
423
  <p id="tokens-intro" class="hx-confirm-note">A review token lets a script or a chat bot approve or send back a proposal as you (<code class="hx-code">POST /api/reviews</code>). It works while you are signed in here and still maintain the repo; it expires, and you can revoke it below.</p>
424
424
  <p id="tokens-msg" class="hx-forge-msg" role="status" hidden data-corn="message"></p>
425
425
  <div id="tokens-secret" class="hx-tokens-secret" hidden>
426
426
  <label class="hx-forge-field" for="tokens-secret-value" data-corn="field">Your new token (copy it now, it is not shown again)</label>
427
427
  <div class="hx-tokens-row">
428
- <input id="tokens-secret-value" class="hx-forge-input hx-mono" type="text" readonly spellcheck="false" autocomplete="off" />
429
- <button type="button" class="hx-btn" data-tokens-copy>Copy</button>
428
+ <input data-corn="control" id="tokens-secret-value" class="hx-forge-input hx-mono" type="text" readonly spellcheck="false" autocomplete="off" />
429
+ <button data-corn-kind="secondary" type="button" class="hx-btn" data-tokens-copy>Copy</button>
430
430
  </div>
431
431
  </div>
432
432
  <ul id="tokens-list" class="hx-tokens-list" aria-label="Your review tokens"></ul>
433
433
  <form id="tokens-form" class="hx-tokens-form" autocomplete="off">
434
- <label class="hx-forge-field" data-corn="field">Kind of token<select id="tokens-scope" class="hx-forge-select"><option value="review">Review: approve or send back proposals</option><option value="agent">Agent: ask for agent runs (POST /api/agent-requests)</option><option value="runner">Runner: pull, claim and report on runs (GET /api/agent-requests)</option></select></label>
435
- <label class="hx-forge-field" data-corn="field">Label<input id="tokens-label" class="hx-forge-input" type="text" maxlength="60" placeholder="chat bot" /></label>
436
- <label class="hx-forge-field" data-corn="field">Days<input id="tokens-days" class="hx-forge-input" type="text" inputmode="numeric" maxlength="2" aria-describedby="tokens-days-hint" /></label>
434
+ <label class="hx-forge-field" data-corn="field">Kind of token<select data-corn="control" id="tokens-scope" class="hx-forge-select"><option value="review">Review: approve or send back proposals</option><option value="agent">Agent: ask for agent runs (POST /api/agent-requests)</option><option value="runner">Runner: pull, claim and report on runs (GET /api/agent-requests)</option></select></label>
435
+ <label class="hx-forge-field" data-corn="field">Label<input data-corn="control" id="tokens-label" class="hx-forge-input" type="text" maxlength="60" placeholder="chat bot" /></label>
436
+ <label class="hx-forge-field" data-corn="field">Days<input data-corn="control" id="tokens-days" class="hx-forge-input" type="text" inputmode="numeric" maxlength="2" aria-describedby="tokens-days-hint" /></label>
437
437
  <span id="tokens-days-hint" class="hx-sr-only"></span>
438
438
  <button type="submit" id="tokens-make" class="hx-btn hx-btn--approve" data-corn-kind="approve">Make a token</button>
439
439
  </form>
440
440
  <div class="hx-confirm-actions">
441
- <button type="button" class="hx-btn" data-tokens-close>Close</button>
441
+ <button data-corn-kind="secondary" type="button" class="hx-btn" data-tokens-close>Close</button>
442
442
  </div>
443
443
  </div>
444
444
  </div>
@@ -110,8 +110,8 @@ export function renderLayerToggles() {
110
110
  return `
111
111
  <button type="button" class="hx-toggle-row${on ? '' : ' is-off'}" data-action="toggle-layer" data-layer="${escHtml(layer.key)}" aria-pressed="${on}" title="${escHtml(layer.desc)}" data-corn="row">
112
112
  <span class="hx-toggle-label">
113
- <span class="hx-dot" style="background-color: ${color}; box-shadow: ${on && state.theme !== 'light' ? `0 0 8px ${color}90` : 'none'}"></span>
114
- <span class="hx-toggle-name">${escHtml(layer.label)}</span>${layer.live ? '<span class="hx-live-tag">live</span>' : ''}
113
+ <span class="hx-dot" data-corn="swatch" style="background-color: ${color}; box-shadow: ${on && state.theme !== 'light' ? `0 0 8px ${color}90` : 'none'}"></span>
114
+ <span class="hx-toggle-name">${escHtml(layer.label)}</span>${layer.live ? '<span class="hx-live-tag" data-corn="live-tag">live</span>' : ''}
115
115
  </span>
116
116
  <span class="hx-toggle-meta">
117
117
  <span class="hx-count" data-corn="count">${(unit[layer.key] || String)(counts[layer.key] || 0)}</span>
@@ -130,8 +130,8 @@ export function renderCloudLegend() {
130
130
  if (state.activeLayers.cloud === false) { el.innerHTML = ''; el.hidden = true; return; }
131
131
  el.hidden = false;
132
132
  el.innerHTML = `
133
- <div class="hx-menu-title"><span>Cloud: when an outage bites</span></div>
134
- ${Object.entries(WHEN_STYLES).map(([when, s]) => `<div class="hx-legend-row"><span class="hx-legend-swatch"><span class="hx-swatch-line hx-swatch-when hx-swatch-when--${when} hx-swatch-when--plain"></span></span><span>${s.legend}</span></div>`).join('')}
133
+ <div class="hx-menu-title" data-corn="menu-title"><span>Cloud: when an outage bites</span></div>
134
+ ${Object.entries(WHEN_STYLES).map(([when, s]) => `<div class="hx-legend-row"><span class="hx-legend-swatch"><span data-corn="swatch" class="hx-swatch-line hx-swatch-when hx-swatch-when--${when} hx-swatch-when--plain"></span></span><span>${s.legend}</span></div>`).join('')}
135
135
  <div class="hx-legend-row"><span class="hx-legend-swatch"></span><span class="hx-faint"><span class="hx-cloud-browser">(browser)</span> the visitor's browser makes the call, not our server</span></div>`;
136
136
  }
137
137
 
@@ -469,7 +469,7 @@ export function liveDetailsHtml(node, live, esc) {
469
469
  }
470
470
  const item = hw.item || {};
471
471
  const photo = item.image ? `<img class="hx-live-photo" data-live-photo="${esc(item.image)}" alt="Photo of ${esc(item.name || node.label)}" hidden />` : '';
472
- const room = item.room_id ? `<div>Room: <button type="button" class="hx-linkbtn" data-action="select-node" data-id="live-room-${esc(item.room_id)}">${esc(hw.roomName || item.room_id)}</button></div>` : '<div class="hx-faint">Its item has no room</div>';
472
+ const room = item.room_id ? `<div>Room: <button data-corn="node-link" type="button" class="hx-linkbtn" data-action="select-node" data-id="live-room-${esc(item.room_id)}">${esc(hw.roomName || item.room_id)}</button></div>` : '<div class="hx-faint">Its item has no room</div>';
473
473
  const contents = hw.contents || [];
474
474
  const total = hw.contents_total ?? contents.length;
475
475
  const rows = contents.map((c) => `<li style="padding-left:${Math.max(0, (c.depth || 1) - 1) * 14}px">${esc(c.name)}${c.quantity && c.quantity !== 1 ? ` <span class="hx-faint">× ${esc(String(c.quantity))}</span>` : ''}</li>`).join('');
package/explorer/live.js CHANGED
@@ -27,6 +27,7 @@
27
27
  import { state, nodeById, escHtml, touchScene } from './state.js';
28
28
  import { render, ensureFlowLoop } from './render.js';
29
29
  import { setMap } from './view.js';
30
+ import { cornState } from './corn-state.js';
30
31
  import { onLayersChange, renderLayerToggles } from './layers.js';
31
32
  import { chipModel, createLiveRunner, groupsOf, liveDetailsHtml, liveWanted } from './live-model.js';
32
33
 
@@ -140,6 +141,8 @@ function paintChip() {
140
141
  if (text) text.textContent = chip.text;
141
142
  const btn = $('live-chip');
142
143
  if (btn) {
144
+ const live = cornState(chip.tone); // success, waiting (stale), stopped (off), failure (unavailable) or running (loading)
145
+ if (live) btn.dataset.cornState = live; else delete btn.dataset.cornState;
143
146
  btn.title = chip.text;
144
147
  btn.setAttribute('aria-label', chip.text || 'Live layer');
145
148
  btn.setAttribute('aria-expanded', String(menuOpen));
@@ -158,7 +161,7 @@ function paintChip() {
158
161
  <p class="hx-live-line hx-live-line--main">${escHtml(chip.text)}</p>
159
162
  ${chip.lines.map((l) => `<p class="hx-live-line">${escHtml(l)}</p>`).join('')}
160
163
  ${chip.note ? `<p class="hx-live-line hx-faint">${escHtml(chip.note)}</p>` : ''}
161
- ${chip.href && !asking ? `<p class="hx-live-line"><a class="hx-link" href="${escHtml(chip.href)}">Where to set a token ↗</a></p>` : ''}`;
164
+ ${chip.href && !asking ? `<p class="hx-live-line"><a data-corn="text-link" class="hx-link" href="${escHtml(chip.href)}">Where to set a token ↗</a></p>` : ''}`;
162
165
  // The field is painted only when it changes, so a repaint (a refresh, the stale tick) never drops what is being typed
163
166
  const fieldHtml = asking ? tokenFieldHtml(tok, chip.href) : '';
164
167
  if (field.dataset.painted !== String(asking)) {
@@ -168,7 +171,7 @@ function paintChip() {
168
171
  field.hidden = !asking;
169
172
  row.innerHTML = `
170
173
  <span class="hx-live-buttons">
171
- <button type="button" class="hx-btn" data-live="refresh"${loading ? ' disabled' : ''}>Refresh</button>
174
+ <button data-corn-kind="secondary" type="button" class="hx-btn" data-live="refresh"${loading ? ' disabled' : ''}>Refresh</button>
172
175
  ${has ? '<button type="button" class="hx-btn" data-live="token-forget" data-corn-kind="danger">Forget token</button>' : ''}
173
176
  </span>
174
177
  <span class="hx-faint">${escHtml(source && source.name ? source.name : '')}</span>`;
@@ -218,11 +221,11 @@ function tokenFieldHtml(tok, href) {
218
221
  return `
219
222
  <label class="hx-live-token-label" for="live-token-input">${escHtml(label)}</label>
220
223
  <div class="hx-live-token-row">
221
- <input id="live-token-input" class="hx-field hx-live-token-input" type="password" data-live="token-input" autocomplete="off" autocapitalize="off" spellcheck="false" />
222
- <button type="button" class="hx-btn" data-live="token-save">Save</button>
224
+ <input data-corn="control" id="live-token-input" class="hx-field hx-live-token-input" type="password" data-live="token-input" autocomplete="off" autocapitalize="off" spellcheck="false" />
225
+ <button data-corn-kind="secondary" type="button" class="hx-btn" data-live="token-save">Save</button>
223
226
  </div>
224
227
  ${tok.help ? `<p class="hx-live-line hx-faint hx-live-help">${withCode(tok.help)}</p>` : ''}
225
- ${href ? `<p class="hx-live-line hx-live-second"><a class="hx-link" href="${escHtml(href)}">or set it there ↗</a></p>` : ''}`;
228
+ ${href ? `<p class="hx-live-line hx-live-second"><a data-corn="text-link" class="hx-link" href="${escHtml(href)}">or set it there ↗</a></p>` : ''}`;
226
229
  }
227
230
 
228
231
  /** Saves what is in the field (then empties it) and asks the source again at once; an empty field saves nothing */
@@ -57,7 +57,7 @@ export function mockupsFor(proposal, slug, source, nodeId, states = {}) {
57
57
  export function mockupsSectionHtml(items) {
58
58
  if (!items.length) return '';
59
59
  const rows = items.map((m) => `<li class="hx-mockup-item" data-corn="row">
60
- <button type="button" class="hx-btn hx-mockup-open" data-mockup="${m.index}" aria-haspopup="dialog">${escHtml(m.title)}<span class="hx-sr-only"> (${m.type === 'page' ? 'page' : 'image'}, opens in a window)</span></button>
60
+ <button data-corn-kind="secondary" type="button" class="hx-btn hx-mockup-open" data-mockup="${m.index}" aria-haspopup="dialog">${escHtml(m.title)}<span class="hx-sr-only"> (${m.type === 'page' ? 'page' : 'image'}, opens in a window)</span></button>
61
61
  <span class="hx-mockup-state hx-mockup-state--${escHtml(m.state)}" data-corn="state-pill"${cornStateAttr(m.state)}>${escHtml(stateWords(m.state))}</span>
62
62
  </li>`).join('');
63
63
  return `<div class="hx-sec hx-mockups" data-mockups data-corn="section">
@@ -132,6 +132,7 @@ export function openMockup(index, opener = null) {
132
132
  const close = document.createElement('button');
133
133
  close.type = 'button';
134
134
  close.className = 'hx-btn hx-mockup-close';
135
+ close.dataset.cornKind = 'secondary';
135
136
  close.dataset.mockupClose = '';
136
137
  close.textContent = 'Close';
137
138
  head.append(title, close);
@@ -143,6 +144,7 @@ export function openMockup(index, opener = null) {
143
144
  status.textContent = stateWords(item.state);
144
145
  const stage = document.createElement('div');
145
146
  stage.className = 'hx-mockup-stage';
147
+ stage.dataset.corn = 'mockup-stage';
146
148
  if (item.type === 'page') {
147
149
  const frame = document.createElement('iframe');
148
150
  frame.className = 'hx-mockup-frame';