Skip to content

chore(docs): remove chat linkage#5959

Merged
jrgarciadev merged 2 commits into
mainfrom
chore/remove-chat-link
Dec 4, 2025
Merged

chore(docs): remove chat linkage#5959
jrgarciadev merged 2 commits into
mainfrom
chore/remove-chat-link

Conversation

@wingkwong
Copy link
Copy Markdown
Member

@wingkwong wingkwong commented Dec 3, 2025

Closes #

📝 Description

⛳️ Current behavior (updates)

🚀 New behavior

💣 Is this a breaking change (Yes/No):

📝 Additional Information

Summary by CodeRabbit

  • Chores
    • Removed chat integration feature and related promotional banners from the documentation interface.
    • Cleaned up environment configuration and unused dependencies associated with the chat functionality.

✏️ Tip: You can customize this high-level summary in your review settings.

@wingkwong wingkwong added the 📋 Scope : Docs Related to the documentation label Dec 3, 2025
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 3, 2025

⚠️ No Changeset found

Latest commit: 83d2f60

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 3, 2025

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

Project Deployment Preview Comments Updated (UTC)
heroui Ready Ready Preview Comment Dec 3, 2025 4:47am
heroui-sb Ready Ready Preview Comment Dec 3, 2025 4:47am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 3, 2025

Walkthrough

This pull request removes the Chat feature integration from the docs application. It deletes the openInChat action module, removes the "Open in Chat" button and related state management from the CodeDemo component, deletes the HeroUIChatBanner and RandomBanner components, and removes associated environment variables from configuration files.

Changes

Cohort / File(s) Summary
Environment & Configuration
apps/docs/.env.example, turbo.json
Removed Chat-related environment variables (IMPORT_API_KEY, CHAT_API_URL, CHAT_URL) from example config and Turbo globalEnv array
Deleted Chat Components
apps/docs/components/heroui-chat-banner.tsx, apps/docs/components/random-banner.tsx
Removed entire HeroUIChatBanner component (banner with scroll tracking and PostHog analytics) and RandomBanner component (conditional banner switcher)
Deleted Chat Action
apps/docs/actions/open-in-chat.ts
Removed openInChat async function that assembled files, sent code snippets to Chat API, and handled wrapper generation; removed getFilesWithWrapper helper
CodeDemo Component Update
apps/docs/components/docs/components/code-demo/code-demo.tsx
Removed useState hook, isLoading state, handleOpenInChat callback, PostHog/pathname imports, analytics dispatch, and conditional "Open in Chat" button rendering; simplified component to render only Tabs with Preview and Code

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Straightforward feature removal with clear scope
  • Mostly deletions and import cleanup
  • Verify no other files reference deleted components or the openInChat function
  • Confirm CodeDemo component still functions correctly after simplification

Possibly related PRs

Suggested reviewers

  • jrgarciadev

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains only the template structure with no actual content filled in; all sections are blank placeholders. Fill in the description section with a summary of changes, explain what chat linkage was removed and why, and complete other relevant template sections.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore(docs): remove chat linkage' directly and clearly reflects the main change: removal of chat-related functionality from the documentation components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/remove-chat-link

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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

🧹 Nitpick comments (1)
apps/docs/components/docs/components/code-demo/code-demo.tsx (1)

84-161: Complete useMemo dependency arrays for previewContent and editorContent

Both memo blocks are missing several values they close over, which can lead to stale renders if those props ever change:

  • previewContent currently depends on [displayMode, isGradientBox, gradientColor, previewHeight, hideWindowActions, asIframe, showPreview, isInView, className] but also uses files, iframeInitialWidth, iframeSrc, title, resizeEnabled, code, noInline, overflow, renderContent.
  • editorContent currently depends on [displayMode, showEditor, isInView, files, highlightedLines, showPreview, showSandpackPreview, showOpenInCodeSandbox] but also uses typescriptStrict and renderContent.

Given the project’s prior care around hook deps, it would be safer and more consistent to include all referenced values, e.g.:

-  const previewContent = useMemo(() => {
+  const previewContent = useMemo(() => {
     // ...
-  }, [
-    displayMode,
-    isGradientBox,
-    gradientColor,
-    previewHeight,
-    hideWindowActions,
-    asIframe,
-    showPreview,
-    isInView,
-    className,
-  ]);
+  }, [
+    asIframe,
+    className,
+    code,
+    files,
+    gradientColor,
+    hideWindowActions,
+    iframeInitialWidth,
+    iframeSrc,
+    isGradientBox,
+    noInline,
+    overflow,
+    previewHeight,
+    renderContent,
+    resizeEnabled,
+    showPreview,
+    title,
+  ]);
 
-  const editorContent = useMemo(() => {
+  const editorContent = useMemo(() => {
     // ...
-  }, [
-    displayMode,
-    showEditor,
-    isInView,
-    files,
-    highlightedLines,
-    showPreview,
-    showSandpackPreview,
-    showOpenInCodeSandbox,
-  ]);
+  }, [
+    files,
+    highlightedLines,
+    renderContent,
+    showEditor,
+    showOpenInCodeSandbox,
+    showSandpackPreview,
+    typescriptStrict,
+  ]);

This keeps the behavior correct even if callers start passing dynamic values later, and aligns with the existing emphasis on precise hook dependencies. Based on learnings, …

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4e3098a and 83d2f60.

📒 Files selected for processing (6)
  • apps/docs/.env.example (0 hunks)
  • apps/docs/actions/open-in-chat.ts (0 hunks)
  • apps/docs/components/docs/components/code-demo/code-demo.tsx (1 hunks)
  • apps/docs/components/heroui-chat-banner.tsx (0 hunks)
  • apps/docs/components/random-banner.tsx (0 hunks)
  • turbo.json (1 hunks)
💤 Files with no reviewable changes (4)
  • apps/docs/.env.example
  • apps/docs/components/heroui-chat-banner.tsx
  • apps/docs/components/random-banner.tsx
  • apps/docs/actions/open-in-chat.ts
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-10-25T17:08:46.283Z
Learnt from: adbjo
Repo: heroui-inc/heroui PR: 5846
File: packages/components/tabs/src/tabs.tsx:156-157
Timestamp: 2025-10-25T17:08:46.283Z
Learning: In packages/components/tabs/src/tabs.tsx, the renderTabs useMemo dependency array intentionally includes `variant` and `isVertical` to prevent potential side-effects, even though they might appear redundant based on static analysis.

Applied to files:

  • apps/docs/components/docs/components/code-demo/code-demo.tsx
📚 Learning: 2025-10-25T17:11:59.338Z
Learnt from: adbjo
Repo: heroui-inc/heroui PR: 5846
File: packages/components/tabs/src/tabs.tsx:155-155
Timestamp: 2025-10-25T17:11:59.338Z
Learning: In packages/components/tabs/src/tabs.tsx, the renderTabs useMemo dependency array intentionally includes both `domRef` and `cursorRef` to maintain consistency in how ref objects are handled in dependency arrays, even though ref objects have stable identity across renders.

Applied to files:

  • apps/docs/components/docs/components/code-demo/code-demo.tsx
📚 Learning: 2025-10-27T21:52:33.324Z
Learnt from: adbjo
Repo: heroui-inc/heroui PR: 5846
File: packages/components/tabs/src/tabs.tsx:115-125
Timestamp: 2025-10-27T21:52:33.324Z
Learning: In packages/components/tabs/src/tabs.tsx, the useEffect dependency array at line 125 intentionally uses `domRef.current` rather than `domRef` because domRef.current can change between renders (when React sets it during the commit phase), whereas domRef itself has stable identity and won't change.

Applied to files:

  • apps/docs/components/docs/components/code-demo/code-demo.tsx
📚 Learning: 2025-10-27T21:48:35.308Z
Learnt from: adbjo
Repo: heroui-inc/heroui PR: 5846
File: packages/components/tabs/src/tabs.tsx:76-101
Timestamp: 2025-10-27T21:48:35.308Z
Learning: In packages/components/tabs/src/tabs.tsx, the updateCursorPosition useCallback dependency array intentionally includes `cursorRef.current` to handle the case where the cursor span element is unmounted and remounted (e.g., when `disableAnimation` or `disableCursorAnimation` toggles). This ensures the callback is recreated when the ref points to a new element, triggering a dependency chain that re-establishes the ResizeObserver and initializes the new cursor element with the data-initialized attribute.
</learning]

Applied to files:

  • apps/docs/components/docs/components/code-demo/code-demo.tsx
🔇 Additional comments (2)
turbo.json (1)

4-10: Env cleanup in globalEnv looks consistent with chat removal

Removing chat-related variables from globalEnv while keeping PLAIN_USER_AUTHENTICATED is coherent with the rest of the PR and should not affect unrelated tasks.

apps/docs/components/docs/components/code-demo/code-demo.tsx (1)

3-10: Import cleanup is correct and minimal

The React and @heroui/react imports now match actual usage (no unused hooks/components from the removed chat feature), which keeps the module lean and avoids tree‑shaking noise.

@jrgarciadev jrgarciadev merged commit a7655ad into main Dec 4, 2025
3 checks passed
@jrgarciadev jrgarciadev deleted the chore/remove-chat-link branch December 4, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📋 Scope : Docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants