Skip to content
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
4 changes: 3 additions & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ in SQL: the requester always sees their own run; a corporate-entity or
process-unit scope is visible only to affiliated accounts; a
thread-group scope is visible only when the account can already see a
post in that group; `all_visible` is requester-only. Hidden runs 404.
The payload is lookup labels plus non-negative aggregate counts -- never
The home list is clickable: `GET /api/analysis-runs/{id}` fills a
labeled detail (cutoff, requested date, counts) without exposing a
DSN or raw record. The payload is lookup labels plus non-negative aggregate counts -- never
source SQL, a DSN, a raw record, or a provider body. After `make seed`,
Demo Analyst and Demo Admin see "Lineage reconstruction · Succeeded ·
Demo Corp" with "3 documents".
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.d/0.80.0-analysis-run-detail-click.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 0.80.0 analysis-run detail click

Home Analysis runs rows open `GET /api/analysis-runs/{id}`. The
detail shows labeled aggregates and dates only. Hidden runs stay
404 / "not visible". Synthetic Demo Corp seed only.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project are documented here. Format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versioning follows
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.80.0] - 2026-08-16

### Added

- Home Analysis runs rows are buttons. Clicking the seeded Demo Corp
lineage run opens `GET /api/analysis-runs/{id}` and shows cutoff,
requested date, and document count. A hidden run is "This analysis
run is not visible." -- never a raw 404 or a DSN. Still synthetic
aggregates only.

## [0.79.0] - 2026-08-16

### Added
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "frontend",
"private": true,
"version": "0.79.0",
"version": "0.80.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
33 changes: 33 additions & 0 deletions frontend/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,29 @@ describe("App, authenticated", () => {
jsonResponse({ post_id: "post-1", has_commitment: true, ticket }),
);
}
if (url.endsWith("/api/analysis-runs/run-demo-lineage")) {
return Promise.resolve(
jsonResponse({
analysis_run_id: "run-demo-lineage",
run_kind_code: "analysis_run_lineage",
run_kind_label: "Lineage reconstruction",
scope_kind_code: "analysis_scope_corporate_entity",
scope_kind_label: "Corporate entity",
scope_entity_name: "Demo Corp",
status_code: "analysis_status_succeeded",
status_label: "Succeeded",
knowledge_cutoff: "2026-01-12T12:00:00Z",
requested_at: "2026-01-12T12:30:00Z",
source_counts: [
{
count_type_code: "analysis_count_document",
count_type_label: "Documents",
count_value: 3,
},
],
}),
);
}
if (url.endsWith("/api/analysis-runs")) {
return Promise.resolve(
jsonResponse({
Expand Down Expand Up @@ -1333,6 +1356,16 @@ describe("App, authenticated", () => {
expect(list).toHaveTextContent("3 documents");
expect(list).not.toHaveTextContent("postgresql://");
expect(list).not.toHaveTextContent("select ");

await userEvent.click(
screen.getByRole("button", {
name: "Open analysis run: Lineage reconstruction · Succeeded · Demo Corp",
}),
);
expect(await screen.findByRole("heading", { name: "Lineage reconstruction · Succeeded · Demo Corp" })).toBeInTheDocument();
expect(screen.getByText(/Cutoff 2026-01-12/)).toBeInTheDocument();
expect(screen.getByText(/Requested 2026-01-12/)).toBeInTheDocument();
expect(screen.queryByText(/postgresql:\/\//)).not.toBeInTheDocument();
});

it("shows the calibrated period-report mean theta on the home page", async () => {
Expand Down
68 changes: 54 additions & 14 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
deriveCommitment,
evaluatePost,
extractPostKeymen,
fetchAnalysisRun,
fetchAnalysisRuns,
fetchCalendar,
fetchLineageGraph,
Expand Down Expand Up @@ -1346,8 +1347,15 @@ function PostDetailPopup({
);
}

function analysisRunCaption(run: AnalysisRun): string {
return [run.run_kind_label, run.status_label, run.scope_entity_name ?? run.scope_kind_label]
.filter(Boolean)
.join(" · ");
}

function AnalysisRunsPanel({ accessToken }: { accessToken: string }) {
const [runs, setRuns] = useState<AnalysisRun[] | null>(null);
const [selected, setSelected] = useState<AnalysisRun | null>(null);
const [error, setError] = useState<string | null>(null);

useEffect(() => {
Expand All @@ -1356,14 +1364,29 @@ function AnalysisRunsPanel({ accessToken }: { accessToken: string }) {
.catch((err) => setError(String(err)));
}, [accessToken]);

if (error) return <p className="error">{error}</p>;
async function handleOpen(runId: string) {
setError(null);
try {
setSelected(await fetchAnalysisRun(accessToken, runId));
} catch (err) {
setSelected(null);
if (err instanceof BackendError && err.status === 404) {
setError("This analysis run is not visible.");
return;
}
setError(String(err));
}
}

if (error && runs === null) return <p className="error">{error}</p>;
if (runs === null) return <p>Loading analysis runs...</p>;

return (
<section className="popup-section lineage-home">
<div className="lineage-home-header">
<h2>Analysis runs</h2>
</div>
{error && <p className="error">{error}</p>}
{runs.length === 0 ? (
<p className="popup-placeholder">
No analysis runs visible to this account yet -- try `make seed`.
Expand All @@ -1374,26 +1397,43 @@ function AnalysisRunsPanel({ accessToken }: { accessToken: string }) {
const documentCount = run.source_counts.find(
(count) => count.count_type_code === "analysis_count_document",
);
const caption = [
run.run_kind_label,
run.status_label,
run.scope_entity_name ?? run.scope_kind_label,
]
.filter(Boolean)
.join(" · ");
const caption = analysisRunCaption(run);
return (
<li key={run.analysis_run_id} className="ticket-list-item">
<span className="ticket-title">{caption}</span>
{documentCount && (
<span className="post-badge">
{documentCount.count_value} {documentCount.count_type_label.toLowerCase()}
</span>
)}
<button
className="post-list-item"
aria-label={`Open analysis run: ${caption}`}
onClick={() => void handleOpen(run.analysis_run_id)}
>
<span className="ticket-title">{caption}</span>
{documentCount && (
<span className="post-badge">
{documentCount.count_value} {documentCount.count_type_label.toLowerCase()}
</span>
)}
</button>
</li>
);
})}
</ul>
)}
{selected && (
<div className="popup-section">
<h3>{analysisRunCaption(selected)}</h3>
<p className="post-meta">
Cutoff {selected.knowledge_cutoff.slice(0, 10)}
{" · "}
Requested {selected.requested_at.slice(0, 10)}
</p>
<ul>
{selected.source_counts.map((count) => (
<li key={count.count_type_code}>
{count.count_value} {count.count_type_label.toLowerCase()}
</li>
))}
</ul>
</div>
)}
</section>
);
}
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,3 +516,7 @@ export interface AnalysisRun {
export function fetchAnalysisRuns(accessToken: string): Promise<{ analysis_runs: AnalysisRun[] }> {
return backendFetch("/api/analysis-runs", accessToken);
}

export function fetchAnalysisRun(accessToken: string, analysisRunId: string): Promise<AnalysisRun> {
return backendFetch(`/api/analysis-runs/${analysisRunId}`, accessToken);
}
2 changes: 1 addition & 1 deletion lineageweave/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
"sentence_excerpts",
]

__version__ = "0.79.0"
__version__ = "0.80.0"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "lineageweave"
version = "0.79.0"
version = "0.80.0"
description = "Reconstructs git-branch-style lineage DAGs from scattered short records using multi-channel score fusion and LLM adjudication."
readme = "README.md"
license = { text = "MIT" }
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.