refactor: code quality improvements for task-7 settings effects

- Extract getVisibleSessions() helper to consolidate hidden-session
  filter used by renderGrid() and renderSidebar() (DRY reduction)
- Add comment to terminal.js magic literal 600 noting it matches
  MOBILE_THRESHOLD in app.js
- Move TERMINAL_JS_PATH and _TERMINAL_JS module fixtures to the top
  of the test file alongside JS_PATH and _JS for consistency
- Strengthen test_render_grid_uses_visible_for_empty_state_check to
  assert visible.length specifically, distinguishing it from
  test_render_grid_creates_visible_array
- Update renderGrid/renderSidebar filter tests to assert getVisibleSessions()
  call; add test_get_visible_sessions_filters_hidden_sessions to cover
  the extracted helper directly
This commit is contained in:
Brian Krabach
2026-03-30 02:28:54 -07:00
parent 142c68d644
commit 851036bac0
18 changed files with 47 additions and 28 deletions
+1 -1
View File
@@ -150,7 +150,7 @@ function createTerminal() {
}
} catch (_) { /* use default 14 */ }
const mobile = window.innerWidth < 600;
const mobile = window.innerWidth < 600; // matches MOBILE_THRESHOLD in app.js
const fontSize = mobile ? Math.min(storedFontSize, 12) : storedFontSize;
_term = new window.Terminal({