Cap the extension proposal card's body so it can't take over the thread

The proposal's own content (host, keys, what would be saved, the bot's check and sources) now scrolls inside a 24rem-tall box, while the outcome and the Reject/Confirm row stay visible below it. A test pins the cap.
This commit is contained in:
2026-11-21 14:38:34 +01:00
parent 20f4ad3e04
commit 2c843dfe4c
2 changed files with 26 additions and 15 deletions
@@ -43,6 +43,14 @@ describe("ProposalCard", () => {
expect(html).toContain(">Confirm<");
});
test("caps its body so a long brief can't take over the thread", () => {
const html = render({ view: { ...github, research: "Long brief. ".repeat(400) } });
expect(html).toContain("max-h-[24rem]");
expect(html).toContain("overflow-y-auto");
expect(html).toContain(">Confirm<");
});
test("offers no buttons once it's decided or expired", () => {
expect(render({ view: { ...github, status: "confirmed", outcome: "Saved as MCP server #9." } })).not.toContain(
">Confirm<",
@@ -72,23 +72,26 @@ export default function ProposalCard({ view, onDecided }: Props) {
return (
<Stack className="w-full gap-0! items-stretch">
{is_skill ? null : <ProposalReachSection view={view} keys={keys} missing={missing} />}
{/* The proposal's own content is capped so a long brief can't take over the thread; the decision stays in view below. */}
<Stack className="max-h-[24rem] w-full gap-0! items-stretch overflow-y-auto overscroll-contain">
{is_skill ? null : <ProposalReachSection view={view} keys={keys} missing={missing} />}
<MessageDetailsHeading>What would be saved</MessageDetailsHeading>
{view.details.map((detail) => (
<ProposalDetailRow key={detail.label} {...detail} />
))}
<MessageDetailsHeading>What would be saved</MessageDetailsHeading>
{view.details.map((detail) => (
<ProposalDetailRow key={detail.label} {...detail} />
))}
<MessageDetailsHeading>
{is_skill ? "Review (written by the bot)" : "Background check (written by the bot)"}
</MessageDetailsHeading>
<Span className="whitespace-pre-wrap text-[13px] leading-5 text-ink break-words">{view.research}</Span>
<Stack className="mt-1 w-full gap-0! items-stretch">
{view.sources.length ? (
view.sources.map((url) => <ProposalSourceRow key={url} url={url} />)
) : (
<Span className="text-[12px] leading-4 text-ink-secondary">No pages given.</Span>
)}
<MessageDetailsHeading>
{is_skill ? "Review (written by the bot)" : "Background check (written by the bot)"}
</MessageDetailsHeading>
<Span className="whitespace-pre-wrap text-[13px] leading-5 text-ink break-words">{view.research}</Span>
<Stack className="mt-1 w-full gap-0! items-stretch">
{view.sources.length ? (
view.sources.map((url) => <ProposalSourceRow key={url} url={url} />)
) : (
<Span className="text-[12px] leading-4 text-ink-secondary">No pages given.</Span>
)}
</Stack>
</Stack>
{view.outcome ? (