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
5 changes: 5 additions & 0 deletions CHANGELOG.d/2.7.0-name-first-cited-after-ask-answer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 2.7.0 Name the first cited source after the landed Ask answer

Open Public post from the landed Demo Corp members and the first
cited source on the landed Ask answer is named. Home list opens do
not.
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.7.0] - 2026-08-17

### Added

- Opening Public post from the landed Demo Corp members now names the
first cited source after the landed first Ask answer: Linked post,
then open that evidence. Home list opens do not add that copy. No
TEPP theta is invented. No cutoff body is invented (ADR 0016).

## [2.6.0] - 2026-08-17

### 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": "2.6.0",
"version": "2.7.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
17 changes: 17 additions & 0 deletions frontend/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,7 @@ describe("App, authenticated", () => {
expect(screen.queryByRole("status", { name: "Related next action" })).not.toBeInTheDocument();
expect(screen.queryByRole("status", { name: "Ask next action" })).not.toBeInTheDocument();
expect(screen.queryByRole("status", { name: "Ask seed next action" })).not.toBeInTheDocument();
expect(screen.queryByRole("status", { name: "Ask citation 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");
Expand Down Expand Up @@ -2425,6 +2426,19 @@ describe("App, authenticated", () => {
expect(
within(popup as HTMLElement).getAllByText("The seeded follow-up after the site visit."),
).toHaveLength(1);
const citedNext = await screen.findByRole("status", { name: "Ask citation next action" });
expect(citedNext).toHaveTextContent(
"Linked post is the first cited source. Open that evidence next.",
);
expect(
firstAskAnswer.compareDocumentPosition(citedNext) & Node.DOCUMENT_POSITION_FOLLOWING,
).not.toBe(0);
expect(citedNext.compareDocumentPosition(askInput) & Node.DOCUMENT_POSITION_FOLLOWING).not.toBe(
0,
);
expect(
within(popup as HTMLElement).getByRole("button", { name: "Open evidence: Linked post" }),
).toHaveAttribute("aria-current", "true");
await waitFor(() => expect(document.getElementById("post-ask")).toHaveFocus());
} finally {
HTMLElement.prototype.scrollIntoView = originalScrollIntoView;
Expand Down Expand Up @@ -2723,6 +2737,9 @@ describe("App, authenticated", () => {
expect(firstAskAnswer.compareDocumentPosition(affiliate) & Node.DOCUMENT_POSITION_FOLLOWING).not.toBe(
0,
);
expect(await screen.findByRole("status", { name: "Ask citation next action" })).toHaveTextContent(
"Linked post is the first cited source. Open that evidence next.",
);
await waitFor(() => expect(document.getElementById("post-ask")).toHaveFocus());
});

Expand Down
19 changes: 19 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ function ChatCitations({
citedPosts,
citedPostIds,
onOpenEvidence,
currentPostId,
}: {
citedPosts?: { post_id: string; post_title: string }[];
citedPostIds: string[];
onOpenEvidence: (postId: string) => void;
currentPostId?: string;
}) {
if ((citedPosts?.length ?? citedPostIds.length) === 0) return null;
const chips =
Expand All @@ -150,6 +152,7 @@ function ChatCitations({
postId={cited.post_id}
postTitle={cited.post_title}
onOpenEvidence={onOpenEvidence}
current={cited.post_id === currentPostId}
/>
))}
</div>
Expand Down Expand Up @@ -209,6 +212,10 @@ function ChatPanel({
}
}

const firstCitedTitle =
exchanges[0]?.cited_posts?.[0]?.post_title ??
(exchanges[0]?.cited_post_ids[0] ? exchanges[0].cited_post_ids[0].slice(0, 8) : null);

return (
<section className="popup-section chat-section">
<h3 id="post-ask" tabIndex={-1}>
Expand All @@ -227,9 +234,17 @@ function ChatPanel({
citedPosts={exchanges[0].cited_posts}
citedPostIds={exchanges[0].cited_post_ids}
onOpenEvidence={setEvidencePostId}
currentPostId={
exchanges[0].cited_posts?.[0]?.post_id ?? exchanges[0].cited_post_ids[0]
}
/>
</div>
) : null}
{nameFirstAsk && firstCitedTitle ? (
<p className="post-meta" role="status" aria-label="Ask citation next action">
{firstCitedNextAction(firstCitedTitle)}
</p>
) : null}
{!seededOnly && (
<div className="chat-input-row">
<input
Expand Down Expand Up @@ -328,6 +343,10 @@ function firstAskNextAction(questionText: string): string {
return `${questionText} is the first Ask. Read that answer next.`;
}

function firstCitedNextAction(postTitle: string): string {
return `${postTitle} is the first cited source. Open that evidence next.`;
}

function EventLineageSection({
lineage,
graph,
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/CitationChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export type CitationChipProps = {
postId: string;
postTitle: string;
onOpenEvidence: (postId: string) => void;
current?: boolean;
};

/**
Expand All @@ -13,12 +14,14 @@ export function CitationChip({
postId,
postTitle,
onOpenEvidence,
current,
}: CitationChipProps) {
return (
<button
type="button"
className="citation-chip"
aria-label={`Open evidence: ${postTitle}`}
aria-current={current ? "true" : undefined}
onClick={() => onOpenEvidence(postId)}
>
{postTitle}
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__ = "2.6.0"
__version__ = "2.7.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 = "2.6.0"
version = "2.7.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.