* se organizer default app
* nit
* Add tests: packages/features/bookings/lib/handleNewBooking/getBookingData.test.ts
Generated by Paragon from proposal for PR #27620
* Replace n x m array functions with maps
* feat: add attributeIds filter to findManyByOrgMembershipIds
Allow filtering attribute-to-user assignments by specific attribute IDs.
This enables querying only the attributes needed for a routing rule
instead of fetching all attributes for all team members.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: extract attribute IDs from routing rules and filter queries
Add extractAttributeIdsFromQueryValue helper to parse routing rules
and identify which attributes are referenced. Pass these IDs through
getAttributesAssignmentData to _queryAllData to only fetch the
attribute assignments that are actually needed for evaluation.
For a team with 785 members and 14 attributes, if a routing rule
only references 2-3 attributes, this reduces the query from ~3500
rows to ~500 rows.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: use attribute filtering in findTeamMembersMatchingAttributeLogic
Extract attribute IDs from the routing rules (main + fallback) and
pass them to getAttributesForLogic to only fetch necessary data.
This completes the optimization to reduce database load when
evaluating routing rules that only reference a subset of attributes.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: filter attributes query by attribute IDs
Also filter the attributes query (not just attributeToUser assignments)
by the attribute IDs referenced in routing rules.
For a routing rule that references 2 out of 14 attributes with 6524
total options, this reduces:
- Attributes fetched: 14 → 2
- Options fetched: 6524 → ~930 (proportional reduction)
- Fewer regex replacements in replaceAttributeOptionIdsWithOptionLabel
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test: add comprehensive test coverage for attribute routing query optimization
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
* Revert "Replace n x m array functions with maps"
This reverts commit 312eeb03bd1aba19760f093c798861a23b5fc66f.
* fix: re-establish extractAttributeIdsFromQueryValue mock after resetAllMocks
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-02-04 11:28:46 -05:00
Keith WilliamsGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: optimize myStats tRPC call to only trigger when Intercom is enabled
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: fetch myStats on-demand when Intercom session is created, not upfront
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* chore: remove unnecessary comments
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat: skip platform billing for non-platform-managed users in 2024-08-13 API
- Add isPlatformManaged check in billBooking() to skip billing for regular users
- Add isPlatformManaged check in billRescheduledBooking() to skip billing for regular users
- Add isPlatformManagedUserBooking check in cancelBooking() to skip billing cancellation for regular users
- Add E2E tests to verify billing behavior for both regular and platform-managed users
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* refactor: reuse booking data for isPlatformManaged instead of fetching user
- Capture isPlatformManagedUserBooking from raw booking data returned by regularBookingService.createBooking() and recurringBookingService.createBooking()
- Pass the flag through the output booking objects
- Update billBooking() and billRescheduledBooking() to use the flag instead of fetching user from database
- Matches the pattern used in 2024-04-15 controller
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: skip platform billing in booking service for non platform
* fix: use double negation for boolean type safety in isPlatformManagedUserBooking
Co-Authored-By: morgan@cal.com <morgan@cal.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: ensure default calendars
* test: add E2E tests for delegation credential controller and update tasker config
- Add E2E tests to verify ensureDefaultCalendars is called when enabling delegation credentials
- Update calendars tasker config to use medium-1x machine for retry on OOM
- Set minimum retry backoff to 60 seconds (1 minute between retries)
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: update tasker config to use small-2x machine with outOfMemory retry on medium-1x
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: update E2E tests to properly spy on service instance and use valid workspace platform slug
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* ci: add CALCOM_SERVICE_ACCOUNT_ENCRYPTION_KEY to E2E API v2 workflow
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: add encryption key to E2E test file for delegation credentials
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* revert: remove CALCOM_SERVICE_ACCOUNT_ENCRYPTION_KEY from workflow (moved to test file)
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: move encryption key to setEnvVars.ts for E2E tests
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: use valid format for service account encryption key
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: encrypt service account key in E2E test for delegation credentials
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: mock updateDelegationCredentialEnabled to bypass Google API call in E2E tests
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: get service from app.get() after initialization for proper spy setup in E2E tests
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: use jest.mock() to mock toggleDelegationCredentialEnabled and bypass Google API calls in E2E tests
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: use Service.prototype pattern for spying on ensureDefaultCalendars in E2E tests
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: move spy setup to beforeAll before app.init() for proper NestJS interception
Co-Authored-By: morgan@cal.com <morgan@cal.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat(api-v2): add GET /v2/bookings/by-seat/{seatUid} endpoint
- Add new endpoint to retrieve a booking by its seat reference UID
- Add getByReferenceUidIncludeBookingWithAttendeesAndUserAndEvent method to BookingSeatRepository
- Add getBookingBySeatUid method to BookingsService
- Add e2e tests for the new endpoint
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: use Object.prototype.hasOwnProperty.call for ES compatibility in e2e tests
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: use select instead of include in BookingSeatRepository for security and performance
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: add teamId and userId to eventType select for access check
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: return seatUid attendee when not admin and seatsShowAttendees is false
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: use select for eventType in repository and fetch full eventType for access check
Co-Authored-By: morgan@cal.com <morgan@cal.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* users not joining org/team
* fix: address Cubic AI review feedback for E2E tests
- Replace waitForURL with expect(page).toHaveURL() for fail-fast URL checks
- Replace Prisma include with select to fetch only needed fields
Both issues had confidence score 9/10 from Cubic AI review.
Co-Authored-By: unknown <>
* fix: add select to Prisma query in getServerSideProps
Address Cubic AI review feedback - use select to fetch only the id field
instead of retrieving all user columns, following project guidelines to
avoid over-fetching and exposing sensitive data.
Co-Authored-By: unknown <>
* refactor: remove comments from newly added E2E tests
Clean up the E2E tests by removing unnecessary comments as requested.
Co-Authored-By: unknown <>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: avatar URL breaking for team/orgs in booker embed
* fix: api v2 breaking because of type mismatch
* fix: atoms build
* chore: implement PR feedback
The checkout step deletes the review-context.json file that was extracted
from the artifact. The 'Post comment with Devin session link' step was
trying to read this file after checkout, causing ENOENT errors.
Fixed by using the PR number from the extract-prompt step output instead
of reading the deleted file.
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat: add GitHub workflows to sync agents/ to Devin Knowledge
- Add parse-to-devin-knowledge.ts to convert agents/ markdown to Devin Knowledge JSON
- Add validate-format.ts to validate rules have frontmatter and knowledge-base sections start with 'When...'
- Add sync-to-devin.ts to sync knowledge entries to Devin API
- Add export-devin-knowledge.sh to backup existing Devin knowledge
- Add validate-agents-format.yml workflow to validate format on PRs
- Add sync-agents-to-devin.yml workflow to sync on merge to main
- Add devin-knowledge.json to .gitignore (generated file)
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* fix: use tsx instead of ts-node for better ESM support in CI
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* docs: add missing knowledge entries from Devin backup
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* refactor: move agents scripts to scripts/ folder
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* refactor: rename scripts to devin-knowledge-* for clarity
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* refactor: move scripts to scripts/devin/ with clearer names
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* rename DEVIN_API_TOKEN to DEVIN_API_KEY
* docs: fix usage comment script path
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* fix: remove folder creation from sync script (API doesn't support it)
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* fix: add -S flag to shebang for proper env execution
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* use pull_request_target
* fix: add -S flag to shebang in sync-knowledge-to-devin.ts for proper env execution
Co-Authored-By: unknown <>
* restructure workflows
* refactor: consolidate agent docs and split knowledge-base into modular rules
- Delete knowledge-base.md, migrate content to 17 new rule files
- Delete coding-standards.md (content duplicated in AGENTS.md and rules)
- Add ci- and reference- prefixes to rules/_sections.md
- Update AGENTS.md to reference new rule files
- Update agents/README.md as rules index
- Clean up parse-local-knowledge.ts (remove deleted file references)
New rule files:
- testing-playwright, testing-mocking, testing-timezone
- ci-check-failures, ci-type-check-first, ci-git-workflow
- data-prisma-migrations, data-prisma-feature-flags
- quality-error-handling, quality-imports, quality-pr-creation, quality-code-comments
- architecture-features-modules
- patterns-workflow-triggers, patterns-app-store
- reference-file-locations, reference-local-dev
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Revert "refactor: consolidate agent docs and split knowledge-base into modular rules"
This reverts commit 8251b6b214c7c01a3bfe2137c6aa9292dd72427e.
* refactor: reorganize agent docs - extract coding rules, keep domain knowledge
- Slim down knowledge-base.md (356 → 96 lines) to domain knowledge only
- Add Business rules section (managed events, orgs/teams, OAuth clients)
- Delete coding-standards.md (content moved to rules)
- Create 19 new rule files for coding guidelines:
- quality-*: PR creation, error handling, imports, comments, code review
- testing-*: playwright, mocking, timezone, incremental
- ci-*: check failures, type-check-first, git workflow
- data-prisma-*: migrations, feature flags
- patterns-*: workflow triggers, app store
- architecture-features-modules, reference-file-locations, reference-local-dev
- Update agents/README.md as rules index (43 total rules)
- Update _sections.md with CI/CD and Reference sections
- Clean up parse-local-knowledge.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: rename knowledge-base sections to start with "When..."
Update section headers to pass validation rules:
- "Business Rules" → "When working with managed events, organizations, or OAuth clients"
- "Product & Codebase Knowledge" → "When you need product or codebase context"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: split knowledge-base business rules into separate sections
Split the combined "When working with managed events, organizations, or OAuth clients"
section into three distinct ## sections for better Devin triggering:
- When working with managed event types
- When working with organizations and teams
- When working with OAuth clients
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: simplify trigger description logic in parse-local-knowledge.ts
Since validate-local-knowledge.ts enforces that all section titles must start
with "When...", we can remove the manual fallback logic and just use the
title directly as the trigger description.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: simplify knowledge-base section validation
Simplify the validation to only check that section titles start with "When..."
since we've standardized on that pattern. Remove the special cases for error,
file naming, PR, and repo note sections.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add script to delete all Devin knowledge entries
Add delete-all-devin-knowledge.ts script that:
- Lists all knowledge entries before deletion
- Requires interactive confirmation (Y) to proceed
- Blocks execution in non-TTY environments (CI, piped input)
- Shows progress while deleting entries
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: add API reference links to delete-all-devin-knowledge script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: replace NOW() with CURRENT_TIMESTAMP in feature flag migration example
Co-Authored-By: unknown <>
* add -S
* docs: consolidate agent documentation and add AI setup guide
- Remove duplicated Project Structure & Tech Stack from agents/README.md
- Condense Commands section in AGENTS.md, link to agents/commands.md
- Add AI-Assisted Development section to root README.md explaining
the agents/ folder structure and symlink configuration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: remove incorrect CLAUDE.md symlink claim from README
Co-Authored-By: unknown <>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* test: add e2e tests for team filter in bookings list
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: replace text locators with data-testid selectors in team filter tests
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: apply formatting to resolved merge conflict
Co-Authored-By: unknown <>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-02-03 11:54:38 -03:00
Keith WilliamsGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Use workflow_run pattern to enable the Cubic AI to Devin review workflow
for PRs from external forks. The pull_request_review event doesn't have
access to secrets when triggered from forks, so we split into two workflows:
1. cubic-devin-review-trigger.yml - Lightweight workflow that triggers on
pull_request_review and saves the review context as an artifact
2. cubic-devin-review.yml - Main workflow that triggers on workflow_run,
downloads the artifact, and processes it with full permissions/secrets
This follows the same pattern used by on-changes-requested.yml and re-draft.yml.
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* refactor: consolidate agent config folders into agents directory
- Move .claude/skills and .claude/rules content to agents/
- Remove duplicate .cursor/ and .goose/ folders
- Create symlinks from .claude/ and .cursor/ to agents/
- Convert review.mdc to quality-review-checklist.md with proper frontmatter
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* feat: add Cal.com APIv2 skills to agents directory
Move the Cal.com API v2 skills from PR #27445 into the consolidated
agents/skills/ directory structure. This includes:
- SKILL.md - Main skill file with API overview
- references/authentication.md - Authentication methods
- references/bookings.md - Bookings API reference
- references/calendars.md - Calendars API reference
- references/event-types.md - Event types API reference
- references/schedules.md - Schedules API reference
- references/slots-availability.md - Slots and availability API reference
- references/webhooks.md - Webhooks API reference
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* fix: update calcom-api skill to use Claude Code frontmatter format
Remove non-standard frontmatter fields (license, metadata) and keep only
the Claude Code supported fields (name, description) as per the
Claude Code skills specification.
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* refactor: restructure calcom-api SKILL.md as index file
Convert SKILL.md from a comprehensive API doc (317 lines) to a concise
index file (108 lines) that references the detailed documentation in
the references/ folder. This follows the Claude Code skills pattern of
keeping SKILL.md focused with supporting files for detailed content.
The SKILL.md now:
- Provides a quick start guide with essential examples
- References all 7 detailed reference docs in a table
- Lists common workflows and best practices
- Points to external resources
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
* docs: preserve deleted content in reference files
Move content that was removed from SKILL.md to appropriate reference files:
- Add Error Handling and Pagination sections to authentication.md
- Add Organization endpoints to event-types.md
- Add Core Concepts section back to SKILL.md
This ensures no useful API documentation is lost during the restructuring.
Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-02-03 14:14:41 +01:00
Joe Au-YeungGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat: skip platform billing for non-platform-managed users
- Add isPlatformManaged to user select in saveBooking and findBookingQuery
- Update 2024-04-15 booking controller to check isPlatformManaged before billing
- Update 2024-08-13 bookings service billBooking methods to check isPlatformManaged
- Update buildDryRunBooking to include isPlatformManaged in user object
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* test: update buildDryRunBooking test to include uuid and isPlatformManaged fields
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* refactor: simplify to only check isPlatformManaged in normal booking flow
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* test: add E2E tests for billing behavior based on isPlatformManaged flag
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: only trigger platform billing for platform user bookingd
* test: add E2E tests for cancel and recurring booking billing behavior
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: correct expected status code for cancel booking endpoint (201 instead of 200)
Co-Authored-By: morgan@cal.com <morgan@cal.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-02-03 12:51:29 +02:00
Hariom BalharaGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: clear oversized images from onboarding store during migration
This fixes the 429 errors caused by large images stored in IndexedDB
before PR #27285 added cropping functionality.
Changes:
- Add version 1 to zustand persist config with migration function
- Migration clears images exceeding thresholds:
- Logos/avatars: 500KB (properly cropped are ~50-150KB)
- Banners: 1.5MB (properly cropped are ~200-500KB)
- Add comprehensive tests for migration logic
When users refresh the page, the migration runs automatically and
clears any oversized images, requiring them to re-upload using the
new cropping flow.
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* fixes
* chore: remove migration test file
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* show personal credits even if on team plan
* show personal credits even when on teams plan
* fix learn more link
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2026-02-03 10:02:14 +01:00
MorganGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Skip retrying and alerting for temp/sandbox subscription IDs
- Skip retrying and alerting for non-usage-based subscriptions
- Log expected errors at info level instead of error level
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat: add proration invoice and reminder email templates
Add email templates for monthly proration billing notifications:
- ProrationInvoiceEmail: Sent when invoice is created for additional seats
- ProrationReminderEmail: Sent 7 days later if invoice remains unpaid
Includes:
- React email templates using V2BaseEmailHtml
- BaseEmail classes for rendering
- Billing email service functions
- Translation keys for email content
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: add tasker integration for proration email notifications
Add task handlers for proration billing email flow:
- sendProrationInvoiceEmail: Sends invoice email and schedules reminder
- sendProrationReminderEmail: Sends reminder if invoice still unpaid
- cancelProrationReminder: Cancels scheduled reminder on payment success
The calling job should trigger these tasks after:
1. MonthlyProrationService.createProrationForTeam() succeeds with invoice
2. handleProrationPaymentSuccess() is called (to cancel reminder)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat: i18n + feedback from cubic + morgan
* fix: use default tasker import instead of non-existent getTasker
Co-Authored-By: unknown <>
* fix: add trigger tasks plus DI
* use for await
* fix query
* fix: remove duplicate JOIN alias in findTeamMembersWithPermission query
The raw SQL query had two INNER JOINs using the same alias 'u':
- INNER JOIN "users" u ON m."userId" = u.id
- INNER JOIN "User" u ON m."userId" = u.id
This would cause a SQL error at runtime. Removed the duplicate JOIN
with incorrect table name ("User" instead of "users").
Fixes issue identified by Cubic AI review.
Co-Authored-By: unknown <>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>