Skip to content

Commit 7519880

Browse files
tyler-daneclaude
andauthored
fix(web): name the local calendar "Compass" to match the server (#2171)
The client synthesized the anonymous/offline calendar as "Local" while the backend ensureLocalCalendar names it "Compass", so the sidebar row renamed itself from "Local" to "Compass" the moment an anonymous user signed up. Align the client on "Compass". isPrimary is intentionally left as-is (the client sentinel is primary because it is the only calendar; the server sets it false so a connected Google primary keeps that role). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 370c284 commit 7519880

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

packages/web/src/calendars/local-calendar.sentinel.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export function getLocalCalendarSentinelId(): CalendarId {
3131
export function synthesizeLocalCalendar(id: CalendarId): Calendar {
3232
return {
3333
id,
34-
name: "Local",
34+
// Matches the server's ensureLocalCalendar name so the sidebar row doesn't
35+
// rename itself from "Local" to "Compass" when an anonymous user signs up.
36+
name: "Compass",
3537
description: "",
3638
timeZone: null,
3739
foregroundColor: "#000000",

packages/web/src/components/PlannerSidebar/PlannerCalendarList/PlannerCalendarList.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ describe("PlannerCalendarList", () => {
150150
// The anonymous synthesized local calendar is isPrimary, but must not be
151151
// relabeled "primary" - the header shows "Temporary account", not its name.
152152
const local = makeCalendar({
153-
name: "Local",
153+
name: "Compass",
154154
provider: "local",
155155
isPrimary: true,
156156
});
157157

158158
renderCalendarList([local], { authenticated: false });
159159

160-
expect(screen.getByText("Local")).toBeInTheDocument();
160+
expect(screen.getByText("Compass")).toBeInTheDocument();
161161
expect(screen.queryByText("primary")).not.toBeInTheDocument();
162162
expect(screen.queryByRole("button")).not.toBeInTheDocument();
163163
});

0 commit comments

Comments
 (0)