Label the coworker's justification on the tool-request card

A bare floating quote made readers infer what it was; 'Reason:' says it.
This commit is contained in:
Rohit C Prasad
2026-08-14 23:55:00 -07:00
committed by Rohit P
parent 8e77d61aa1
commit b022e58d07
3 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -16,7 +16,8 @@ test("request_tool surfaces a card naming the tool, the reason and the pinned ve
await ask(page);
const card = page.locator(".dirreq-card");
await expect(card).toContainText("gitleaks");
await expect(card).toContainText("scan the git history for committed secrets");
// The coworker's justification is labeled, not a bare floating quote.
await expect(card).toContainText("Reason: “scan the git history for committed secrets”");
// The fact strip is the product's voice: version, publisher, checksum — kept apart from
// the coworker's quoted reason (mixing them is what made the card confusing, 2026-08-14).
const facts = card.locator(".toolreq-facts");
@@ -21,7 +21,11 @@ export function ToolRequestCard({
The coworker needs <code>{item.tool}</code>
</span>
</div>
{item.reason && <div className="dirreq-reason">{item.reason}</div>}
{item.reason && (
<div className="dirreq-reason">
<span className="toolreq-label">Reason:</span> {item.reason}
</div>
)}
{/* The fact strip is the PRODUCT speaking (registry metadata), styled apart from the
coworker's quoted ask above — mixing the two voices is what made the card confusing. */}
{item.installable ? (
+3
View File
@@ -794,6 +794,9 @@ button.btn.danger { color: var(--accent); }
.dirreq-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.dirreq-head .ico { color: var(--accent); }
.dirreq-reason { font-size: 13px; color: var(--muted); font-style: italic; margin: 6px 0 10px; }
/* the coworker's justification gets an explicit label — the quote alone made readers
work out what the italic line was */
.toolreq-label { font-style: normal; font-weight: 600; color: var(--ink); }
/* request_tool fact strip — the product's own metadata (version, publisher, checksum),
deliberately NOT italic so it can't be misread as the coworker still talking */
.toolreq-facts {