@mhosaic/feedback 0.35.0 → 0.36.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.
@@ -850,6 +850,10 @@ var DEFAULT_STRINGS = {
850
850
  "detail.tech.errors": "Runtime errors",
851
851
  "detail.tech.console": "Console (last 20)",
852
852
  "detail.tech.network": "Network (last 15)",
853
+ "detail.verified.badge": "Agent-verified",
854
+ "detail.verified.title": "Proof of fix",
855
+ "detail.verified.functional": "Functional check",
856
+ "detail.verified.ui": "UI check",
853
857
  "status.new": "New",
854
858
  "status.in_progress": "In progress",
855
859
  "status.awaiting_validation": "Awaiting your validation",
@@ -1050,6 +1054,10 @@ var FRENCH_STRINGS = {
1050
1054
  "detail.tech.errors": "Erreurs d\u2019ex\xE9cution",
1051
1055
  "detail.tech.console": "Console (20 derniers)",
1052
1056
  "detail.tech.network": "R\xE9seau (15 derniers)",
1057
+ "detail.verified.badge": "V\xE9rifi\xE9 par l\u2019agent",
1058
+ "detail.verified.title": "Preuve de correction",
1059
+ "detail.verified.functional": "Fonctionnel v\xE9rifi\xE9",
1060
+ "detail.verified.ui": "Interface v\xE9rifi\xE9e",
1053
1061
  "status.new": "Nouveau",
1054
1062
  "status.in_progress": "En cours",
1055
1063
  "status.awaiting_validation": "En attente de validation",
@@ -1621,7 +1629,10 @@ function ReportDetailView({
1621
1629
  "\u2190 ",
1622
1630
  strings["detail.back"]
1623
1631
  ] }),
1624
- /* @__PURE__ */ jsx3("span", { class: `pill pill-status pill-status--${detail.status}`, children: strings[`status.${detail.status}`] ?? detail.status })
1632
+ /* @__PURE__ */ jsxs3("span", { class: "report-detail-header-pills", children: [
1633
+ /* @__PURE__ */ jsx3("span", { class: `pill pill-status pill-status--${detail.status}`, children: strings[`status.${detail.status}`] ?? detail.status }),
1634
+ detail.verification && /* @__PURE__ */ jsx3("span", { class: "pill pill-verified", children: strings["detail.verified.badge"] })
1635
+ ] })
1625
1636
  ] }),
1626
1637
  variant === "board" && /* @__PURE__ */ jsxs3("div", { class: "report-detail-header report-detail-header--board", children: [
1627
1638
  /* @__PURE__ */ jsxs3(
@@ -1637,7 +1648,10 @@ function ReportDetailView({
1637
1648
  ]
1638
1649
  }
1639
1650
  ),
1640
- /* @__PURE__ */ jsx3("span", { class: `pill pill-status pill-status--${detail.status}`, children: strings[`status.${detail.status}`] ?? detail.status })
1651
+ /* @__PURE__ */ jsxs3("span", { class: "report-detail-header-pills", children: [
1652
+ /* @__PURE__ */ jsx3("span", { class: `pill pill-status pill-status--${detail.status}`, children: strings[`status.${detail.status}`] ?? detail.status }),
1653
+ detail.verification && /* @__PURE__ */ jsx3("span", { class: "pill pill-verified", children: strings["detail.verified.badge"] })
1654
+ ] })
1641
1655
  ] }),
1642
1656
  /* @__PURE__ */ jsxs3("div", { class: "report-detail-body", children: [
1643
1657
  /* @__PURE__ */ jsx3(ContextBlock, { detail, strings }),
@@ -1711,6 +1725,15 @@ function ReportDetailView({
1711
1725
  }
1712
1726
  ) : /* @__PURE__ */ jsx3("div", { class: "report-detail-screenshot", children: /* @__PURE__ */ jsx3("img", { src: url, alt: "", loading: "lazy", onError: () => unpinUrl(pinKey) }) });
1713
1727
  }),
1728
+ detail.verification && /* @__PURE__ */ jsx3(
1729
+ VerificationPanel,
1730
+ {
1731
+ verification: detail.verification,
1732
+ strings,
1733
+ pinUrl,
1734
+ unpinUrl
1735
+ }
1736
+ ),
1714
1737
  /* @__PURE__ */ jsx3("h3", { class: "report-detail-section", children: strings["detail.thread"] }),
1715
1738
  detail.comments.length === 0 ? /* @__PURE__ */ jsx3("p", { class: "report-detail-empty", children: strings["detail.no_replies"] }) : /* @__PURE__ */ jsx3("ul", { class: "report-comments", children: detail.comments.map((c) => /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(
1716
1739
  CommentBubble,
@@ -1879,6 +1902,68 @@ function TechnicalContextDrawer({ ctx, strings }) {
1879
1902
  ] })
1880
1903
  ] });
1881
1904
  }
1905
+ function VerificationPanel({
1906
+ verification,
1907
+ strings,
1908
+ pinUrl,
1909
+ unpinUrl
1910
+ }) {
1911
+ return /* @__PURE__ */ jsxs3("details", { class: "report-detail-verification", children: [
1912
+ /* @__PURE__ */ jsx3("summary", { children: strings["detail.verified.title"] }),
1913
+ /* @__PURE__ */ jsxs3("div", { class: "verification-body", children: [
1914
+ /* @__PURE__ */ jsx3("p", { class: "verification-evidence", children: verification.evidence }),
1915
+ /* @__PURE__ */ jsxs3("div", { class: "verification-meta", children: [
1916
+ /* @__PURE__ */ jsxs3("span", { children: [
1917
+ verification.functional_ok ? "\u2713" : "\u2717",
1918
+ " ",
1919
+ strings["detail.verified.functional"]
1920
+ ] }),
1921
+ /* @__PURE__ */ jsxs3("span", { children: [
1922
+ verification.ui_ok ? "\u2713" : "\u2717",
1923
+ " ",
1924
+ strings["detail.verified.ui"]
1925
+ ] }),
1926
+ /* @__PURE__ */ jsxs3("span", { children: [
1927
+ verification.environment,
1928
+ verification.app_version ? ` \xB7 ${verification.app_version}` : ""
1929
+ ] })
1930
+ ] }),
1931
+ verification.screenshots.length > 0 && /* @__PURE__ */ jsx3("div", { class: "verification-shots", children: verification.screenshots.map((s, i) => {
1932
+ const pinKey = `verif:${i}`;
1933
+ const url = pinUrl(pinKey, s.url);
1934
+ if (!url) return null;
1935
+ const safeHref = safeExternalHref(url);
1936
+ return safeHref ? /* @__PURE__ */ jsx3(
1937
+ "a",
1938
+ {
1939
+ class: "report-detail-screenshot",
1940
+ href: safeHref,
1941
+ target: "_blank",
1942
+ rel: "noopener noreferrer",
1943
+ children: /* @__PURE__ */ jsx3(
1944
+ "img",
1945
+ {
1946
+ src: url,
1947
+ alt: s.caption ?? "",
1948
+ loading: "lazy",
1949
+ onError: () => unpinUrl(pinKey)
1950
+ }
1951
+ )
1952
+ },
1953
+ i
1954
+ ) : /* @__PURE__ */ jsx3("div", { class: "report-detail-screenshot", children: /* @__PURE__ */ jsx3(
1955
+ "img",
1956
+ {
1957
+ src: url,
1958
+ alt: s.caption ?? "",
1959
+ loading: "lazy",
1960
+ onError: () => unpinUrl(pinKey)
1961
+ }
1962
+ ) }, i);
1963
+ }) })
1964
+ ] })
1965
+ ] });
1966
+ }
1882
1967
  function DeviceSection({
1883
1968
  device,
1884
1969
  strings
@@ -4965,6 +5050,10 @@ var WIDGET_STYLES = `
4965
5050
  .pill-status--awaiting_validation { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }
4966
5051
  .pill-status--closed { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
4967
5052
  .pill-status--rejected, .pill-status--wontfix, .pill-status--duplicate { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }
5053
+ /* Agent-verified fix badge (Phase B) \u2014 emerald, same family as
5054
+ .pill-status--closed but its own modifier since it layers alongside
5055
+ the status pill rather than replacing it. */
5056
+ .pill-verified { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
4968
5057
  .pill-type { background: var(--mfb-surface); color: var(--mfb-text-muted); border-color: var(--mfb-border); }
4969
5058
  .pill-severity { background: var(--mfb-surface); color: var(--mfb-text-muted); border-color: var(--mfb-border); }
4970
5059
  .pill-severity--blocker { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
@@ -4979,6 +5068,7 @@ var WIDGET_STYLES = `
4979
5068
  justify-content: space-between;
4980
5069
  gap: 8px;
4981
5070
  }
5071
+ .report-detail-header-pills { display: inline-flex; align-items: center; gap: 6px; }
4982
5072
  .report-detail-body { display: flex; flex-direction: column; gap: 10px; }
4983
5073
  .report-detail-description {
4984
5074
  font-size: 14px;
@@ -5332,12 +5422,14 @@ button.report-detail-edit {
5332
5422
  /* Transparency drawer \u2014 closed by default. The user can click open to
5333
5423
  verify what their browser sent: device, errors, console tail, network
5334
5424
  tail. Read-only; purely a trust-building gesture. */
5335
- .report-detail-tech {
5425
+ .report-detail-tech,
5426
+ .report-detail-verification {
5336
5427
  border: 1px solid var(--mfb-border);
5337
5428
  border-radius: var(--mfb-radius);
5338
5429
  background: var(--mfb-surface);
5339
5430
  }
5340
- .report-detail-tech > summary {
5431
+ .report-detail-tech > summary,
5432
+ .report-detail-verification > summary {
5341
5433
  cursor: pointer;
5342
5434
  padding: 8px 10px;
5343
5435
  font-size: 11px;
@@ -5347,15 +5439,19 @@ button.report-detail-edit {
5347
5439
  user-select: none;
5348
5440
  list-style: none;
5349
5441
  }
5350
- .report-detail-tech > summary::-webkit-details-marker { display: none; }
5351
- .report-detail-tech > summary::before {
5442
+ .report-detail-tech > summary::-webkit-details-marker,
5443
+ .report-detail-verification > summary::-webkit-details-marker { display: none; }
5444
+ .report-detail-tech > summary::before,
5445
+ .report-detail-verification > summary::before {
5352
5446
  content: '\u25B8';
5353
5447
  display: inline-block;
5354
5448
  margin-right: 6px;
5355
5449
  transition: transform 120ms;
5356
5450
  }
5357
- .report-detail-tech[open] > summary::before { transform: rotate(90deg); }
5358
- .tech-body {
5451
+ .report-detail-tech[open] > summary::before,
5452
+ .report-detail-verification[open] > summary::before { transform: rotate(90deg); }
5453
+ .tech-body,
5454
+ .verification-body {
5359
5455
  padding: 0 10px 10px 10px;
5360
5456
  display: flex;
5361
5457
  flex-direction: column;
@@ -5435,6 +5531,31 @@ button.report-detail-edit {
5435
5531
  .tech-network-url { word-break: break-all; }
5436
5532
  .tech-network-time { text-align: right; color: var(--mfb-text-muted); font-variant-numeric: tabular-nums; }
5437
5533
 
5534
+ /* Proof-of-fix drawer (Phase B) \u2014 shares the collapsible shell rules
5535
+ with .report-detail-tech above (grouped selectors): closed by
5536
+ default, rotating \u25B8 marker. Surfaces an agent's verification pass
5537
+ so the submitter can see the evidence behind the "V\xE9rifi\xE9 par
5538
+ l'agent" badge. */
5539
+ .verification-evidence {
5540
+ margin: 0;
5541
+ font-size: 12px;
5542
+ white-space: pre-wrap;
5543
+ }
5544
+ .verification-meta {
5545
+ display: flex;
5546
+ gap: 12px;
5547
+ flex-wrap: wrap;
5548
+ font-size: 11px;
5549
+ color: var(--mfb-text-muted);
5550
+ }
5551
+ .verification-shots {
5552
+ display: flex;
5553
+ gap: 8px;
5554
+ flex-wrap: wrap;
5555
+ }
5556
+ .verification-shots .report-detail-screenshot { width: 96px; flex: 0 0 auto; }
5557
+ .verification-shots .report-detail-screenshot img { max-height: 96px; }
5558
+
5438
5559
  /* KPI strip \u2014 four pills above the My Reports list. Each is clickable
5439
5560
  to filter the rows below. Borrowed from thePnr's FeedbackKPICards. */
5440
5561
  .kpi-strip {
@@ -6601,8 +6722,8 @@ function createFeedback(config) {
6601
6722
  capture_method: captureMethod,
6602
6723
  technical_context
6603
6724
  };
6604
- if ("0.35.0") {
6605
- payload.widget_version = "0.35.0";
6725
+ if ("0.36.0") {
6726
+ payload.widget_version = "0.36.0";
6606
6727
  }
6607
6728
  if (manualScreenshots?.length) {
6608
6729
  payload.screenshots = manualScreenshots;
@@ -6746,4 +6867,4 @@ function createFeedback(config) {
6746
6867
  export {
6747
6868
  createFeedback
6748
6869
  };
6749
- //# sourceMappingURL=chunk-A2TMODNI.mjs.map
6870
+ //# sourceMappingURL=chunk-T36VC7TZ.mjs.map