Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(cos): don't clip the Learning card's "No data" value

Adam Eivyc5788f77489e
diff --git a/client/src/pages/ChiefOfStaff.jsx b/client/src/pages/ChiefOfStaff.jsx
index 223b684efa..03bd286cad 100644
--- a/client/src/pages/ChiefOfStaff.jsx
+++ b/client/src/pages/ChiefOfStaff.jsx
@@ -526,8 +526,10 @@ export default function ChiefOfStaff() {
<div className="flex-1 min-w-0 text-left">
<div className="text-[10px] text-gray-500">Learning</div>
{/* Stacked, not a flex row: as flex items these keep min-width:auto,
- so on a narrow card the skipped label can't shrink and spills out. */}
- <div className="text-sm font-bold text-white truncate">
+ so on a narrow card the skipped label can't shrink and spills out.
+ The value itself stays wrappable — `truncate` would clip the
+ (widest) 'No data' to 'No dat…' on a narrow card. */}
+ <div className="text-sm font-bold text-white">
{learningSummary?.overallSuccessRate != null ? `${learningSummary.overallSuccessRate}%` : 'No data'}
</div>
{learningSummary?.skipped > 0 && (
diff --git a/client/src/pages/ChiefOfStaff.test.jsx b/client/src/pages/ChiefOfStaff.test.jsx
index 735a2661cc..0d68f03a5b 100644
--- a/client/src/pages/ChiefOfStaff.test.jsx
+++ b/client/src/pages/ChiefOfStaff.test.jsx
@@ -176,6 +176,24 @@ describe('ChiefOfStaff Learning card skipped label', () => {
}
});
+ it('leaves the value wrappable so "No data" is not clipped', async () => {
+ // `truncate` implies white-space:nowrap. The label needs it (it can be
+ // arbitrarily wide); the value must NOT have it — the widest value,
+ // "No data", is wider than the compact card's ~45px text column and would
+ // render clipped as "No dat…" instead of wrapping.
+ api.getCosLearningSummary.mockResolvedValue({ overallSuccessRate: null, skipped: 0, status: 'unknown', totalCompleted: 0 });
+ renderAt('config');
+
+ // Only the compact card spells the empty state "No data" — the ascii `mini`
+ // card renders an em dash — so scope to the card that actually shows it.
+ const cards = await learningCards();
+ const values = cards.map(c => within(c).queryByText('No data')).filter(Boolean);
+ expect(values.length).toBeGreaterThan(0);
+ for (const value of values) {
+ expect(value.classList.contains('truncate')).toBe(false);
+ }
+ });
+
it('omits the skipped label entirely when nothing was skipped', async () => {
api.getCosLearningSummary.mockResolvedValue({ ...summaryWithSkipped, skipped: 0, status: 'good' });
renderAt('config');