Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.
gui: Privacy's kept-from-vendors card, redrawn (the owner's Night design)
yetonee96d577f28cc
diff --git a/internal/gui/assets/app.css b/internal/gui/assets/app.cssindex 4382295c7..11a8f4028 100644--- a/internal/gui/assets/app.css+++ b/internal/gui/assets/app.css@@ -3225,90 +3225,122 @@ body:not(.side-nav) #view-settings .set-head.stuck::before { box-shadow: 0 1px 0#privacyModelRow.pm-wait .name { color: var(--muted); }/* Privacy › what masking kept from vendors (renderMaskObs): a quiet card- over the switches. Flat colour only: hairlines, the charts' own colours- for kinds, and the accent kept for today and the shield */-.mask-obs { position: relative; margin-bottom: 6px; padding: 16px 18px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }+ over the switches, in the other cards' own colour. Flat only: no+ gradients, no shadows; hairlines, one thin number, and the accent kept+ for what left this computer as placeholders */+.mask-obs { position: relative; container-type: inline-size; margin-bottom: 6px; padding: 26px 30px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }.mask-obs:empty { display: none; }-.mo-head { display: flex; align-items: center; gap: 11px; min-height: 30px; }+.mo-head { display: flex; align-items: flex-start; gap: 12px; }.mo-head .grow, .mo-lh .grow { flex: 1; }-.mo-shield { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--accent); box-shadow: inset 0 0 0 1px var(--line-2); }-.mask-obs.off .mo-shield { color: var(--muted); }.mo-title { min-width: 0; }-.mo-name { font-size: 13px; font-weight: 600; letter-spacing: -.005em; color: var(--fg); }-.mo-sub { font-size: 11.5px; line-height: 1.4; color: var(--muted); }-.mo-empty { margin-top: 12px; font-size: 12px; line-height: 1.5; color: var(--muted); }-.mo-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: end; margin-top: 20px; }-.mo-count { min-width: 0; padding-bottom: 2px; }-.mo-big { display: flex; align-items: baseline; gap: 8px; }-.mo-num { font-size: 52px; line-height: .92; font-weight: 600; letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: var(--fg); }-.mo-unit { font-size: 12.5px; color: var(--muted); white-space: nowrap; }-.mo-meta { margin-top: 10px; font-size: 12px; color: var(--fg-2); white-space: nowrap; font-variant-numeric: tabular-nums; }-.mo-days { position: relative; min-width: 0; height: 84px; display: flex; flex-direction: column; }-.mo-bars { flex: 1; min-height: 0; display: flex; align-items: stretch; justify-content: space-between; gap: 6px; border-bottom: 1px solid var(--line); }-.mo-bars.many { gap: 3px; }-.mo-day { flex: 1 1 0; max-width: 22px; min-width: 3px; display: flex; align-items: flex-end; justify-content: center; }-.mo-day i { display: block; width: 100%; border-radius: 3px 3px 1px 1px; background: color-mix(in srgb, var(--fg) 15%, transparent); transform-origin: bottom; transition: background-color .15s; }-.mo-day:hover i { background: color-mix(in srgb, var(--fg) 32%, transparent); }+.mo-name { font-size: 12px; letter-spacing: .14em; color: var(--fg-2); }+.mo-sub { margin-top: 7px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }+.mo-empty { margin-top: 14px; font-size: 12px; line-height: 1.5; color: var(--muted); }+.mo-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 236px); gap: 56px; align-items: end; margin-top: 38px; }+.mo-count { min-width: 0; }+.mo-num { font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-size: clamp(64px, 16cqi, 140px); font-weight: 100; line-height: .82; letter-spacing: -.055em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--fg); }+.mo-unit { margin-top: 20px; font-size: 14px; letter-spacing: .02em; color: var(--fg-2); }+.mo-unit span { margin-left: 8px; color: var(--faint); }+.mo-stats { min-width: 0; border-top: 1px solid var(--line); }+.mo-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }+.mo-stat b { font-size: 20px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--fg); }+.mo-days { position: relative; min-width: 0; height: 54px; margin-top: 14px; display: flex; flex-direction: column; }+.mo-bars { flex: 1; min-height: 0; display: flex; align-items: stretch; justify-content: space-between; gap: 5px; }+.mo-bars.many { gap: 2px; }+.mo-day { flex: 1 1 0; min-width: 3px; display: flex; align-items: flex-end; justify-content: center; }+.mo-day i { display: block; width: 100%; border-radius: 1.5px; background: color-mix(in srgb, var(--fg) 24%, transparent); transform-origin: bottom; transition: background-color .15s; }+.mo-day:hover i { background: color-mix(in srgb, var(--fg) 42%, transparent); }.mo-day.now i, .mo-day.now:hover i { background: var(--accent); }-.mo-day.zero i { width: 3px; height: 3px; margin-bottom: 3px; border-radius: 50%; background: var(--line-2); }-.mo-axis { display: flex; justify-content: space-between; padding-top: 5px; font-size: 10px; line-height: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }-.mo-ctip { position: absolute; top: -4px; transform: translate(-50%, -100%); padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--card); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); font-size: 11px; white-space: nowrap; color: var(--fg); font-variant-numeric: tabular-nums; pointer-events: none; }+.mo-day.zero i { height: 2px; background: var(--line); }+.mo-axis { display: flex; justify-content: space-between; padding-top: 6px; font-size: 10.5px; line-height: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }+.mo-axis span:last-child { color: var(--accent); }+.mo-ctip { position: absolute; top: -4px; transform: translate(-50%, -100%); padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--card); font-size: 11px; white-space: nowrap; color: var(--fg); font-variant-numeric: tabular-nums; pointer-events: none; }.mo-ctip[hidden] { display: none; }-.mo-sk-num { width: 120px; height: 46px; border-radius: 8px; }-.mo-sk-chart { height: 64px; border-radius: 8px; }-.mo-sec { margin-top: 20px; }-.mo-sec > .label, .mo-lh { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }-.mo-hint { font-size: 11px; color: var(--faint); }-/* the lines as the vendor got them, each placeholder in its kind's colour */-.mo-saw { margin-top: 20px; padding: 11px 14px 12px; border-radius: 10px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }-.mo-saw .mo-lh { margin-bottom: 6px; }-.mo-snip { font-family: var(--code); font-size: 11.5px; line-height: 1.75; color: var(--fg-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }-.mo-snip + .mo-snip { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }-.mo-ph { padding: 1px 5px; border-radius: 4px; font: inherit; color: color-mix(in srgb, var(--k) 78%, var(--fg)); background: color-mix(in srgb, var(--k) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 22%, transparent); outline: none; cursor: default; }-.mo-ph:hover { background: color-mix(in srgb, var(--k) 22%, transparent); }-.mo-ph:focus-visible { background: color-mix(in srgb, var(--k) 22%, transparent); }-/* what was kept and what found it, side by side */-.mo-ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 28px; margin-top: 20px; }-.mo-ledg { min-width: 0; }-.mo-ledg > .label { margin-bottom: 2px; }-.mo-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; grid-template-rows: 26px 2px; align-items: center; column-gap: 6px; width: 100%; padding: 0 6px 7px; margin: 0 -6px; box-sizing: content-box; border: 0; border-radius: 7px; background: transparent; color: var(--fg); font: inherit; font-size: 12.5px; text-align: left; cursor: default; }-.mo-row:not(:disabled):hover { background: var(--pill); }-.mo-row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); }-.mo-row b { font-weight: 600; font-variant-numeric: tabular-nums; }-.mo-row .mo-dotc { justify-self: center; }-.mo-meter { grid-column: 2 / 4; height: 2px; border-radius: 1px; background: var(--line); overflow: hidden; }-.mo-meter i { display: block; height: 100%; background: color-mix(in srgb, var(--fg) 40%, transparent); transform-origin: left; }-.mo-row.model .mo-meter i { background: var(--c6); }+.mo-sk-num { width: 180px; height: 96px; border-radius: 10px; }+.mo-sk-chart { height: 96px; border-radius: 10px; }+.mo-sec > .label, .mo-lh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }+.mo-hint { font-size: 11.5px; color: var(--faint); }.mo-dotc { flex: none; width: 7px; height: 7px; border-radius: 50%; }-.mo-flow { display: grid; grid-template-columns: minmax(0, 200px) minmax(96px, 1fr) minmax(0, 200px); max-width: 760px; margin: 0 auto; }-.mo-col { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }-.mo-node { display: flex; align-items: center; gap: 7px; height: 30px; min-width: 0; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; font-size: 12px; cursor: default; }++/* agents → this computer → providers: hairlines on a faint grid */+.mo-fl { margin: 64px 0 0; }+.mo-flow { position: relative; display: grid; grid-template-columns: minmax(0, 150px) minmax(80px, 1fr) minmax(0, 150px); gap: 14px; }+.mo-col { display: flex; flex-direction: column; justify-content: center; min-width: 0; }+.mo-node { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; height: 48px; min-width: 0; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--fg); font: inherit; cursor: default; }+.mo-col.provider .mo-node { align-items: flex-start; }.mo-node:not(:disabled):hover { background: var(--pill); }.mo-node:disabled { color: var(--muted); }-.mo-node .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }-.mo-node .ct { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }+.mo-node .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }+.mo-node .ct { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }+.mo-col.provider .ct { color: var(--accent); }.mo-mid { position: relative; min-width: 0; }.mo-mid svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }-.mo-rib { fill: none; stroke: var(--fg); stroke-linecap: round; }-.mo-dot { fill: var(--muted); opacity: 0; }+/* the dot grid behind the hairlines, a dot every 14px */+.mo-mid::before { content: ""; position: absolute; inset: 0; background: var(--fg); opacity: .07; pointer-events: none;+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='1' cy='1' r='.6'/%3E%3C/svg%3E") 0 0 / 14px 14px;+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='1' cy='1' r='.6'/%3E%3C/svg%3E") 0 0 / 14px 14px; }+.mo-th { fill: none; stroke: var(--fg); stroke-width: .6; stroke-dasharray: 1 1; }+.mo-th.out { stroke: var(--accent); }+.mo-th.one { stroke-width: .9; }+.mo-mem { stroke: var(--accent); stroke-opacity: .55; stroke-width: 1; }+.mo-tick { stroke: var(--accent); stroke-opacity: .35; stroke-width: .6; }+.mo-scan { fill: var(--accent); opacity: 0; animation: mo-scan 5.5s cubic-bezier(.45, 0, .55, 1) infinite; }+@keyframes mo-scan { 0% { transform: translateY(0); opacity: 0; } 15%, 85% { opacity: 1; } 100% { transform: translateY(var(--h)); opacity: 0; } }+.mo-dot { fill: var(--fg); opacity: 0; }.mo-dot.out { fill: var(--accent); }-.mo-rib.out { stroke: var(--accent); }-.mo-hub { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); background: var(--card); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 0 5px color-mix(in srgb, var(--accent) 9%, transparent), 0 0 0 11px color-mix(in srgb, var(--accent) 4%, transparent); }-.mo-values { display: flex; flex-wrap: wrap; gap: 6px; }-.mo-val { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; font-size: 12px; cursor: default; outline: none; }-.mo-val:hover { border-color: var(--line-2); background: var(--pill); }-.mo-val:focus-visible { border-color: var(--line-2); background: var(--pill); }-.mo-val .sh { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--code); font-size: 11.5px; letter-spacing: .02em; }-.mo-val .x { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }-.mo-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); }+.mo-hub { position: absolute; left: 50%; top: -30px; width: 20px; height: 20px; margin-left: -10px; display: flex; align-items: center; justify-content: center; color: var(--accent); }+.mo-cap { margin-top: 16px; text-align: center; font-size: 11px; letter-spacing: .12em; color: var(--muted); }++/* the newest request as the vendor got it, or as it is here */+.mo-saw { margin-top: 30px; border-radius: 12px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }+.mo-saw .mo-lh { align-items: center; flex-wrap: wrap; row-gap: 6px; margin: 0; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }+.mo-saw .label { margin: 0; }+.mo-lines { padding: 12px 18px 14px; }+.mo-snip { font-family: var(--code); font-size: 12px; line-height: 2; color: var(--fg-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }+.mo-snip + .mo-snip { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }+.mo-ph { padding: 1px 5px; border-radius: 4px; font: inherit; color: color-mix(in srgb, var(--k) 78%, var(--fg)); background: color-mix(in srgb, var(--k) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 22%, transparent); outline: none; cursor: default; }+.mo-ph:hover { background: color-mix(in srgb, var(--k) 22%, transparent); }+.mo-ph:focus-visible { background: color-mix(in srgb, var(--k) 22%, transparent); }+.mo-saw .mo-ph { padding: 1px 6px; margin: 0 1px; border-radius: 5px; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--accent) 40%, transparent); animation: mo-breathe 4.8s ease-in-out infinite; }+.mo-saw .mo-ph:hover, .mo-saw .mo-ph:focus-visible { background: color-mix(in srgb, var(--accent) 20%, transparent); }+@keyframes mo-breathe { 50% { box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--accent) 75%, transparent), 0 0 0 3px color-mix(in srgb, var(--accent) 7%, transparent); } }+.mo-orig { color: var(--fg); border-bottom: 1px dotted var(--muted); }+.mo-orig.gone { color: var(--faint); }++/* what was kept and how it was found; the values masked most */+.mo-low { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 52px; margin-top: 34px; }+.mo-ledger { min-width: 0; }+.mo-ledg + .mo-ledg { margin-top: 24px; }+.mo-ledg > .label { margin-bottom: 2px; }+.mo-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--fg); font: inherit; font-size: 12.5px; text-align: left; cursor: default; }+.mo-row:last-child { border-bottom: 0; }+.mo-row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); transition: color .15s; }+.mo-row:not(:disabled):hover .nm { color: var(--fg); }+.mo-row b { font-size: 16px; font-weight: 300; font-variant-numeric: tabular-nums; }+.mo-row.model b { color: var(--accent); }+.mo-top { min-width: 0; }+.mo-values { display: flex; flex-direction: column; }+.mo-val { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 10px; margin: 0 -10px; border: 0; border-radius: 9px; background: none; color: var(--fg); font: inherit; font-size: 12.5px; text-align: left; cursor: default; outline: none; }+.mo-val:hover, .mo-val:focus-visible { background: var(--pill); }+.mo-val .i { flex: none; width: 16px; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }+.mo-val .sh { flex: 0 1 150px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--code); font-size: 12px; letter-spacing: .03em; }+.mo-val .by { flex: none; width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--muted); }+.mo-val .bar { flex: 1; min-width: 12px; display: flex; }+.mo-val .bar i { height: 1px; background: color-mix(in srgb, var(--fg) 24%, transparent); transition: background-color .15s; }+.mo-val:hover .bar i, .mo-val:focus-visible .bar i { background: var(--accent); }+.mo-val .x { flex: none; min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }+.mo-foot { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }.mo-note { flex: 1; min-width: 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }.mo-open { flex: none; display: inline-flex; align-items: center; gap: 2px; }-@media (max-width: 560px) {- .mo-hero { grid-template-columns: minmax(0, 1fr); gap: 14px; }- .mo-num { font-size: 44px; }- .mo-flow { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); }- .mo-node .ic { display: none; }+@container (max-width: 620px) {+ .mo-hero, .mo-low { grid-template-columns: minmax(0, 1fr); gap: 26px; }+ .mo-hero { margin-top: 28px; }+ .mo-fl { margin-top: 52px; }+ .mo-flow { grid-template-columns: minmax(0, 1fr) minmax(48px, 1fr) minmax(0, 1fr); gap: 4px; }+ .mo-val .by { display: none; }}+@media (max-width: 560px) { .mask-obs { padding: 20px 18px 12px; } }+@media (prefers-reduced-motion: reduce) { .mo-scan, .mo-saw .mo-ph { animation: none; } }/* what a masked value was, beside it while it is pointed at */.mask-tip { position: fixed; z-index: 1000; max-width: min(360px, calc(100vw - 16px)); padding: 8px 11px 9px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); font-size: 12px; color: var(--fg); pointer-events: none; animation: mask-tip .16s var(--ease); }diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.jsindex 071ac399a..c6834c98a 100644--- a/internal/gui/assets/app.js+++ b/internal/gui/assets/app.js@@ -22158,7 +22158,7 @@ function drawMaskObs() {const on = !!(s.redact || s.redactPersonal);if (sum?.requests) maskSawLoad();const saw = maskSawLines();- const key = JSON.stringify([document.documentElement.lang, maskDays, on, sum, saw.map((x) => x.text), state.agents?.length, (providers || maskProv)?.providers?.length]);+ const key = JSON.stringify([document.documentElement.lang, maskDays, on, sum, saw?.texts, state.agents?.length, (providers || maskProv)?.providers?.length]);if (key === maskDrawn && box.firstChild) return;maskDrawn = key;// it moves when it first has numbers to say, and for other days: not@@ -22170,12 +22170,10 @@ function drawMaskObs() {box.classList.toggle("off", !on);const head = el("div", "mo-head");- const shield = el("span", "mo-shield");- shield.append(svg(SHIELD, 17, 1.5));const words = el("div", "mo-title");words.append(el("div", "mo-name", t("Kept from vendors")),el("div", "mo-sub", on ? t("Masked on this computer before each request left it, and put back in each answer") : t("Masking is off: requests go to vendors as they are")));- head.append(shield, words, el("span", "grow"));+ head.append(words, el("span", "grow"));if (sum?.requests || maskDays === 30) head.append(segs([["7", t("7 days")], ["30", t("30 days")]], String(maskDays), (v) => {maskDays = +v;try { localStorage.setItem("magpie.maskDays", v); } catch {}@@ -22193,19 +22191,23 @@ function drawMaskObs() {return;}- // the number, and the days under it- const hero = el("div", "mo-hero");- const count = el("div", "mo-count");- const big = el("div", "mo-big");- const num = el("span", "mo-num", fmtN(sum.n));- big.append(num, el("span", "mo-unit", t(sum.n === 1 ? "value masked" : "values masked")));- count.append(big, el("div", "mo-meta", sum.requests- ? [t(sum.distinct === 1 ? "1 different value" : "{n} different values", { n: fmtN(sum.distinct) }), t(sum.requests === 1 ? "1 request" : "{n} requests", { n: fmtN(sum.requests) }),- sum.blocked ? t(sum.blocked === 1 ? "1 request held back" : "{n} requests held back", { n: fmtN(sum.blocked) }) : "",- sum.warned ? t(sum.warned === 1 ? "1 value sent as written" : "{n} values sent as written", { n: fmtN(sum.warned) }) : ""].filter(Boolean).join(" · ")- : t("Nothing yet in these days")));+ // the number in full; beside it what makes it up, and the days+ const hero = el("div", "mo-hero"), count = el("div", "mo-count");+ const num = el("div", "mo-num", sum.n.toLocaleString(intlLang()));+ const unit = el("div", "mo-unit", t(sum.n === 1 ? "value masked" : "values masked"));+ unit.append(el("span", "", t(maskDays === 30 ? "30 days" : "7 days")));+ count.append(num, unit);+ const stats = el("div", "mo-stats");+ const stat = (label, n) => { const r = el("div", "mo-stat"); r.append(el("span", "", label), el("b", "", fmtN(n))); stats.append(r); };+ if (sum.requests) {+ stat(t("Different values"), sum.distinct);+ stat(t("Requests"), sum.requests);+ if (sum.blocked) stat(t("Held back"), sum.blocked);+ if (sum.warned) stat(t("Sent as written"), sum.warned);+ } else stats.append(el("div", "mo-stat", t("Nothing yet in these days")));const chart = el("div", "mo-days");- hero.append(count, chart);+ stats.append(chart);+ hero.append(count, stats);box.append(hero);maskStrip(chart, sum.days, move);if (move && sum.n) maskCountUp(num, sum.n);@@ -22214,49 +22216,41 @@ function drawMaskObs() {return;}- // what the vendor saw: the newest lines, as they went- if (saw.length) box.append(maskSawPane(saw, move));+ // agents, this computer, providers; then the newest request+ if (sum.agents.length && sum.providers.length) box.append(maskFlow(sum, move));+ if (saw) box.append(maskSawPane(saw, move));- // what was kept, by kind, and what found it- const ledger = el("div", "mo-ledger");+ // what was kept and what found it; beside them the values masked most+ const low = el("div", "mo-low"), ledger = el("div", "mo-ledger");if (sum.kinds.length) {const top = sum.kinds.slice(0, 6), rest = sum.kinds.slice(6);- const rows = top.map((k) => ({ n: k.n, c: maskColor(k.name), label: maskKindName(k.name), open: { kind: k.name }, tip: t("Show the requests with {kind}", { kind: maskKindName(k.name) }) }));- if (rest.length) rows.push({ n: rest.reduce((a, k) => a + k.n, 0), c: "var(--faint)", label: t("Other") });- ledger.append(maskLedger(t("What was kept"), "kind", rows, move));+ const rows = top.map((k) => ({ n: k.n, label: maskKindName(k.name), open: { kind: k.name }, tip: t("Show the requests with {kind}", { kind: maskKindName(k.name) }) }));+ if (rest.length) rows.push({ n: rest.reduce((a, k) => a + k.n, 0), label: t("Other") });+ ledger.append(maskLedger(t("What was kept"), "kind", rows));}const by = Object.keys(MASK_BY).filter((b) => sum.by?.[b]).map((b) => ({ n: sum.by[b], label: maskByName(b), open: { by: b }, model: b === "model",tip: b === "model" ? t(sum.by.model === 1 ? "1 value found by the local model, which no rule recognises" : "{n} values found by the local model, which no rule recognises", { n: fmtN(sum.by.model) }) : "" }));- if (by.length) ledger.append(maskLedger(t("Found by"), "by", by, move));- if (ledger.firstChild) box.append(ledger);-- // from which agents, to which providers- if (sum.agents.length && sum.providers.length) {- const sec = el("div", "mo-sec");- sec.append(el("div", "label", t("From your agents, masked, to vendors")));- sec.append(maskFlow(sum, move));- box.append(sec);- }-- // the values masked most, shown while pointed at+ if (by.length) ledger.append(maskLedger(t("Found by"), "by", by));+ low.append(ledger);if (sum.values.length) {- const sec = el("div", "mo-sec");- const lh = el("div", "mo-lh");- lh.append(el("span", "label", t("Masked most")), el("span", "mo-hint", t("Point at one to see what it was")));- sec.append(lh);- const wrap = el("div", "mo-values");- for (const v of sum.values.slice(0, 12)) {- const c = el("button", "mo-val");+ const sec = el("div", "mo-top"), lh = el("div", "mo-lh");+ lh.append(el("span", "label", t("Masked most")), el("span", "grow"), el("span", "mo-hint", t("Point at one to see what it was")));+ const wrap = el("div", "mo-values"), max = sum.values[0].n || 1;+ for (const [i, v] of sum.values.slice(0, 8).entries()) {+ const c = el("button", "mo-val"), sh = maskShape(v.head, v.len), bar = el("span", "bar"), f = el("i");c.type = "button";- c.setAttribute("aria-label", maskKindName(v.kind) + " " + maskShape(v.head, v.len));- c.append(maskDot(v.kind), el("span", "sh", maskShape(v.head, v.len)), el("span", "x", "×" + fmtN(v.n)));+ c.setAttribute("aria-label", maskKindName(v.kind) + " " + sh);+ f.style.width = Math.max(3, (100 * v.n) / max) + "%";+ bar.append(f);+ c.append(el("span", "i", String(i + 1).padStart(2, "0")), el("span", "sh", sh), el("span", "by", maskByName(v.by)), bar, el("span", "x", fmtN(v.n)));maskTipOn(c, { p: v.p, kind: v.kind, by: v.by, meta: t(v.requests === 1 ? "In 1 request, {when}" : "In {n} requests, most recently {when}", { n: fmtN(v.requests), when: ago(v.last) }) });c.onclick = () => maskOpenRecords({ kind: v.kind });wrap.append(c);}- sec.append(wrap);- box.append(sec);+ sec.append(lh, wrap);+ low.append(sec);}+ box.append(low);const foot = el("div", "mo-foot");foot.append(el("span", "mo-note", t("Kept on this computer for 30 days, without the values themselves")));@@ -22265,7 +22259,8 @@ function drawMaskObs() {open.onclick = () => maskOpenRecords({});foot.append(open);box.append(foot);- if (move) for (const [i, n] of [...box.children].slice(2).entries()) n.animate([{ opacity: 0, transform: "translateY(6px)" }, { opacity: 1, transform: "none" }], { duration: 520, delay: 160 + i * 70, easing: "cubic-bezier(.32, .72, 0, 1)", fill: "backwards" });+ // each part rises out of a blur+ if (move) for (const [i, n] of [...box.children].slice(1).entries()) n.animate([{ opacity: 0, transform: "translateY(8px)", filter: "blur(6px)" }, {}], { duration: 1100, delay: i * 120, easing: "cubic-bezier(.2, .7, .1, 1)", fill: "backwards" });}function maskCountUp(node, n) {@@ -22274,7 +22269,7 @@ function maskCountUp(node, n) {if (!node.isConnected) return;const p = Math.min(1, (now - start) / ms);const e = p === 1 ? 1 : 1 - Math.pow(2, -10 * p);- node.textContent = fmtN(Math.round(n * e));+ node.textContent = Math.round(n * e).toLocaleString(intlLang());if (p < 1) requestAnimationFrame(step);};requestAnimationFrame(step);@@ -22312,30 +22307,20 @@ function maskStrip(box, days, move) {box.append(bars, axis, tip);}-// maskLedger: one column of the breakdown, a row each with its count and a-// hairline meter of its share; a row opens its records-function maskLedger(title, kind, rows, move) {+// maskLedger: a column of the breakdown; a row opens its records+function maskLedger(title, kind, rows) {const col = el("div", "mo-ledg " + kind);col.append(el("div", "label", title));- const max = Math.max(1, ...rows.map((r) => r.n));- rows.forEach((r, i) => {+ for (const r of rows) {const b = el("button", "mo-row" + (r.model ? " model" : ""));b.type = "button";- const d = el("span", "mo-dotc");- d.style.background = r.c || (r.model ? "var(--c6)" : "var(--faint)");- b.append(d);- const m = el("span", "mo-meter"), f = el("i");- f.style.width = (100 * r.n) / max + "%";- if (r.c) f.style.background = r.c;- m.append(f);- b.append(el("span", "nm", r.label), el("b", "", fmtN(r.n)), m);+ b.append(el("span", "nm", r.label), el("b", "", fmtN(r.n)));if (r.open) {if (r.tip) b.title = r.tip;b.onclick = () => maskOpenRecords(r.open);} else b.disabled = true;- if (move) f.animate([{ transform: "scaleX(0)" }, { transform: "none" }], { duration: 820, delay: 360 + i * 60, easing: "cubic-bezier(.32, .72, 0, 1)", fill: "backwards" });col.append(b);- });+ }return col;}@@ -22355,18 +22340,10 @@ function maskSawLoad() {.catch(() => {}).finally(() => { maskSawBusy = false; maskSawAt = Date.now(); drawMaskObs(); });}-// up to three lines, one a record before a second from any+// the newest record with lines, up to three of themfunction maskSawLines() {- const out = [], seen = new Set();- for (const pass of [0, 1]) for (const r of maskSaw || []) {- const texts = maskSnipTexts(r).filter((x) => !seen.has(x));- for (const text of pass ? texts : texts.slice(0, 1)) {- if (out.length >= 3) return out;- seen.add(text);- out.push({ text: text.replace(/\s+/g, " "), t: r.t, info: new Map((r.values || []).map((x) => [x.p, x])) });- }- }- return out;+ const r = (maskSaw || []).find((r) => maskSnipTexts(r).length);+ return r && { r, texts: maskSnipTexts(r).slice(0, 3).map((x) => x.replace(/\s+/g, " ")), info: new Map((r.values || []).map((x) => [x.p, x])) };}// maskPlace: a placeholder as the text carried it, in its kind's colour,// what it stood for shown while pointed at@@ -22378,37 +22355,51 @@ function maskPlace(cls, p, x) {maskTipOn(mark, { p, kind, by: x?.b || "known" });return mark;}-function maskSawPane(lines, move) {- const pane = el("div", "mo-saw");+// maskSawPane: the newest request's lines as the vendor got them, or as+// written here, each value read from this magpie's memory when asked+function maskSawPane(saw, move) {+ const pane = el("div", "mo-saw"), r = saw.r;const h = el("div", "mo-lh");- h.append(el("span", "label", t("What the vendor saw")), el("span", "grow"), el("span", "mo-hint", ago(lines[0].t)));- pane.append(h);- let k = 0;- for (const x of lines) {- const s = el("div", "mo-snip");- let at = 0;- for (const m of x.text.matchAll(PLACEHOLDER)) {- s.append(document.createTextNode(x.text.slice(at, m.index)));- const mark = maskPlace("mo-ph", m[0], x.info.get(m[0]));- // a marker drawn over the value, then lifted to the placeholder- if (move) mark.animate([- { clipPath: "inset(0 100% 0 0)", backgroundColor: "var(--k)", color: "transparent" },- { clipPath: "inset(0 0 0 0)", backgroundColor: "var(--k)", color: "transparent", offset: .55 },- { clipPath: "inset(0 0 0 0)" },- ], { duration: 900, delay: 520 + k++ * 180, easing: "cubic-bezier(.65, 0, .35, 1)", fill: "backwards" });- s.append(mark);- at = m.index + m[0].length;+ h.append(el("span", "label", t("Latest request")), el("span", "mo-hint", [maskWho(r.agent, "agent").name + " → " + maskWho(r.provider, "provider").name, ago(r.t), t(r.n === 1 ? "1 value masked" : "{n} values masked", { n: fmtN(r.n) })].join(" · ")), el("span", "grow"));+ const body = el("div", "mo-lines");+ const fill = (here) => {+ maskTipOff();+ body.replaceChildren();+ let k = 0;+ for (const text of saw.texts) {+ const s = el("div", "mo-snip");+ let at = 0;+ for (const m of text.matchAll(PLACEHOLDER)) {+ s.append(document.createTextNode(text.slice(at, m.index)));+ let mark;+ if (here) {+ mark = el("span", "mo-orig", m[0]);+ maskValue(m[0]).then((v) => { if (v === null) mark.classList.add("gone"); else mark.textContent = v; });+ } else {+ mark = maskPlace("mo-ph", m[0], saw.info.get(m[0]));+ // a marker drawn over the value, then lifted+ const ink = { backgroundColor: "var(--accent)", color: "transparent" };+ if (move) mark.animate([{ clipPath: "inset(0 100% 0 0)", ...ink }, { clipPath: "inset(0)", ...ink, offset: .55 }, { clipPath: "inset(0)" }],+ { duration: 900, delay: 900 + k++ * 180, easing: "cubic-bezier(.65, 0, .35, 1)", fill: "backwards" });+ }+ s.append(mark);+ at = m.index + m[0].length;+ }+ s.append(document.createTextNode(text.slice(at)));+ body.append(s);}- s.append(document.createTextNode(x.text.slice(at)));- pane.append(s);- }+ move = false;+ };+ h.append(segs([["v", t("What the vendor saw")], ["h", t("As written here")]], "v", (v) => fill(v === "h")));+ fill(false);+ pane.append(h, body);return pane;}-// maskFlow: the agents that sent what was masked, each a ribbon as wide-// as its share into the shield, and from it to the providers it went to+// maskFlow: hairlines from the agents into this computer, uneven as+// written, and out of it to the providers, even as placeholdersfunction maskFlow(sum, move) {- const flow = el("div", "mo-flow");+ const sec = el("div", "mo-sec mo-fl"), flow = el("div", "mo-flow");const side = (list, kind) => {const shown = list.slice(0, 4), rest = list.slice(4);const rows = shown.map((x) => ({ id: x.name, n: x.n, ...maskWho(x.name, kind) }));@@ -22417,7 +22408,6 @@ function maskFlow(sum, move) {for (const r of rows) {const b = el("button", "mo-node");b.type = "button";- if (r.icon) b.append(icon(r.icon));b.append(el("span", "nm", r.name), el("span", "ct", fmtN(r.n)));if (r.id) {b.title = t("Show what {name} sent masked", { name: r.name });@@ -22430,62 +22420,63 @@ function maskFlow(sum, move) {const [from, fromRows] = side(sum.agents, "agent");const [to, toRows] = side(sum.providers, "provider");const mid = el("div", "mo-mid");- const rowH = 34;- const H = Math.max(fromRows.length, toRows.length) * rowH - 4;+ const rowH = 48, H = Math.max(fromRows.length, toRows.length, 2) * rowH;const max = Math.max(...fromRows.map((r) => r.n), ...toRows.map((r) => r.n), 1);- const ys = (rows) => {- const off = (H - (rows.length * rowH - 4)) / 2;- return rows.map((_, i) => off + i * rowH + 15);- };- const c = H / 2, hubR = 19;const hub = el("span", "mo-hub");- hub.append(svg(SHIELD, 16, 1.6));- hub.title = t("Masked here, on this computer");- // drawn in the middle's own pixels, again as it is resized: a viewBox- // stretched to fit would bend the strokes and their dashes+ hub.append(svg(SHIELD, 16, 1.3));+ // drawn in the middle's own pixels on each resize: a stretched viewBox+ // would bend the hairlinesconst s = sv("svg", { "aria-hidden": "true" });- let drawnW = 0, first = true;+ let drawnW = 0;const draw = () => {const W = Math.round(mid.clientWidth);if (!W || W === drawnW) return;drawnW = W;s.setAttribute("viewBox", `0 0 ${W} ${H}`);s.replaceChildren();- const m = W / 2, bend = Math.max(18, (m - hubR) * .55);- const ribs = [];- const rib = (d, n, out, i) => {- const w = 1.5 + 5 * n / max;- const path = sv("path", { d, class: "mo-rib" + (out ? " out" : ""), "stroke-width": w, "stroke-opacity": (out ? .34 : .14) + .36 * n / max });- s.append(path);- ribs.push(path);- // what goes along it: a value as it was on the way in, a placeholder- // after the shield; more of them on a busier ribbon- if (!stillMotion()) for (let k = 0, dots = 1 + Math.round(2 * n / max); k < dots; k++) {- const dot = sv("circle", { r: out ? 2.2 : 1.8, class: "mo-dot" + (out ? " out" : "") });- const dur = 2.4 + i * .17;- dot.append(sv("animateMotion", { path: d, dur: dur + "s", begin: (out ? 1.2 : 0) + k * dur / dots + "s", repeatCount: "indefinite", keyPoints: "0;1", keyTimes: "0;1", calcMode: "spline", keySplines: ".45 0 .55 1" }));- dot.append(sv("animate", { attributeName: "opacity", values: "0;1;1;0", keyTimes: "0;.12;.85;1", dur: dur + "s", begin: (out ? 1.2 : 0) + k * dur / dots + "s", repeatCount: "indefinite" }));- s.append(dot);- }+ const m = W / 2, still = stillMotion(), lines = [];+ const add = (tag, a, to = s) => { const n = sv(tag, a); to.append(n); return n; };+ const curve = (x0, y0, x1, y1) => `M${x0},${y0}C${(x0 + x1) / 2},${y0} ${(x0 + x1) / 2},${y1} ${x1},${y1}`;+ const bundle = (rows, out) => {+ const ks = rows.map((r) => Math.max(1, Math.round(24 * r.n / max))), all = ks.reduce((a, k) => a + k, 0);+ let j = 0, rnd = out ? 11 : 7;+ rows.forEach((r, i) => {+ const y = (H - rows.length * rowH) / 2 + (i + .5) * rowH;+ for (let q = 0; q < ks[i]; q++, j++) {+ const at = all > 1 ? H * (.2 + .6 * j / (all - 1)) : H / 2;+ rnd = (rnd * 16807) % 2147483647;+ const end = y + (q - (ks[i] - 1) / 2) * 1.6 + (out ? 0 : (rnd % 30 - 15) / 10);+ const d = out ? curve(m, at, W, end) : curve(0, end, m, at);+ lines.push(add("path", { d, pathLength: 1, class: "mo-th" + (out ? " out" : "") + (ks[i] === 1 ? " one" : ""), "stroke-opacity": ks[i] === 1 ? (out ? .8 : .4) : out ? .42 : .07 + (rnd % 20) / 100 }));+ // a value goes in round, a placeholder out square+ if (q === ks[i] >> 1 && !still) for (let k = 0, dots = 1 + Math.round(2 * r.n / max); k < dots; k++) {+ const dur = 1.7 + i * .5, begin = (out ? dur : 0) + k * 2 * dur / dots + "s";+ const z = out ? 1.8 : 1.7, dot = add("rect", { x: -z, y: -z, width: 2 * z, height: 2 * z, rx: out ? .6 : z, class: "mo-dot" + (out ? " out" : "") });+ const a = { dur: dur + "s", begin, repeatCount: "indefinite" };+ add("animateMotion", { path: d, ...a }, dot);+ add("animate", { attributeName: "opacity", values: "0;1;1;0", keyTimes: "0;.1;.85;1", ...a }, dot);+ }+ }+ });};- ys(fromRows).forEach((y, i) => rib(`M0,${y}C${bend},${y} ${m - hubR - bend},${c} ${m - hubR},${c}`, fromRows[i].n, false, i));- ys(toRows).forEach((y, i) => rib(`M${m + hubR},${c}C${m + hubR + bend},${c} ${W - bend},${y} ${W},${y}`, toRows[i].n, true, i));- if (move && first) ribs.forEach((r, i) => {- // drawn in once, by its own length, then left whole- const len = r.getTotalLength();- r.style.strokeDasharray = `${len} ${len}`;- const out = r.classList.contains("out");- r.animate([{ strokeDashoffset: len }, { strokeDashoffset: 0 }], { duration: 760, delay: 380 + (out ? 520 : 0) + i * 40, easing: "cubic-bezier(.65, 0, .35, 1)", fill: "backwards" })- .finished.then(() => { r.style.strokeDasharray = ""; }, () => { r.style.strokeDasharray = ""; });+ bundle(fromRows, false);+ bundle(toRows, true);+ // this computer: a ticked line, and a mark going down it+ add("line", { x1: m, y1: 0, x2: m, y2: H, class: "mo-mem" });+ for (let y = 0; y <= H; y += 19) add("line", { x1: m - 3, y1: y, x2: m + 3, y2: y, class: "mo-tick" });+ if (!still) add("rect", { x: m - 1, y: 0, width: 2, height: 22, rx: 1, class: "mo-scan" }).style.setProperty("--h", H - 22 + "px");+ // drawn in once, the way in first+ if (move) lines.forEach((p) => {+ p.animate([{ strokeDashoffset: 1 }, {}], { duration: 2400, delay: p.classList.contains("out") ? 700 : 300, easing: "cubic-bezier(.3, .6, .1, 1)", fill: "backwards" });});- first = false;+ move = false;};mid.append(s, hub);flow.style.height = H + "px";flow.append(from, mid, to);new ResizeObserver(draw).observe(mid);- if (move) hub.animate([{ transform: "scale(.4)", opacity: 0 }, { transform: "none", opacity: 1 }], { duration: 520, delay: 760, easing: "cubic-bezier(.34, 1.56, .64, 1)", fill: "backwards" });- return flow;+ sec.append(flow, el("div", "mo-cap", t("Masked here, on this computer")));+ return sec;}// ---- the records: each request masking changed, newest first ----diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.jsindex c73512771..c689a72cf 100644--- a/internal/gui/assets/i18n.js+++ b/internal/gui/assets/i18n.js@@ -3796,6 +3796,8 @@ const I18N = {"Yesterday": "昨天","Not in memory: magpie has restarted since. The value itself is never written to disk": "已不在内存中:magpie 之后重启过。原值从不写入磁盘","Kept from vendors": "没让厂商看到的",+ "Different values": "不同的值",+ "As written here": "这台电脑上的","When a value is found": "发现敏感值时","Mask": "脱敏","Warn": "提醒",@@ -3820,10 +3822,6 @@ const I18N = {"Sent as written": "按原样发送","Masked": "已脱敏","Masking is off: this is what Mask secrets and Mask personal data would do": "脱敏已关闭:下面是开启“脱敏密钥”和“脱敏个人信息”后的效果",- "1 request held back": "1 个请求被拦下",- "{n} requests held back": "{n} 个请求被拦下",- "1 value sent as written": "1 个值按原样发送",- "{n} values sent as written": "{n} 个值按原样发送","1 value went to the vendor as written, as you set": "1 个值按你的设置原样发给了厂商","{n} values went to the vendor as written, as you set": "{n} 个值按你的设置原样发给了厂商","Masked on this computer before each request left it, and put back in each answer": "每个请求离开这台电脑前在本机脱敏,回复里再换回原样",@@ -3831,8 +3829,6 @@ const I18N = {"Turn on Mask secrets or Mask personal data below, and what is kept from vendors shows here, request by request": "打开下方的「脱敏密钥」或「脱敏个人信息」,没让厂商看到的内容会逐个请求显示在这里","value masked": "处已脱敏","values masked": "处已脱敏",- "1 different value": "1 个不同的值",- "{n} different values": "{n} 个不同的值","Nothing yet in these days": "这几天还没有","A request that carries a key, a password or personal data shows here as it goes": "带着密钥、密码或个人信息的请求,一发出就会出现在这里","What was kept": "遮住了什么",@@ -3841,7 +3837,6 @@ const I18N = {"Show them": "查看","1 value found by the local model, which no rule recognises": "本地模型找到 1 个规则认不出的值","{n} values found by the local model, which no rule recognises": "本地模型找到 {n} 个规则认不出的值",- "From your agents, masked, to vendors": "从你的智能体,经过脱敏,到厂商","Masked most": "脱敏最多的","Point at one to see what it was": "指向一个即可看到原值","In 1 request, {when}": "出现在 1 个请求中,{when}",@@ -7679,6 +7674,8 @@ const I18N = {"Yesterday": "昨天","Not in memory: magpie has restarted since. The value itself is never written to disk": "已不在記憶體中:magpie 之後重新啟動過。原值從不寫入磁碟","Kept from vendors": "沒讓廠商看到的",+ "Different values": "不同的值",+ "As written here": "這台電腦上的","When a value is found": "發現敏感值時","Mask": "脫敏","Warn": "提醒",@@ -7703,10 +7700,6 @@ const I18N = {"Sent as written": "照原樣送出","Masked": "已脫敏","Masking is off: this is what Mask secrets and Mask personal data would do": "脫敏已關閉:下面是開啟「脫敏金鑰」和「脫敏個人資訊」後的效果",- "1 request held back": "1 個請求被攔下",- "{n} requests held back": "{n} 個請求被攔下",- "1 value sent as written": "1 個值照原樣送出",- "{n} values sent as written": "{n} 個值照原樣送出","1 value went to the vendor as written, as you set": "1 個值依你的設定照原樣送給了廠商","{n} values went to the vendor as written, as you set": "{n} 個值依你的設定照原樣送給了廠商","Masked on this computer before each request left it, and put back in each answer": "每個請求離開這台電腦前在本機脫敏,回覆裡再換回原樣",@@ -7714,8 +7707,6 @@ const I18N = {"Turn on Mask secrets or Mask personal data below, and what is kept from vendors shows here, request by request": "打開下方的「脫敏金鑰」或「脫敏個人資訊」,沒讓廠商看到的內容會逐個請求顯示在這裡","value masked": "處已脫敏","values masked": "處已脫敏",- "1 different value": "1 個不同的值",- "{n} different values": "{n} 個不同的值","Nothing yet in these days": "這幾天還沒有","A request that carries a key, a password or personal data shows here as it goes": "帶著金鑰、密碼或個人資訊的請求,一發出就會出現在這裡","What was kept": "遮住了什麼",@@ -7724,7 +7715,6 @@ const I18N = {"Show them": "查看","1 value found by the local model, which no rule recognises": "本機模型找到 1 個規則認不出的值","{n} values found by the local model, which no rule recognises": "本機模型找到 {n} 個規則認不出的值",- "From your agents, masked, to vendors": "從你的智慧體,經過脫敏,到廠商","Masked most": "脫敏最多的","Point at one to see what it was": "指向一個即可看到原值","In 1 request, {when}": "出現在 1 個請求中,{when}",@@ -11564,6 +11554,8 @@ const I18N = {"Yesterday": "昨日","Not in memory: magpie has restarted since. The value itself is never written to disk": "メモリにありません:その後 magpie が再起動しました。元の値はディスクに書き込まれません","Kept from vendors": "ベンダーに渡さなかったもの",+ "Different values": "異なる値",+ "As written here": "このコンピュータ上","When a value is found": "値が見つかったとき","Mask": "マスク","Warn": "警告",@@ -11588,10 +11580,6 @@ const I18N = {"Sent as written": "そのまま送信","Masked": "マスク済み","Masking is off: this is what Mask secrets and Mask personal data would do": "マスクはオフです:「シークレットをマスク」と「個人情報をマスク」をオンにした場合の結果です",- "1 request held back": "1 件のリクエストを止めました",- "{n} requests held back": "{n} 件のリクエストを止めました",- "1 value sent as written": "1 個の値をそのまま送信",- "{n} values sent as written": "{n} 個の値をそのまま送信","1 value went to the vendor as written, as you set": "設定どおり、1 個の値をそのままベンダーに送りました","{n} values went to the vendor as written, as you set": "設定どおり、{n} 個の値をそのままベンダーに送りました","Masked on this computer before each request left it, and put back in each answer": "各リクエストがこのコンピュータを出る前にここでマスクし、応答で元に戻します",@@ -11599,8 +11587,6 @@ const I18N = {"Turn on Mask secrets or Mask personal data below, and what is kept from vendors shows here, request by request": "下の「シークレットをマスク」か「個人情報をマスク」をオンにすると、ベンダーに渡さなかったものがリクエストごとにここに表示されます","value masked": "か所をマスク","values masked": "か所をマスク",- "1 different value": "異なる値 1 個",- "{n} different values": "異なる値 {n} 個","Nothing yet in these days": "この期間はまだありません","A request that carries a key, a password or personal data shows here as it goes": "キー、パスワード、個人情報を含むリクエストは送信と同時にここに表示されます","What was kept": "隠したもの",@@ -11609,7 +11595,6 @@ const I18N = {"Show them": "表示","1 value found by the local model, which no rule recognises": "ルールでは見つからない値をローカルモデルが 1 個検出","{n} values found by the local model, which no rule recognises": "ルールでは見つからない値をローカルモデルが {n} 個検出",- "From your agents, masked, to vendors": "エージェントから、マスクを経て、ベンダーへ","Masked most": "マスクの多い値","Point at one to see what it was": "ポイントすると元の値が見えます","In 1 request, {when}": "1 件のリクエスト、{when}",@@ -15449,6 +15434,8 @@ const I18N = {"Yesterday": "Gestern","Not in memory: magpie has restarted since. The value itself is never written to disk": "Nicht mehr im Speicher: magpie wurde seitdem neu gestartet. Der Wert selbst wird nie auf die Festplatte geschrieben","Kept from vendors": "Vor Anbietern verborgen",+ "Different values": "Verschiedene Werte",+ "As written here": "Wie hier geschrieben","When a value is found": "Wenn ein Wert gefunden wird","Mask": "Maskieren","Warn": "Warnen",@@ -15473,10 +15460,6 @@ const I18N = {"Sent as written": "Unverändert gesendet","Masked": "Maskiert","Masking is off: this is what Mask secrets and Mask personal data would do": "Maskieren ist aus: So würden „Geheimnisse maskieren“ und „Personenbezogene Daten maskieren“ wirken",- "1 request held back": "1 Anfrage zurückgehalten",- "{n} requests held back": "{n} Anfragen zurückgehalten",- "1 value sent as written": "1 Wert unverändert gesendet",- "{n} values sent as written": "{n} Werte unverändert gesendet","1 value went to the vendor as written, as you set": "1 Wert ging wie eingestellt unverändert an den Anbieter","{n} values went to the vendor as written, as you set": "{n} Werte gingen wie eingestellt unverändert an den Anbieter","Masked on this computer before each request left it, and put back in each answer": "Auf diesem Computer maskiert, bevor jede Anfrage ihn verlässt, und in jeder Antwort zurückgesetzt",@@ -15484,8 +15467,6 @@ const I18N = {"Turn on Mask secrets or Mask personal data below, and what is kept from vendors shows here, request by request": "Schalte unten „Geheimnisse maskieren“ oder „Personenbezogene Daten maskieren“ ein, dann zeigt sich hier pro Anfrage, was vor Anbietern verborgen blieb","value masked": "Wert maskiert","values masked": "Werte maskiert",- "1 different value": "1 verschiedener Wert",- "{n} different values": "{n} verschiedene Werte","Nothing yet in these days": "In diesen Tagen noch nichts","A request that carries a key, a password or personal data shows here as it goes": "Eine Anfrage mit einem Schlüssel, Passwort oder personenbezogenen Daten erscheint hier, sobald sie rausgeht","What was kept": "Was verborgen wurde",@@ -15494,7 +15475,6 @@ const I18N = {"Show them": "Anzeigen","1 value found by the local model, which no rule recognises": "1 Wert vom lokalen Modell gefunden, den keine Regel erkennt","{n} values found by the local model, which no rule recognises": "{n} Werte vom lokalen Modell gefunden, die keine Regel erkennt",- "From your agents, masked, to vendors": "Von deinen Agenten, maskiert, zu den Anbietern","Masked most": "Am häufigsten maskiert","Point at one to see what it was": "Zeig auf einen, um ihn zu sehen","In 1 request, {when}": "In 1 Anfrage, {when}",diff --git a/internal/gui/tests/mask-actions.test.cjs b/internal/gui/tests/mask-actions.test.cjsindex 8323fdb73..a97357698 100644--- a/internal/gui/tests/mask-actions.test.cjs+++ b/internal/gui/tests/mask-actions.test.cjs@@ -12,7 +12,7 @@ const fs = require("node:fs/promises");const path = require("node:path");const { test } = require("node:test");const { chromium, webkit } = require("playwright");-const { reach, watchSettingsReads, settingsDrawn } = require("./reader.cjs");+const { reach, wheelTo, watchSettingsReads, settingsDrawn } = require("./reader.cjs");const assets = path.resolve(__dirname, "../assets");const SECRET = "sk-proj-Tr1eDq8Wm3Rt6YxN2vLp";@@ -81,7 +81,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",assert.deepEqual(await acts.locator(".mask-act").evaluateAll((rs) => rs.map((r) => r.dataset.kind)), ["API_KEY", "PRIVATE_KEY", "TOKEN", "PASSWORD", "SECRET"]);assert.equal(await acts.locator(".mask-act .segs .opt.on").count(), 5);const more = acts.locator(".mask-act-more button");- await reach(page, more);+ await wheelTo(page, more, 300); // under the masking card, a long wheel down at 640pxawait more.click();await acts.locator('.mask-act[data-kind="EMAIL"]').waitFor();assert.equal(await acts.locator(".mask-act").count(), 22, "every personal kind shown");diff --git a/internal/gui/tests/masking-records.test.cjs b/internal/gui/tests/masking-records.test.cjsindex 5a3d1a14b..39ffcd919 100644--- a/internal/gui/tests/masking-records.test.cjs+++ b/internal/gui/tests/masking-records.test.cjs@@ -2,12 +2,14 @@// Settings › Privacy opens on what masking kept from vendors: the number,// the days, the kinds, agents to providers and the values masked most, a// value shown only while pointed at (and said gone when this magpie no-// longer knows it). Its records open from the card, filtered by what was+// longer knows it), and the newest request as the vendor got it or, asked+// for, as it is here. Its records open from the card, filtered by what was// clicked, each one opening on the text the vendor saw. A masked call on// the Gateway page opens its own record. Nothing in the card or the// records is left in English, nothing is wider than the window, and a// click scrolls nothing.-// Every language, Chromium and WebKit, 1100 and 640px; the API is faked.+// Every language, Chromium and WebKit, 1100 and 640px, tall enough that+// pointing at a row needs no scroll; the API is faked.const assert = require("node:assert/strict");const fs = require("node:fs/promises");const path = require("node:path");@@ -91,7 +93,7 @@ function serve(lang, sum, asked) {async function open(engine, lang, width, sum, where) {const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));- const page = await (await browser.newContext({ viewport: { width, height: 900 }, reducedMotion: "reduce" })).newPage();+ const page = await (await browser.newContext({ viewport: { width, height: 1800 }, reducedMotion: "reduce" })).newPage();page.setDefaultTimeout(8000);const errors = [], asked = [];page.on("pageerror", (e) => errors.push(e.message));@@ -103,7 +105,7 @@ async function open(engine, lang, width, sum, where) {}// English that a translated page must not show-const english = ["Kept from vendors", "What the vendor saw", "values masked", "What was kept", "Masked most", "View records", "What was masked", "Every kind", "Found by", "Local model", "Not in memory", "This request"];+const english = ["Kept from vendors", "What the vendor saw", "As written here", "Latest request", "Different values", "values masked", "What was kept", "Masked most", "View records", "What was masked", "Every kind", "Found by", "Local model", "Not in memory", "This request"];const wide = (page) => page.evaluate(() => {const over = [...document.querySelectorAll("#maskObs *, #maskRecs *")].filter((n) => n.getClientRects().length && n.getBoundingClientRect().right > innerWidth + 1).map((n) => n.className?.baseVal ?? n.className);return { page: document.documentElement.scrollWidth > document.documentElement.clientWidth, over };@@ -131,6 +133,10 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",assert.equal(await page.evaluate(() => [document.querySelector("#maskObs"), ...document.querySelectorAll("#maskObs *")].some((n) => /gradient/.test(getComputedStyle(n).backgroundImage + getComputedStyle(n, "::before").backgroundImage))), false, "flat: no gradient");assert.deepEqual(await card.locator(".mo-col.agent .nm").allTextContents(), ["Claude Code", "Codex"]);assert.deepEqual(await card.locator(".mo-col.provider .nm").allTextContents(), ["Anthropic", "OpenAI"]);+ // hairlines into this computer and out of it, drawn once it is laid out+ await card.locator(".mo-flow path.mo-th:not(.out)").first().waitFor({ state: "attached" });+ await card.locator(".mo-flow path.mo-th.out").first().waitFor({ state: "attached" });+ assert.equal(await page.evaluate(() => getComputedStyle(document.querySelector("#maskObs")).boxShadow), "none", "no shadow");assert.deepEqual(await card.locator(".mo-val .sh").allTextContents(), ["sk-p••••••••", "•••"]);assert.equal((await card.textContent()).includes(SECRET), false, "no value until pointed at");assert.equal(asked.filter((a) => a.startsWith("value")).length, 0, "nothing asked until pointed at");@@ -156,6 +162,15 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",await page.mouse.move(1, 1);await page.locator(".mask-tip").waitFor({ state: "detached" });+ // asked for, the newest request as it is here: each value read then,+ // one this magpie no longer knows said so; and back+ await card.locator(".mo-saw .segs .opt").nth(1).click();+ await page.waitForFunction((s) => document.querySelector("#maskObs .mo-orig:not(.gone)")?.textContent === s, SECRET);+ await card.locator(".mo-saw .mo-orig.gone").waitFor();+ assert.equal(await card.locator(".mo-saw mark.mo-ph").count(), 0);+ await card.locator(".mo-saw .segs .opt").first().click();+ assert.deepEqual(await card.locator(".mo-saw mark.mo-ph").allTextContents(), [KEY, MAIL]);+// a kind's row opens its records, filtered by itawait card.locator(".mo-ledg.kind .mo-row").nth(1).click();const recs = page.locator("#maskRecs");diff --git a/internal/gui/tests/privacy-model.test.cjs b/internal/gui/tests/privacy-model.test.cjsindex d80d4e645..5c5414414 100644--- a/internal/gui/tests/privacy-model.test.cjs+++ b/internal/gui/tests/privacy-model.test.cjs@@ -10,7 +10,7 @@ const fs = require("node:fs/promises");const path = require("node:path");const { test } = require("node:test");const { chromium, webkit } = require("playwright");-const { watchSettingsReads, settingsDrawn } = require("./reader.cjs");+const { wheelTo, watchSettingsReads, settingsDrawn } = require("./reader.cjs");const assets = path.resolve(__dirname, "../assets");const size = 1637572192;@@ -134,6 +134,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",const { browser, page, errors } = await open(engine, "en", 1100, true, model, posts);t.after(() => browser.close());const row = page.locator("#privacyModelRow");+ await wheelTo(page, row, 300); // under the masking card; WebKit's own scroll-into-view misses itawait row.locator(".segs .opt", { hasText: "On" }).click();await row.locator("button.text", { hasText: "Cancel" }).click();await page.waitForFunction(() => document.querySelector("#privacyModelRow .segs .opt.on")?.textContent === "Off");@@ -141,6 +142,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",Object.assign(model, { installed: true, on: false });await page.reload();+ await wheelTo(page, row.locator("button.text", { hasText: "Delete model" }), 300);await row.locator("button.text", { hasText: "Delete model" }).click();await page.locator("dialog.action-confirm button", { hasText: /^Delete$/ }).click();await page.waitForFunction(() => !document.querySelector("#privacyModelRow button.text"));