refactor(bookings): add round-robin host effective-limits foundation#28760
Closed
deepshekhardas wants to merge 2 commits intocalcom:mainfrom
Closed
refactor(bookings): add round-robin host effective-limits foundation#28760deepshekhardas wants to merge 2 commits intocalcom:mainfrom
deepshekhardas wants to merge 2 commits intocalcom:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
2 issues found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/features/ee/round-robin/RoundRobinHostLimitsService.ts">
<violation number="1" location="packages/features/ee/round-robin/RoundRobinHostLimitsService.ts:49">
P2: Falsely treating `limit = 0` as "no limit" due to a falsy check allows unlimited capacity when a zero limit should mean no bookings allowed.</violation>
</file>
<file name="apps/web/modules/bookings/columns/filterColumns.ts">
<violation number="1" location="apps/web/modules/bookings/columns/filterColumns.ts:138">
P2: Newly added UTM header translation keys are referenced but missing in locale resources, causing fallback/raw key rendering in the UI.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
| const window = config?.window ?? null; | ||
|
|
||
| // If no limit is set, host has unlimited capacity | ||
| if (!limit || !window) { |
Contributor
There was a problem hiding this comment.
P2: Falsely treating limit = 0 as "no limit" due to a falsy check allows unlimited capacity when a zero limit should mean no bookings allowed.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/features/ee/round-robin/RoundRobinHostLimitsService.ts, line 49:
<comment>Falsely treating `limit = 0` as "no limit" due to a falsy check allows unlimited capacity when a zero limit should mean no bookings allowed.</comment>
<file context>
@@ -0,0 +1,225 @@
+ const window = config?.window ?? null;
+
+ // If no limit is set, host has unlimited capacity
+ if (!limit || !window) {
+ results.push({
+ userId,
</file context>
Suggested change
| if (!limit || !window) { | |
| if (limit == null || window == null) { |
| }), | ||
| columnHelper.accessor((row) => (row.type === "data" ? row.booking.utmSource : null), { | ||
| id: "utmSource", | ||
| header: t("utm_source"), |
Contributor
There was a problem hiding this comment.
P2: Newly added UTM header translation keys are referenced but missing in locale resources, causing fallback/raw key rendering in the UI.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/modules/bookings/columns/filterColumns.ts, line 138:
<comment>Newly added UTM header translation keys are referenced but missing in locale resources, causing fallback/raw key rendering in the UI.</comment>
<file context>
@@ -128,5 +133,64 @@ export function buildFilterColumns({ t, permissions, status }: BuildFilterColumn
}),
+ columnHelper.accessor((row) => (row.type === "data" ? row.booking.utmSource : null), {
+ id: "utmSource",
+ header: t("utm_source"),
+ enableColumnFilter: true,
+ enableSorting: false,
</file context>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #28715
Summary
Foundation implementation for per-member round-robin booking limits. This PR establishes the service structure without changing current booking behavior.
Changes
Time Windows Supported
Structure
Next Steps
Future PR will:
Testing