@slack/radar-mcp 1.20.0 → 1.21.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.
Files changed (41) hide show
  1. package/README.md +11 -6
  2. package/dist/mcp/api-paths.d.ts +11 -0
  3. package/dist/mcp/api-paths.js +67 -16
  4. package/dist/mcp/index.js +24 -7
  5. package/dist/mcp/network-detail.d.ts +5 -0
  6. package/dist/mcp/network-detail.js +86 -0
  7. package/dist/mcp/radar-response.d.ts +7 -0
  8. package/dist/mcp/radar-response.js +15 -0
  9. package/dist/mcp/session-backfill.d.ts +9 -3
  10. package/dist/mcp/session-backfill.js +77 -17
  11. package/dist/mcp/session-detail.js +54 -2
  12. package/dist/mcp/session-query.js +53 -11
  13. package/dist/mcp/sources-gate.js +4 -0
  14. package/dist/mcp/switchboard-tools.d.ts +9 -0
  15. package/dist/mcp/switchboard-tools.js +40 -0
  16. package/dist/mcp/tools.js +62 -16
  17. package/dist/shared/constants.d.ts +10 -0
  18. package/dist/shared/constants.js +10 -0
  19. package/dist/shared/event-spool.js +3 -2
  20. package/dist/shared/form-body.d.ts +18 -0
  21. package/dist/shared/form-body.js +251 -0
  22. package/dist/shared/stream.d.ts +1 -1
  23. package/dist/shared/switchboard.d.ts +9 -0
  24. package/dist/shared/switchboard.js +54 -0
  25. package/dist/shared/wire.d.ts +32 -0
  26. package/dist/web/public/index.html +172 -10
  27. package/dist/web/public/next/app.js +16 -10
  28. package/dist/web/public/next/db.js +4 -1
  29. package/dist/web/public/next/feed.js +515 -57
  30. package/dist/web/public/next/filters.js +158 -40
  31. package/dist/web/public/next/form-body.js +252 -0
  32. package/dist/web/public/next/inspector.js +103 -12
  33. package/dist/web/public/next/registry.js +21 -2
  34. package/dist/web/public/next/store.js +503 -51
  35. package/dist/web/public/next/voice-model.js +532 -0
  36. package/dist/web/public/next/voice.js +397 -0
  37. package/dist/web/server.d.ts +7 -0
  38. package/dist/web/server.js +154 -16
  39. package/dist/web/spec.d.ts +10 -6
  40. package/dist/web/spec.js +61 -6
  41. package/package.json +3 -3
@@ -0,0 +1,251 @@
1
+ // Decode an application/x-www-form-urlencoded request body into its fields. A record that carries
2
+ // `request_content_type` (the request's Content-Type, read off the OkHttp body by the device
3
+ // interceptor) is a form or not by that field alone. A record without it predates the field, so a
4
+ // form body is recognised by shape: `key=value&key=value` with nothing that would make it JSON or
5
+ // prose. Slack API POSTs routinely tuck JSON inside a field (blocks, types, client_context), so
6
+ // every decoded value that looks like JSON is parsed too. Pure, never throws.
7
+ //
8
+ // The browser build cannot import from src/shared, so scripts/mirror-shared.mjs copies this file
9
+ // to src/web/public/next/form-body.ts at build time (gitignored). This is the one to edit.
10
+ // Every pair is `name=value` with no whitespace; a trailing empty value (`draft_id=`) is fine.
11
+ const FORM_SHAPE = /^[^=&\s]+=[^&\s]*(&[^=&\s]+=[^&\s]*)*$/;
12
+ // A lone pair needs a field-like key: a base64 blob such as `QUJDRA==` otherwise passes the
13
+ // shape as key `QUJDRA` with value `=`. Real field names start with a letter or underscore and
14
+ // stay short; the padding pattern catches the blobs that happen to start with a letter too.
15
+ const KEY_START = /^[A-Za-z_]/;
16
+ const MAX_LONE_KEY = 64;
17
+ const BASE64_BLOB = /^[A-Za-z0-9+/]+=*$/;
18
+ // A lower-case snake_case key is a field name, never base64 padding (`token=`, `_x=1`).
19
+ const PLAIN_FIELD_NAME = /^[a-z_][a-z0-9_]*$/;
20
+ // Bracket nesting past this is not a payload the tool needs to read, and the dashboard's JSON
21
+ // highlighter recurses one frame per level, so a hostile depth stays a string, marked as left
22
+ // unparsed so the reader knows it was a choice. Real bodies sit far under it: the fixture's `blocks` nest 6
23
+ // deep, and rich_text lists carry their indent as a field rather than by nesting.
24
+ const MAX_JSON_DEPTH = 32;
25
+ const DEPTH_UNPARSED = `JSON nested past ${MAX_JSON_DEPTH} levels; left unparsed`;
26
+ // The declared media type, with or without parameters. Anchored on the type itself so a
27
+ // multipart boundary or a suffix that happens to contain the words does not read as a form.
28
+ const FORM_MEDIA_TYPE = /^\s*application\/x-www-form-urlencoded\s*(;|$)/i;
29
+ // application/json, the +json structured-syntax family (application/vnd.api+json) and the
30
+ // unregistered but seen text/json, with or without parameters.
31
+ const JSON_MEDIA_TYPE = /^\s*(application|text)\/([\w.+-]*\+)?json\s*(;|$)/i;
32
+ // The first two characters of a JSON object or array with something (or nothing) inside. A
33
+ // value like `[WIP] fix` or `{fire}` opens with a bracket too, but not like a JSON token.
34
+ const JSON_OPENER = /^(\{"|\{\}|\[\{|\["|\[\[|\[-?\d|\[(true|false|null)|\[\])/;
35
+ // Split off a tail the device cap left without an `=`: the body was cut inside a field name or
36
+ // right after an `&`. Only applies when a complete pair precedes it, so a bare word stays intact.
37
+ function splitCutTail(body) {
38
+ const amp = body.lastIndexOf("&");
39
+ if (amp > 0 && /^[^=&\s]*$/.test(body.slice(amp + 1))) {
40
+ return { body: body.slice(0, amp), truncated: true };
41
+ }
42
+ return { body, truncated: false };
43
+ }
44
+ // The record's own answer when it has one: `request_content_type` settles the form question
45
+ // without the shape rules. undefined means the record carries no verdict (a build that predates
46
+ // the field), so the caller falls back to shape.
47
+ export function formContentType(contentType) {
48
+ if (typeof contentType !== "string" || contentType.trim() === "")
49
+ return undefined;
50
+ return FORM_MEDIA_TYPE.test(contentType);
51
+ }
52
+ // The record's own answer to "is this JSON?", by the same rule: undefined without a verdict.
53
+ function jsonContentType(contentType) {
54
+ if (typeof contentType !== "string" || contentType.trim() === "")
55
+ return undefined;
56
+ return JSON_MEDIA_TYPE.test(contentType);
57
+ }
58
+ // Is this request body a form? The declared Content-Type wins when the record has one; the shape
59
+ // rules stand in when it does not. One shape rule holds either way: a body that opens like a JSON
60
+ // token (`{"`, `[{`, `[1`; not `[WIP]` or `{fire}`) is not a form, whatever the header says,
61
+ // because URLSearchParams would swallow the whole text as a single key and hide a cut. Both the
62
+ // decode and the caller that skips it for an oversized body go through here, so the two paths
63
+ // cannot disagree about what is a form.
64
+ export function isFormBody(text, contentType) {
65
+ if (typeof text !== "string")
66
+ return false;
67
+ const declared = formContentType(contentType);
68
+ if (declared === undefined)
69
+ return looksLikeFormBody(text);
70
+ const trimmed = text.trim();
71
+ return declared && trimmed.length > 0 && !opensLikeJsonToken(trimmed);
72
+ }
73
+ // The whole-body opener: JSON_OPENER after collapsing whitespace behind the bracket, so a
74
+ // pretty-printed body qualifies and bracketed prose does not.
75
+ function opensLikeJsonToken(trimmed) {
76
+ return JSON_OPENER.test(trimmed.replace(/^([[{])\s+/, "$1"));
77
+ }
78
+ // The whole shape verdict without the decode: the pair pattern plus the lone-pair rules, for a
79
+ // record with no Content-Type of its own.
80
+ export function looksLikeFormBody(text) {
81
+ if (typeof text !== "string")
82
+ return false;
83
+ // Surrounding whitespace (a captured trailing newline) is not part of the body shape.
84
+ const trimmed = text.trim();
85
+ if (trimmed.length === 0 || trimmed[0] === "{" || trimmed[0] === "[")
86
+ return false;
87
+ const { body } = splitCutTail(trimmed);
88
+ if (!FORM_SHAPE.test(body))
89
+ return false;
90
+ if (!body.includes("&")) {
91
+ const key = body.slice(0, body.indexOf("="));
92
+ if (key.length > MAX_LONE_KEY || !KEY_START.test(key))
93
+ return false;
94
+ if (!PLAIN_FIELD_NAME.test(key) && BASE64_BLOB.test(body))
95
+ return false;
96
+ }
97
+ return true;
98
+ }
99
+ export function decodeFormBody(text, contentType) {
100
+ if (!isFormBody(text, contentType))
101
+ return null;
102
+ const { body, truncated } = splitCutTail(text.trim());
103
+ let params;
104
+ try {
105
+ params = new URLSearchParams(body);
106
+ }
107
+ catch {
108
+ return null;
109
+ }
110
+ const fields = [];
111
+ params.forEach((value, key) => {
112
+ const field = { key, value };
113
+ if (opensLikeJson(value) && scanJson(value).depth > MAX_JSON_DEPTH) {
114
+ field.unparsedReason = DEPTH_UNPARSED;
115
+ }
116
+ else {
117
+ const json = parseJsonValue(value);
118
+ if (json !== undefined)
119
+ field.json = json;
120
+ }
121
+ fields.push(field);
122
+ });
123
+ return fields.length ? { fields, truncated } : null;
124
+ }
125
+ function opensLikeJson(value) {
126
+ const c = value[0];
127
+ return c === "{" || c === "[";
128
+ }
129
+ function parseJsonValue(value) {
130
+ if (!opensLikeJson(value))
131
+ return undefined;
132
+ if (scanJson(value).depth > MAX_JSON_DEPTH)
133
+ return undefined;
134
+ try {
135
+ return JSON.parse(value);
136
+ }
137
+ catch {
138
+ return undefined;
139
+ }
140
+ }
141
+ // One linear pass over a JSON-looking value: the deepest `{` / `[` nesting, skipping bracket
142
+ // characters inside strings, and whether the text is still open when it ends (a bracket never
143
+ // closed, or a string never terminated). Open at the end is what a cut looks like; a value that
144
+ // merely ends in a letter (`[1] fix typo`) is balanced and is not.
145
+ function scanJson(value) {
146
+ let depth = 0;
147
+ let deepest = 0;
148
+ let inString = false;
149
+ for (let i = 0; i < value.length; i++) {
150
+ const ch = value[i];
151
+ if (inString) {
152
+ if (ch === "\\")
153
+ i++;
154
+ else if (ch === '"')
155
+ inString = false;
156
+ }
157
+ else if (ch === '"') {
158
+ inString = true;
159
+ }
160
+ else if (ch === "{" || ch === "[") {
161
+ depth++;
162
+ if (depth > deepest)
163
+ deepest = depth;
164
+ }
165
+ else if (ch === "}" || ch === "]") {
166
+ depth--;
167
+ }
168
+ }
169
+ return { depth: deepest, open: depth > 0 || inString };
170
+ }
171
+ // The device caps a captured body, so a long form body can end mid-field. Either the tail was
172
+ // cut inside a field name (dropped at decode time), or the last value opens like a JSON token,
173
+ // did not parse, and is still open where the text ends: it was clipped inside its JSON.
174
+ export function formBodyLooksTruncated(body) {
175
+ if (body.truncated)
176
+ return true;
177
+ const last = body.fields[body.fields.length - 1];
178
+ if (!last || last.json !== undefined)
179
+ return false;
180
+ return valueLooksCut(last.value);
181
+ }
182
+ // The same verdict from the raw text, reading only the last pair, for a body too large to decode.
183
+ export function formTextLooksTruncated(text) {
184
+ if (typeof text !== "string")
185
+ return false;
186
+ const { body, truncated } = splitCutTail(text.trim());
187
+ if (truncated)
188
+ return true;
189
+ const last = body.slice(body.lastIndexOf("&") + 1);
190
+ if (!last.includes("="))
191
+ return false;
192
+ // Read the value off the parsed pair rather than by raw key: a `+` or percent escape in the
193
+ // name would make a raw-key lookup miss.
194
+ const value = [...new URLSearchParams(last).values()][0] ?? "";
195
+ return valueLooksCut(value);
196
+ }
197
+ // Bracket balance decides, not the last character: `[1] fix typo` closes its bracket and is a
198
+ // plain value; `[{"a":1}` closes the inner brace and is still a cut.
199
+ function valueLooksCut(value) {
200
+ return JSON_OPENER.test(value) && scanJson(value).open && parseJsonValue(value) === undefined;
201
+ }
202
+ // The same cut verdict for a whole JSON request body (not a form): it opens like a JSON token,
203
+ // does not parse, and the text ends inside an open bracket or string. `{"a":1}trailing` fails to
204
+ // parse but is balanced, so it is malformed rather than cut and stays unflagged; `[draft` opens
205
+ // with a bracket but not like JSON, so a plain-text body is not flagged either. Whitespace after
206
+ // the opening bracket is collapsed first so a pretty-printed body still qualifies. A record that
207
+ // declares a type that is neither JSON nor form (text/plain, multipart) is text whatever it opens
208
+ // with, so it is never flagged. A declared form body is read by shape here like a record with no
209
+ // declared type: the only form-typed body that can be a cut is one that opens like a JSON token,
210
+ // which isFormBody already refused as a mislabel.
211
+ export function jsonTextLooksCut(text, contentType) {
212
+ if (typeof text !== "string")
213
+ return false;
214
+ if (jsonContentType(contentType) === false && formContentType(contentType) !== true)
215
+ return false;
216
+ const s = text.trim();
217
+ if (!opensLikeJsonToken(s) || !scanJson(s).open)
218
+ return false;
219
+ try {
220
+ JSON.parse(s);
221
+ return false;
222
+ }
223
+ catch {
224
+ return true;
225
+ }
226
+ }
227
+ // Collapse the field list into a plain object: the parsed JSON where a value parsed, else the
228
+ // decoded string. A key that repeats becomes an array in wire order.
229
+ export function formBodyToObject(body) {
230
+ // Built without a prototype so a field named toString, constructor or __proto__ is just a key.
231
+ const out = Object.create(null);
232
+ // Keys seen more than once. Needed because a first value can itself be a JSON array
233
+ // (`attachments=[]`), which must not be mistaken for an accumulator on a repeat.
234
+ const repeated = new Set();
235
+ for (const f of body.fields) {
236
+ const v = f.json !== undefined ? f.json : f.value;
237
+ if (!Object.hasOwn(out, f.key)) {
238
+ out[f.key] = v;
239
+ }
240
+ else if (repeated.has(f.key)) {
241
+ out[f.key].push(v);
242
+ }
243
+ else {
244
+ out[f.key] = [out[f.key], v];
245
+ repeated.add(f.key);
246
+ }
247
+ }
248
+ // Hand back an ordinary object; fromEntries defines own properties, so a `__proto__` key
249
+ // stays a key instead of swapping the prototype the way assignment would.
250
+ return Object.fromEntries(Object.entries(out));
251
+ }
@@ -6,7 +6,7 @@ export interface RadarEvent {
6
6
  [key: string]: unknown;
7
7
  }
8
8
  export interface ParsedSSE {
9
- type: "network" | "rtm" | "clog" | "log" | "trace" | `${string}_detail`;
9
+ type: "network" | "rtm" | "clog" | "log" | "trace" | "switchboard" | `${string}_detail`;
10
10
  event: RadarEvent;
11
11
  }
12
12
  export declare const localNetworkBuffer: RadarEvent[];
@@ -0,0 +1,9 @@
1
+ export declare const SWITCHBOARD_KIND = "switchboard";
2
+ export declare const SWITCHBOARD_BACKFILL_SESSIONS = 3;
3
+ export declare const SWITCHBOARD_BACKFILL_DEADLINE_MS: number;
4
+ export declare function switchboardListPath(): string;
5
+ export declare const SWITCHBOARD_KINDS: readonly ["session", "state", "frame", "phase", "player"];
6
+ export type SwitchboardKind = (typeof SWITCHBOARD_KINDS)[number];
7
+ export declare function switchboardSessionPath(sessionId: number, limit: number, kind?: SwitchboardKind): string;
8
+ export declare function newestSwitchboardSessionIds(list: unknown): number[];
9
+ export declare function switchboardPageEvents(session: unknown): Record<string, unknown>[];
@@ -0,0 +1,54 @@
1
+ // The switchboard replay's device-side shape, shared by the dashboard's /backfill route and the
2
+ // MCP's spool backfill so the two pick the same sessions and build the same paths. Pure: no I/O.
3
+ //
4
+ // The device keeps switchboard two levels deep: `GET /api/switchboard` lists session summaries
5
+ // (`{sessions: [...]}`, newest first), `GET /api/switchboard/<session_id>?limit=N` is one session's
6
+ // summary plus `events`, the newest N records oldest first (the device pages at 50 when the query
7
+ // is absent, so the limit is forwarded per session or a talkative session replays as its last few
8
+ // seconds).
9
+ export const SWITCHBOARD_KIND = "switchboard";
10
+ // Sessions replayed per backfill. Bounds the round trips (one list plus one fetch per session).
11
+ export const SWITCHBOARD_BACKFILL_SESSIONS = 3;
12
+ // The replay is two waves (list, then the sessions), so on its own it could hold a caller for two
13
+ // device timeouts. Both the dashboard's /backfill and the MCP's spool backfill race it against this
14
+ // deadline and answer with the sessions that had landed. The default matches the ring kinds' device
15
+ // timeout; the env var is there so a suite holding a fake device socket does not wait it out.
16
+ export const SWITCHBOARD_BACKFILL_DEADLINE_MS = Number(process.env.SLACK_RADAR_SWITCHBOARD_BACKFILL_DEADLINE_MS) || 4000;
17
+ export function switchboardListPath() {
18
+ return `/api/${SWITCHBOARD_KIND}`;
19
+ }
20
+ // The record kinds the plugin emits, the closed set a `kind` query may name. Shared so the path
21
+ // builder below takes the type and never sees raw input.
22
+ export const SWITCHBOARD_KINDS = ["session", "state", "frame", "phase", "player"];
23
+ export function switchboardSessionPath(sessionId, limit, kind) {
24
+ return `/api/${SWITCHBOARD_KIND}/${sessionId}?limit=${limit}${kind ? `&kind=${kind}` : ""}`;
25
+ }
26
+ // The session ids to replay from a list response: newest first by the session's own start time,
27
+ // the id breaking a tie (minted in order), then the first SWITCHBOARD_BACKFILL_SESSIONS. The
28
+ // list's order is the device's to choose, so the pick does not lean on it, and the id alone is
29
+ // not the key: the counter restarts with the app process, so a restarted id 1 can be the newest
30
+ // session. A session id goes into a path, so only a non-negative safe integer counts as one (7.5,
31
+ // -1 and 1e21 are not ids the device minted). Anything else yields [].
32
+ export function newestSwitchboardSessionIds(list) {
33
+ const sessions = Array.isArray(list?.sessions)
34
+ ? list.sessions
35
+ : [];
36
+ const num = (v) => (typeof v === "number" && Number.isFinite(v) ? v : null);
37
+ const id = (v) => (typeof v === "number" && Number.isSafeInteger(v) && v >= 0 ? v : null);
38
+ return sessions
39
+ .map((s) => {
40
+ const row = (s !== null && typeof s === "object" ? s : {});
41
+ return { id: id(row.session_id), began: num(row.began_at) ?? 0 };
42
+ })
43
+ .filter((s) => s.id !== null)
44
+ .sort((a, b) => b.began - a.began || b.id - a.id)
45
+ .map((s) => s.id)
46
+ .slice(0, SWITCHBOARD_BACKFILL_SESSIONS);
47
+ }
48
+ // The `events` page of a session response, only its object rows. Anything else yields [].
49
+ export function switchboardPageEvents(session) {
50
+ const events = session?.events;
51
+ if (!Array.isArray(events))
52
+ return [];
53
+ return events.filter((e) => e !== null && typeof e === "object");
54
+ }
@@ -22,3 +22,35 @@ export type EnableRefusal = "self_arm_blocked" | "device_changed";
22
22
  * from the earlier reason. A frame with NO reason says nothing about the diagnosis.
23
23
  */
24
24
  export type StatusReason = "no_session" | "undiagnosed";
25
+ /**
26
+ * The Switchboard plugin's session summary, as `GET /api/switchboard` lists it (`{sessions:
27
+ * [...]}`, newest first) and as the envelope of `GET /api/switchboard/<session_id>`, which adds
28
+ * `events: [...]` (the page of records, newest `limit` oldest first). Every record carries an `id`
29
+ * the plugin mints: strictly increasing across sessions, never repeated within a process, reset
30
+ * with it. `total_captured` is the records the plugin still holds for the session; `events` is
31
+ * only ever the page, the count is `total_captured`. `levels` is the newest audio level tick, null
32
+ * before the first one.
33
+ */
34
+ export interface SwitchboardLevels {
35
+ timestamp: number;
36
+ mic_rms: number;
37
+ mic_peak: number;
38
+ playback_rms: number;
39
+ playback_peak: number;
40
+ }
41
+ export interface SwitchboardSessionSummary {
42
+ session_id: number;
43
+ team_id: string | null;
44
+ began_at: number;
45
+ ended_at: number | null;
46
+ last_state?: Record<string, unknown> | null;
47
+ frames: {
48
+ incoming: number;
49
+ outgoing: number;
50
+ };
51
+ total_captured: number;
52
+ levels: SwitchboardLevels | null;
53
+ }
54
+ export interface SwitchboardSessionDetail extends SwitchboardSessionSummary {
55
+ events: Record<string, unknown>[];
56
+ }
@@ -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;
@@ -93,6 +93,7 @@
93
93
  .filters .frow label { color:var(--muted); font-size:12px; min-width:96px; }
94
94
  .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
95
  .filters input:focus, .filters select:focus { outline:none; border-color:var(--accent); }
96
+ .filters input::placeholder { color:var(--muted-2); opacity:1; }
96
97
  .matchrow .f_mk { flex:0 0 130px; } .combo { position:relative; flex:1; display:flex; } .combo .f_mv { flex:1; padding-right:24px; }
97
98
  .combocaret { position:absolute; right:8px; top:50%; transform:translateY(-50%); color:var(--muted); font-size:10px; cursor:pointer; }
98
99
  .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 +104,25 @@
103
104
  .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
105
  .filters .fmsg { color:var(--muted); font-size:12px; } .filters .fhint { color:var(--muted); font-size:11.5px; font-style:italic; }
105
106
  .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
- .chip .x { cursor:pointer; color:var(--muted-2); background:var(--surface); border-radius:50%; width:16px; height:16px; line-height:14px; text-align:center; font-size:11px; }
107
+ .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; }
108
+ .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; }
109
+ /* Exclude chips wear the -term pill's tint (.fpill-neg): hidden-by and shown-if are different
110
+ polarities, and the text stays --text for contrast. */
111
+ .chip-exclude { background:var(--lvl-err-bg); border-color:var(--error-2); }
112
+ /* --blue-2 on the red field measured 4.11:1 on the light page; --text-2 clears AA on both themes. */
113
+ .chip-exclude b { color:var(--text-2); }
114
+ /* An exclude term naming a field no held row of this tab has: still an exclude chip (the tint
115
+ stays), with a dashed muted edge for a term that has no effect here yet. Harmless, so no amber
116
+ and no glyph, which are a refused term's. --muted-2 on the red fill is 6.0:1 dark, 5.8:1 light. */
117
+ .chip.chip-unknown { border-style:dashed; border-color:var(--muted-2); }
118
+ .excluderow input { flex:1; min-width:0; }
119
+ .fexclhint { margin:-2px 0 6px 104px; }
120
+ /* A real button (keyboard reachable) with the chrome reset so it keeps reading as the glyph. */
121
+ /* line-height after font: the shorthand resets it, so before it the glyph sat low. */
122
+ .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; }
123
+ .chip .x:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
124
+ /* --accent on the red chip fill is 2.63:1 in light; the text tint of the accent clears it. */
125
+ :root.light .chip .x:focus-visible { outline-color:var(--accent-text); }
109
126
  .chip .x:hover { color:#fff; background:var(--error-2); }
110
127
  /* stats strip */
111
128
  .statstrip { display:flex; align-items:center; gap:18px; margin-bottom:6px; flex:0 0 auto; min-height:0; }
@@ -167,7 +184,7 @@
167
184
  .fhelp:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
168
185
  /* Anchored to the box's left edge: the box is the wide element on the bar, so the legend has
169
186
  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; }
187
+ .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
188
  /* --accent-text, not --accent: the accent lands near 3.4:1 on the light surface, and the same
172
189
  call is made for the other small accent text in this file. */
173
190
  .fhelppop code { color:var(--accent-text); font-size:11.5px; white-space:nowrap; }
@@ -221,13 +238,53 @@
221
238
  border-color: var(--error-2);
222
239
  color: var(--error-2);
223
240
  }
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); }
241
+ .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; }
242
+ .fbtn:hover, .fexclude:hover { border-color:var(--accent); } .fbtn:disabled { opacity:.4; cursor:default; } .fbtn.paused { color:var(--warn); border-color:var(--warn); }
226
243
  .fcount { color:var(--muted); font-size:11.5px; white-space:nowrap; }
227
244
  .fstatus { font-size:11.5px; font-weight:600; white-space:nowrap; }
228
245
  .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; }
246
+ .fsortlbl { color:var(--muted-2); font-size:12px; display:flex; align-items:center; gap:5px; white-space:nowrap; }
247
+ .fexcludewrap { display:flex; align-items:center; gap:5px; }
248
+ .fexclude[aria-expanded="true"] { border-color:var(--accent); }
249
+ /* Qualified with .feedbar so it outranks the bar's generic input rule (0,1,1) and the box
250
+ matches the exclude… button's size, padding, surface and border. */
251
+ .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; }
252
+ .feedbar .fexclude-input:focus { outline:none; border-color:var(--accent); }
253
+ .feedbar .fexclude-input::placeholder { color:var(--muted-2); opacity:1; }
254
+ /* A refused term: the same amber as an invalid regex in the filter box, with the reason beside it. */
255
+ .feedbar .fexclude-input[aria-invalid="true"] { border-color:var(--warn); }
256
+ /* Hung under the input so it reads as the input's note and never as the caption of the next label;
257
+ the wrap is position:relative for it. The ⚠ glyph matches the Filters panel's "⚠ rejected". */
258
+ .fexcludewrap { position:relative; }
259
+ /* The Switchboard kind chips: the row's .sbkind pill as a button. The strike-through carries the
260
+ state (a struck name is a hidden kind), the fill is secondary: on wears the pill's fill and
261
+ text (10:1 dark, 8.5:1 light); off drops the fill and strikes the name in --muted-2 (7:1 dark,
262
+ 6.9:1 light on the page). Both states share the --muted border (measured 3.8:1 dark, 4.2:1
263
+ 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
264
+ chip, and neither the group nor its "kinds" label shrinks (a shrinking group wrapped chips
265
+ onto a second line); it shares the bar's row with exclude…. The note anchors to the group's
266
+ right edge and grows inward, so it cannot run off the bar's end. */
267
+ .fsortlbl:has(.fkinds) { flex:0 0 auto; }
268
+ .fkinds { position:relative; display:inline-flex; align-items:center; gap:3px; flex:0 0 auto; }
269
+ #fkinds-note { left:auto; right:0; }
270
+ .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; }
271
+ .fkind:hover { border-color:var(--accent); }
272
+ .fkind:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
273
+ :root.light .fkind:focus-visible { outline-color:var(--accent-text); }
274
+ .fkind-off { background:transparent; color:var(--muted-2); border-color:var(--muted); text-decoration:line-through; text-decoration-thickness:1.5px; }
275
+ /* The note hangs below the bar out of flow; without a reserved row the feed viewport paints
276
+ over it whenever the bar does not wrap. */
277
+ .feedbar:has(.fexclude-note) { margin-bottom:26px; }
278
+ .fexclude-note { position:absolute; left:0; top:100%; margin-top:2px; z-index:1; color:var(--warn); font-size:11.5px; white-space:nowrap; }
279
+ .fexclude-note::before { content:"⚠ "; }
280
+ :root.light .fexclude-note { color:var(--warn-text); }
281
+ /* A note about a term that was taken (the gapped hint) is advice, not a warning: no glyph, muted. */
282
+ .fexclude-note.fexclude-note-plain { color:var(--muted-2); }
283
+ .fexclude-note.fexclude-note-plain::before { content:""; }
284
+ :root.light .fexclude-note.fexclude-note-plain { color:var(--muted-2); }
230
285
  .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; }
286
+ /* The cap is for the app selector's package names; the sort labels are short and size to themselves. */
287
+ .feedbar select.fsort { max-width:none; }
231
288
  /* the virtualized viewport */
232
289
  .vpbox { position:relative; flex:1; min-height:0; display:flex; }
233
290
  .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 +298,108 @@
241
298
  .row.sel { background:var(--sel); } /* selection background beats breach/failed tint */
242
299
  .row.inspecting { box-shadow:inset 3px 0 var(--accent); } /* inspected row marker (overrides the red bar) */
243
300
  .row .t { color:var(--muted); } .dir-OUTGOING{color:var(--blue)} .dir-INCOMING{color:var(--purple)} .chan { color:var(--muted-2); }
301
+ /* switchboard rows: the device sends lowercase directions; the arrow reads incoming as ← (from the server) */
302
+ .dir-outgoing{color:var(--blue)} .dir-incoming{color:var(--purple)} .sbdir { font-weight:700; }
303
+ .sbsess { color:var(--muted-2); font-variant-numeric:tabular-nums; }
304
+ /* One neutral pill for every kind: the per-kind tints were the Live type-chip colours, which
305
+ would give purple, green, amber and blue a second meaning on the same page. --surface-3 is
306
+ about 1.1:1 against the body, so the pill gets its own background. Failure keeps the red. */
307
+ .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); }
308
+ /* A selected row's tint is close to the pill's, so the outline steps up to keep the pill's shape. */
309
+ .row.sel .sbkind:not(.sbkind-bad) { box-shadow:inset 0 0 0 1px var(--muted); }
310
+ .sbkind-bad { background:var(--lvl-err-bg); color:var(--error); }
311
+ .sbsum { color:var(--text-2); }
312
+ /* voice panel (Switchboard tab): session strip, tracks, stat cards. Every colour is a theme
313
+ token, so light and dark come from :root / :root.light alone; the two light overrides below
314
+ swap amber text for the readable --warn-text the way .fexclude-note does. */
315
+ .voice { display:flex; flex-direction:column; gap:8px; margin-bottom:8px; flex:0 0 auto; }
316
+ .voice-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:8px 12px; }
317
+ .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; }
318
+ .voice-strip { display:flex; gap:14px; align-items:center; flex-wrap:wrap; font-size:12.5px; }
319
+ .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); }
320
+ .voice-dot { width:8px; height:8px; border-radius:50%; background:var(--muted); }
321
+ .voice-dot.ok { background:var(--accent); box-shadow:0 0 6px var(--accent); }
322
+ .voice-dot.bad { background:var(--error); }
323
+ .voice-dot.warn { background:var(--warn); }
324
+ .voice-dot.muted { background:var(--purple); }
325
+ .voice-kv { color:var(--muted-2); } .voice-kv b { color:var(--text); font-weight:600; }
326
+ .voice-kv.warn { color:var(--warn); }
327
+ .voice-kv.warn b { color:inherit; }
328
+ :root.light .voice-kv.warn { color:var(--warn-text); }
329
+ .voice-note { color:var(--muted-2); } .voice-note b { color:var(--text); font-weight:600; }
330
+ .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; }
331
+ .voice-phases { display:flex; height:10px; border-radius:6px; overflow:hidden; border:1px solid var(--border-2); margin-top:8px; }
332
+ .voice-phase { background:var(--sel-soft); border-right:1px solid var(--border); }
333
+ .voice-phase.slow { background:var(--lvl-err-bg); }
334
+ .voice-phasetext { font-size:11px; margin-top:4px; }
335
+ .voice-slowtxt { color:var(--error); }
336
+ .voice-zoom { display:inline-flex; gap:4px; text-transform:none; letter-spacing:0; }
337
+ .voice-zoombtn { 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; }
338
+ .voice-zoombtn:hover { color:var(--text); border-color:var(--border-3); }
339
+ /* Same accent tokens .modebtn.active uses for the mode picker, so the two "selected" controls
340
+ on the page read as one visual language. */
341
+ .voice-zoombtn.on { background:var(--accent-bg); border-color:var(--accent); color:var(--accent-text); font-weight:600; }
342
+ .voice-zoombtn.on:hover { border-color:var(--accent); }
343
+ .voice-zoombtn:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
344
+ :root.light .voice-zoombtn:focus-visible { outline-color:var(--accent-text); }
345
+ /* header re-arm count, its own span so it can carry the warn colour without the whole header
346
+ title turning amber. */
347
+ .voice-hd-rearms { font-weight:600; }
348
+ .voice-hd-rearms.warn { color:var(--warn); }
349
+ :root.light .voice-hd-rearms.warn { color:var(--warn-text); }
350
+ /* Row and tick labels are plain HTML over the plot, not SVG text: the SVG's
351
+ preserveAspectRatio="none" stretches x only, and a glyph drawn inside it would stretch or
352
+ squash along with the bars. The gutter is a fixed-width column so a label never sits under
353
+ a bar; the plot's own children are absolutely positioned over its (relatively positioned)
354
+ box, sized as a percent of its width, which the SVG (width:100%) shares exactly. */
355
+ .voice-trackrow { display:flex; }
356
+ .voice-rowlabels { position:relative; width:56px; flex:0 0 56px; }
357
+ /* line-height 18px matches ROW_H in voice.ts, the bar height each label sits beside, so the
358
+ label text centres on its bar instead of hugging the top of the row. top is a percent of the
359
+ plot's own height (set inline, per row, in voice.ts), not a fixed px, so the label still
360
+ lines up with its bar if H ever changes. */
361
+ .voice-rowlabels span { position:absolute; left:0; font-size:10px; color:var(--muted-2); line-height:18px; }
362
+ .voice-rowlabels { padding-right:6px; }
363
+ .voice-plot { position:relative; flex:1 1 auto; min-width:0; }
364
+ .voice-plot svg { width:100%; height:110px; display:block; }
365
+ .voice-ticklabels { position:absolute; left:0; right:0; bottom:0; height:12px; pointer-events:none; }
366
+ .voice-ticklabels span { position:absolute; bottom:0; transform:translateX(-50%); font-size:10px; color:var(--muted-2); }
367
+ .voice-nomarkers { position:absolute; bottom:14px; right:4px; font-size:10px; }
368
+ /* A guide line's opacity is a class, not an inline attr, so the light theme can read it a
369
+ touch stronger than dark: a faint line against a light background disappears much faster
370
+ than the same opacity against dark. */
371
+ .voice-guide { opacity:.35; }
372
+ :root.light .voice-guide { opacity:.6; }
373
+ .voice-legend { display:flex; gap:8px 14px; font-size:11px; color:var(--muted-2); margin-top:8px; flex-wrap:wrap; }
374
+ .voice-legend span::before { content:""; display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:6px; vertical-align:-1px; background:var(--muted); }
375
+ .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); }
376
+ /* Legend swatches teach the tracks' own shapes, not just their colours: a thin vertical bar
377
+ for the line-tick markers (half height for the focus tick, half width for the stop tick,
378
+ matching their own glyphs), a two-band gradient standing in for the stall's dashed cap, and a
379
+ head-plus-stem shape for the error dot and the mixed glyph's own square-capped shape line. */
380
+ .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; }
381
+ .voice-legend .f::before { height:6px; }
382
+ .voice-legend .s::before { width:2px; }
383
+ .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); }
384
+ .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; }
385
+ .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; }
386
+ .voice-legend .mu::before { border:1px dashed var(--purple); background:repeating-linear-gradient(to bottom, var(--purple) 0 1px, transparent 1px 3px); }
387
+ .voice-legend .mb::before { width:7px; height:11px; border-radius:3.5px; background:var(--muted); }
388
+ .voice-cards { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; }
389
+ .voice-stat { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:6px 10px; display:flex; flex-direction:column; }
390
+ .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; }
391
+ .voice-stat .sub { font-size:10px; color:var(--muted-2); margin-bottom:2px; }
392
+ .voice-stat.bad .v { color:var(--error); } .voice-stat.warn .v { color:var(--warn); }
393
+ .voice-stat.warn { border-color:var(--warn); background:var(--lvl-warn-bg); } .voice-stat.bad { border-color:var(--error); background:var(--lvl-err-bg); }
394
+ .voice-stat.warn .sub { color:var(--warn); }
395
+ :root.light .voice-stat.warn .v { color:var(--warn-text); }
396
+ :root.light .voice-stat.warn .sub { color:var(--warn-text); }
244
397
  .tchip { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:1px 6px; border-radius:4px; }
245
398
  /* network status code chip in the row */
246
399
  .stchip { font-size:10px; font-weight:700; padding:1px 6px; border-radius:4px; font-variant-numeric:tabular-nums; }
247
400
  .stchip.st2 { background:var(--chip-clog-bg); color:var(--accent); } .stchip.st3 { background:var(--lvl-info-bg); color:var(--blue); }
248
401
  .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); }
402
+ .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
403
  .lvl { font-size:10px; font-weight:700; padding:1px 5px; border-radius:4px; }
251
404
  .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
405
  .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 +418,7 @@
265
418
  .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
419
  .inspector-hd .x:hover { color:var(--error); border-color:var(--error); }
267
420
  .inspector .empty { color:var(--muted); font-size:12.5px; }
421
+ .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
422
  /* header badges: the at-a-glance facts */
269
423
  .ibadges { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
270
424
  .ibadge { font-size:11px; font-weight:600; padding:2px 8px; border-radius:999px; background:var(--surface-3); color:var(--text-2); white-space:nowrap; }
@@ -299,6 +453,14 @@
299
453
  .inspector pre.rawbody { color:var(--text-2); }
300
454
  .kv { display:grid; grid-template-columns:auto 1fr; gap:2px 12px; font-size:11.5px; }
301
455
  .kv-k { color:var(--muted-2); white-space:nowrap; } .kv-v { color:var(--text-2); word-break:break-all; }
456
+ /* decoded form body: caption + per-field rows; a JSON field nests its own collapsible */
457
+ .formnote { color:var(--muted); font-size:11px; margin-bottom:6px; }
458
+ .formunparsed { color:var(--muted-2); font-size:11px; margin-bottom:3px; }
459
+ .formkv { font-size:12px; row-gap:4px; align-items:start; }
460
+ .formkv .formkey { padding-top:2px; }
461
+ .formkv .kv-v { word-break:normal; overflow-wrap:anywhere; }
462
+ .formkv .kv-v.empty { color:var(--muted); font-style:italic; }
463
+ .formkv .kv-v .insec { margin:0; }
302
464
  /* alert */
303
465
  #flash { position:fixed; inset:0; background:#ff3b30; opacity:0; pointer-events:none; z-index:50; transition:opacity .08s; } #flash.on { opacity:.38; }
304
466
  #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; }