fix(mobile-nav): Home nav button toggles the Home hub (lr-551048)#341
Conversation
|
No security-relevant findings in this diff. Scope: PR #341 (fa00aea..ebfda3a), sidebar-mobile.js + new regression test (91 lines, 2 files). Change is a pure UI-state toggle: imports two already-exported, side-effect-free functions (isHomeHubVisible, hideHomeHub) from app-home-hub.js and branches the mobile Home button's click handler to close the hub when already open instead of unconditionally re-opening it. No new DOM sinks, no new network calls, no auth/session state touched, no user input parsed. The added test file is a static source-text regression check against the built file (no execution of untrusted input). Scanners: semgrep (0 findings, 200 rules/2 files), gitleaks (0 leaks, both changed files). trufflehog unavailable in this environment (binary not found) - recorded as unavailable, not run. No package.json/lockfile changes in this diff, so osv-scanner is not applicable. Early-exit: low-surface diff, no reachable security-relevant sink. |
|
PEACHES — blocking
|
|
PEACHES — clean (0 blocking findings) This PR correctly adds toggle behavior to the mobile Home button, fixing lr-551048. The three exported functions (showHomeHub, hideHomeHub, isHomeHubVisible) are all present in app-home-hub.js and properly imported. The toggle logic branches correctly on visibility state, and the regression test validates both the import chain and the handler behavior. No issues found. |
|
Merged via clagentic-loadout v0.1.0
|
lr-551048: mobile Home nav button now toggles the Home hub.
Fix: lib/public/modules/sidebar-mobile.js imports hideHomeHub and isHomeHubVisible from app-home-hub.js. The mobile-home-btn click handler now branches on isHomeHubVisible(): if visible, calls hideHomeHub() and setMobileTabActive(null) to clear tab-active state; otherwise calls setMobileTabActive("home") and showHomeHub() as before.
Scope: frontend-only, no LLM calls added, no brand strings changed.
Tests: npm test -- 950 pass, 3 fail. The 3 failures are lr-1f7e context-window-warn tests in test/sdk-bridge-context-window-warn.test.js, confirmed pre-existing on main via git stash + rerun before this change, unrelated to this diff. Added test/mobile-home-toggle-lr-551048.test.js with 3 source-text regression tests covering the import, the toggle branch, and tab-active-state clearing on close, matching this project convention for DOM-heavy frontend modules.
Task: lr-551048