client/src/components/cos/tabs/AgentCard.jsx's TaskDescription (~line 80) is a second "long task text with a Show more toggle" implementation, one directory over from the shared client/src/components/ui/CollapsibleText.jsx. It uses a text.length > 200 heuristic + max-h-[3.5rem] + gradient fade instead of measured line-clamp-2, and its toggle carries no aria-expanded/aria-controls.
Not consolidated when CollapsibleText was introduced because AgentCard renders markdown blocks via MarkdownOutput, which line-clamp can't clamp.
Decision: add a children-based max-height variant to CollapsibleText (an alternative clamp strategy for content that can't use CSS line-clamp, e.g. rendered markdown), then migrate AgentCard's TaskDescription onto it and delete the bespoke implementation. This unifies the collapse affordance and its accessibility (aria-expanded/aria-controls) everywhere, at the cost of visibly changing AgentCard's current fade treatment — call that out in the PR for review.
Deferred from the PR that clamped CoS task text.
Migrated from PLAN.md by /do:replan --issues.
client/src/components/cos/tabs/AgentCard.jsx'sTaskDescription(~line 80) is a second "long task text with a Show more toggle" implementation, one directory over from the sharedclient/src/components/ui/CollapsibleText.jsx. It uses atext.length > 200heuristic +max-h-[3.5rem]+ gradient fade instead of measuredline-clamp-2, and its toggle carries noaria-expanded/aria-controls.Not consolidated when
CollapsibleTextwas introduced becauseAgentCardrenders markdown blocks viaMarkdownOutput, whichline-clampcan't clamp.Decision: add a
children-based max-height variant toCollapsibleText(an alternative clamp strategy for content that can't use CSSline-clamp, e.g. rendered markdown), then migrateAgentCard'sTaskDescriptiononto it and delete the bespoke implementation. This unifies the collapse affordance and its accessibility (aria-expanded/aria-controls) everywhere, at the cost of visibly changingAgentCard's current fade treatment — call that out in the PR for review.Deferred from the PR that clamped CoS task text.
Migrated from PLAN.md by /do:replan --issues.