Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(calendar): decouple mini calendar navigation (#9240)

dev-rb5b64a86e5585
diff --git a/apps/web/src/features/calendar-view/components/CalendarSidebar.tsx b/apps/web/src/features/calendar-view/components/CalendarSidebar.tsx
index 3c2dac2252..68fc003842 100644
--- a/apps/web/src/features/calendar-view/components/CalendarSidebar.tsx
+++ b/apps/web/src/features/calendar-view/components/CalendarSidebar.tsx
@@ -27,16 +27,7 @@ import { Key } from '@solid-primitives/keyed';
import { Button, Checkbox, cn, Calendar as MiniCalendar } from '@ui';
import { tourTarget } from '@ui/components/Tour';
import { format } from 'date-fns';
-import {
- createEffect,
- createMemo,
- createSignal,
- For,
- Match,
- on,
- Show,
- Switch,
-} from 'solid-js';
+import { createMemo, createSignal, For, Match, Show, Switch } from 'solid-js';
import { CalendarCallSidebar } from '../calendar-call-sidebar';
import { useCalendarFocus } from '../calendar-focus-target';
import { CALENDAR_TOUR } from '../tour';
@@ -52,9 +43,7 @@ import { ConnectCalendarsPromotion } from './ConnectCalendarsPromotion';
function CalendarMiniCalendar() {
const calendarView = useCalendarView();
const calendarPager = useCalendarPager();
- const shell = useViewShell();
const initialDate = new Date();
- const [focusedDay, setFocusedDay] = createSignal(initialDate);
const currentDate = createMemo(
() => calendarPager.activeDateInfo()?.view.calendar.getDate() ?? initialDate
@@ -65,32 +54,15 @@ function CalendarMiniCalendar() {
return { end: dateInfo.end, start: dateInfo.start };
});
- const navigateToDate = (date: Date) => {
- setFocusedDay(date);
- calendarPager.gotoDate(date);
- if (shell.aside.isOverlay()) shell.aside.collapse();
- };
- const navigateMonth = (month: Date) => {
- const focused = focusedDay();
- const sameMonth =
- focused.getFullYear() === month.getFullYear() &&
- focused.getMonth() === month.getMonth();
- navigateToDate(sameMonth ? focused : month);
- };
- createEffect(on(currentDate, setFocusedDay));
-
+ // Month browsing and keyboard focus stay local to the mini calendar.
return (
<MiniCalendar
required
fixedWeeks
startOfWeek={calendarView.displaySettings.weekStartsOn}
value={currentDate()}
- month={currentDate()}
- focusedDay={focusedDay()}
highlightedRange={highlightedRange()}
- onMonthChange={navigateMonth}
- onFocusedDayChange={setFocusedDay}
- onValueChange={(date) => date && navigateToDate(date)}
+ onValueChange={(date) => date && calendarPager.gotoDate(date)}
/>
);
}
diff --git a/docs/agent-guide/calendar.md b/docs/agent-guide/calendar.md
index e87e32d36e..bcc719012f 100644
--- a/docs/agent-guide/calendar.md
+++ b/docs/agent-guide/calendar.md
@@ -468,7 +468,11 @@ icon button. Desktop `New` keeps its label.
Touch devices keep the month selector and header controls without separate
create or call buttons in the right island. Mobile header islands omit Search.
The desktop sidebar's Search icon sits left of collapse and reveals event search
-above New. Its mini calendar remains navigable by date and month.
+above New. Its mini calendar browses months independently of the main grid:
+month arrows, the month picker, and keyboard focus changes do not move the main
+calendar. Selecting a day navigates the main calendar without closing the narrow
+layout's navigation overlay. Main calendar navigation updates the mini calendar's
+selected day and week highlight without resetting the month being browsed.
Active Quick Calls you created, participated in, or were invited to appear above your
next five events (including ones in progress), whether or not they have call links.