Skip to content

Conversation

@hbjORbj
Copy link
Contributor

@hbjORbj hbjORbj commented Aug 25, 2025

What does this PR do?

  • As the PR title says, this PR simply removes some unused code

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - 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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

Walkthrough

  • Removed the i18next TFunction import and the t prop from apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsxConnectedVideoStepInner no longer accepts or is passed t; the outer component continues to use useLocale for the Button label.
  • Simplified apps/web/components/plain/PlainContactForm.tsx by deleting the internal ContactFormData interface and switching to an inline type for form data (message and attachmentIds); attachment handling and submit logic unchanged.
  • Deleted apps/web/app/api/nope/route.ts, removing the app-router GET and POST exports that returned 400 responses.

Possibly related PRs

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between def5ceb and 6e44c94.

📒 Files selected for processing (1)
  • apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch perf/remove-unused-apis

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@graphite-app graphite-app bot requested a review from a team August 25, 2025 08:19
@keithwillcode keithwillcode added core area: core, team members only foundation labels Aug 25, 2025
@graphite-app
Copy link

graphite-app bot commented Aug 25, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (08/25/25)

1 reviewer was added to this PR based on Keith Williams's automation.

@hbjORbj hbjORbj marked this pull request as draft August 25, 2025 08:20
@hbjORbj hbjORbj changed the title perf: remove unused apis chore: remove unused code Aug 25, 2025
@dosubot dosubot bot added the performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive label Aug 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx (1)

55-60: Fix: Avoid indefinite loader on metadata parse failure

If user metadata fails zod parsing, the component returns StepConnectionLoader and never recovers, leading to a stuck UI. Fallback to proceeding without metadata instead of rendering a perpetual loader.

Apply this diff:

-  const result = userMetadata.safeParse(user.metadata);
-  if (!result.success) {
-    return <StepConnectionLoader />;
-  }
-  const { data: metadata } = result;
+  const result = userMetadata.safeParse(user.metadata);
+  const metadata = result.success ? result.data : undefined;
🧹 Nitpick comments (3)
apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx (3)

67-67: Use stable/unique key for list items

item.name may be non-unique or mutable. Prefer slug for React list keys to reduce unnecessary re-renders and avoid key collisions.

-            <li key={item.name}>
+            <li key={item.slug}>

62-65: Minor: Simplify null checks around items

You can rely on optional chaining with items?.map to avoid repeating queryConnectedVideoApps?.items.

-      {queryConnectedVideoApps?.items &&
-        queryConnectedVideoApps?.items.map((item) => {
+      {queryConnectedVideoApps?.items?.map((item) => {

12-14: Avoid magic string for excluded slug

Hardcoding "daily-video" makes future changes brittle. Hoist into a typed constant for clarity and reusability.

Add the constant near the top:

 import { AppConnectionItem } from "../components/AppConnectionItem";
 import { StepConnectionLoader } from "../components/StepConnectionLoader";
 
+const EXCLUDED_VIDEO_APP_SLUGS = new Set(["daily-video"] as const);

Use it in the filter:

-          if (item.slug === "daily-video") return null; // we dont want to show daily here as it is installed by default
+          if (EXCLUDED_VIDEO_APP_SLUGS.has(item.slug)) return null; // excluded: installed by default

Also applies to: 65-65

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9b7c658 and bba3094.

📒 Files selected for processing (2)
  • apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx (1 hunks)
  • apps/web/components/plain/PlainContactForm.tsx (0 hunks)
💤 Files with no reviewable changes (1)
  • apps/web/components/plain/PlainContactForm.tsx
🧰 Additional context used
📓 Path-based instructions (3)
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Always use t() for text localization in frontend code; direct text embedding should trigger a warning

Files:

  • apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
🔇 Additional comments (2)
apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx (2)

105-106: Localization usage looks good

Button label uses t(), and there’s no user-facing hardcoded text. This complies with the frontend localization guideline.


94-94: ✅ Prop removal verified – no lingering t or TFunction references
Confirmed that ConnectedVideoStepInner is invoked without a t prop, and there are no remaining t: prop definitions, TFunction types, or related imports in apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx. The cleanup aligns with the PR goal of trimming unused APIs and has no functional impact.

import { Popover, PopoverContent, PopoverTrigger } from "@calcom/ui/components/popover";
import { showToast } from "@calcom/ui/components/toast";

interface ContactFormData {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not used

const [hasAnyInstalledVideoApps, setAnyInstalledVideoApps] = useState(false);
return (
<>
<ConnectedVideoStepInner setAnyInstalledVideoApps={setAnyInstalledVideoApps} t={t} user={user} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not used

@vercel
Copy link

vercel bot commented Aug 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cal Ignored Ignored Aug 29, 2025 0:50am
cal-eu Ignored Ignored Aug 29, 2025 0:50am

@hbjORbj hbjORbj marked this pull request as ready for review August 27, 2025 10:37
@graphite-app graphite-app bot requested a review from a team August 27, 2025 10:37
@hbjORbj hbjORbj changed the title chore: remove unused code chore: remove unused code including /api/nope Aug 27, 2025
@volnei volnei enabled auto-merge (squash) August 27, 2025 16:28
@volnei volnei merged commit 5b2b5fd into main Aug 29, 2025
37 checks passed
@volnei volnei deleted the perf/remove-unused-apis branch August 29, 2025 01:09
@github-actions
Copy link
Contributor

E2E results are ready!

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

Labels

core area: core, team members only foundation performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive ready-for-e2e 💻 refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants