Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"*.{js,ts,tsx,jsx,mjs,cjs}": ["npx biome check --write"],
"*.{json,md,yaml,yml}": ["npx biome check --write"]
"*.{js,ts,tsx,jsx,mjs,cjs}": [
"npx biome check --write --no-errors-on-unmatched"
],
"*.{json,md,yaml,yml}": ["npx biome check --write --no-errors-on-unmatched"]
}
2 changes: 1 addition & 1 deletion src/disputes/RevertClusterDisplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class RevertClusterDisplay {
if (cluster.section) {
const section = document.createElement("div");
section.style.cssText =
"font-size:0.78rem;color:var(--text-dim);margin-bottom:0.3rem;font-family:var(--font-mono);";
"font-size:0.78rem;color:var(--text-dim);margin-bottom:0.3rem;font-family:var(--mono);";
section.textContent = cluster.section;
card.appendChild(section);
}
Expand Down
2 changes: 1 addition & 1 deletion src/language/CertaintyTimeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class CertaintyTimeline {
const info = document.createElement("div");
info.id = "certainty-info";
info.style.cssText =
"font-size:0.78rem;color:var(--text-dim);margin-top:0.25rem;font-family:var(--font-mono);";
"font-size:0.78rem;color:var(--text-dim);margin-top:0.25rem;font-family:var(--mono);";
info.textContent = "Click a dot for details.";
this.container.appendChild(info);

Expand Down
30 changes: 18 additions & 12 deletions src/language/WordingDiffCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,25 @@ export class WordingDiffCard {
body.textContent = ch.summary;
card.appendChild(body);

// A sentence seen for the first time has no "before" and a removed
// one has no "after"; each printed an empty − or + line.
if (ch.before !== ch.after) {
const beforeEl = document.createElement("div");
beforeEl.className = "card-diff";
beforeEl.style.cssText +=
";border-left:3px solid var(--red);margin-bottom:2px;";
beforeEl.textContent = `− ${ch.before}`;
card.appendChild(beforeEl);

const afterEl = document.createElement("div");
afterEl.className = "card-diff";
afterEl.style.cssText += ";border-left:3px solid var(--green);";
afterEl.textContent = `+ ${ch.after}`;
card.appendChild(afterEl);
if (ch.before.trim()) {
const beforeEl = document.createElement("div");
beforeEl.className = "card-diff";
beforeEl.style.cssText +=
";border-left:3px solid var(--red);margin-bottom:2px;";
beforeEl.textContent = `− ${ch.before}`;
card.appendChild(beforeEl);
}

if (ch.after.trim()) {
const afterEl = document.createElement("div");
afterEl.className = "card-diff";
afterEl.style.cssText += ";border-left:3px solid var(--green);";
afterEl.textContent = `+ ${ch.after}`;
card.appendChild(afterEl);
}
}

grid.appendChild(card);
Expand Down
6 changes: 5 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ new ImportUpload(document.getElementById("import-area")!, (events) => {
exportCtrl.setData(events);
const allTypes = collectEventTypes(events);
filter.setTypes(allTypes);
timelineView.setData(events);
updateAll(events);
});

Expand All @@ -83,6 +84,7 @@ async function loadSampleData(): Promise<void> {
exportCtrl.setData(events);
const allTypes = collectEventTypes(events);
filter.setTypes(allTypes);
timelineView.setData(events);
updateAll(events);
} catch (err) {
console.warn("Could not load sample data:", err);
Expand All @@ -97,8 +99,10 @@ function collectEventTypes(events: EvidenceEvent[]): EventType[] {
return Array.from(set).sort();
}

// Every panel but the timeline. The timeline takes the full set once, on load,
// and a filter through applyFilter, so its count reads "3 of 12". Setting its
// data from here made the filtered set its total, and the count read "3 of 3".
function updateAll(events: EvidenceEvent[]): void {
timelineView.setData(events);
citationChart.setData(events);
certaintyTimeline.setData(events);
schemaViewer.setData(events as unknown as Record<string, unknown>[]);
Expand Down
2 changes: 1 addition & 1 deletion src/timeline/DiffView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class DiffView {

const sectionInfo = document.createElement("div");
sectionInfo.style.cssText =
"font-size:0.78rem;color:var(--text-dim);margin-bottom:0.5rem;font-family:var(--font-mono);";
"font-size:0.78rem;color:var(--text-dim);margin-bottom:0.5rem;font-family:var(--mono);";
sectionInfo.textContent = event.section || "(no section)";
this.container.appendChild(sectionInfo);

Expand Down
Loading