Skip to content

Conversation

@hila-f-qodo
Copy link

@hila-f-qodo hila-f-qodo commented Jan 26, 2026

Benchmark PR from qodo-benchmark#716


Open with Devin

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View issue and 4 additional flags in Devin Review.

Open in Devin Review


export type Slot = {
time: string;
userIds?: string[];

Choose a reason for hiding this comment

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

🔴 Type mismatch: Slot.userIds changed from number[] to string[]

The new Slot type in packages/platform/atoms/booker/types.ts has userIds?: string[] but the original type that was removed from packages/trpc/server/routers/viewer/slots/types.ts had userIds?: number[].

Click to expand

Original type (removed from trpc):

export type Slot = {
  time: string;
  userIds?: number[];  // numbers
  ...
};

New type (in atoms):

export type Slot = {
  time: string;
  userIds?: string[];  // strings - INCORRECT
  ...
};

The internal implementation in packages/trpc/server/routers/viewer/slots/util.ts:1362-1367 still uses userIds?: number[], confirming the actual data uses numbers. This type mismatch could cause:

  1. Runtime errors when code expects numbers but receives strings
  2. Incorrect comparisons (e.g., 1 === "1" is false)
  3. Breaking consumers that rely on numeric userIds

Recommendation: Change userIds?: string[] to userIds?: number[] to match the original type definition and the actual data types used in the codebase.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

3 participants