| 452 | } |
| 453 | |
| 454 | function comparisonOverview() { |
| 455 | const host=el('div'), direction=el('div','comparison-direction'); |
| 456 | for (const [index,[label,pin]] of [['From · source (after)',viewComparison.from],['To · target (before)',viewComparison.to]].entries()) { |
| 457 | if (index) direction.append(el('span','direction-arrow','→')); |
| 458 | const side=el('div');side.append(el('small','',label),el('strong','',pin.view),el('small','',`state ${pin.state.slice(0,12)} · filter ${pin.membership_hash.slice(0,12)}`));direction.append(side); |
| 459 | } |
| 460 | host.append(direction); |
| 461 | const files=el('div','file-comparisons'), table=el('table'), head=el('thead'), heading=el('tr'),body=el('tbody'); |
| 462 | for (const title of ['File state','Before path','After path','Content']) { const th=el('th','',title);th.scope='col';heading.append(th); } |
| 463 | head.append(heading);table.append(head,body); |
| 464 | for (const file of viewComparison.files) { const row=el('tr');row.dataset.fileComparison=file.source_ref;row.append(el('td','',title(file.status)),el('td','source-path',file.before_path || '(absent)'),el('td','source-path',file.after_path || '(absent)'),el('td','',title(file.content_status)));body.append(row); } |
| 465 | files.append(table);host.append(detail(`Recorded file comparison (${viewComparison.files.length})`,files)); |
| 466 | host.append(el('p','muted','New/existing/resolved/changed/unknown describe local rule observations, not whole-program behavioral proof. Missing source coverage is never a resolution.')); |
| 467 | return host; |
| 468 | } |
| 469 | |
| 470 | function cardCoverage() { |
| 471 | const host = el('div', 'card-coverage'); |