Skip to main content

max / balanced_breakfast

sources: drop the all-read count checkmark (no-checkmark brand rule) The unread-count pill showed "✓ N" when a feed was fully read. Removed the checkmark from both the "All" row and per-source counts; all-read is already signalled by the .all-read style (green border/text), so "N" (green) vs "U/N" stays distinct. Updated the test to assert the all-read style + absence of a checkmark instead of its presence. 55 JS tests pass; lint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-12 20:17 UTC
Commit: b1174591e6d3836ce7a6b11d88c1b78bb7bc58da
Parent: a33b9d3
2 files changed, +7 insertions, -6 deletions
@@ -134,9 +134,9 @@
134 134 const totalCount = sources.reduce((sum, s) => sum + s.totalCount, 0);
135 135 const totalUnread = sources.reduce((sum, s) => sum + s.unreadCount, 0);
136 136 const allReadClass = totalUnread === 0 && totalCount > 0 ? ' all-read' : '';
137 - const allCountText = totalUnread > 0
138 - ? `${totalUnread}/${totalCount}`
139 - : totalCount > 0 ? `\u2713 ${totalCount}` : `${totalCount}`;
137 + // All-read is signalled by the .all-read style (green), not a checkmark
138 + // (no-checkmark brand rule); partial shows unread/total.
139 + const allCountText = totalUnread > 0 ? `${totalUnread}/${totalCount}` : `${totalCount}`;
140 140
141 141 // Build all items in a fragment first, then swap in one operation
142 142 // to avoid the flash of empty content.
@@ -174,7 +174,7 @@
174 174 const srcReadClass = source.unreadCount === 0 && source.totalCount > 0;
175 175 const countText = source.unreadCount > 0
176 176 ? `${source.unreadCount}/${source.totalCount}`
177 - : source.totalCount > 0 ? `\u2713 ${source.totalCount}` : `${source.totalCount}`;
177 + : `${source.totalCount}`;
178 178
179 179 const li = BB.ui.renderRow({
180 180 tag: 'li',
@@ -496,7 +496,7 @@ describe('BB.sources.render', () => {
496 496 assert(sourceItem.innerHTML.includes('data-health="yellow"'), 'Should have data-health="yellow" attribute');
497 497 });
498 498
499 - test('source with unreadCount=0 shows checkmark and total (no slash)', () => {
499 + test('source with unreadCount=0 shows total via all-read style (no slash, no checkmark)', () => {
500 500 resetMockElement('sources-list');
501 501 const sources = [
502 502 { id: 's1', name: 'Feed A', totalCount: 5, unreadCount: 0, tags: [], health: 'green' },
@@ -506,9 +506,10 @@ describe('BB.sources.render', () => {
506 506 BB.sources.render(sources);
507 507 const list = document.getElementById('sources-list');
508 508 const sourceItem = list.children[1]; // children[0] is "All"
509 - assert(sourceItem.innerHTML.includes('\u2713'), 'Should show checkmark when all read');
509 + assert(sourceItem.innerHTML.includes('all-read'), 'Should mark the count all-read (green)');
510 510 assert(sourceItem.innerHTML.includes('5'), 'Should show total count');
511 511 assert(!sourceItem.innerHTML.includes('0/5'), 'Should not show 0/X format');
512 + assert(!sourceItem.innerHTML.includes('\u2713'), 'Should not show a checkmark');
512 513 });
513 514
514 515 test('source with lastError shows error text in health dot title', () => {