openclaw/ui
Ian Derrington 266d320062
feat(ui): add hide-cron toggle to chat session selector (#26976)
* feat(ui): add hide-cron toggle to chat session selector

Adds a clock icon toggle button in the chat controls bar that filters
cron sessions out of the session dropdown. Default: hidden (true).

Why: cron sessions (key prefix `cron:`) accumulate fast — a job running
every 15 min produces 48 entries/day. They pollute the session selector
on small screens and devices like the Rabbit R1.

Changes:
- app-render.helpers.ts
  - isCronSessionKey() — exported helper (exported for tests)
  - countHiddenCronSessions() — counts filterable crons, skips active key
  - resolveSessionOptions() — new hideCron param; skips cron: keys
    unless that key is the currently active session (never drop it)
  - renderCronFilterIcon() — clock SVG with optional badge count
  - renderChatControls() — reads state.sessionsHideCron (default true),
    passes hideCron to resolveSessionOptions, adds toggle button at the
    end of the controls bar showing hidden count as a badge
- app-view-state.ts — adds sessionsHideCron: boolean to AppViewState
- app.ts — @state() sessionsHideCron = true (persists across re-renders)
- app-render.helpers.node.test.ts — tests for isCronSessionKey

* fix(ui): harden cron session filtering and i18n labels

---------

Co-authored-by: FLUX <flux@openclaw.ai>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-01 08:24:14 -06:00
..
public fix: migrate legacy gateway services 2026-01-30 04:01:31 +01:00
src feat(ui): add hide-cron toggle to chat session selector (#26976) 2026-03-01 08:24:14 -06:00
index.html revert(ui): remove UI portions of mixed commits from main 2026-02-22 13:01:22 -06:00
package.json chore: update workspace dependencies 2026-02-21 14:35:13 +01:00
vite.config.ts chore: silence onboard warning noise 2026-02-26 22:47:35 +01:00
vitest.config.ts chore: update deps and add control ui routing tests 2025-12-30 14:30:46 +01:00
vitest.node.config.ts chore: fix vitest standalone configs and update package description (#11865) 2026-02-08 05:24:50 -08:00