Skip to content

feat: Troubleshooter atom#27497

Merged
PeerRich merged 27 commits intomainfrom
troubleshooter-atom
Feb 6, 2026
Merged

feat: Troubleshooter atom#27497
PeerRich merged 27 commits intomainfrom
troubleshooter-atom

Conversation

@Ryukemeister
Copy link
Copy Markdown
Contributor

@Ryukemeister Ryukemeister commented Feb 2, 2026

What does this PR do?

Adds a new Troubleshooter atom to inspect availability by event type, with a sidebar (event type selection, schedule info, connected calendars) and a large calendar view. Also exposes atoms APIs and hooks to power the experience in platform apps and the example site.

Visual Demo

troubleshooter.atom.mov

Changes made

  • New Features

    • TroubleshooterPlatformWrapper with sidebar (EventTypeSelect, EventScheduleItem, CalendarToggleContainer) and LargeCalendar.
    • New atoms endpoints: GET /atoms/event-types/list-with-team and GET /atoms/schedules/event-type/:eventSlug.
    • New platform hooks: useEventTypesList and useScheduleByEventSlug.
    • Exported TroubleShooter from @calcom/atoms and added /troubleshooter example page with navbar link.
    • LargeCalendar supports event type views via teamId or username + eventSlug.
  • Refactors

    • Componentized EventTypeSelect, EventScheduleItem, and CalendarToggleContainer for reuse; added prop-driven variants.
    • Troubleshooter store now includes username on the selected event.
    • Reorganized atoms index exports; CalendarToggleContainer supports optionally hiding the "Manage calendars" button.
    • Exposed listWithTeamHandler and getScheduleByEventSlugHandler via platform libraries and narrowed TRPC handler ctx types.

Updates since last revision

  • Localized "Event Type" label with t("event_type") in EventTypeSelectComponent.tsx (addressing Cubic AI review feedback)

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. N/A - no documentation changes required.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Navigate to the /troubleshooter page in the platform examples app
  2. Verify the Event Type dropdown displays with a localized label
  3. Select different event types and verify the schedule and calendar information updates accordingly
  4. Verify the LargeCalendar displays availability correctly

Human Review Checklist

  • Verify the localization change in EventTypeSelectComponent.tsx correctly uses the existing event_type translation key
  • Note: Type check CI failure is pre-existing (in BillingCredits.tsx) and unrelated to this PR's changes

Link to Devin run: https://app.devin.ai/sessions/01b6449f291a493cb845a288df90f11b
Requested by: unknown ()


Open with Devin

@Ryukemeister Ryukemeister requested review from a team as code owners February 2, 2026 09:30
@graphite-app graphite-app bot added core area: core, team members only consumer labels Feb 2, 2026
Copy link
Copy Markdown
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.

3 issues found across 25 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="packages/platform/atoms/troubleshooter/wrappers/TroubleshooterPlatformWrapper.tsx">

<violation number="1" location="packages/platform/atoms/troubleshooter/wrappers/TroubleshooterPlatformWrapper.tsx:28">
P2: The mobile branch sets a misspelled CSS variable (--troublehooster-meta-width), but the grid reads --troubleshooter-meta-width. This prevents the mobile width override from taking effect, leading to an undefined column width on mobile.</violation>

<violation number="2" location="packages/platform/atoms/troubleshooter/wrappers/TroubleshooterPlatformWrapper.tsx:49">
P3: Tailwind negative margin utility is malformed (`ml[-1px]`), so the margin won’t apply. Use `ml-[-1px]` instead.</violation>
</file>

<file name="packages/platform/examples/base/src/pages/troubleshooter.tsx">

<violation number="1" location="packages/platform/examples/base/src/pages/troubleshooter.tsx:7">
P2: Rule violated: **Enforce Singular Naming for Single-Item Functions**

Rename the single-item function to a singular name to comply with the singular naming rule (e.g., "Calendar" or "Troubleshooter").</violation>
</file>

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

@PeerRich PeerRich enabled auto-merge (squash) February 2, 2026 09:45
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 2, 2026

Devin AI is addressing Cubic AI's review feedback

A Devin session has been created to address the issues identified by Cubic AI.

View Devin Session

@devin-ai-integration
Copy link
Copy Markdown
Contributor

I've reviewed the Cubic AI feedback and addressed the issues based on their confidence scores (only fixing issues with confidence 9/10 or higher):

Fixed (confidence 9/10):

  • Renamed the Calendars function to Troubleshooter in packages/platform/examples/base/src/pages/troubleshooter.tsx to comply with the singular naming convention. Also updated the data-testid from calendars-settings-atom to troubleshooter-atom for consistency, and removed the unused CalendarSettings import.

Skipped (confidence below 9/10):

  • CSS variable typo --troublehooster-meta-width (confidence 8/10)
  • Malformed Tailwind class ml[-1px] (confidence 7/10)

These lower-confidence issues may warrant manual review by the PR author to determine if they are valid concerns.

Copy link
Copy Markdown
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.

3 issues found across 12 files (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="packages/features/troubleshooter/components/EventTypeSelectComponent.tsx">

<violation number="1" location="packages/features/troubleshooter/components/EventTypeSelectComponent.tsx:91">
P3: Localize this label with t() instead of a hardcoded string so it participates in translations.</violation>
</file>

<file name="packages/features/troubleshooter/components/EventScheduleItemComponent.tsx">

<violation number="1" location="packages/features/troubleshooter/components/EventScheduleItemComponent.tsx:21">
P2: Localize the label text with `t()` instead of hardcoding English to comply with the localization requirement.</violation>
</file>

<file name="packages/features/troubleshooter/components/CalendarToggleContainerComponent.tsx">

<violation number="1" location="packages/features/troubleshooter/components/CalendarToggleContainerComponent.tsx:140">
P3: Localize the "Nameless Calendar" fallback with `t()` (add a translation key if one doesn’t already exist).</violation>
</file>

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 3, 2026

Devin AI is addressing Cubic AI's review feedback

A Devin session has been created to address the issues identified by Cubic AI.

View Devin Session

@Ryukemeister Ryukemeister dismissed ThyMinimalDev’s stale review February 3, 2026 12:30

implemented feedback but I need to test this again, since atoms build is blocked we cant lets this go in now. need to wait now.

@paragon-review
Copy link
Copy Markdown

paragon-review bot commented Feb 4, 2026

Paragon: tests updated

1 updated test generated for this PR.

Updated Tests

  • listWithTeamHandler - should return user's own event types and event types of teams they are a member of — Adding new test to existing file

Accept Changes Open in Paragon

Details

Updated Tests

  • listWithTeamHandler - should return user's own event types and event types of teams they are a member of (integration)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 4, 2026

E2E results are ready!

@Ryukemeister Ryukemeister added ready-for-e2e run-ci Approve CI to run for external contributors labels Feb 5, 2026
Copy link
Copy Markdown
Contributor

@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 5 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@ThyMinimalDev ThyMinimalDev left a comment

Choose a reason for hiding this comment

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

well done

@PeerRich PeerRich merged commit 8a17ebc into main Feb 6, 2026
51 of 52 checks passed
@PeerRich PeerRich deleted the troubleshooter-atom branch February 6, 2026 15:34
LEFT JOIN "public"."Team" AS "j1" ON ("j1"."id") = ("public"."EventType"."teamId")
WHERE "public"."EventType"."userId" = ${userId}
LEFT JOIN "public"."users" AS "u" ON ("u"."id") = ("public"."EventType"."userId")
WHERE "public"."EventType"."userId" = ${userId} AND "public"."EventType"."teamId" IS NULL
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Ryukemeister Why was this AND "public"."EventType"."teamId" IS NULL added? We are explicitly LEFT JOIN on the Team table and then filtering all records out with this WHERE clause. Or am I reading that wrong?

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

Labels

consumer core area: core, team members only ready-for-e2e run-ci Approve CI to run for external contributors size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants