feat(home-hub): Recent Sessions per-project alert dot (lr-2b1f03)#342
Conversation
The Home Hub Projects list already surfaces a per-project unread-count badge (proj.unread, e.g. icon-strip-project-badge.has-unread), but the Recent Sessions list had no alert indicator at all, so there was no way to tell which project a session's unresolved activity belonged to from that view. Add a small red dot (not a count -- it wouldn't fit the row) to each Recent Sessions row whose session's project currently has unread activity. Reuses the existing getCachedProjects()/proj.unread source that already drives the Projects-list badge -- no new data path. Frontend-only change in lib/public/modules/app-home-hub.js (new projectHasAlert() helper + handleHubRecentSessions()) and lib/public/css/home-hub.css (.hub-recent-alert-dot, matching the existing #e74c3c red used by .icon-strip-project-badge). Tests: node --test suite passes except 4 pre-existing failures in test/sdk-bridge-context-window-warn.test.js, unrelated to this change (not touched by this diff, present on main).
|
PEACHES — clean (0 nits) CSS JavaScript Alert rendering in Regression test (full file): validates helper presence, correct cache usage, and fallback behavior. No brand violations, no new SDK requires, no hardcoded paths, no cross-layer imports. Minimal change, test included. |
|
No security-relevant findings. This PR adds a small per-project alert-dot indicator to the Home Hub Recent Sessions list (lib/public/css/home-hub.css, lib/public/modules/app-home-hub.js) plus a matching regression test. The new projectHasAlert() helper only reads an existing in-memory project cache (getCachedProjects()) and does a boolean slug lookup - no new network or IO calls. The new alertHtml markup injected into item.innerHTML is a static string with no interpolated data (unlike sess.title/sess.agentName, which already pass through escapeHtml and are unchanged by this PR), so no new XSS surface. CSS change is a static rule. No dependency manifest changes in this diff. gitleaks and semgrep both ran clean against the full base..head diff; trufflehog was unavailable in this environment (command not found); osv-scanner not applicable (no package.json/lock changes in scope). Scanners run:
BOBBIE -- clean |
|
Merged via clagentic-loadout v0.1.0
|
Summary
The Home Hub Projects list shows a per-project alert count badge (proj.unread), but the Recent Sessions list had no alert indicator at all -- no way to tell which project a session's unresolved activity belonged to from that view.
This adds a small red dot to each Recent Sessions row whose session's project currently has unread activity (proj.unread > 0). A numeric count would not fit the row, per the task description, so a plain dot is used -- goal is showing WHERE the alert is from, not how many.
Data source
Reuses the exact same per-project source that already drives the Projects-list unread badge (.icon-strip-project-badge.has-unread / .mobile-project-unread): getCachedProjects() from app-projects.js, keyed off proj.unread. No new data path, no server-side change -- pure read of the existing client-side cache, looked up per row via sess.projectSlug (matches proj.slug via lib/project-loop.js:1358-1392 and lib/server.js:994-1017).
Changes
Frontend-only. No LLM calls added. No user-facing brand strings changed.
Task: lr-2b1f03
Test status
npm test: 956/960 pass. The 4 failures are all in test/sdk-bridge-context-window-warn.test.js, pre-existing on main and unrelated to this diff (that file and lib/sdk-bridge.js are untouched here).