Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix activity date picker dismissal (#6539)

Ezra Ellettebf0de7eefbf9
diff --git a/apps/screenpipe-app-tauri/components/activity-ledger.test.tsx b/apps/screenpipe-app-tauri/components/activity-ledger.test.tsx
index d94b20fd9..ddf551131 100644
--- a/apps/screenpipe-app-tauri/components/activity-ledger.test.tsx
+++ b/apps/screenpipe-app-tauri/components/activity-ledger.test.tsx
@@ -1476,20 +1476,6 @@ describe("ActivityLedger", () => {
fireEvent.click(
await screen.findByRole("option", { name: "Custom range" }),
);
- fireEvent.click(
- screen.getByRole("button", { name: "Choose custom date range" }),
- );
-
- expect(
- screen.getByRole("button", { name: "Choose custom date range" }),
- ).toHaveAttribute("aria-expanded", "true");
- fireEvent.click(screen.getByRole("gridcell", { name: "16", exact: true }));
- await waitFor(() =>
- expect(
- screen.getByRole("button", { name: "Choose custom date range" }),
- ).toHaveAttribute("aria-expanded", "false"),
- );
-
fireEvent.click(
screen.getByRole("combobox", { name: "Time range: Custom range" }),
);
diff --git a/apps/screenpipe-app-tauri/components/activity-ledger.tsx b/apps/screenpipe-app-tauri/components/activity-ledger.tsx
index 48fb4c983..7b64b1251 100644
--- a/apps/screenpipe-app-tauri/components/activity-ledger.tsx
+++ b/apps/screenpipe-app-tauri/components/activity-ledger.tsx
@@ -1341,7 +1341,6 @@ export function ActivityLedger({
const [customDateRange, setCustomDateRange] = useState<DateRange | undefined>(
() => selectedDateRange(customStart, customEnd),
);
- const [customCalendarOpen, setCustomCalendarOpen] = useState(false);
const [summary, setSummary] = useState<ActivitySummaryResponse | null>(null);
const [meetings, setMeetings] = useState<ActivityReviewMeeting[]>([]);
const [ledgerIntervals, setLedgerIntervals] = useState<
@@ -1822,7 +1821,6 @@ Re-query Screenpipe only inside the cited time range and use the cited frames an
value={preset}
onValueChange={(value) => {
const nextPreset = value as RangePreset;
- setCustomCalendarOpen(false);
setPreset(nextPreset);
posthog.capture("activity_range_changed", {
range: nextPreset,
@@ -1903,10 +1901,7 @@ Re-query Screenpipe only inside the cited time range and use the cited frames an
{preset === "custom" ? (
<div className="mt-4 flex justify-end">
- <Popover
- open={customCalendarOpen}
- onOpenChange={setCustomCalendarOpen}
- >
+ <Popover>
<PopoverTrigger asChild>
<Button
variant="outline"
@@ -1934,7 +1929,6 @@ Re-query Screenpipe only inside the cited time range and use the cited frames an
setCustomEnd(
toLocalInputValue(endOfSelectedDay(nextRange.to, now)),
);
- setCustomCalendarOpen(false);
}}
defaultMonth={customDateRange?.from}
disabled={{ after: new Date() }}