Skip to content

fix(rituals): UI/UX debug pass — overview, calendar, crons (cave-v1x6)#3717

Merged
BunsDev merged 1 commit into
mainfrom
fix/rituals-uiux-pass
Jul 23, 2026
Merged

fix(rituals): UI/UX debug pass — overview, calendar, crons (cave-v1x6)#3717
BunsDev merged 1 commit into
mainfrom
fix/rituals-uiux-pass

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 23, 2026

Copy link
Copy Markdown
Member

Autopilot UI/UX debug pass over the Rituals surface (bead cave-v1x6). Bugs were identified by driving a built server with Playwright + seeded data, then fixed and re-verified live.

Overview tab

  1. Log pane displayed future times on past-sorted rows. Rows sort by firedAt ?? updatedAt ?? createdAt but rendered the future fireAt, producing jumbled labels (in 6d, in 2d, in 1d, in 3h…). RitualItemRow gained a timeMode prop; the Log pane passes timeMode="log" and shows the same timestamp it sorts by. Verified live: log rows now read 24m ago / 27m ago… monotonically.
  2. Search dead-end with 0 items. The search input was gated on items.length > 0, so with an empty inbox the search icon vanished entirely (and an active query that filtered to 0 could never be cleared on mobile). Gate removed.
  3. Focus lost after delete. Deleting a reminder only restored focus if the "New reminder" button existed, and deleting a cron never restored focus (button lives in the Crons tab header). Both paths now call focusHeaderAction() which falls back newBtnRef → newCronBtnRef.

Calendar tab

  1. Single-letter shortcuts hijacked system chords. Cmd+M (minimize), Ctrl+D, etc. switched calendar views because the handler ignored modifiers. Each view case now breaks on metaKey/ctrlKey/altKey. Verified live: Cmd+M leaves the view unchanged; plain m still switches to Month.
  2. Month navigation overflowed short months. Stepping from Jan 31 landed on Mar 3 (Date rollover). navigate() month case steps from day 1 and clamps to the target month's last day.
  3. "Show N past items" unreachable. The control only rendered when the agenda was otherwise empty; with future items present there was no way to reveal past ones. It now renders above populated groups too, and the list always sorts ascending. Verified live: "Show 34 past items" appears above today's group.

Crons tab

  1. Detail panel time format diverged from list. The panel used a local helper that switched to absolute dates past 60m while the list uses relativeTimeSigned — same run shown two ways side-by-side. Panel now uses relativeTimeSigned.
  2. Weekly cadence echo in click order. Toggling days echoed "Fri, Mon, Wed" if clicked in that order; now filtered through RRULE_DAY_ORDER (the generated RRULE was already ordered — display-only bug).
  3. Hard-coded colors broke theming/light-mode. Replaced rgba(255,255,255,*) with color-mix(in oklch, var(--foreground) N%, transparent) and raw oklch() literals with semantic tokens (--color-success/warning/danger) across status-icon, schedule-list, cron-detail-panel, cron-detail-primitives, reminder-detail-panel.

Verification

  • Targeted suites green (with the css-source-contract hook where the runner applies it): automations-view, automations-detail-inputs, calendar-view-polish, calendar-keyboard, calendar-agenda-redesign, rituals-tabs, rituals-overview, calendar-actions, inbox-feed-a11y, delete-undo-surfaces, a11y-audit-fixes, github-subscribe-ux, mobile-shell-smoke, offline-work-queue, inbox-calendar-familiar-scope, calendar-view-primitives, calendar-overflow-pill, surface-preferences, pausable-poll-discipline
  • pnpm typecheck clean; full pnpm build clean
  • Live Playwright verification of fixes 1, 4, 6, 7/9 against the built branch
  • New regression pins added in automations-view.test.ts, calendar-view-polish.test.ts, automations-detail-inputs.test.ts

…cave-v1x6)

Overview:
- Log pane rows now show when the item fired (firedAt ?? updatedAt ?? createdAt)
  instead of the future fireAt, so times are monotonic with the sort order
- Search icon no longer disappears when the list is empty (dead-end state)
- Focus returns to the header action button after delete for reminders AND crons
  (previously only the New-reminder path was restored, and never for crons)

Calendar:
- Single-letter view shortcuts (t/d/w/m/a/n) no longer hijack Cmd/Ctrl/Alt chords
  like Cmd+M (minimize) or Ctrl+D
- Month prev/next now clamps to the last day of the target month instead of
  overflowing (Jan 31 -> Mar 3 skip-month bug)
- Agenda view: items always sort ascending; 'Show N past items' control is also
  rendered when future groups exist (was only reachable on an empty agenda)

Crons:
- Detail panel Last/Next run uses the same relative-time formatting as the list
  (was absolute date past 60m, inconsistent side by side)
- Weekly cadence echo lists days in week order (Mon, Wed, Fri) rather than
  click order
- Replaced hard-coded rgba(255,255,255,*) and raw oklch() literals with
  semantic tokens (--foreground color-mix, --color-success/warning/danger)
  across status-icon, schedule-list, cron/reminder detail panels

Verified: targeted test suites + typecheck green; fixes confirmed live via
Playwright against a built server (Cmd+M guard, log-pane times, agenda
past-items control, cron detail badge/relative times).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 23, 2026 18:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

UI/UX debug pass over the Rituals surface to fix several interaction and display bugs across the Overview, Calendar, and Crons tabs, and to align styling with theme tokens (especially for light mode). The PR also adds/extends source-pin tests to prevent regressions in the fixed behaviors.

Changes:

  • Calendar: keep agenda ordering chronological when revealing past items; make “Show past items” reachable even when future groups exist; harden keyboard shortcuts against modified keypresses; clamp month navigation to avoid short-month overflow.
  • Overview/Crons: fix timestamp presentation (log vs scheduled time) and unify cron run time formatting between list and detail panel; order weekly cadence display by week order.
  • Theming: replace hard-coded white/oklch literals with semantic tokens and color-mix(...)-based derived colors across multiple Rituals components; add regression pins in existing test suites.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/calendar-view.tsx Agenda ordering + “show past” control; keyboard shortcut modifier guards; month navigation clamp.
src/components/calendar-view-polish.test.ts Adds pins asserting modifier-guarded shortcuts, month clamp logic, and agenda showPast behavior.
src/components/automations/status-icon.tsx Replaces hard-coded rgba whites with theme-derived color-mix(...) values for status dots.
src/components/automations/schedule-list.tsx Aligns paused indicator styling with theme-derived color-mix(...) tokens.
src/components/automations/ritual-overview.tsx Adds timeMode to render log rows using last-activity time rather than future schedule time.
src/components/automations/reminder-detail-panel.tsx Swaps hard-coded oklch/red hover colors for semantic theme tokens and color-mix(...).
src/components/automations/cron-detail-primitives.tsx Uses semantic success token for “active” summary tile tone.
src/components/automations/cron-detail-panel.tsx Uses relativeTimeSigned for run timestamps; week-orders cadence echo; replaces hard-coded colors with theme tokens.
src/components/automations-view.tsx Fixes focus restoration after deletes across tabs; removes search dead-end gating; passes timeMode="log" for log rows.
src/components/automations-view.test.ts Updates pins for focus-restore helper, overview search gating removal, log-time rendering, and “no hardcoded white rgba” rule.
src/components/automations-detail-inputs.test.ts Adds pins for cron panel relative time formatting, week-ordered cadence echo, and tokenized status colors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1599 to +1601
case "ArrowLeft": if (target.closest('[data-calendar-event="true"], [data-month-cell="true"]')) break; e.preventDefault(); navigate(-1); break;
case "ArrowRight": if (target.closest('[data-calendar-event="true"], [data-month-cell="true"]')) break; e.preventDefault(); navigate(1); break;
case "t": case "T": setAnchor(new Date()); break;
case "d": case "D": setViewMode("day"); break;
case "w": case "W": setViewMode("week"); break;
case "m": case "M": setViewMode("month"); break;
case "a": case "A": setViewMode("agenda"); break;
case "t": case "T": if (e.metaKey || e.ctrlKey || e.altKey) break; setAnchor(new Date()); break;
@BunsDev
BunsDev merged commit b4e1303 into main Jul 23, 2026
16 checks passed
@BunsDev
BunsDev deleted the fix/rituals-uiux-pass branch July 23, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants