Files
plugins/packages/fingerprint/web/style.css
T
KaranocaVe 5db645541a fingerprint 0.2.3: History expands saved runs in place, an About tab, and a launcher fallback address (#858)
KaranocaVe (#858): History expands a saved run in place (results, cancel and
export for that run, by id) instead of replacing the current run; a new About
tab links the project and lm-detector (anchors standalone, copy buttons in
magpie's frame); the desktop launcher shows the local service address after
4s if navigation stalls; integration.md documents Windows' excluded port
ranges. Version 0.2.3.

Reviewed at d272d0c14fed1c1b654f970f358fabea4b2fe210, run on mote (macOS) in
a copy of the PR tree with a temp HOME in the run folder:
- packages/fingerprint: bun install --frozen-lockfile, typecheck ok, bun test
  37 pass 0 fail, bun run build. diff -r of the PR's dist against the rebuild:
  identical (dist/ui, plugin.js, cli.js).
- bun scripts/check.mjs fingerprint: registry.json ok, fingerprint ok.
- Bundle: the only new URL strings are the two About links
  (github.com/KaranocaVe/magpie-fingerprint, github.com/Ikaleio/lm-detector);
  no new fetch/eval/Function/WebSocket/sendBeacon; CSS has only the existing
  data: SVG.
- Playwright 1.62.0, Chromium and WebKit, en and zh-CN, 1100px and 380px,
  standalone and inside a parent frame, with the API stubbed from the demo
  server's /api/bootstrap (a running, a completed and a failed run): History
  expands a row (aria-expanded true), cancel from an expanded running row sends
  one cancel and the row shows Cancelled, About shows 2 anchors standalone and
  2 copy buttons framed (copy shows Copied in both engines), ArrowRight/Left
  wrap across the three tabs, no horizontal overflow, no request off the stub
  origin. 48 screenshots checked.
- The one page error, standalone only ("Cannot destructure property 'context'"
  from the vendored bridge's hello), is the same on main 03ab6d66f (same load
  harness on main's dist).

Not tried: the launcher fallback in a real Windows magpie window (covered by
the new boot test only). src/service-identity.ts VERSION still says 0.2.2
(health/bootstrap report it; nothing compares it), filed separately.
2026-11-08 14:29:18 +08:00

1132 lines
19 KiB
CSS

/* Layout for Fingerprint; controls and palette come from Magpie's vendored UI. */
:root[data-magpie] {
--bg: var(--magpie-bg);
--card: var(--magpie-card);
--fg: var(--magpie-fg);
--fg-2: var(--magpie-fg-2);
--muted: var(--magpie-muted);
--faint: var(--magpie-faint);
--line: var(--magpie-line);
--accent: var(--magpie-accent);
--accent-soft: var(--magpie-accent-soft);
--accent-fg: var(--magpie-accent-fg);
--green: var(--magpie-green);
--red: var(--magpie-red);
--amber: var(--magpie-amber);
--font: var(--magpie-font);
--code: var(--magpie-code);
--pill: color-mix(in srgb, var(--fg) 5%, var(--card));
--pill-hover: color-mix(in srgb, var(--fg) 9%, var(--card));
--card-2: color-mix(in srgb, var(--bg) 55%, var(--card));
--line-2: color-mix(in srgb, var(--line) 70%, transparent);
--sel: var(--accent-soft);
}
html,
body,
#root {
min-height: 100%;
}
body {
display: block;
height: auto;
padding: 0;
overflow: auto;
background: var(--bg);
color: var(--fg);
font: 13px/1.4 var(--font);
-webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
font: inherit;
}
button {
cursor: default;
}
button:disabled {
opacity: 0.45;
cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
textarea:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.app-menu {
position: relative;
min-width: 0;
}
.app-menu-trigger {
display: inline-flex;
align-items: center;
justify-content: space-between;
gap: 8px;
width: 100%;
min-height: 32px;
padding: 6px 9px;
border: 1px solid var(--line);
border-radius: 6px;
background: var(--card);
color: var(--fg);
text-align: left;
cursor: pointer;
}
.app-menu-trigger:hover {
background: var(--pill-hover);
}
.app-menu-chevron {
color: var(--muted);
line-height: 1;
}
.app-menu-list {
position: absolute;
z-index: 20;
top: calc(100% + 4px);
left: 0;
min-width: 100%;
max-height: 280px;
overflow: auto;
padding: 4px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--card);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}
.app-menu-list > button {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
width: 100%;
padding: 6px 8px;
border: 0;
border-radius: 5px;
background: none;
color: var(--fg);
text-align: left;
cursor: pointer;
}
.app-menu-list > button:hover,
.app-menu-list > button:focus-visible,
.app-menu-list > button.selected,
.app-menu-list > button.active {
background: var(--accent-soft);
}
.app-shell {
max-width: 1232px;
padding: 0 16px 24px;
margin: 0 auto;
}
.standalone {
padding-top: 20px;
}
.standalone-title {
font-size: 18px;
font-weight: 600;
margin: 0 0 16px;
}
.page-tools {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
min-height: 48px;
}
.segs {
flex: none;
align-self: center;
}
.segs .opt {
display: inline-flex;
align-items: center;
gap: 7px;
border: 0;
background: none;
}
.segs .opt.on {
background: var(--seg-thumb);
box-shadow: var(--seg-edge);
}
.tab-count {
color: var(--muted);
font-size: 10.5px;
font-variant-numeric: tabular-nums;
}
.page-status {
display: flex;
align-items: center;
gap: 8px;
}
.service-dot {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 11px;
color: var(--muted);
white-space: nowrap;
}
.service-dot i {
width: 5px;
height: 5px;
border-radius: 50%;
background: var(--green);
}
.service-dot i.bad {
background: var(--amber);
}
.main {
min-width: 0;
}
.intro {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: 8px;
margin: 0 0 14px;
font-size: 11.5px;
color: var(--muted);
}
.intro p {
margin: 0;
}
.intro > span {
white-space: nowrap;
font-size: 11px;
}
.bank-tools {
display: inline-flex;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
gap: 7px;
min-width: 0;
}
.bank-tools > span {
white-space: nowrap;
font-size: 11px;
}
.bank-download {
white-space: nowrap;
}
.workspace-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 310px;
align-items: start;
gap: 12px;
}
.panel {
min-width: 0;
overflow: hidden;
}
.panel-title {
display: flex;
gap: 9px;
align-items: center;
padding: 10px 12px;
min-height: 44px;
}
h2 {
font-size: 12.5px;
font-weight: 600;
letter-spacing: 0;
margin: 0;
}
.panel-title h2 {
display: flex;
align-items: baseline;
gap: 7px;
}
.section-count {
font-size: 11px;
font-weight: 400;
color: var(--muted);
font-variant-numeric: tabular-nums;
}
.selection-count {
margin-left: auto;
color: var(--muted);
font-size: 11px;
white-space: nowrap;
}
.text,
.ghost-button,
.advanced-toggle {
border: 0;
padding: 3px 6px;
background: transparent;
border-radius: 5px;
font-size: 11.5px;
color: var(--ctl-fg);
display: inline-flex;
align-items: center;
gap: 5px;
}
.text:hover,
.ghost-button:hover,
.advanced-toggle:hover {
color: var(--fg);
background: var(--pill);
}
.filter-row {
display: flex;
gap: 8px;
padding: 0 12px 10px;
}
.search {
display: flex;
align-items: center;
gap: 6px;
flex: 1;
min-width: 0;
padding: 0 8px;
background: var(--card);
border: 1px solid var(--line);
border-radius: 6px;
color: var(--muted);
}
.search:focus-within {
border-color: var(--accent);
}
.search input {
width: 100%;
min-width: 0;
padding: 5px 0;
border: 0;
background: transparent;
outline: none;
box-shadow: none;
height: 28px;
font-size: 11.5px;
}
input::placeholder {
color: var(--muted);
opacity: 1;
}
input:not([type='checkbox']),
select,
textarea {
border: 1px solid var(--line);
border-radius: 6px;
background: var(--card);
color: var(--fg);
padding: 5px 8px;
min-width: 0;
}
.search input {
border: 0;
}
select {
height: 28px;
padding: 3px 24px 3px 8px;
font-size: 11.5px;
}
.filter-row > .app-menu {
max-width: 145px;
}
.model-list {
max-height: 367px;
overflow-y: auto;
border-top: 1px solid var(--line-2);
}
.model-row {
width: 100%;
display: flex;
align-items: center;
gap: 10px;
padding: 8px 12px;
min-height: 46px;
text-align: left;
}
.model-row:hover {
background: var(--card-2);
}
.model-row.selected {
background: var(--sel);
}
.model-row input {
flex: none;
margin: 0;
}
.model-name {
flex: 1;
min-width: 0;
}
.model-name strong {
font: 500 12px/1.4 var(--font) !important;
letter-spacing: 0;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.model-name small {
display: block;
color: var(--muted) !important;
font: 10.5px/1.4 var(--code);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 2px;
}
.model-endpoint {
font-size: 9.5px;
color: var(--muted);
background: var(--pill);
border-radius: 4px;
padding: 2px 5px;
white-space: nowrap;
}
.config-panel > label,
.config-panel > .two-col,
.config-panel > .switch-row,
.config-panel > .advanced {
margin: 0 12px 12px;
}
.config-panel label {
display: flex;
flex-direction: column;
gap: 5px;
font-size: 11.5px;
color: var(--fg-2);
}
.config-panel label > input,
.config-panel label > select,
.config-panel label > .app-menu {
width: 100%;
font-size: 12px;
height: 28px;
}
.config-panel label > .app-menu .app-menu-trigger {
min-height: 28px;
font-size: 12px;
}
.two-col {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.three-col {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.three-col > label:last-child {
grid-column: 1 / -1;
}
.switch-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
padding-top: 3px;
}
.switch-row strong {
font-size: 12px;
font-weight: 400;
}
.switch-row small {
display: block;
font-size: 10.5px;
color: var(--muted);
margin-top: 3px;
}
.switch {
flex: none;
}
.advanced-toggle {
margin: 0 6px 10px;
}
.advanced {
border-top: 1px solid var(--line-2);
padding-top: 10px;
display: grid;
gap: 10px;
}
.run-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 12px;
border-top: 1px solid var(--line-2);
}
.run-footer > div {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
color: var(--muted);
}
.run-footer strong {
font-size: 12px;
font-weight: 600;
color: var(--fg);
font-variant-numeric: tabular-nums;
}
.run-footer small {
display: none;
}
.primary-button,
.danger-button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
border: 0;
padding: 5px 10px;
min-height: 28px;
border-radius: 7px;
background: var(--accent);
color: var(--accent-fg);
font-size: 12px;
font-weight: 500;
white-space: nowrap;
}
.primary-button:hover:not(:disabled) {
opacity: 0.85;
}
.danger-button {
color: var(--red);
background: var(--red-soft);
}
.notice {
padding: 8px 10px;
margin-bottom: 12px;
border-radius: 7px;
display: flex;
align-items: center;
gap: 8px;
font-size: 11.5px;
}
.notice.error {
background: var(--red-soft);
color: var(--red);
}
.notice button {
margin-left: auto;
padding: 0;
color: inherit;
border: 0;
background: none;
display: inline-flex;
}
.notice.demo {
background: var(--accent-soft);
color: var(--accent);
}
.badge,
.demo-chip {
font-size: 10px;
padding: 2px 5px;
border-radius: 4px;
background: var(--amber-soft);
color: var(--amber);
}
.empty-state,
.empty-history {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 9px;
min-height: 150px;
color: var(--muted);
font-size: 12px;
}
.empty-state p,
.empty-history p {
margin: 0;
}
.results {
margin-top: 20px;
}
.results-head {
display: flex;
align-items: center;
gap: 12px;
justify-content: space-between;
margin-bottom: 9px;
}
.result-actions {
display: flex;
align-items: center;
gap: 10px;
}
.status {
display: inline-flex;
align-items: center;
gap: 4px;
white-space: nowrap;
font-size: 10.5px;
color: var(--muted);
}
.status.completed,
.status.scored,
.status.complete {
color: var(--green);
}
.status.running,
.status.streaming,
.status.waiting {
color: var(--accent);
}
.status.failed,
.status.unscorable {
color: var(--red);
}
.progress-track {
height: 3px;
background: var(--pill);
border-radius: 2px;
overflow: hidden;
}
.progress-track i {
display: block;
height: 100%;
background: var(--green);
transition: width 0.2s;
}
.result-meta,
.run-context {
display: flex;
justify-content: space-between;
gap: 8px;
flex-wrap: wrap;
font-size: 10.5px;
color: var(--muted);
margin-top: 7px;
font-variant-numeric: tabular-nums;
}
.run-context {
justify-content: flex-start;
gap: 14px;
margin-bottom: 10px;
}
.challenge-details {
margin: 10px 0;
font-size: 11px;
color: var(--muted);
}
summary {
cursor: default;
padding: 5px 0;
}
.challenge-details > div {
background: var(--card);
padding: 10px 12px;
border-bottom: 1px solid var(--line-2);
}
.challenge-details p {
margin: 5px 0 0;
line-height: 1.6;
}
.result-card {
background: var(--card);
border: 1px solid var(--line);
border-radius: 10px;
overflow: hidden;
margin-top: 8px;
}
.result-summary {
display: flex;
width: 100%;
align-items: center;
gap: 9px;
padding: 11px 12px;
border: 0;
border-radius: 0;
background: none;
text-align: left;
}
.result-summary:hover {
background: var(--card-2);
}
.result-icon {
display: inline-flex;
color: var(--green);
}
.result-card.failed .result-icon {
color: var(--red);
}
.result-model {
min-width: 0;
flex: 1;
}
.result-model strong {
display: block;
font: 500 12px/1.4 var(--font);
overflow-wrap: anywhere;
}
.result-model small,
.result-label small {
display: block;
font-size: 10.5px;
color: var(--muted);
margin-top: 2px;
}
.result-label {
text-align: right;
font-size: 12px;
}
.evidence-caveat {
flex: none;
max-width: 116px;
color: var(--muted);
font-size: 11px;
line-height: 1.35;
text-align: right;
}
.result-summary > svg {
color: var(--faint);
flex: none;
transition: transform 0.15s;
}
.rotate {
transform: rotate(180deg);
}
.result-body {
border-top: 1px solid var(--line-2);
padding: 12px;
background: var(--card-2);
}
.candidate-head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 8px;
margin-bottom: 12px;
}
h3 {
font-size: 12px;
margin: 0;
font-weight: 500;
}
.candidate-head > span {
font-size: 10.5px;
color: var(--muted);
}
.candidate {
display: flex;
gap: 10px;
margin-top: 10px;
align-items: center;
}
.candidate > span {
color: var(--muted);
width: 14px;
font: 11px var(--code);
}
.candidate > div {
flex: 1;
min-width: 0;
}
.candidate-label {
display: flex;
justify-content: space-between;
gap: 8px;
font-size: 11.5px;
margin-bottom: 5px;
}
.candidate-label strong {
font-weight: 500;
}
.candidate-label em {
font-style: normal;
font-variant-numeric: tabular-nums;
color: var(--fg-2);
}
.bar {
height: 3px;
background: var(--pill);
border-radius: 2px;
overflow: hidden;
}
.bar i {
display: block;
height: 100%;
border-radius: 2px;
background: var(--accent);
opacity: 0.75;
}
.evidence-note {
font-size: 10.5px;
color: var(--muted);
margin: 12px 0;
line-height: 1.6;
}
.sample-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 8px;
margin: 10px 0;
}
.sample-tile {
border: 1px solid var(--line);
border-radius: 7px;
padding: 9px 10px;
min-width: 0;
background: var(--card);
}
.sample-tile header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 5px;
}
.sample-tile header b {
font-size: 11px;
font-weight: 500;
}
.sample-tile > strong {
font-size: 17px;
display: block;
margin: 6px 0;
font-weight: 500;
font-variant-numeric: tabular-nums;
}
.sample-tile > strong small {
font-size: 11px;
color: var(--muted);
font-weight: 400;
}
.sample-tile code {
font: 10px var(--code);
color: var(--muted);
overflow-wrap: anywhere;
}
.sample-tile em,
.sample-tile > small {
color: var(--red);
display: block;
font-size: 10.5px;
margin-top: 5px;
}
.result-body > details {
color: var(--muted);
font-size: 11px;
}
pre {
max-height: 330px;
overflow: auto;
white-space: pre-wrap;
overflow-wrap: anywhere;
font: 10.5px/1.6 var(--code);
}
.history-tools {
color: var(--muted);
font-size: 11.5px;
padding: 0 0 12px;
}
.history-tools p {
margin: 0;
}
.history-list {
overflow: hidden;
}
.history-row {
display: flex;
gap: 12px;
align-items: center;
min-height: 54px;
padding: 0 10px 0 12px;
}
.history-item + .history-item {
border-top: 1px solid var(--line-2);
}
.history-detail {
padding: 0 12px 16px;
border-top: 1px solid var(--line-2);
}
.history-detail .results {
margin-top: 16px;
}
.history-caret {
margin-left: auto;
flex: none;
transition: transform 0.15s;
}
.history-caret.open {
transform: rotate(180deg);
}
.about-page {
max-width: 600px;
}
.about-heading {
padding: 8px 0 20px;
}
.about-heading h2 {
font-size: 16px;
font-weight: 600;
margin: 0 0 4px;
}
.about-heading p {
margin: 0;
color: var(--muted);
font-size: 12px;
}
.about-links {
list-style: none;
margin: 0;
padding: 0;
}
.about-link {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px 0;
border-top: 1px solid var(--line-2);
font-size: 12px;
}
.about-github {
flex: none;
margin-top: 1px;
color: var(--fg-2);
}
.about-link-content {
flex: 1;
min-width: 0;
}
.about-link-content strong {
display: block;
font-weight: 600;
}
.about-url {
display: inline-flex;
align-items: center;
gap: 5px;
margin-top: 4px;
max-width: 100%;
color: var(--muted);
font-size: 11.5px;
overflow-wrap: anywhere;
word-break: break-word;
}
a.about-url {
color: var(--accent);
text-decoration: none;
}
a.about-url:hover {
text-decoration: underline;
}
.about-url svg {
flex: none;
}
.about-copy {
flex: none;
display: flex;
flex-direction: column;
align-items: center;
min-width: 38px;
}
.about-copy-status,
.about-copy-error {
color: var(--muted);
font-size: 10px;
}
.about-copy-error {
display: block;
margin-top: 4px;
}
.history-row > button:first-child {
display: flex;
align-items: center;
gap: 10px;
flex: 1;
min-width: 0;
text-align: left;
border: 0;
background: none;
padding: 10px 0;
}
.history-row strong {
font-weight: 500;
font-size: 12px;
display: block;
overflow-wrap: anywhere;
}
.history-row small {
display: block;
margin-top: 3px;
color: var(--muted);
font-size: 10.5px;
}
.history-state {
width: 6px;
height: 6px;
background: var(--muted);
border-radius: 50%;
flex: none;
}
.history-state.completed {
background: var(--green);
}
.history-state.running {
background: var(--accent);
}
.history-state.failed {
background: var(--red);
}
.danger-icon:hover {
color: var(--red);
}
.export-sheet {
position: fixed;
z-index: 10;
inset: 10vh max(20px, calc((100vw - 760px) / 2));
background: var(--card);
border: 1px solid var(--line);
border-radius: 12px;
box-shadow: var(--shadow);
padding: 14px;
display: flex;
flex-direction: column;
gap: 12px;
}
.export-head {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 13px;
}
.export-sheet textarea {
width: 100%;
flex: 1;
min-height: 180px;
height: 50vh;
resize: none;
font: 10.5px/1.6 var(--code);
}
.export-sheet > div:last-child {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10px;
}
.export-sheet small {
font-size: 11px;
color: var(--muted);
}
.muted,
.muted-line {
color: var(--muted);
font-size: 11.5px;
}
.spin {
animation: spin 0.9s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@media (max-width: 800px) {
.workspace-grid {
grid-template-columns: minmax(0, 1fr) 280px;
}
.model-endpoint {
display: none;
}
}
@media (max-width: 620px) {
.app-shell {
padding: 0 12px 20px;
}
.standalone {
padding-top: 16px;
}
.workspace-grid {
grid-template-columns: minmax(0, 1fr);
}
.model-list {
max-height: 280px;
}
.page-tools {
gap: 6px;
flex-wrap: wrap;
padding: 6px 0;
}
.page-status {
gap: 3px;
}
.service-dot {
font-size: 10px;
}
.intro {
font-size: 11px;
}
.sample-grid {
grid-template-columns: 1fr;
}
.result-summary {
display: grid;
grid-template-columns: 20px minmax(0, 1fr) 17px;
align-items: start;
}
.result-icon {
grid-column: 1;
grid-row: 1;
}
.result-model {
grid-column: 2;
grid-row: 1;
}
.result-summary > svg {
grid-column: 3;
grid-row: 1;
}
.result-label,
.evidence-caveat {
grid-column: 2;
text-align: left;
max-width: none;
}
.sample-tile {
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
column-gap: 10px;
}
.sample-tile header {
grid-column: 1 / -1;
}
.sample-tile > strong {
font-size: 15px;
}
.result-meta {
font-size: 10px;
}
.history-row {
gap: 8px;
}
.export-sheet {
inset: 12px;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation: none !important;
transition: none !important;
}
}
.source-note {
margin: -2px 0 14px;
color: var(--muted);
font-size: 11px;
line-height: 1.6;
}
.bank-error {
color: var(--danger);
font-size: 11px;
overflow-wrap: anywhere;
}