Similar versions: surface-overlap metric + endpoint + UI panel
Ranks catalogued engine versions by how much of their CMC_* surface they share,
which (unlike a binary fuzzy hash) stays meaningful across compilers — the golden
pair PIKLIB8/MSVC6 vs bloomoodll/MSVC8 scores 85%.
- similarity.py: jaccard, surface_similarity (per-axis + pooled overall),
fuzzy_similarity (ssdeep via ppdeep, secondary signal)
- service.similar_snapshots + GET /snapshots/{id}/similar?min=N (SimilarHit)
- UI: "Podobne wersje" panel in the snapshot browser (overlap bar + ⇄ diff)
- tests: 6 new (jaccard, identical/disjoint, golden pair 0<x<100, fuzzy,
endpoint + min filter) -> 28/28
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -100,6 +100,19 @@ body { background: var(--bg); color: var(--fg); font: 13px/1.45 var(--mono); }
|
||||
.empty { color: var(--dim); font-style: italic; }
|
||||
.moved { color: var(--accent); }
|
||||
|
||||
.similar { margin: 4px 0 16px; }
|
||||
.similar-title { color: var(--dim); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; margin-bottom: 6px; }
|
||||
.simrow { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
|
||||
.simscore { width: 38px; text-align: right; color: var(--accent); font-weight: 600; }
|
||||
.simbar { flex: 0 0 120px; height: 7px; background: #16202c; border: 1px solid var(--border);
|
||||
border-radius: 4px; overflow: hidden; }
|
||||
.simfill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--add)); }
|
||||
.simname { flex: 1; min-width: 0; color: var(--fg); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.simname:hover { color: var(--accent); text-decoration: underline; }
|
||||
.simfuzzy { color: var(--dim); font-size: 11px; }
|
||||
.simdiff { color: var(--accent); cursor: pointer; font-size: 11px; }
|
||||
.simdiff:hover { text-decoration: underline; }
|
||||
|
||||
.browse-filter { margin-bottom: 10px; }
|
||||
.btab { display: inline-block; padding: 4px 10px; margin-right: 6px; border: 1px solid var(--border);
|
||||
border-radius: 6px; cursor: pointer; color: var(--dim); }
|
||||
|
||||
Reference in New Issue
Block a user