feat: render defense qna discussion fields
This commit is contained in:
@@ -62,6 +62,15 @@ describe("DiscussionPanel", () => {
|
|||||||
expect(screen.getByText(/future scheduler/)).toBeDefined();
|
expect(screen.getByText(/future scheduler/)).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("renders defense Q&A fields when present", () => {
|
||||||
|
render(<DiscussionPanel branchId="where-is-ai-agent" onClose={onClose} />);
|
||||||
|
|
||||||
|
expect(screen.getByText("Where is the AI agent in this thesis?")).toBeDefined();
|
||||||
|
expect(screen.getByText(/workflow substrate that external agents operate/i)).toBeDefined();
|
||||||
|
expect(screen.getByText(/not a new planning algorithm/i)).toBeDefined();
|
||||||
|
expect(screen.getByText(/Answer directly first/i)).toBeDefined();
|
||||||
|
});
|
||||||
|
|
||||||
it("shows mcp-agent-scale links to Anthropic and Cloudflare", () => {
|
it("shows mcp-agent-scale links to Anthropic and Cloudflare", () => {
|
||||||
render(<DiscussionPanel branchId="mcp-agent-scale" onClose={onClose} />);
|
render(<DiscussionPanel branchId="mcp-agent-scale" onClose={onClose} />);
|
||||||
const anthropic = screen.getByText("Anthropic MCP");
|
const anthropic = screen.getByText("Anthropic MCP");
|
||||||
|
|||||||
@@ -61,6 +61,23 @@ export const DiscussionPanel = ({ branchId, onClose }: DiscussionPanelProps) =>
|
|||||||
</header>
|
</header>
|
||||||
<p className="discussion-panel__evidence">{branch.evidencePointer}</p>
|
<p className="discussion-panel__evidence">{branch.evidencePointer}</p>
|
||||||
<p className="discussion-panel__summary">{branch.summary}</p>
|
<p className="discussion-panel__summary">{branch.summary}</p>
|
||||||
|
{branch.question && (
|
||||||
|
<section className="discussion-panel__qna" aria-label="defense question">
|
||||||
|
<p className="discussion-panel__question">{branch.question}</p>
|
||||||
|
{branch.shortAnswer && (
|
||||||
|
<p className="discussion-panel__short-answer">{branch.shortAnswer}</p>
|
||||||
|
)}
|
||||||
|
{branch.expandedAnswer && (
|
||||||
|
<p className="discussion-panel__expanded-answer">{branch.expandedAnswer}</p>
|
||||||
|
)}
|
||||||
|
{branch.speakerHint && (
|
||||||
|
<p className="discussion-panel__speaker-hint">
|
||||||
|
<span>Speaker hint</span>
|
||||||
|
{branch.speakerHint}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</section>
|
||||||
|
)}
|
||||||
{branch.detail && (
|
{branch.detail && (
|
||||||
<p className="discussion-panel__detail">
|
<p className="discussion-panel__detail">
|
||||||
{branch.detail.links?.map((link, index) => (
|
{branch.detail.links?.map((link, index) => (
|
||||||
|
|||||||
@@ -535,6 +535,52 @@
|
|||||||
margin: 0.5rem 0;
|
margin: 0.5rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.discussion-panel__qna {
|
||||||
|
display: grid;
|
||||||
|
gap: 0.6rem;
|
||||||
|
margin: 0.75rem 0;
|
||||||
|
padding: 0.85rem;
|
||||||
|
border: 1px solid color-mix(in srgb, var(--accent-cyan) 35%, transparent);
|
||||||
|
border-radius: 1rem;
|
||||||
|
background: color-mix(in srgb, var(--stage-surface) 82%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.discussion-panel__question {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 1.02rem;
|
||||||
|
font-weight: 750;
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.discussion-panel__short-answer,
|
||||||
|
.discussion-panel__expanded-answer {
|
||||||
|
margin: 0;
|
||||||
|
color: var(--text-muted);
|
||||||
|
line-height: 1.45;
|
||||||
|
}
|
||||||
|
|
||||||
|
.discussion-panel__short-answer {
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.discussion-panel__speaker-hint {
|
||||||
|
margin: 0;
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
border-top: 1px solid color-mix(in srgb, var(--stage-line) 70%, transparent);
|
||||||
|
color: var(--text-muted);
|
||||||
|
font-size: 0.88rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.discussion-panel__speaker-hint span {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 0.2rem;
|
||||||
|
color: var(--accent-cyan);
|
||||||
|
font-size: 0.72rem;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
.discussion-panel__detail {
|
.discussion-panel__detail {
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: oklch(0.85 0.02 250);
|
color: oklch(0.85 0.02 250);
|
||||||
|
|||||||
Reference in New Issue
Block a user