Skip to content

Conversation

@betomoedano
Copy link
Contributor

@betomoedano betomoedano commented Jan 18, 2026

What does this PR do?

  • Added @react-native-community/datetimepicker dependency for native date/time picker functionality.
  • Replaced modal-based date/time picker implementation with DateTimePickerAndroid for improved user experience.
  • Updated RescheduleScreen to utilize the new date/time picker methods, enhancing the selection process and ensuring better styling consistency.
  • Introduced a new LimitsTabDatePicker component utilizing DateTimePickerAndroid for improved date selection on Android.
  • Introduced EditAvailabilityOverrideScreen component to allow users to create and edit availability overrides.

Visual Demo (For contributors especially)

android-picker-demo.mp4

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • reschedule a meeting

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

- Added @react-native-community/datetimepicker dependency for native date/time picker functionality.
- Replaced modal-based date/time picker implementation with DateTimePickerAndroid for improved user experience.
- Updated RescheduleScreen to utilize the new date/time picker methods, enhancing the selection process and ensuring better styling consistency.
- Introduced a new LimitsTabDatePicker component utilizing DateTimePickerAndroid for improved date selection on Android.
- Implemented date parsing and formatting for user-friendly display.
- Enhanced user interaction with a pressable element to open the date picker.
@betomoedano betomoedano marked this pull request as ready for review January 18, 2026 17:00
@betomoedano betomoedano requested a review from a team as a code owner January 18, 2026 17:00
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jan 18, 2026
- Introduced EditAvailabilityOverrideScreen component to allow users to create and edit availability overrides.
- Implemented date and time selection using DateTimePickerAndroid for improved user experience.
- Added functionality to handle existing overrides, including editing and deleting options.
- Enhanced user interaction with clear alerts for success and error states during save operations.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 5 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="companion/components/screens/RescheduleScreen.android.tsx">

<violation number="1" location="companion/components/screens/RescheduleScreen.android.tsx:114">
P2: 90-day reschedule limit removed: native DateTimePicker has no maximumDate, allowing arbitrary future dates</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

setSelectedDateTime(newDate);
}
},
minimumDate: new Date(), // Prevent selecting past dates
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 18, 2026

Choose a reason for hiding this comment

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

P2: 90-day reschedule limit removed: native DateTimePicker has no maximumDate, allowing arbitrary future dates

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At companion/components/screens/RescheduleScreen.android.tsx, line 114:

<comment>90-day reschedule limit removed: native DateTimePicker has no maximumDate, allowing arbitrary future dates</comment>

<file context>
@@ -100,6 +98,40 @@ export const RescheduleScreen = forwardRef<RescheduleScreenHandle, RescheduleScr
+            setSelectedDateTime(newDate);
+          }
+        },
+        minimumDate: new Date(), // Prevent selecting past dates
+      });
+    }, [selectedDateTime]);
</file context>

Fix confidence (alpha): 8/10

Suggested change
minimumDate: new Date(), // Prevent selecting past dates
minimumDate: new Date(), // Prevent selecting past dates
maximumDate: new Date(Date.now() + 90 * 24 * 60 * 60 * 1000), // Limit to next 90 days
Fix with Cubic

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="companion/components/screens/EditAvailabilityOverrideScreen.android.tsx">

<violation number="1" location="companion/components/screens/EditAvailabilityOverrideScreen.android.tsx:110">
P2: Unavailable override misdetected when API returns times with seconds, blocking save due to failed time validation</violation>

<violation number="2" location="companion/components/screens/EditAvailabilityOverrideScreen.android.tsx:258">
P2: Editing an override skips the duplicate-date check, allowing two overrides for the same date</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

setSelectedDate(dateStringToDate(override.date ?? ""));
const start = override.startTime ?? "00:00";
const end = override.endTime ?? "00:00";
setIsUnavailable(start === "00:00" && end === "00:00");
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 18, 2026

Choose a reason for hiding this comment

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

P2: Unavailable override misdetected when API returns times with seconds, blocking save due to failed time validation

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At companion/components/screens/EditAvailabilityOverrideScreen.android.tsx, line 110:

<comment>Unavailable override misdetected when API returns times with seconds, blocking save due to failed time validation</comment>

<file context>
@@ -0,0 +1,449 @@
+        setSelectedDate(dateStringToDate(override.date ?? ""));
+        const start = override.startTime ?? "00:00";
+        const end = override.endTime ?? "00:00";
+        setIsUnavailable(start === "00:00" && end === "00:00");
+        setStartTime(timeStringToDate(start === "00:00" ? "09:00" : start));
+        setEndTime(timeStringToDate(end === "00:00" ? "17:00" : end));
</file context>
Fix with Cubic


if (isEditing && overrideIndex !== undefined) {
// Update existing override
newOverrides[overrideIndex] = newOverride;
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 18, 2026

Choose a reason for hiding this comment

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

P2: Editing an override skips the duplicate-date check, allowing two overrides for the same date

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At companion/components/screens/EditAvailabilityOverrideScreen.android.tsx, line 258:

<comment>Editing an override skips the duplicate-date check, allowing two overrides for the same date</comment>

<file context>
@@ -0,0 +1,449 @@
+
+    if (isEditing && overrideIndex !== undefined) {
+      // Update existing override
+      newOverrides[overrideIndex] = newOverride;
+    } else {
+      // Check if date already exists
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Created by Linear-GitHub Sync size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant