@slack/radar-mcp 1.20.0 → 1.22.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.
- package/README.md +75 -17
- package/dist/mcp/api-paths.d.ts +11 -0
- package/dist/mcp/api-paths.js +56 -20
- package/dist/mcp/dashboard-identity.d.ts +6 -0
- package/dist/mcp/dashboard-identity.js +11 -0
- package/dist/mcp/index.js +138 -36
- package/dist/mcp/logs-result.d.ts +1 -0
- package/dist/mcp/logs-result.js +1 -0
- package/dist/mcp/network-detail.d.ts +5 -0
- package/dist/mcp/network-detail.js +86 -0
- package/dist/mcp/radar-export-get.d.ts +30 -0
- package/dist/mcp/radar-export-get.js +49 -0
- package/dist/mcp/radar-response.d.ts +11 -1
- package/dist/mcp/radar-response.js +23 -3
- package/dist/mcp/session-backfill.d.ts +9 -3
- package/dist/mcp/session-backfill.js +76 -17
- package/dist/mcp/session-detail.js +54 -2
- package/dist/mcp/session-enable.d.ts +1 -0
- package/dist/mcp/session-enable.js +146 -15
- package/dist/mcp/session-query.js +53 -11
- package/dist/mcp/snapshot.js +42 -26
- package/dist/mcp/sources-gate.js +5 -0
- package/dist/mcp/stale-dashboard.d.ts +23 -0
- package/dist/mcp/stale-dashboard.js +122 -0
- package/dist/mcp/switchboard-spool.d.ts +12 -0
- package/dist/mcp/switchboard-spool.js +107 -0
- package/dist/mcp/switchboard-tools.d.ts +18 -0
- package/dist/mcp/switchboard-tools.js +178 -0
- package/dist/mcp/tools.d.ts +4 -1
- package/dist/mcp/tools.js +114 -23
- package/dist/mcp/web-child-env.d.ts +4 -1
- package/dist/mcp/web-child-env.js +4 -1
- package/dist/shared/android.d.ts +43 -0
- package/dist/shared/android.js +227 -19
- package/dist/shared/constants.d.ts +19 -4
- package/dist/shared/constants.js +19 -4
- package/dist/shared/event-spool.js +3 -2
- package/dist/shared/feature-flags.d.ts +1 -0
- package/dist/shared/feature-flags.js +1 -0
- package/dist/shared/form-body.d.ts +18 -0
- package/dist/shared/form-body.js +251 -0
- package/dist/shared/ios-logs.d.ts +10 -0
- package/dist/shared/ios-logs.js +91 -0
- package/dist/shared/ios.d.ts +25 -2
- package/dist/shared/ios.js +157 -3
- package/dist/{web → shared}/log-session.d.ts +45 -31
- package/dist/shared/log-session.js +300 -0
- package/dist/shared/radar-request-raw.d.ts +7 -0
- package/dist/shared/radar-request-raw.js +89 -0
- package/dist/shared/radar-token.d.ts +25 -0
- package/dist/shared/radar-token.js +164 -0
- package/dist/shared/stream.d.ts +4 -1
- package/dist/shared/stream.js +107 -15
- package/dist/shared/switchboard-host-store.d.ts +21 -0
- package/dist/shared/switchboard-host-store.js +166 -0
- package/dist/shared/switchboard-note.d.ts +15 -0
- package/dist/shared/switchboard-note.js +92 -0
- package/dist/shared/switchboard-report-file.d.ts +5 -0
- package/dist/shared/switchboard-report-file.js +26 -0
- package/dist/shared/switchboard-report.d.ts +20 -0
- package/dist/shared/switchboard-report.js +406 -0
- package/dist/shared/switchboard.d.ts +118 -0
- package/dist/shared/switchboard.js +487 -0
- package/dist/shared/transport.d.ts +43 -3
- package/dist/shared/version.d.ts +2 -0
- package/dist/shared/version.js +18 -0
- package/dist/shared/wire.d.ts +46 -1
- package/dist/web/install-app.d.ts +57 -8
- package/dist/web/install-app.js +270 -60
- package/dist/web/macapp/RadarApp.swift +340 -22
- package/dist/web/public/index.html +216 -12
- package/dist/web/public/next/app.js +43 -22
- package/dist/web/public/next/db.js +4 -1
- package/dist/web/public/next/feed.js +604 -59
- package/dist/web/public/next/filters.js +158 -40
- package/dist/web/public/next/flags.js +3 -0
- package/dist/web/public/next/form-body.js +252 -0
- package/dist/web/public/next/inspector.js +171 -14
- package/dist/web/public/next/prefs.js +5 -2
- package/dist/web/public/next/registry.js +35 -3
- package/dist/web/public/next/store.js +947 -69
- package/dist/web/public/next/switchboard-note.js +93 -0
- package/dist/web/public/next/toast.js +9 -5
- package/dist/web/public/next/voice-model.js +712 -0
- package/dist/web/public/next/voice.js +552 -0
- package/dist/web/server.d.ts +20 -9
- package/dist/web/server.js +834 -174
- package/dist/web/spec.d.ts +11 -6
- package/dist/web/spec.js +62 -6
- package/package.json +4 -4
- package/dist/web/log-session.js +0 -166
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
component lands. ---- */
|
|
15
15
|
:root {
|
|
16
16
|
color-scheme: dark; --row-h:24px;
|
|
17
|
-
--bg:#0b0f14; --surface:#121925; --surface-2:#0e151e; --surface-3:#141d2b; --inset:#0c1117;
|
|
17
|
+
--bg:#0b0f14; --surface:#121925; --surface-2:#0e151e; --surface-3:#141d2b; --inset:#0c1117; --chip-sb-bg:#1b2a3d;
|
|
18
18
|
--text:#e8f0f8; --text-2:#cfd8e3; --muted:#5f7186; --muted-2:#8aa0b4;
|
|
19
19
|
--border:#1e2a3a; --border-2:#243244; --border-3:#2c3e52; --rowline:#11161d;
|
|
20
20
|
--accent:#39d98a; --accent-bg:#1c3a2a; --accent-text:#39d98a;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
:root.light {
|
|
31
31
|
color-scheme: light;
|
|
32
|
-
--bg:#f4f6f9; --surface:#ffffff; --surface-2:#f0f3f7; --surface-3:#eef2f7; --inset:#ffffff;
|
|
32
|
+
--bg:#f4f6f9; --surface:#ffffff; --surface-2:#f0f3f7; --surface-3:#eef2f7; --inset:#ffffff; --chip-sb-bg:#dfe7f3;
|
|
33
33
|
--text:#1a2330; --text-2:#33404f; --muted:#6b7787; --muted-2:#4a5666;
|
|
34
34
|
--border:#d4dde7; --border-2:#c3cedb; --border-3:#aebccb; --rowline:#e7edf3;
|
|
35
35
|
--accent:#0e9f6e; --accent-bg:#d6f3e6; --accent-text:#0a7d56;
|
|
@@ -61,6 +61,8 @@
|
|
|
61
61
|
.statusrow .conn { white-space:nowrap; }
|
|
62
62
|
.statusrow .conn[title] { cursor:help; }
|
|
63
63
|
.statusrow .reason { font-weight:400; flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:help; }
|
|
64
|
+
/* The exception is a refused outage: the held sentence, and the press or pick answer that replaces it, stay until the next action instead of mounting per tick, and their last words are the instruction, so they wrap instead of ellipsizing. */
|
|
65
|
+
.statusrow .reason.refusal { white-space:normal; }
|
|
64
66
|
/* min-width holds the button's own width across its "Reconnect Radar" / "enabling…" relabel (the wider label measures ~150px; the headroom covers a wider fallback glyph). What keeps the button and the chip after it from shifting at an ATTEMPT boundary is the header's markup order: the changing recovery tail renders after them, on its own status row, and the conn span before them holds its text between the outage's two ends (a device-list change aside). */
|
|
65
67
|
.reconnect { background:var(--surface); border:1px solid var(--warn); color:var(--warn-text, var(--warn)); border-radius:8px; padding:4px 12px; min-width:160px; text-align:center; font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
|
|
66
68
|
.reconnect:hover { border-color:var(--warn-2); } .reconnect:disabled { opacity:.75; cursor:default; }
|
|
@@ -93,6 +95,7 @@
|
|
|
93
95
|
.filters .frow label { color:var(--muted); font-size:12px; min-width:96px; }
|
|
94
96
|
.filters input, .filters select { background:var(--surface); border:1px solid var(--border-2); border-radius:7px; color:var(--text); padding:6px 9px; font:inherit; font-size:12px; }
|
|
95
97
|
.filters input:focus, .filters select:focus { outline:none; border-color:var(--accent); }
|
|
98
|
+
.filters input::placeholder { color:var(--muted-2); opacity:1; }
|
|
96
99
|
.matchrow .f_mk { flex:0 0 130px; } .combo { position:relative; flex:1; display:flex; } .combo .f_mv { flex:1; padding-right:24px; }
|
|
97
100
|
.combocaret { position:absolute; right:8px; top:50%; transform:translateY(-50%); color:var(--muted); font-size:10px; cursor:pointer; }
|
|
98
101
|
.combolist { position:absolute; top:100%; left:0; right:0; z-index:30; margin-top:2px; max-height:200px; overflow:auto; background:var(--surface); border:1px solid var(--border-3); border-radius:7px; box-shadow:0 6px 18px var(--shadow); }
|
|
@@ -103,9 +106,25 @@
|
|
|
103
106
|
.filters .fapply { background:var(--accent-bg); border:1px solid var(--accent); color:var(--accent-text); border-radius:8px; padding:7px 16px; font:inherit; font-size:12.5px; font-weight:600; cursor:pointer; }
|
|
104
107
|
.filters .fmsg { color:var(--muted); font-size:12px; } .filters .fhint { color:var(--muted); font-size:11.5px; font-style:italic; }
|
|
105
108
|
.chips { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:6px; flex:0 0 auto; }
|
|
106
|
-
.chip { display:inline-flex; align-items:center; gap:7px; background:var(--surface-3); border:1px solid var(--border-3); color:var(--text-2); border-radius:999px; padding:4px 6px 4px 11px; font-size:12px; }
|
|
107
|
-
.chip b { color:var(--blue-2); font-weight:600; } .chip .v { color:var(--text); }
|
|
108
|
-
|
|
109
|
+
.chip { display:inline-flex; align-items:center; gap:7px; background:var(--surface-3); border:1px solid var(--border-3); color:var(--text-2); border-radius:999px; padding:4px 6px 4px 11px; font-size:12px; max-width:340px; }
|
|
110
|
+
.chip b { color:var(--blue-2); font-weight:600; } .chip .v { color:var(--text); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
111
|
+
/* Exclude chips wear the -term pill's tint (.fpill-neg): hidden-by and shown-if are different
|
|
112
|
+
polarities, and the text stays --text for contrast. */
|
|
113
|
+
.chip-exclude { background:var(--lvl-err-bg); border-color:var(--error-2); }
|
|
114
|
+
/* --blue-2 on the red field measured 4.11:1 on the light page; --text-2 clears AA on both themes. */
|
|
115
|
+
.chip-exclude b { color:var(--text-2); }
|
|
116
|
+
/* An exclude term naming a field no held row of this tab has: still an exclude chip (the tint
|
|
117
|
+
stays), with a dashed muted edge for a term that has no effect here yet. Harmless, so no amber
|
|
118
|
+
and no glyph, which are a refused term's. --muted-2 on the red fill is 6.0:1 dark, 5.8:1 light. */
|
|
119
|
+
.chip.chip-unknown { border-style:dashed; border-color:var(--muted-2); }
|
|
120
|
+
.excluderow input { flex:1; min-width:0; }
|
|
121
|
+
.fexclhint { margin:-2px 0 6px 104px; }
|
|
122
|
+
/* A real button (keyboard reachable) with the chrome reset so it keeps reading as the glyph. */
|
|
123
|
+
/* line-height after font: the shorthand resets it, so before it the glyph sat low. */
|
|
124
|
+
.chip .x { cursor:pointer; color:var(--muted-2); background:var(--surface); border:0; border-radius:50%; width:16px; height:16px; padding:0; margin:0; text-align:center; font:inherit; font-size:11px; line-height:14px; }
|
|
125
|
+
.chip .x:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
|
|
126
|
+
/* --accent on the red chip fill is 2.63:1 in light; the text tint of the accent clears it. */
|
|
127
|
+
:root.light .chip .x:focus-visible { outline-color:var(--accent-text); }
|
|
109
128
|
.chip .x:hover { color:#fff; background:var(--error-2); }
|
|
110
129
|
/* stats strip */
|
|
111
130
|
.statstrip { display:flex; align-items:center; gap:18px; margin-bottom:6px; flex:0 0 auto; min-height:0; }
|
|
@@ -167,7 +186,7 @@
|
|
|
167
186
|
.fhelp:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
|
|
168
187
|
/* Anchored to the box's left edge: the box is the wide element on the bar, so the legend has
|
|
169
188
|
room to its right and never runs off the viewport on a narrow window. */
|
|
170
|
-
.fhelppop { position:absolute; left:0; top:calc(100% + 4px); z-index:5; display:grid; grid-template-columns:auto 1fr; gap:4px 12px; max-width:min(460px, 90vw); background:var(--surface); border:1px solid var(--border-3); border-radius:8px; padding:8px 10px; font-size:12px; color:var(--text); box-shadow:0 4px 16px var(--shadow); cursor:default; }
|
|
189
|
+
.fhelppop { position:absolute; left:0; top:calc(100% + 4px); z-index:5; display:grid; grid-template-columns:auto 1fr; gap:4px 12px; max-width:min(460px, 90vw); max-height:min(60vh, 420px); overflow:auto; background:var(--surface); border:1px solid var(--border-3); border-radius:8px; padding:8px 10px; font-size:12px; color:var(--text); box-shadow:0 4px 16px var(--shadow); cursor:default; }
|
|
171
190
|
/* --accent-text, not --accent: the accent lands near 3.4:1 on the light surface, and the same
|
|
172
191
|
call is made for the other small accent text in this file. */
|
|
173
192
|
.fhelppop code { color:var(--accent-text); font-size:11.5px; white-space:nowrap; }
|
|
@@ -221,13 +240,53 @@
|
|
|
221
240
|
border-color: var(--error-2);
|
|
222
241
|
color: var(--error-2);
|
|
223
242
|
}
|
|
224
|
-
.fbtn { background:var(--surface); border:1px solid var(--border-3); border-radius:8px; color:var(--text); padding:6px 10px; font:inherit; font-size:12px; cursor:pointer; white-space:nowrap; }
|
|
225
|
-
.fbtn:hover { border-color:var(--accent); } .fbtn:disabled { opacity:.4; cursor:default; } .fbtn.paused { color:var(--warn); border-color:var(--warn); }
|
|
243
|
+
.fbtn, .fexclude { background:var(--surface); border:1px solid var(--border-3); border-radius:8px; color:var(--text); padding:6px 10px; font:inherit; font-size:12px; cursor:pointer; white-space:nowrap; }
|
|
244
|
+
.fbtn:hover, .fexclude:hover { border-color:var(--accent); } .fbtn:disabled { opacity:.4; cursor:default; } .fbtn.paused { color:var(--warn); border-color:var(--warn); }
|
|
226
245
|
.fcount { color:var(--muted); font-size:11.5px; white-space:nowrap; }
|
|
227
246
|
.fstatus { font-size:11.5px; font-weight:600; white-space:nowrap; }
|
|
228
247
|
.fstatus.st-live { color:var(--accent); } .fstatus.st-locked { color:var(--warn); } .fstatus.st-paused { color:var(--warn); }
|
|
229
|
-
.fsortlbl { color:var(--muted); font-size:12px; display:flex; align-items:center; gap:5px; white-space:nowrap; }
|
|
248
|
+
.fsortlbl { color:var(--muted-2); font-size:12px; display:flex; align-items:center; gap:5px; white-space:nowrap; }
|
|
249
|
+
.fexcludewrap { display:flex; align-items:center; gap:5px; }
|
|
250
|
+
.fexclude[aria-expanded="true"] { border-color:var(--accent); }
|
|
251
|
+
/* Qualified with .feedbar so it outranks the bar's generic input rule (0,1,1) and the box
|
|
252
|
+
matches the exclude… button's size, padding, surface and border. */
|
|
253
|
+
.feedbar .fexclude-input { background:var(--surface); border:1px solid var(--border-3); border-radius:8px; color:var(--text); padding:6px 10px; font:inherit; font-size:12px; field-sizing:content; min-width:120px; max-width:220px; }
|
|
254
|
+
.feedbar .fexclude-input:focus { outline:none; border-color:var(--accent); }
|
|
255
|
+
.feedbar .fexclude-input::placeholder { color:var(--muted-2); opacity:1; }
|
|
256
|
+
/* A refused term: the same amber as an invalid regex in the filter box, with the reason beside it. */
|
|
257
|
+
.feedbar .fexclude-input[aria-invalid="true"] { border-color:var(--warn); }
|
|
258
|
+
/* Hung under the input so it reads as the input's note and never as the caption of the next label;
|
|
259
|
+
the wrap is position:relative for it. The ⚠ glyph matches the Filters panel's "⚠ rejected". */
|
|
260
|
+
.fexcludewrap { position:relative; }
|
|
261
|
+
/* The Switchboard kind chips: the row's .sbkind pill as a button. The strike-through carries the
|
|
262
|
+
state (a struck name is a hidden kind), the fill is secondary: on wears the pill's fill and
|
|
263
|
+
text (10:1 dark, 8.5:1 light); off drops the fill and strikes the name in --muted-2 (7:1 dark,
|
|
264
|
+
6.9:1 light on the page). Both states share the --muted border (measured 3.8:1 dark, 4.2:1
|
|
265
|
+
light, over the 3:1 non-text bar), so only the fill moves on a press. Padding makes a ~25px target. Never wraps inside a
|
|
266
|
+
chip, and neither the group nor its "kinds" label shrinks (a shrinking group wrapped chips
|
|
267
|
+
onto a second line); it shares the bar's row with exclude…. The note anchors to the group's
|
|
268
|
+
right edge and grows inward, so it cannot run off the bar's end. */
|
|
269
|
+
.fsortlbl:has(.fkinds) { flex:0 0 auto; }
|
|
270
|
+
.fkinds { position:relative; display:inline-flex; align-items:center; gap:3px; flex:0 0 auto; }
|
|
271
|
+
#fkinds-note { left:auto; right:0; }
|
|
272
|
+
.fkind { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:5px 7px; border-radius:4px; background:var(--chip-sb-bg); color:var(--text-2); border:1px solid var(--muted); font-family:inherit; line-height:1.3; cursor:pointer; white-space:nowrap; }
|
|
273
|
+
.fkind:hover { border-color:var(--accent); }
|
|
274
|
+
.fkind:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
|
|
275
|
+
:root.light .fkind:focus-visible { outline-color:var(--accent-text); }
|
|
276
|
+
.fkind-off { background:transparent; color:var(--muted-2); border-color:var(--muted); text-decoration:line-through; text-decoration-thickness:1.5px; }
|
|
277
|
+
/* The note hangs below the bar out of flow; without a reserved row the feed viewport paints
|
|
278
|
+
over it whenever the bar does not wrap. */
|
|
279
|
+
.feedbar:has(.fexclude-note) { margin-bottom:26px; }
|
|
280
|
+
.fexclude-note { position:absolute; left:0; top:100%; margin-top:2px; z-index:1; color:var(--warn); font-size:11.5px; white-space:nowrap; }
|
|
281
|
+
.fexclude-note::before { content:"⚠ "; }
|
|
282
|
+
:root.light .fexclude-note { color:var(--warn-text); }
|
|
283
|
+
/* A note about a term that was taken (the gapped hint) is advice, not a warning: no glyph, muted. */
|
|
284
|
+
.fexclude-note.fexclude-note-plain { color:var(--muted-2); }
|
|
285
|
+
.fexclude-note.fexclude-note-plain::before { content:""; }
|
|
286
|
+
:root.light .fexclude-note.fexclude-note-plain { color:var(--muted-2); }
|
|
230
287
|
.feedbar select { background:var(--surface); border:1px solid var(--border-3); border-radius:8px; color:var(--text); padding:6px 8px; font:inherit; font-size:12px; cursor:pointer; max-width:200px; }
|
|
288
|
+
/* The cap is for the app selector's package names; the sort labels are short and size to themselves. */
|
|
289
|
+
.feedbar select.fsort { max-width:none; }
|
|
231
290
|
/* the virtualized viewport */
|
|
232
291
|
.vpbox { position:relative; flex:1; min-height:0; display:flex; }
|
|
233
292
|
.vp { position:relative; flex:1; min-height:0; overflow-y:auto; border:1px solid var(--border); border-radius:12px; background:var(--inset); user-select:none; -webkit-user-select:none; }
|
|
@@ -241,12 +300,133 @@
|
|
|
241
300
|
.row.sel { background:var(--sel); } /* selection background beats breach/failed tint */
|
|
242
301
|
.row.inspecting { box-shadow:inset 3px 0 var(--accent); } /* inspected row marker (overrides the red bar) */
|
|
243
302
|
.row .t { color:var(--muted); } .dir-OUTGOING{color:var(--blue)} .dir-INCOMING{color:var(--purple)} .chan { color:var(--muted-2); }
|
|
303
|
+
/* switchboard rows: the device sends lowercase directions; the arrow reads incoming as ← (from the server) */
|
|
304
|
+
.dir-outgoing{color:var(--blue)} .dir-incoming{color:var(--purple)} .sbdir { font-weight:700; }
|
|
305
|
+
.sbsess { color:var(--muted-2); font-variant-numeric:tabular-nums; }
|
|
306
|
+
/* One neutral pill for every kind: the per-kind tints were the Live type-chip colours, which
|
|
307
|
+
would give purple, green, amber and blue a second meaning on the same page. --surface-3 is
|
|
308
|
+
about 1.1:1 against the body, so the pill gets its own background. Failure keeps the red. */
|
|
309
|
+
.sbkind { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:1px 6px; border-radius:4px; background:var(--chip-sb-bg); color:var(--text-2); box-shadow:inset 0 0 0 1px var(--border-2); }
|
|
310
|
+
/* A selected row's tint is close to the pill's, so the outline steps up to keep the pill's shape. */
|
|
311
|
+
.row.sel .sbkind:not(.sbkind-bad) { box-shadow:inset 0 0 0 1px var(--muted); }
|
|
312
|
+
.sbkind-bad { background:var(--lvl-err-bg); color:var(--error); }
|
|
313
|
+
.sbsum { color:var(--text-2); }
|
|
314
|
+
/* voice panel (Switchboard tab): session strip, tracks, stat cards. Every colour is a theme
|
|
315
|
+
token, so light and dark come from :root / :root.light alone; the two light overrides below
|
|
316
|
+
swap amber text for the readable --warn-text the way .fexclude-note does. */
|
|
317
|
+
.voice { display:flex; flex-direction:column; gap:8px; margin-bottom:8px; flex:0 0 auto; }
|
|
318
|
+
.voice-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:8px 12px; }
|
|
319
|
+
.voice-hd { display:flex; justify-content:space-between; align-items:center; font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:6px; }
|
|
320
|
+
.voice-strip { display:flex; gap:14px; align-items:center; flex-wrap:wrap; font-size:12.5px; }
|
|
321
|
+
.voice-pill { display:inline-flex; align-items:center; gap:6px; padding:2px 10px; border-radius:999px; border:1px solid var(--border-2); background:var(--surface-2); color:var(--text); }
|
|
322
|
+
/* Reset the UA button chrome that would otherwise show through .voice-pill's own look. */
|
|
323
|
+
button.voice-pill-server { font:inherit; text-align:inherit; cursor:pointer; }
|
|
324
|
+
button.voice-pill-server:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
|
|
325
|
+
:root.light button.voice-pill-server:focus-visible { outline-color:var(--accent-text); }
|
|
326
|
+
.voice-dot { width:8px; height:8px; border-radius:50%; background:var(--muted); }
|
|
327
|
+
.voice-dot.ok { background:var(--accent); box-shadow:0 0 6px var(--accent); }
|
|
328
|
+
.voice-dot.bad { background:var(--error); }
|
|
329
|
+
.voice-dot.warn { background:var(--warn); }
|
|
330
|
+
.voice-dot.muted { background:var(--purple); }
|
|
331
|
+
.voice-kv { color:var(--muted-2); } .voice-kv b { color:var(--text); font-weight:600; }
|
|
332
|
+
.voice-kv.warn { color:var(--warn); }
|
|
333
|
+
.voice-kv.warn b { color:inherit; }
|
|
334
|
+
:root.light .voice-kv.warn { color:var(--warn-text); }
|
|
335
|
+
.voice-note { color:var(--muted-2); } .voice-note b { color:var(--text); font-weight:600; }
|
|
336
|
+
.voice-ended { background:var(--surface-3); color:var(--text-2); font-weight:700; box-shadow:inset 0 0 0 1px var(--border-2); border:0; border-radius:4px; padding:1px 6px; }
|
|
337
|
+
.voice-phases { display:flex; height:10px; border-radius:6px; overflow:hidden; border:1px solid var(--border-2); margin-top:8px; }
|
|
338
|
+
.voice-phase { background:var(--sel-soft); border-right:1px solid var(--border); }
|
|
339
|
+
.voice-phase.slow { background:var(--lvl-err-bg); }
|
|
340
|
+
.voice-phasetext { font-size:11px; margin-top:4px; }
|
|
341
|
+
.voice-slowtxt { color:var(--error); }
|
|
342
|
+
/* Export sits beside the zoom role="group", not inside it: the group's aria-label describes
|
|
343
|
+
the zoom buttons only. */
|
|
344
|
+
.voice-hd-tools { display:inline-flex; align-items:center; gap:4px; text-transform:none; letter-spacing:0; }
|
|
345
|
+
.voice-zoom { display:inline-flex; gap:4px; text-transform:none; letter-spacing:0; padding-right:8px; border-right:1px solid var(--border-2); }
|
|
346
|
+
.voice-zoombtn, .voice-exportbtn { font:inherit; font-size:11px; color:var(--muted-2); background:var(--surface-2); border:1px solid var(--border-2); border-radius:6px; padding:1px 8px; cursor:pointer; }
|
|
347
|
+
.voice-zoombtn:hover, .voice-exportbtn:hover { color:var(--text); border-color:var(--border-3); }
|
|
348
|
+
/* Flex gap (4px) plus this margin matches .voice-zoom's 8px padding-right, centering the divider. */
|
|
349
|
+
.voice-exportbtn { margin-left:4px; }
|
|
350
|
+
/* The button is never really disabled while exporting (that would drop it from tab order), so
|
|
351
|
+
aria-disabled is the selector that matches. */
|
|
352
|
+
.voice-exportbtn:disabled, .voice-exportbtn[aria-disabled="true"] { opacity:.5; cursor:progress; }
|
|
353
|
+
/* Keep hover from signaling "clickable" while a click is ignored. */
|
|
354
|
+
.voice-exportbtn[aria-disabled="true"]:hover { color:var(--muted-2); border-color:var(--border-2); }
|
|
355
|
+
.voice-exportbtn:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
|
|
356
|
+
:root.light .voice-exportbtn:focus-visible { outline-color:var(--accent-text); }
|
|
357
|
+
/* Same accent tokens .modebtn.active uses for the mode picker, so the two "selected" controls
|
|
358
|
+
on the page read as one visual language. */
|
|
359
|
+
.voice-zoombtn.on { background:var(--accent-bg); border-color:var(--accent); color:var(--accent-text); font-weight:600; }
|
|
360
|
+
.voice-zoombtn.on:hover { border-color:var(--accent); }
|
|
361
|
+
.voice-zoombtn:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
|
|
362
|
+
:root.light .voice-zoombtn:focus-visible { outline-color:var(--accent-text); }
|
|
363
|
+
/* header re-arm count, its own span so it can carry the warn colour without the whole header
|
|
364
|
+
title turning amber. */
|
|
365
|
+
.voice-hd-rearms { font-weight:600; }
|
|
366
|
+
.voice-hd-rearms.warn { color:var(--warn); }
|
|
367
|
+
:root.light .voice-hd-rearms.warn { color:var(--warn-text); }
|
|
368
|
+
/* Row and tick labels are plain HTML over the plot, not SVG text: the SVG's
|
|
369
|
+
preserveAspectRatio="none" stretches x only, and a glyph drawn inside it would stretch or
|
|
370
|
+
squash along with the bars. The gutter is a fixed-width column so a label never sits under
|
|
371
|
+
a bar; the plot's own children are absolutely positioned over its (relatively positioned)
|
|
372
|
+
box, sized as a percent of its width, which the SVG (width:100%) shares exactly. */
|
|
373
|
+
.voice-trackrow { display:flex; }
|
|
374
|
+
.voice-rowlabels { position:relative; width:96px; flex:0 0 96px; }
|
|
375
|
+
/* line-height 18px matches ROW_H in voice.ts, the bar height each label sits beside, so the
|
|
376
|
+
label text centres on its bar instead of hugging the top of the row. top is a percent of the
|
|
377
|
+
plot's own height (set inline, per row, in voice.ts), not a fixed px, so the label still
|
|
378
|
+
lines up with its bar if H ever changes. */
|
|
379
|
+
/* nowrap keeps "playback level" on one line so it stays beside its bar. */
|
|
380
|
+
.voice-rowlabels span { position:absolute; left:0; font-size:10px; color:var(--muted-2); line-height:18px; white-space:nowrap; }
|
|
381
|
+
.voice-rowlabels { padding-right:6px; }
|
|
382
|
+
.voice-plot { position:relative; flex:1 1 auto; min-width:0; }
|
|
383
|
+
/* Fallback only: voice.ts sets the real height inline via plotHeight(hasLevels). A mismatch
|
|
384
|
+
with the viewBox height would scale every row's y and misalign the row labels. */
|
|
385
|
+
.voice-plot svg { width:100%; height:172px; display:block; }
|
|
386
|
+
.voice-ticklabels { position:absolute; left:0; right:0; bottom:0; height:12px; pointer-events:none; }
|
|
387
|
+
.voice-ticklabels span { position:absolute; bottom:0; transform:translateX(-50%); font-size:10px; color:var(--muted-2); }
|
|
388
|
+
/* top is set inline by voice.ts to pin the note to the markers row; anchoring to the bottom
|
|
389
|
+
would land it on the playback level row. */
|
|
390
|
+
.voice-nomarkers { position:absolute; right:4px; font-size:10px; }
|
|
391
|
+
/* A guide line's opacity is a class, not an inline attr, so the light theme can read it a
|
|
392
|
+
touch stronger than dark: a faint line against a light background disappears much faster
|
|
393
|
+
than the same opacity against dark. */
|
|
394
|
+
.voice-guide { opacity:.35; }
|
|
395
|
+
:root.light .voice-guide { opacity:.6; }
|
|
396
|
+
.voice-legend { display:flex; gap:8px 14px; font-size:11px; color:var(--muted-2); margin-top:8px; flex-wrap:wrap; }
|
|
397
|
+
.voice-legend span::before { content:""; display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:6px; vertical-align:-1px; background:var(--muted); }
|
|
398
|
+
.voice-legend .m::before { background:var(--blue); } .voice-legend .y::before { background:var(--accent); } .voice-legend .r::before { background:var(--warn); } .voice-legend .s::before { background:var(--purple); } .voice-legend .f::before { background:var(--muted-2); }
|
|
399
|
+
/* Plain swatch, matching the clipped peak rect in voice.ts's levelBars. */
|
|
400
|
+
.voice-legend .clip::before { background:var(--error); }
|
|
401
|
+
/* Legend swatches teach the tracks' own shapes, not just their colours: a thin vertical bar
|
|
402
|
+
for the line-tick markers (half height for the focus tick, half width for the stop tick,
|
|
403
|
+
matching their own glyphs), a two-band gradient standing in for the stall's dashed cap, and a
|
|
404
|
+
head-plus-stem shape for the error dot and the mixed glyph's own square-capped shape line. */
|
|
405
|
+
.voice-legend .r::before, .voice-legend .s::before, .voice-legend .st::before, .voice-legend .e::before, .voice-legend .f::before { width:3px; height:11px; border-radius:1.5px; }
|
|
406
|
+
.voice-legend .f::before { height:6px; }
|
|
407
|
+
.voice-legend .s::before { width:2px; }
|
|
408
|
+
.voice-legend .st::before { width:3px; height:11px; border:0; border-radius:0; background:repeating-linear-gradient(to bottom, var(--warn-2) 0 4px, transparent 4px 7px); }
|
|
409
|
+
.voice-legend .e::before { width:7px; height:14px; border-radius:0; background:radial-gradient(circle at 50% 3.5px, var(--error) 3.5px, transparent 4px), linear-gradient(var(--error),var(--error)) 50% 100%/3px 10px no-repeat; }
|
|
410
|
+
.voice-legend .mx::before { width:6px; height:14px; border-radius:0; background:linear-gradient(var(--text),var(--text)) 50% 0/6px 6px no-repeat, linear-gradient(var(--text),var(--text)) 50% 100%/3px 6px no-repeat; }
|
|
411
|
+
.voice-legend .mu::before { border:1px dashed var(--purple); background:repeating-linear-gradient(to bottom, var(--purple) 0 1px, transparent 1px 3px); }
|
|
412
|
+
.voice-legend .mb::before { width:7px; height:11px; border-radius:3.5px; background:var(--muted); }
|
|
413
|
+
/* A scale note, not a marker kind: a swatch would imply a marker colour that does not exist. */
|
|
414
|
+
.voice-legend .lv::before { content:none; margin-right:0; }
|
|
415
|
+
.voice-cards { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; }
|
|
416
|
+
.voice-stat { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:6px 10px; display:flex; flex-direction:column; }
|
|
417
|
+
.voice-stat .v { font-size:22px; font-weight:700; line-height:1; margin-bottom:2px; color:var(--text); font-variant-numeric:tabular-nums; } .voice-stat .l { font-size:11px; color:var(--muted-2); margin-top:auto; }
|
|
418
|
+
.voice-stat .sub { font-size:10px; color:var(--muted-2); margin-bottom:2px; }
|
|
419
|
+
.voice-stat.bad .v { color:var(--error); } .voice-stat.warn .v { color:var(--warn); }
|
|
420
|
+
.voice-stat.warn { border-color:var(--warn); background:var(--lvl-warn-bg); } .voice-stat.bad { border-color:var(--error); background:var(--lvl-err-bg); }
|
|
421
|
+
.voice-stat.warn .sub { color:var(--warn); }
|
|
422
|
+
:root.light .voice-stat.warn .v { color:var(--warn-text); }
|
|
423
|
+
:root.light .voice-stat.warn .sub { color:var(--warn-text); }
|
|
244
424
|
.tchip { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:1px 6px; border-radius:4px; }
|
|
245
425
|
/* network status code chip in the row */
|
|
246
426
|
.stchip { font-size:10px; font-weight:700; padding:1px 6px; border-radius:4px; font-variant-numeric:tabular-nums; }
|
|
247
427
|
.stchip.st2 { background:var(--chip-clog-bg); color:var(--accent); } .stchip.st3 { background:var(--lvl-info-bg); color:var(--blue); }
|
|
248
428
|
.stchip.st4 { background:var(--lvl-warn-bg); color:var(--warn-2); } .stchip.st5 { background:var(--lvl-err-bg); color:var(--error); }
|
|
249
|
-
.t-network{ background:var(--chip-net-bg); color:var(--blue); } .t-rtm{ background:var(--chip-rtm-bg); color:var(--purple); } .t-clog{ background:var(--chip-clog-bg); color:var(--accent); } .t-trace{ background:var(--chip-trace-bg); color:var(--warn); } .t-log{ background:var(--chip-log-bg); color:var(--chip-log-fg); }
|
|
429
|
+
.t-network{ background:var(--chip-net-bg); color:var(--blue); } .t-rtm{ background:var(--chip-rtm-bg); color:var(--purple); } .t-clog{ background:var(--chip-clog-bg); color:var(--accent); } .t-trace{ background:var(--chip-trace-bg); color:var(--warn); } .t-log{ background:var(--chip-log-bg); color:var(--chip-log-fg); } .t-switchboard{ background:var(--chip-sb-bg); color:var(--blue-2); }
|
|
250
430
|
.lvl { font-size:10px; font-weight:700; padding:1px 5px; border-radius:4px; }
|
|
251
431
|
.lvl-ERROR,.lvl-FATAL{ background:var(--lvl-err-bg); color:var(--error); } .lvl-WARN{ background:var(--lvl-warn-bg); color:var(--warn-2); } .lvl-INFO{ background:var(--lvl-info-bg); color:var(--blue); } .lvl-DEBUG,.lvl-VERBOSE{ background:var(--lvl-dbg-bg); color:var(--muted-2); }
|
|
252
432
|
.logpkg { color:var(--blue-2); background:var(--surface-3); font-size:10.5px; padding:1px 6px; border-radius:4px; white-space:nowrap; max-width:130px; overflow:hidden; text-overflow:ellipsis; }
|
|
@@ -265,6 +445,7 @@
|
|
|
265
445
|
.inspector-hd .x { cursor:pointer; color:var(--muted-2); border:1px solid var(--border-3); border-radius:6px; padding:1px 8px; flex:0 0 auto; }
|
|
266
446
|
.inspector-hd .x:hover { color:var(--error); border-color:var(--error); }
|
|
267
447
|
.inspector .empty { color:var(--muted); font-size:12.5px; }
|
|
448
|
+
.vp .empty-row { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:12px; text-align:center; color:var(--muted-2); font-size:12.5px; pointer-events:none; }
|
|
268
449
|
/* header badges: the at-a-glance facts */
|
|
269
450
|
.ibadges { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
|
|
270
451
|
.ibadge { font-size:11px; font-weight:600; padding:2px 8px; border-radius:999px; background:var(--surface-3); color:var(--text-2); white-space:nowrap; }
|
|
@@ -294,11 +475,32 @@
|
|
|
294
475
|
pre.json color or the tokens render monochrome. */
|
|
295
476
|
.j-key { color:var(--j-key); } .j-str { color:var(--j-str); } .j-num { color:var(--j-num); } .j-bool { color:var(--j-bool); } .j-null { color:var(--j-null); font-style:italic; }
|
|
296
477
|
.inspector pre.json .j-key { color:var(--j-key); } .inspector pre.json .j-str { color:var(--j-str); } .inspector pre.json .j-num { color:var(--j-num); } .inspector pre.json .j-bool { color:var(--j-bool); } .inspector pre.json .j-null { color:var(--j-null); }
|
|
478
|
+
/* Collapsible objects/arrays. The caret hangs into the space before the bracket, so the
|
|
479
|
+
layout matches unfolded JSON; it is ::before content so it never lands in a copy. */
|
|
480
|
+
.j-tog { display:inline-block; width:1ch; margin-left:-1ch; padding:0; border:0; background:none; font:inherit; line-height:inherit; cursor:pointer; user-select:none; color:var(--muted); }
|
|
481
|
+
.j-tog:focus-visible { outline:1px solid var(--accent); }
|
|
482
|
+
/* Empty alt text keeps the glyph out of the accessible name, so the title (Fold/Unfold) is the
|
|
483
|
+
name. The plain declaration first is the fallback for Firefox before 128 and Safari before 17.4,
|
|
484
|
+
which drop the slash form. */
|
|
485
|
+
.j-tog::before { content:"▾"; content:"▾" / ""; }
|
|
486
|
+
.j-tog:hover { color:var(--text); }
|
|
487
|
+
.j-closed > .j-tog::before { content:"▸"; content:"▸" / ""; }
|
|
488
|
+
.j-ell { display:none; color:var(--muted); font-style:italic; cursor:pointer; }
|
|
489
|
+
.j-closed > .j-inner { display:none; }
|
|
490
|
+
.j-closed > .j-ell { display:inline; }
|
|
297
491
|
/* key/value grid for headers */
|
|
298
492
|
.trunc { background:var(--lvl-warn-bg); border:1px solid var(--warn); color:var(--warn-2); border-radius:6px; padding:7px 9px; font-size:11.5px; line-height:1.5; margin-bottom:8px; }
|
|
299
493
|
.inspector pre.rawbody { color:var(--text-2); }
|
|
300
494
|
.kv { display:grid; grid-template-columns:auto 1fr; gap:2px 12px; font-size:11.5px; }
|
|
301
495
|
.kv-k { color:var(--muted-2); white-space:nowrap; } .kv-v { color:var(--text-2); word-break:break-all; }
|
|
496
|
+
/* decoded form body: caption + per-field rows; a JSON field nests its own collapsible */
|
|
497
|
+
.formnote { color:var(--muted); font-size:11px; margin-bottom:6px; }
|
|
498
|
+
.formunparsed { color:var(--muted-2); font-size:11px; margin-bottom:3px; }
|
|
499
|
+
.formkv { font-size:12px; row-gap:4px; align-items:start; }
|
|
500
|
+
.formkv .formkey { padding-top:2px; }
|
|
501
|
+
.formkv .kv-v { word-break:normal; overflow-wrap:anywhere; }
|
|
502
|
+
.formkv .kv-v.empty { color:var(--muted); font-style:italic; }
|
|
503
|
+
.formkv .kv-v .insec { margin:0; }
|
|
302
504
|
/* alert */
|
|
303
505
|
#flash { position:fixed; inset:0; background:#ff3b30; opacity:0; pointer-events:none; z-index:50; transition:opacity .08s; } #flash.on { opacity:.38; }
|
|
304
506
|
#alertbanner { position:fixed; top:0; left:0; right:0; z-index:60; text-align:center; background:#ff3b30; color:#fff; font-weight:700; padding:10px; letter-spacing:.04em; box-shadow:0 2px 12px var(--shadow); display:flex; justify-content:center; gap:20px; }
|
|
@@ -443,7 +645,8 @@
|
|
|
443
645
|
.valexpand td { background:var(--surface-2); padding:10px; border-bottom:1px solid var(--rowline); white-space:normal; max-width:none; }
|
|
444
646
|
.valexpandbar { display:flex; gap:8px; margin-bottom:8px; }
|
|
445
647
|
.valexpandbar button { background:var(--surface); border:1px solid var(--border-3); border-radius:6px; color:var(--muted-2); padding:3px 10px; font:inherit; font-size:11px; cursor:pointer; } .valexpandbar button:hover { border-color:var(--accent); color:var(--accent); }
|
|
446
|
-
|
|
648
|
+
/* padding-left leaves room for the root JSON fold caret, which hangs 1ch left and overflow would clip */
|
|
649
|
+
.valpretty { margin:0; padding-left:1ch; white-space:pre-wrap; word-break:break-word; font-size:11.5px; line-height:1.45; color:var(--text-2); max-height:300px; overflow:auto; }
|
|
447
650
|
.truncwarn { background:var(--lvl-info-bg); border:1px solid var(--blue); color:var(--blue); border-radius:8px; padding:8px 11px; font-size:11.5px; margin-bottom:10px; }
|
|
448
651
|
/* Stronger treatment for the "no matches" case where files were skipped -- a search that
|
|
449
652
|
could not read anything is a different severity than one that read everything and found
|
|
@@ -516,7 +719,8 @@
|
|
|
516
719
|
recording) unmounts it entirely, so anything panel-local can be invisible exactly when it
|
|
517
720
|
matters most. Bottom-center and transient. Ignores clicks unless it has a saved file to
|
|
518
721
|
reveal, which is the one case the rule below opts into. */
|
|
519
|
-
|
|
722
|
+
/* max-width wraps a long export note into a readable block, keeping 16px margin on narrow windows. */
|
|
723
|
+
#radartoast { position:fixed; left:50%; bottom:28px; transform:translateX(-50%) translateY(8px); background:var(--surface); border:1px solid var(--accent); color:var(--text); border-radius:8px; padding:8px 16px; font-size:12.5px; max-width:min(640px, calc(100vw - 32px)); text-align:center; box-shadow:0 4px 16px var(--shadow); z-index:70; opacity:0; pointer-events:none; transition:opacity .15s ease, transform .15s ease; }
|
|
520
724
|
#radartoast.on { opacity:1; transform:translateX(-50%) translateY(0); }
|
|
521
725
|
/* Only a save confirmation that actually has a file to reveal takes clicks. The default
|
|
522
726
|
stays pointer-events:none above, because a toast floats over rows the user is clicking
|
|
@@ -8,10 +8,11 @@ import { html } from "./html.js";
|
|
|
8
8
|
import { render } from "preact";
|
|
9
9
|
import { useState, useEffect, useCallback, useRef } from "preact/hooks";
|
|
10
10
|
import { useStoreValue } from "./hooks.js";
|
|
11
|
-
import { store, MODES, modeServed, describeConstraints, AUTO_REARM_MAX_FAILS
|
|
11
|
+
import { store, MODES, modeServed, describeConstraints, AUTO_REARM_MAX_FAILS } from "./store.js";
|
|
12
12
|
import { SOURCES } from "./registry.js";
|
|
13
13
|
import { Feed } from "./feed.js";
|
|
14
14
|
import { Cards } from "./widgets.js";
|
|
15
|
+
import { VoicePanel, showsVoicePanel } from "./voice.js";
|
|
15
16
|
import { Inspector } from "./inspector.js";
|
|
16
17
|
import { Filters } from "./filters.js";
|
|
17
18
|
import { DbBrowser } from "./db.js";
|
|
@@ -70,6 +71,7 @@ export function Header({ screenOpen, onScreenToggle }) {
|
|
|
70
71
|
// answer), so there is no gating to get wrong here.
|
|
71
72
|
const enableError = useStoreValue(store, "enable-error", () => store.visibleEnableError);
|
|
72
73
|
const enableInstructs = useStoreValue(store, "enable-error", () => store.visibleEnableInstructs);
|
|
74
|
+
const refusal = useStoreValue(store, "refusal", () => store.refusal);
|
|
73
75
|
const profile = useStoreValue(store, "profile", () => store.profileLabel);
|
|
74
76
|
const version = useStoreValue(store, "version", () => store.serverVersion);
|
|
75
77
|
const selfHeal = useStoreValue(store, "self-heal", () => store.selfHeal);
|
|
@@ -98,11 +100,12 @@ export function Header({ screenOpen, onScreenToggle }) {
|
|
|
98
100
|
// but renders its own "checking…" tail rather than an instruction the reply may withdraw.
|
|
99
101
|
const selfArmBlocked = useStoreValue(store, "self-arm-blocked", () => store.selfArmBlocked);
|
|
100
102
|
const mayAutoRearm = selfArmBlocked === false;
|
|
101
|
-
// A device-select failure (e.g. an ambiguous
|
|
102
|
-
//
|
|
103
|
+
// A device-select failure (e.g. an ambiguous 409). Cleared by a pick that works, a refusal
|
|
104
|
+
// mounting or a reset; a bound-device change does not (a pin that landed moves the baseline
|
|
103
105
|
// after the error is written, so the error is about the device just pinned — see
|
|
104
|
-
// checkSerialEdge). Suppressed while
|
|
105
|
-
// spans explaining one outage)
|
|
106
|
+
// checkSerialEdge). Suppressed while an enable answer is on screen (two differently worded
|
|
107
|
+
// spans explaining one outage); it outranks the held refusal sentence, since the pick is the
|
|
108
|
+
// later action. Also suppressed during an /enable flight (a new attempt supersedes the old
|
|
106
109
|
// answer, and visibleEnableError is null for the same reason).
|
|
107
110
|
const pickError = useStoreValue(store, "device-error", () => store.deviceError);
|
|
108
111
|
const pickInstructs = useStoreValue(store, "device-error", () => store.deviceErrorInstructs);
|
|
@@ -172,6 +175,7 @@ export function Header({ screenOpen, onScreenToggle }) {
|
|
|
172
175
|
return html `<h1>SLACK RADAR DASHBOARD <span class="conn waiting">● dashboard stopped</span></h1>`;
|
|
173
176
|
}
|
|
174
177
|
const connected = conn.state === "connected";
|
|
178
|
+
const refusalReason = enabling || enableError || pickError ? null : refusal;
|
|
175
179
|
// The no-radar-session wording is split in two so the controls between them hold still: the
|
|
176
180
|
// conn span keeps the fixed diagnosis ("● no radar session on the device") for the whole
|
|
177
181
|
// outage, and the part that changes with what the automation is doing renders in its own
|
|
@@ -190,9 +194,13 @@ export function Header({ screenOpen, onScreenToggle }) {
|
|
|
190
194
|
// hover) and present whenever the Reconnect button is — so a reason mounting or unmounting at an
|
|
191
195
|
// attempt boundary, or at a manual press in an undiagnosed outage, changes what the row says,
|
|
192
196
|
// not how tall the header is (a height change reflows everything below it).
|
|
197
|
+
// The one exception is a refused outage (.reason.refusal): the held sentence and the press or
|
|
198
|
+
// pick answer that replaces it wrap instead of ellipsizing, since their last words instruct.
|
|
193
199
|
//
|
|
194
|
-
// The tail's precedence, each rung earning its rank:
|
|
195
|
-
//
|
|
200
|
+
// The tail's precedence, each rung earning its rank: a FAILED PRESS or a FAILED PICK in a refused
|
|
201
|
+
// outage outranks all of these, since none exist there (the no-session latch and its automation
|
|
202
|
+
// are retired by the refusal); then an unresolved device PICK outranks everything else (the
|
|
203
|
+
// policy refuses to act until the human picks, so promising a retry would be
|
|
196
204
|
// false); a flight IN PROGRESS outranks the give-up wording (a manual press after give-up
|
|
197
205
|
// must not render "press Reconnect" beside its own disabled, already-pressed button; the
|
|
198
206
|
// manual flight renders no tail at all, since the button already reads "enabling…"); a
|
|
@@ -228,7 +236,14 @@ export function Header({ screenOpen, onScreenToggle }) {
|
|
|
228
236
|
: flapped
|
|
229
237
|
? "Auto re-enable gave up, the session keeps dying soon after coming back"
|
|
230
238
|
: "Auto re-enable gave up after " + AUTO_REARM_MAX_FAILS + " tries";
|
|
231
|
-
|
|
239
|
+
// A refused press has no tail, and its answer usually repeats the sentence already shown.
|
|
240
|
+
// The tail names the outcome so the press is visible; the span beside it says why.
|
|
241
|
+
// The pick answer gets the same tail so the row reads as the pick's result,
|
|
242
|
+
// not as the picked device refusing.
|
|
243
|
+
// An answer without an instruction gets the press here, so the row keeps exactly one.
|
|
244
|
+
const pressFailed = refusal !== null && !!enableError;
|
|
245
|
+
const pickFailed = refusal !== null && !!visiblePickError;
|
|
246
|
+
const tailText = pressFailed ? "Reconnect failed" + press : pickFailed ? "Pick failed" + press : !inOutage || needsPick
|
|
232
247
|
? null
|
|
233
248
|
: enabling || autoRearming
|
|
234
249
|
? autoRearming
|
|
@@ -270,7 +285,9 @@ export function Header({ screenOpen, onScreenToggle }) {
|
|
|
270
285
|
<h1>
|
|
271
286
|
SLACK RADAR DASHBOARD
|
|
272
287
|
<span class=${"conn " + conn.state}>${connLabel}</span>
|
|
273
|
-
|
|
288
|
+
${profile
|
|
289
|
+
? html `<span class="profilewrap" title="the device profile Radar is connected to (first app to launch wins the socket)">profile: <b>${profile}</b></span>`
|
|
290
|
+
: null}
|
|
274
291
|
<${DeviceChip} />
|
|
275
292
|
${!connected ? html `<button class="reconnect" disabled=${enabling} onClick=${reconnect}>${enabling ? "⟳ enabling…" : "⟳ Reconnect Radar"}</button>` : null}
|
|
276
293
|
${suppressed
|
|
@@ -299,7 +316,7 @@ export function Header({ screenOpen, onScreenToggle }) {
|
|
|
299
316
|
${selfHeal?.outcome === "updated" ? html `<span class="version" title="Radar self-healed to a newer version on this launch">↑ updated to v${selfHeal.toVersion}</span>` : null}
|
|
300
317
|
${selfHeal?.outcome === "error" ? html `<span class="conn waiting" title=${"The dock launcher's self-heal check failed: " + (selfHeal.error || "unknown error") + ". Log: ~/Library/Logs/slack-radar-dashboard.log"}>⚠ self-heal check failed</span>` : null}
|
|
301
318
|
${setupHint && !setupHint.mcpSeen && !hintDismissed ? html `<span class="setuphint" title="Radar has not seen an agent client start its MCP server on this machine. The dashboard works without one.">No agent client has connected yet. <a href="https://slack-github.com/slack/slack-radar-mcp#installation" target="_blank" rel="noreferrer">Set up agent tools</a>.<button class="hintdismiss" onClick=${dismissHint} aria-label="Hide the agent tools hint permanently for dashboards at this address" title="Hide this hint permanently for dashboards at this address">✕</button></span>` : null}
|
|
302
|
-
${statusRow ? html `<span class="statusrow">${recoveryTail ? html `<span class=${"conn " + conn.state} title=${tailTitle}>${recoveryTail}</span>` : null}${enableError ? html `<span class
|
|
319
|
+
${statusRow ? html `<span class="statusrow">${recoveryTail ? html `<span class=${"conn " + conn.state} title=${tailTitle}>${recoveryTail}</span>` : null}${enableError ? html `<span class=${"conn waiting reason" + (pressFailed ? " refusal" : "")} title=${enableError}>${enableError}</span>` : null}${refusalReason ? html `<span class="conn waiting reason refusal" title=${refusalReason}>${refusalReason}</span>` : null}${visiblePickError ? html `<span class=${"conn waiting reason" + (refusal !== null ? " refusal" : "")} title=${visiblePickError}>${visiblePickError}</span>` : null}</span>` : null}
|
|
303
320
|
</h1>
|
|
304
321
|
`;
|
|
305
322
|
}
|
|
@@ -308,16 +325,15 @@ export function ModeBar() {
|
|
|
308
325
|
useEffect(() => store.on("spec", () => force((n) => n + 1)), []);
|
|
309
326
|
const deviceSources = useStoreValue(store, "sources", () => store.deviceSources);
|
|
310
327
|
const activeKey = store.activeModeKey();
|
|
311
|
-
const pick = (specToPush) => store.
|
|
328
|
+
const pick = (specToPush) => store.pushPreset(specToPush);
|
|
312
329
|
const serves = (m) => modeServed(m.key, deviceSources);
|
|
313
330
|
// A device switch can hide the active tab (leaner build). Reset to the first tab so the
|
|
314
|
-
// user is never stranded on an invisible mode rendering a dead feed. Through
|
|
315
|
-
// every other preset push, so the level floor
|
|
316
|
-
// MODES[0].spec would
|
|
317
|
-
// it (lastLogLevel back to ""), and the next Logs click would start at VERBOSE.
|
|
331
|
+
// user is never stranded on an invisible mode rendering a dead feed. Through pushPreset like
|
|
332
|
+
// every other preset push, so the platform log package and level floor ride along. Live carries
|
|
333
|
+
// log rows, so a bare MODES[0].spec would forget both pieces of platform/view state.
|
|
318
334
|
useEffect(() => {
|
|
319
335
|
if (activeKey && activeKey !== "__custom__" && !modeServed(activeKey, deviceSources)) {
|
|
320
|
-
store.
|
|
336
|
+
store.pushPreset(MODES[0].spec);
|
|
321
337
|
}
|
|
322
338
|
}, [deviceSources, activeKey]);
|
|
323
339
|
// Group modes by source kind for visual separation
|
|
@@ -392,16 +408,18 @@ function StreamView({ spec }) {
|
|
|
392
408
|
<span class="summary">${spec.summary || spec.title}</span>
|
|
393
409
|
<span class="tech">${tech}</span>
|
|
394
410
|
</div>
|
|
395
|
-
<${Filters} spec=${spec} />
|
|
411
|
+
<${Filters} spec=${spec} remembered=${store.matchesMode(spec) !== null} />
|
|
396
412
|
<${Cards} spec=${spec} />
|
|
413
|
+
${showsVoicePanel(spec) ? html `<${VoicePanel} onInspect=${(ev) => setSelected(ev)} />` : null}
|
|
397
414
|
<div class=${"stage" + (selected ? " split" : "")}>
|
|
398
415
|
<${Feed} spec=${spec} onInspect=${(ev) => setSelected(ev)} selectedId=${selected && selected.id} />
|
|
399
416
|
${selected ? html `<${Inspector} ev=${selected} onClose=${() => setSelected(null)} />` : null}
|
|
400
417
|
</div>
|
|
401
418
|
`;
|
|
402
419
|
}
|
|
403
|
-
|
|
404
|
-
|
|
420
|
+
// Exported for the test that pins the tab list; App is the only caller.
|
|
421
|
+
export function Blank() {
|
|
422
|
+
return html `<div class="sub"><span class="summary">Pick a dashboard above.</span><span class="tech">Live, Network, RTM, Clogs, Traces, Logs, Switchboard, Database, Preferences, Feature Flags. Or ask a terminal Claude Code session to build a custom view.</span></div>`;
|
|
405
423
|
}
|
|
406
424
|
function App() {
|
|
407
425
|
const spec = useStoreValue(store, "spec", () => store.spec);
|
|
@@ -442,9 +460,12 @@ function App() {
|
|
|
442
460
|
return;
|
|
443
461
|
const nextKey = keys[next];
|
|
444
462
|
const preset = MODES.find((m) => m.key === nextKey)?.spec;
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
463
|
+
if (nextKey === "__custom__" && store.lastCustomSpec) {
|
|
464
|
+
store.setSpec(store.lastCustomSpec);
|
|
465
|
+
}
|
|
466
|
+
else if (preset) {
|
|
467
|
+
store.pushPreset(preset);
|
|
468
|
+
}
|
|
448
469
|
e.preventDefault();
|
|
449
470
|
};
|
|
450
471
|
window.addEventListener("keydown", onKey);
|
|
@@ -721,7 +721,10 @@ function Grid({ rows, cols, selectedRow, onSelect, sort, onSort, }) {
|
|
|
721
721
|
</tr>
|
|
722
722
|
</thead>
|
|
723
723
|
<tbody>
|
|
724
|
-
${rows.map(
|
|
724
|
+
${rows.map(
|
|
725
|
+
// Keyed by the row object, which sortRows leaves untouched because it copies the array and
|
|
726
|
+
// not the rows, so a sort moves the existing rows instead of rewriting every cell in place.
|
|
727
|
+
(row) => html `<tr key=${row} class=${row === selectedRow ? "rowsel" : ""} onClick=${() => onSelect(row)}>
|
|
725
728
|
${cols.map((c) => html `<td title=${String(row[c] ?? "")}>${String(row[c] ?? "")}</td>`)}
|
|
726
729
|
</tr>`)}
|
|
727
730
|
</tbody>
|