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: 4 additions & 0 deletions CHANGELOG.d/2.0.0-land-first-related-after-priya.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 2.0.0 Land the first related node after Priya Nair is named

Open Public post from the landed Demo Corp members and the popup lands
Priya Nair related nodes under the first-related next action.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ 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).

## [2.0.0] - 2026-08-17

### Added

- Opening Public post from the landed Demo Corp members now lands
Priya Nair related nodes under the first-related next action, ahead
of Affiliate tree. Home list opens still wait for a related click.
No TEPP theta is invented. No cutoff body is invented (ADR 0016).

## [1.9.0] - 2026-08-17

### Added
Expand Down
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ Lineage DAG marks that post current. After that current node, the
popup names Keyman and evaluation as the next read. After landed
evaluation, the popup names the first Keyman as the next read. After
landed Ada West related, the popup names the first related node as
the next read. Changing the week first still focuses the report
the next read. After that next action, the popup lands Priya Nair
related nodes. Changing the week first still focuses the report
period field. Mean θ stays on the period-report panel.
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": "1.9.0",
"version": "2.0.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
18 changes: 17 additions & 1 deletion frontend/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,7 @@ describe("App, authenticated", () => {
expect(screen.queryByRole("status", { name: "Keyman next action" })).not.toBeInTheDocument();
expect(screen.queryByRole("status", { name: "Related next action" })).not.toBeInTheDocument();
expect(screen.queryByText("Related to Ada West")).not.toBeInTheDocument();
expect(screen.queryByText("Related to Priya Nair")).not.toBeInTheDocument();
const popup = document.querySelector(".popup-panel");
expect(popup).not.toBeNull();
const evaluation = within(popup as HTMLElement).getByRole("heading", {
Expand Down Expand Up @@ -2333,10 +2334,24 @@ describe("App, authenticated", () => {
expect(relatedNext).toHaveTextContent(
"Priya Nair is the first related node. Read that person next.",
);
expect(
within(popup as HTMLElement).getByRole("button", {
name: "Related nodes for Priya Nair (Counterparty)",
}),
).toHaveAttribute("aria-current", "true");
const landedRelated = await within(popup as HTMLElement).findByRole("heading", {
name: "Related to Priya Nair",
});
expect(
within(landedRelated.closest(".related-keymen") as HTMLElement).getByText(/Ada West/),
).toBeInTheDocument();
expect(related.compareDocumentPosition(relatedNext) & Node.DOCUMENT_POSITION_FOLLOWING).not.toBe(
0,
);
expect(relatedNext.compareDocumentPosition(affiliate) & Node.DOCUMENT_POSITION_FOLLOWING).not.toBe(
expect(
relatedNext.compareDocumentPosition(landedRelated) & Node.DOCUMENT_POSITION_FOLLOWING,
).not.toBe(0);
expect(landedRelated.compareDocumentPosition(affiliate) & Node.DOCUMENT_POSITION_FOLLOWING).not.toBe(
0,
);
} finally {
Expand Down Expand Up @@ -2613,6 +2628,7 @@ describe("App, authenticated", () => {
expect(await screen.findByRole("status", { name: "Related next action" })).toHaveTextContent(
"Priya Nair is the first related node. Read that person next.",
);
expect(await screen.findByRole("heading", { name: "Related to Priya Nair" })).toBeInTheDocument();
});

it("lets post_admin rebuild the period report", async () => {
Expand Down
54 changes: 54 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ function KeymanPanel({
focusEntity,
focusTeam,
landFirstKeyman,
landFirstRelated,
afterList,
}: {
postId: string;
Expand All @@ -580,10 +581,13 @@ function KeymanPanel({
focusEntity?: { entityId: string; entityName: string } | null;
focusTeam?: { teamId: string; teamName: string } | null;
landFirstKeyman?: boolean;
landFirstRelated?: boolean;
afterList?: ReactNode;
}) {
const [related, setRelated] = useState<RelatedNode[] | null>(null);
const [selectedName, setSelectedName] = useState<string | null>(null);
const [landedRelated, setLandedRelated] = useState<RelatedNode[] | null>(null);
const [landedRelatedName, setLandedRelatedName] = useState<string | null>(null);
const [extracting, setExtracting] = useState(false);
const [error, setError] = useState<string | null>(null);
const [orchestratorOff, setOrchestratorOff] = useState(false);
Expand Down Expand Up @@ -647,6 +651,32 @@ function KeymanPanel({
});
}, [accessToken, landFirstKeyman, keymen, selectedName]);

useEffect(() => {
if (!landFirstRelated) {
setLandedRelatedName(null);
setLandedRelated(null);
return;
}
const first = related?.[0];
if (!first || first.node_type_code !== NODE_PERSON) {
return;
}
const name = first.label ?? first.node_id;
let cancelled = false;
setLandedRelatedName(name);
setLandedRelated(null);
fetchRelatedKeymen(accessToken, first.node_id)
.then((result) => {
if (!cancelled) setLandedRelated(result.related);
})
.catch(() => {
if (!cancelled) setLandedRelated([]);
});
return () => {
cancelled = true;
};
}, [accessToken, landFirstRelated, related]);

useEffect(() => {
if (!focusPerson) return;
const requestId = ++relatedRequest.current;
Expand Down Expand Up @@ -742,6 +772,11 @@ function KeymanPanel({
<button
className="keyman-select"
aria-label={`Related nodes for ${caption}`}
aria-current={
landFirstRelated && related[0]?.node_id === node.node_id
? "true"
: undefined
}
onClick={() => handleSelect(node.node_id, node.label ?? node.node_id)}
>
{caption}
Expand Down Expand Up @@ -856,6 +891,24 @@ function KeymanPanel({
{firstRelatedNextAction(related[0].label ?? related[0].node_id)}
</p>
) : null}
{afterList && landFirstRelated && landedRelatedName ? (
<div className="related-keymen">
<h4>Related to {landedRelatedName}</h4>
{landedRelated === null ? (
<p>Loading related nodes...</p>
) : landedRelated.length === 0 ? (
<p className="popup-placeholder">No related nodes in the visible graph.</p>
) : (
<ul>
{landedRelated.map((node) => (
<li key={`${node.node_type_code}:${node.node_id}`}>
{relatedNodeCaption(node)}
</li>
))}
</ul>
)}
</div>
) : null}
</>
);
}
Expand Down Expand Up @@ -1465,6 +1518,7 @@ function PostDetailPopup({
focusEntity={focusEntity}
focusTeam={focusTeam}
landFirstKeyman
landFirstRelated
afterList={
<>
<EvaluationPanel
Expand Down
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__ = "1.9.0"
__version__ = "2.0.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 = "1.9.0"
version = "2.0.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.