From d6bf168300161869d2759fd40f9cfa8cdd75b8ec Mon Sep 17 00:00:00 2001
From: "developing-today[bot]"
<5454422+developing-today[bot]@users.noreply.github.com>
Date: Tue, 3 Nov 2026 19:07:52 -0600
Subject: [PATCH] fix(aggregator): wrap attention and item cards on mobile
(#3949)
---
pm-stack/aggregator/src/render.ts | 15 +++++++++++----
pm-stack/aggregator/test/mobile-targets.test.ts | 8 ++++++++
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/pm-stack/aggregator/src/render.ts b/pm-stack/aggregator/src/render.ts
index a8ef1393a0..8977499773 100644
--- a/pm-stack/aggregator/src/render.ts
+++ b/pm-stack/aggregator/src/render.ts
@@ -153,6 +153,13 @@ h1 { font-size: 18px; } h2 { font-size: 15px; }
a { color: #58a6ff; }
.card { border: 1px solid #30363d; border-radius: 8px; padding: 10px 12px; margin: 8px 0; background: #161b22; overflow-wrap: anywhere; }
.muted { color: #8b949e; font-size: 12px; }
+@media (max-width: 480px) {
+ .attention-card-header { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; min-width: 0; margin-bottom: 4px; }
+ .attention-card-header > strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
+ .attention-card-header .badge { white-space: normal; }
+ .item-session-records > .session-record-line { box-sizing: border-box; max-width: 100%; min-width: 0; }
+ .item-session-records .session-record-meta { display: block; max-width: 100%; overflow-wrap: anywhere; }
+}
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid #30363d; margin: 1px 2px 1px 0; white-space: nowrap; }
.badge.open { background: #1f6feb33; border-color: #1f6feb; color: #58a6ff; }
.badge.merged { background: #2ea04333; border-color: #2ea043; color: #3fb950; }
@@ -2150,7 +2157,7 @@ export function renderItem(
: "";
const sessionSection =
extras && extras.sessions.length
- ? `
Sessions that worked this
${extras.sessions.map((r) => sessionRecordLine(r)).join("")}`
+ ? `Sessions that worked this
${extras.sessions.map((r) => sessionRecordLine(r)).join("")}
`
: "";
const statusSection =
extras?.statusRequest && extras.formOpts
@@ -2208,7 +2215,7 @@ export function sessionRecordLine(
const badges = actionBadgesHtml(act?.actions);
const controls =
act?.identities && sessionRecordIsLive(r) ? sessionActionsHtml(r.id, r.source, { identities: act.identities }) : "";
- return `${esc(r.label)} ${esc(r.source)} ${esc(r.agentLabel)}${badges}
${esc(r.id)} · ${esc(r.status)}${r.model ? ` · ${esc(r.model)}` : ""} · started ${fmtDate(r.startedAt)} · last seen ${fmtDate(r.lastSeenAt)}${tokens}${parent}${refs}${controls}
`;
+ return `${esc(r.label)} ${esc(r.source)} ${esc(r.agentLabel)}${badges}
${esc(r.id)} · ${esc(r.status)}${r.model ? ` · ${esc(r.model)}` : ""} · started ${fmtDate(r.startedAt)} · last seen ${fmtDate(r.lastSeenAt)}${tokens}${parent}${refs}${controls}
`;
}
// --- Quota view (#851) + Usage & billing hub (design 2026-10-25) -----------
@@ -2637,7 +2644,7 @@ function sessionCard(
act?.identities && act.commentOpts
? cardCommentHtml(objectRef, undefined, act.commentsByObject?.get(objectRef), act.commentOpts)
: "";
- return `${esc(e.title ?? e.sessionId)} ${esc(src)} ${esc(STATE_LABELS[e.state])}${tierBadge}${cs.acked ? `
Acknowledged` : ""}${sub}${cmt}${badges}
${esc(e.sessionId)} · ${esc(e.directory ?? "—")}${e.branch ? ` · ${esc(e.branch)}` : ""} · ${esc(e.model ?? "—")}${e.provider ? ` / ${esc(e.provider)}` : ""} · last activity ${fmtDate(e.lastActivityAt)} · ${esc(e.messageCount ?? "—")} msgs${e.outcome ? ` · outcome: ${esc(e.outcome)}` : ""}${esc(evidence)}${reason}${orch}${controls}${detail}${commentBox}${kidsHtml}
`;
+ return `${esc(e.sessionId)} · ${esc(e.directory ?? "—")}${e.branch ? ` · ${esc(e.branch)}` : ""} · ${esc(e.model ?? "—")}${e.provider ? ` / ${esc(e.provider)}` : ""} · last activity ${fmtDate(e.lastActivityAt)} · ${esc(e.messageCount ?? "—")} msgs${e.outcome ? ` · outcome: ${esc(e.outcome)}` : ""}
${esc(evidence)}${reason}${orch}${controls}${detail}${commentBox}${kidsHtml}
`;
}
/** A #899 tier item that is not a live session — a decision, task, or gap. */
@@ -2707,7 +2714,7 @@ function tierItemCard(
const detail = `Details & history
- Source
- ${esc(item.source)} · ${esc(item.kind)}${item.state ? ` · state ${esc(item.state)}` : ""}
- Since
- ${esc(fmtDate(item.since))}
- Last seen
- ${esc(fmtDate(item.lastSeenAt))}
${item.horizon ? `- Horizon
- ${esc(item.horizon)}
` : ""}- Ref
${esc(objectRef)}${item.ref ? ` · ${esc(item.ref)}` : ""} ${item.blockedBy?.length ? `- Blocked by
- ${item.blockedBy.map((d) => esc(`${d.task} (${d.status}${d.workerLabel ? `, ${d.workerLabel}` : ""})`)).join("; ")}
` : ""}${questionPayload}
${actionHistoryHtml(act?.actions)} `;
const commentBox =
act?.identities && act.commentOpts ? cardCommentHtml(objectRef, item.ref, act.comments, act.commentOpts) : "";
- return `${esc(item.source)} ${esc(item.kind)}${isUserTier ? whyUserBadge(item) : ""}${cs.acked ? ` Acknowledged` : ""} ${titleHtml}${cmt}${badges}
${esc(whyLabel)}: ${esc(item.reason)}${question}${blocked}${action}${extBody}${ref}${controls}${detail}${commentBox}
`;
+ return `
${esc(whyLabel)}: ${esc(item.reason)}${question}${blocked}${action}${extBody}${ref}${controls}${detail}${commentBox}
`;
}
export interface AttentionAct {
diff --git a/pm-stack/aggregator/test/mobile-targets.test.ts b/pm-stack/aggregator/test/mobile-targets.test.ts
index f893630164..889efafaa9 100644
--- a/pm-stack/aggregator/test/mobile-targets.test.ts
+++ b/pm-stack/aggregator/test/mobile-targets.test.ts
@@ -45,6 +45,14 @@ describe("tap targets are at least 40px tall (#1180)", () => {
expect(renderSource).toContain('Coverage — pool vs backlog by repository');
expect(renderSource).toContain('Recent alert-ledger transitions');
});
+ test("attention headers wrap and item session rows stay within the mobile card", () => {
+ expect(renderSource).toMatch(/\.attention-card-header \{[^}]*flex-wrap: wrap;/);
+ expect(renderSource).toMatch(/\.attention-card-header > strong \{[^}]*min-width: 0;/);
+ expect(renderSource).toMatch(/\.item-session-records > \.session-record-line \{[^}]*max-width: 100%;/);
+ expect(renderSource).toMatch(/\.item-session-records \.session-record-meta \{[^}]*overflow-wrap: anywhere;/);
+ expect(renderSource).toContain('