astralis-devtools 0.1.0 → 0.3.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.
@@ -1,7 +1,7 @@
1
1
  import { h, icon, plural } from "../dom.mjs";
2
2
  import { readIdentity } from "../identity.mjs";
3
3
  import { GITHUB_MARK, ICONS } from "../icons.mjs";
4
- import { browserEnvironment, captureScreenshot, treeFromElement } from "../report.mjs";
4
+ import { browserEnvironment, treeFromElement } from "../report.mjs";
5
5
  import { empty } from "./shared.mjs";
6
6
 
7
7
  /* Report: a problem sent to the maintainers as a GitHub issue, opened from
@@ -9,8 +9,25 @@ import { empty } from "./shared.mjs";
9
9
 
10
10
  A report is an issue snapshot of one component and everything inside it.
11
11
  The exact JSON is shown before anything is sent, and nothing is sent until
12
- the reporter presses Send. The form keeps its input across screens and
13
- while findings stream in. */
12
+ the reporter creates the issue. The form keeps its input across screens and
13
+ pages, and while findings stream in, until the report is sent; then the form
14
+ clears and Your issues shows it. Pictures and files are added on GitHub, in the
15
+ issue itself: its API cannot attach them. */
16
+
17
+ /** A report nobody has written yet. */
18
+ export const emptyReport = () => ({
19
+ title: "",
20
+ happened: "",
21
+ expected: "",
22
+ includeText: false,
23
+ includeFindings: true,
24
+ includeConsole: false,
25
+ snapshot: null,
26
+ problems: [],
27
+ similar: null,
28
+ status: "idle", // idle | sending | failed | notice
29
+ message: "",
30
+ });
14
31
 
15
32
  /** The form for a new report. */
16
33
  function newReport(app) {
@@ -19,10 +36,11 @@ function newReport(app) {
19
36
  const element = state.selected?.isConnected ? state.selected : null;
20
37
 
21
38
  if (!element) {
39
+ const written = r.title || r.happened || r.expected;
22
40
  const root = h(
23
41
  "div",
24
42
  {},
25
- empty(ICONS.report, "Which component is it?", "Pick the component the problem is in. The report describes it and everything inside it.", { neutral: true }),
43
+ empty(ICONS.report, "Which component is it?", `Pick the component the problem is in. The report describes it and everything inside it.${written ? " What you wrote is kept." : ""}`, { neutral: true }),
26
44
  h(
27
45
  "div",
28
46
  { class: "row", style: "justify-content:center" },
@@ -35,22 +53,23 @@ function newReport(app) {
35
53
 
36
54
  let timer = null;
37
55
  let request = 0;
38
-
39
- /** The JSON as shown: exact, except that a screenshot's data is summarised (it is shown as an image). */
40
- function previewText(snapshot) {
41
- const shown = snapshot.screenshot
42
- ? { ...snapshot, screenshot: `data:image/jpeg;base64,… (${Math.round((snapshot.screenshot.length * 0.75) / 1024)} kB, shown above)` }
43
- : snapshot;
44
- return JSON.stringify(shown, null, 2);
56
+ let current = false; // whether r.snapshot holds everything in the form
57
+ let disposed = false;
58
+ if (r.status !== "sending") {
59
+ // It may describe a component picked earlier.
60
+ r.snapshot = null;
61
+ r.problems = [];
45
62
  }
46
63
 
47
64
  function schedule() {
65
+ current = false;
48
66
  clearTimeout(timer);
49
67
  timer = setTimeout(assemble, 250);
50
68
  }
51
69
 
52
70
  /** Ask the bridge to complete the snapshot from the page's part. Nothing leaves the machine. */
53
71
  async function assemble() {
72
+ clearTimeout(timer);
54
73
  if (!element.isConnected) return;
55
74
  const mine = ++request;
56
75
  const body = {
@@ -58,9 +77,8 @@ function newReport(app) {
58
77
  route: location.pathname,
59
78
  environment: browserEnvironment(window),
60
79
  description: { title: r.title, happened: r.happened, expected: r.expected },
61
- include: { findings: r.includeFindings, console: r.includeConsole, screenshot: Boolean(r.screenshot) },
80
+ include: { findings: r.includeFindings, console: r.includeConsole },
62
81
  console: [...app.consoleErrors.messages],
63
- ...(r.screenshot ? { screenshot: r.screenshot } : {}),
64
82
  };
65
83
  try {
66
84
  const response = await fetch(`${app.base}/snapshot`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(body) });
@@ -69,6 +87,7 @@ function newReport(app) {
69
87
  if (!response.ok) throw new Error(result?.error ?? `The bridge answered ${response.status}.`);
70
88
  r.snapshot = result.snapshot;
71
89
  r.problems = result.problems;
90
+ current = true;
72
91
  if (r.status === "notice") r.status = "idle";
73
92
  checkSimilar(result.snapshot);
74
93
  } catch (error) {
@@ -85,7 +104,9 @@ function newReport(app) {
85
104
  try {
86
105
  const response = await fetch(`${app.base}/github/similar`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(snapshot) });
87
106
  if (!response.ok) return;
88
- r.similar = await response.json();
107
+ const found = await response.json();
108
+ if (disposed) return;
109
+ r.similar = found;
89
110
  } catch {
90
111
  return; // no check is no reason to stop a report
91
112
  }
@@ -94,31 +115,35 @@ function newReport(app) {
94
115
 
95
116
  /** Open a new issue, or, with `addTo`, add the report to that existing one. */
96
117
  async function send(addTo = null) {
97
- if (!r.snapshot || r.problems.length) return;
118
+ if (r.status === "sending" || !r.snapshot || r.problems.length) return;
98
119
  r.status = "sending";
99
120
  r.message = "";
100
121
  refresh();
122
+ // The last keystrokes may still be waiting to be assembled, and sending clears the form.
123
+ if (!current) await assemble();
124
+ if (!current || !r.snapshot || r.problems.length) {
125
+ r.status = element.isConnected ? "idle" : "notice";
126
+ r.message = element.isConnected ? "" : "That component is no longer on the page. Nothing was sent; pick it again.";
127
+ return app.reportChanged();
128
+ }
129
+ const { snapshot } = r;
101
130
  try {
102
131
  const where = addTo ? `submit?addTo=${addTo}` : "submit";
103
- const response = await fetch(`${app.base}/${where}`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(r.snapshot) });
132
+ const response = await fetch(`${app.base}/${where}`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(snapshot) });
104
133
  const result = await response.json();
105
134
  if (response.status === 401) app.github.reload();
106
135
  if (!response.ok) throw new Error(result?.error ?? `The bridge answered ${response.status}.`);
107
- r.status = "sent";
108
- r.url = result.url;
109
- r.number = result.number;
110
- r.added = Boolean(addTo);
111
- r.similar = null;
112
- window.open(result.url, "_blank", "noopener");
113
- app.github.loadIssues();
136
+ Object.assign(r, emptyReport());
137
+ app.reportSent({ number: result.number, url: result.url, added: Boolean(addTo) }, snapshot.description.title);
114
138
  } catch (error) {
115
139
  r.status = "failed";
116
140
  r.message = error.message;
141
+ app.reportChanged();
117
142
  }
118
- refresh();
119
143
  }
120
144
 
121
145
  function notice(message) {
146
+ if (r.status === "sending") return;
122
147
  r.status = "notice";
123
148
  r.message = message;
124
149
  refresh();
@@ -148,39 +173,20 @@ function newReport(app) {
148
173
  const result = await response.json();
149
174
  if (!response.ok) throw new Error(result?.error ?? `The bridge answered ${response.status}.`);
150
175
  window.open(result.url, "_blank", "noopener");
151
- notice(
152
- r.screenshot
153
- ? "GitHub's form is open in a new tab: check it, drop the screenshot in, and press Create."
154
- : "GitHub's form is open in a new tab: check it and press Create.",
155
- );
176
+ notice("GitHub's form is open in a new tab: check it, add any picture or file there, and press Create.");
156
177
  } catch (error) {
157
178
  notice(`${error.message} Copy JSON or Download keeps the snapshot.`);
158
179
  }
159
180
  }
160
181
 
161
- /** GitHub's API cannot attach images, so a screenshot is saved for the reporter to drop into the issue. */
162
- function downloadScreenshot() {
163
- h("a", { href: r.screenshot, download: "astralis-screenshot.jpg" }).click();
164
- }
165
-
166
- async function addScreenshot() {
167
- try {
168
- r.screenshot = await captureScreenshot({
169
- hide: () => (app.host.style.visibility = "hidden"),
170
- show: () => (app.host.style.visibility = ""),
171
- });
172
- schedule();
173
- } catch (error) {
174
- notice(error?.name === "NotAllowedError" ? "No screenshot: the capture was declined." : `No screenshot: ${error.message}`);
175
- }
176
- refresh();
177
- }
178
-
182
+ const inputs = [];
179
183
  const field = (label, key, multiline, placeholder) => {
180
184
  const input = h(multiline ? "textarea" : "input", { class: "field", rows: multiline ? 3 : null, maxlength: multiline ? 4000 : 200, "aria-label": label, placeholder });
181
185
  input.value = r[key];
186
+ inputs.push(input);
182
187
  input.addEventListener("input", () => {
183
188
  r[key] = input.value;
189
+ app.keepDraft(r);
184
190
  schedule();
185
191
  });
186
192
  return h("label", { class: "field-label" }, label, input);
@@ -199,13 +205,12 @@ function newReport(app) {
199
205
  const textToggle = toggle("Include page text", "includeText", "Off: text is replaced by its length.");
200
206
  const findingsToggle = toggle("Include the validator's findings", "includeFindings", "For the files that render this page.");
201
207
  const consoleToggle = toggle("Include console errors", "includeConsole", "Paths are trimmed to the app.");
202
- const shot = h("div", { class: "shot" });
203
208
  const preview = h("pre", { class: "json", "aria-label": "Snapshot JSON" });
204
209
  const problems = h("ul", { class: "problems" });
205
- const status = h("p", { class: "report-status" });
210
+ const status = h("div", { class: "report-status", role: "status" });
206
211
  const similar = h("div", {});
207
- const sendButton = h("button", { class: "btn primary", type: "button", onclick: () => send() }, icon(GITHUB_MARK), h("span", {}, "Open issue on GitHub"));
208
- const linkButton = h("button", { class: "btn", type: "button", title: "Opens GitHub's own form, filled in; you submit it there. No sign-in.", onclick: openOnGitHub }, icon(ICONS.external), "Open on GitHub instead");
212
+ const sendButton = h("button", { class: "btn primary", type: "button", onclick: () => send() }, icon(GITHUB_MARK), h("span", {}, "Create issue from here"));
213
+ const linkButton = h("button", { class: "btn", type: "button", title: "Opens GitHub's own form, filled in; you submit it there. No sign-in.", onclick: openOnGitHub }, icon(ICONS.external), "Open GitHub's form instead");
209
214
  const copyButton = h("button", { class: "btn", type: "button", onclick: copy }, icon(ICONS.copy), "Copy JSON");
210
215
  const downloadButton = h("button", { class: "btn", type: "button", onclick: download }, icon(ICONS.download), "Download");
211
216
 
@@ -216,13 +221,13 @@ function newReport(app) {
216
221
  "div",
217
222
  { class: "card target" },
218
223
  h("span", { class: "detail-icon" }, icon(ICONS.components)),
219
- h("div", { class: "grow" }, h("div", { class: "name" }, readIdentity(element)[0]?.name ?? "Component"), h("div", { class: "muted", style: "font-size:12px" }, "and everything inside it. Nothing is sent until you press Send.")),
224
+ h("div", { class: "grow" }, h("div", { class: "name" }, readIdentity(element)[0]?.name ?? "Component"), h("div", { class: "muted", style: "font-size:12px" }, "and everything inside it. Nothing is sent until you create the issue.")),
220
225
  h("button", { class: "btn ghost", type: "button", onclick: () => app.startPicking("report") }, icon(ICONS.pick), "Change"),
221
226
  ),
222
227
  field("Title", "title", false, "Card loses its border in dark mode"),
223
228
  field("What happened?", "happened", true, "What you saw"),
224
229
  field("What did you expect?", "expected", true, "What should have happened"),
225
- h("div", { class: "card", style: "padding:2px 14px" }, textToggle.row, findingsToggle.row, consoleToggle.row, h("div", { class: "switch-row", style: "cursor:default" }, h("span", {}, "Screenshot", h("small", {}, "Captured only when you ask. You add it to the issue yourself.")), shot)),
230
+ h("div", { class: "card", style: "padding:2px 14px" }, textToggle.row, findingsToggle.row, consoleToggle.row),
226
231
  problems,
227
232
  similar,
228
233
  h("details", { class: "json-box" }, h("summary", {}, icon(ICONS.chevron), "Exactly what will be sent"), preview),
@@ -270,43 +275,21 @@ function newReport(app) {
270
275
 
271
276
  function refresh() {
272
277
  consoleToggle.text.textContent = `Include console errors (${app.consoleErrors.messages.length})`;
273
- shot.replaceChildren(
274
- r.screenshot
275
- ? h(
276
- "div",
277
- { class: "row" },
278
- h("img", { class: "thumb", src: r.screenshot, alt: "Screenshot to be sent" }),
279
- h("button", { class: "btn ghost", type: "button", onclick: () => { r.screenshot = null; schedule(); refresh(); } }, "Remove"),
280
- )
281
- : h("button", { class: "btn", type: "button", onclick: addScreenshot }, icon(ICONS.camera), "Add…"),
282
- );
283
- preview.textContent = r.snapshot ? previewText(r.snapshot) : "Assembling…";
278
+ preview.textContent = r.snapshot ? JSON.stringify(r.snapshot, null, 2) : "Assembling…";
284
279
  problems.replaceChildren(...r.problems.map((p) => h("li", {}, p)));
285
280
  const signedIn = Boolean(app.state.github?.login);
281
+ // What is typed while a report is on its way would be cleared with it.
282
+ for (const input of inputs) input.readOnly = r.status === "sending";
286
283
  sendButton.disabled = !signedIn || !r.snapshot || r.problems.length > 0 || r.status === "sending";
287
284
  sendButton.title = signedIn ? "" : "Sign in with GitHub first";
288
- linkButton.disabled = !r.snapshot || r.problems.length > 0;
285
+ linkButton.disabled = !r.snapshot || r.problems.length > 0 || r.status === "sending";
289
286
  copyButton.disabled = !r.snapshot;
290
287
  downloadButton.disabled = !r.snapshot;
291
- sendButton.lastChild.textContent = r.status === "sending" ? "Opening…" : "Open issue on GitHub";
288
+ sendButton.lastChild.textContent = r.status === "sending" ? "Creating…" : "Create issue from here";
292
289
  similar.replaceChildren(...[similarCard()].filter(Boolean));
293
290
  status.className = `report-status ${r.status}`;
294
291
  status.replaceChildren(
295
- r.status === "sent"
296
- ? h(
297
- "span",
298
- {},
299
- r.added ? `Added your report to #${r.number}. ` : `Opened #${r.number} on GitHub. `,
300
- h("a", { class: "link", href: r.url, target: "_blank", rel: "noreferrer" }, "View it"),
301
- r.screenshot
302
- ? h("span", {}, ". GitHub cannot take images by API: ", h("button", { class: "link", type: "button", onclick: downloadScreenshot }, "save the screenshot"), " and drop it into the issue.")
303
- : ".",
304
- )
305
- : r.status === "failed"
306
- ? `${r.message} Nothing was sent; Copy JSON or Download keeps the snapshot.`
307
- : r.status === "notice"
308
- ? r.message
309
- : "",
292
+ r.status === "failed" ? `${r.message} Nothing was sent; Copy JSON or Download keeps the snapshot.` : r.status === "notice" ? r.message : "",
310
293
  );
311
294
  }
312
295
 
@@ -319,7 +302,11 @@ function newReport(app) {
319
302
  refresh();
320
303
  if (reason === "findings") schedule();
321
304
  },
322
- dispose: () => clearTimeout(timer),
305
+ dispose() {
306
+ disposed = true;
307
+ request++; // a snapshot still being assembled is for a form that is gone
308
+ clearTimeout(timer);
309
+ },
323
310
  };
324
311
  }
325
312
 
@@ -332,7 +319,7 @@ function accountCard(app) {
332
319
  return h(
333
320
  "div",
334
321
  { class: "notice" },
335
- "GitHub sign-in is not set up in this version of the DevTools. Use Open on GitHub instead below: it fills in GitHub's own form, and you submit it there.",
322
+ "GitHub sign-in is not set up in this version of the DevTools. Use Open GitHub's form instead, in a new report: it opens GitHub's own form, filled in, and you submit it there.",
336
323
  );
337
324
  }
338
325
  if (gh.login) {
@@ -389,7 +376,7 @@ function accountCard(app) {
389
376
  "div",
390
377
  { class: "grow" },
391
378
  h("div", { class: "account-name" }, "Sign in to report"),
392
- h("div", { class: "muted small" }, `Issues open on ${repo} from your own account. The app can only read and write issues there. Or use Open on GitHub instead, with no sign-in.`),
379
+ h("div", { class: "muted small" }, `Issues open on ${repo} from your own account. The app can only read and write issues there. Or use Open GitHub's form instead, with no sign-in.`),
393
380
  gh.error ? h("div", { class: "account-error" }, gh.error) : null,
394
381
  ),
395
382
  h("button", { class: "btn primary", type: "button", onclick: () => app.github.signIn() }, icon(GITHUB_MARK), "Sign in with GitHub"),
@@ -403,12 +390,30 @@ const ago = (iso) => {
403
390
  return "just now";
404
391
  };
405
392
 
393
+ /** What was just sent, where it went, and how to add to it. */
394
+ const sentCard = ({ number, url, added }) =>
395
+ h(
396
+ "div",
397
+ { class: "card sent-card", role: "status", style: "margin-bottom:14px" },
398
+ h("span", { class: "sent-icon" }, icon(ICONS.check)),
399
+ h(
400
+ "div",
401
+ { class: "grow" },
402
+ h("div", { class: "sent-title" }, added ? `Added your report to #${number}` : `Created #${number}`),
403
+ h("p", { class: "muted small" }, "To add a screenshot or a file, open the issue and drop it into a comment there."),
404
+ h("a", { class: "btn primary", href: url, target: "_blank", rel: "noreferrer" }, icon(GITHUB_MARK), `Open #${number} on GitHub`, icon(ICONS.external)),
405
+ ),
406
+ );
407
+
406
408
  /** The issues the reporter has opened, and where each stands. */
407
409
  function yourIssues(app) {
410
+ const sent = app.state.sent;
411
+ const confirmation = h("div", {}, sent && sentCard(sent));
408
412
  const root = h("div", {});
409
413
  function update() {
410
414
  const gh = app.state.github;
411
415
  const issues = app.state.issues;
416
+ if (app.state.sent !== sent) confirmation.replaceChildren();
412
417
  if (!gh?.login) {
413
418
  root.replaceChildren(empty(ICONS.report, "Your issues show here", "Sign in with GitHub to see the issues you have opened and where each stands.", { neutral: true }));
414
419
  return;
@@ -454,7 +459,13 @@ function yourIssues(app) {
454
459
  );
455
460
  }
456
461
  update();
457
- return { root, update };
462
+ return {
463
+ root: h("div", {}, confirmation, root),
464
+ update,
465
+ dispose() {
466
+ if (app.state.sent === sent) app.state.sent = null;
467
+ },
468
+ };
458
469
  }
459
470
 
460
471
  export function reportScreen(app) {
@@ -487,6 +498,7 @@ export function reportScreen(app) {
487
498
  title: [{ label: "Report" }],
488
499
  root,
489
500
  update(reason) {
501
+ if (reason === "sent") return show("issues");
490
502
  if (reason === "github") {
491
503
  account.replaceChildren(accountCard(app));
492
504
  drawTabs();
@@ -51,7 +51,7 @@ export function bridgeMissing(app) {
51
51
  " containing ",
52
52
  h("code", {}, 'export { GET, POST } from "astralis-devtools/next/route";'),
53
53
  ", or run ",
54
- h("code", {}, "astralis init --devtools"),
54
+ h("code", {}, "npx astralis-cli init --devtools"),
55
55
  ".",
56
56
  )
57
57
  : h("p", {}, "Is the dev server running? The bridge answers this machine only."),
@@ -193,7 +193,7 @@ h1, h2, h3, h4, p { margin: 0; }
193
193
  .pad { padding: 14px; }
194
194
  .btn {
195
195
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px;
196
- border-radius: 10px; font: 500 12.5px/1 var(--sans); white-space: nowrap;
196
+ border-radius: 10px; font: 500 12.5px/1 var(--sans); white-space: nowrap; text-decoration: none;
197
197
  background: rgb(255 255 255 / 0.05); border: 1px solid var(--line-2); color: var(--text);
198
198
  transition: background 140ms var(--ease), border-color 140ms var(--ease), transform 140ms var(--ease), box-shadow 200ms var(--ease);
199
199
  }
@@ -321,7 +321,7 @@ h1, h2, h3, h4, p { margin: 0; }
321
321
  .tier-dot.leaf { background: var(--brand); }
322
322
  .tier-dot.required { background: var(--advice); }
323
323
  .n-pill { min-width: 22px; padding: 2px 7px; border-radius: 999px; font: 500 11px/1.3 var(--sans); text-align: center; color: var(--muted); background: rgb(255 255 255 / 0.06); }
324
- .mini { display: inline-flex; align-items: center; gap: 4px; font: 600 11px/1 var(--sans); }
324
+ .mini { display: inline-flex; align-items: center; gap: 4px; font: 600 11px/1 var(--sans); white-space: nowrap; }
325
325
  .mini.error { color: var(--error); }
326
326
  .mini.advice { color: var(--advice); }
327
327
  .mini i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
@@ -384,6 +384,33 @@ button.chip:hover { border-color: var(--brand-line); color: var(--brand-2); }
384
384
  .props td:first-child { width: 1%; padding-right: 16px; white-space: nowrap; color: var(--muted); }
385
385
  .props td:last-child { color: var(--brand-2); word-break: break-word; }
386
386
  .tags { display: flex; flex-wrap: wrap; gap: 6px; }
387
+ .prop-groups { display: flex; flex-direction: column; gap: 2px; }
388
+ .prop-group .group-label { font-weight: 600; white-space: nowrap; }
389
+ .prop-group .group-hint { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
390
+ .mini.in-use { color: var(--brand-2); }
391
+ .prop-rows { padding: 0 10px 6px 34px; }
392
+ .prop-row { display: flex; flex-direction: column; gap: 5px; padding: 9px 0; }
393
+ .prop-row + .prop-row { border-top: 1px solid var(--line); }
394
+ .prop-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 22px; }
395
+ .prop-name { font: 600 12.5px/1.3 var(--mono); color: var(--text); }
396
+ .prop-row.used .prop-name { color: var(--brand-2); }
397
+ .prop-alias { font: 11.5px/1.3 var(--mono); color: var(--faint); }
398
+ .prop-type { font: 11.5px/1.3 var(--mono); color: var(--advice); }
399
+ .prop-head .pill { flex: none; max-width: 100%; height: 20px; padding: 0 8px; font-size: 10.5px; }
400
+ .prop-head .pill.in-use { display: block; color: var(--brand-2); background: var(--brand-soft); border-color: transparent; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); line-height: 18px; }
401
+ .prop-doc { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
402
+ .prop-default { font-size: 12px; color: var(--faint); }
403
+ .prop-default .code { color: var(--text); }
404
+ .prop-values { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 11.5px; }
405
+ .prop-values:focus { outline: none; }
406
+ .val {
407
+ display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 6px;
408
+ font: 500 11px/1 var(--mono); color: var(--muted); background: rgb(255 255 255 / 0.04); border: 1px solid var(--line);
409
+ }
410
+ .val.on { color: var(--brand-2); background: var(--brand-soft); border-color: var(--brand-line); }
411
+ .val.hit { color: var(--text); border-color: var(--line-2); background: rgb(255 255 255 / 0.09); }
412
+ button.val.more { color: var(--brand-2); border-style: dashed; border-color: var(--brand-line); background: none; transition: background 140ms var(--ease); }
413
+ button.val.more:hover { background: var(--brand-soft); }
387
414
  .gone { display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin-bottom: 14px; border-radius: 11px; background: var(--error-soft); color: var(--error); font-size: 12.5px; }
388
415
 
389
416
  /* ---- report ------------------------------------------------------------------ */
@@ -410,8 +437,6 @@ button.chip:hover { border-color: var(--brand-line); color: var(--brand-2); }
410
437
  .switch input:checked + span { background: var(--brand); border-color: transparent; }
411
438
  .switch input:checked + span::after { transform: translateX(14px); background: var(--brand-ink); }
412
439
  .switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
413
- .shot { display: flex; align-items: center; gap: 10px; }
414
- .thumb { max-width: 120px; max-height: 72px; border-radius: 8px; border: 1px solid var(--line-2); }
415
440
  details.json-box { border-radius: 12px; background: var(--bg-1); border: 1px solid var(--line); }
416
441
  details.json-box summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; font-weight: 500; }
417
442
  details.json-box summary::-webkit-details-marker { display: none; }
@@ -425,7 +450,11 @@ details.json-box[open] summary .icon { transform: rotate(90deg); }
425
450
  .problems:empty { display: none; }
426
451
  .report-status { font-size: 12.5px; min-height: 18px; }
427
452
  .report-status.failed { color: var(--error); }
428
- .report-status.sent { color: var(--ok); }
453
+ .sent-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; color: var(--text); border-color: rgb(74 222 128 / 0.28); background: linear-gradient(180deg, var(--ok-soft), transparent 75%), var(--bg-1); }
454
+ .sent-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex: none; background: var(--ok-soft); color: var(--ok); }
455
+ .sent-icon .icon { width: 17px; height: 17px; }
456
+ .sent-title { font: 600 14px/1.3 var(--display); }
457
+ .sent-card p { margin: 3px 0 12px; }
429
458
 
430
459
  /* ---- GitHub ------------------------------------------------------------------- */
431
460