Skip to content
This repository was archived by the owner on Jun 29, 2026. It is now read-only.

Remove unused workspace chat primitives#55

Merged
urjitc merged 1 commit into
mainfrom
cleanup/main-checker-findings
Jun 27, 2026
Merged

Remove unused workspace chat primitives#55
urjitc merged 1 commit into
mainfrom
cleanup/main-checker-findings

Conversation

@urjitc

@urjitc urjitc commented Jun 27, 2026

Copy link
Copy Markdown
Member

Summary

  • remove unused legacy AI chat tool card primitives
  • remove unused prompt input wrapper exports
  • remove unused markdown helper export
  • remove unused @cloudflare/ai-chat and @shadcn/react dependencies
  • destructure the document editor auth session query result

Verification

  • pnpm exec vp check
  • pnpm exec knip
  • pnpm exec react-doctor . --scope changed --verbose
  • pnpm exec vp test --run --passWithNoTests
  • pnpm exec vp build

Deferred full-scan findings

Full React Doctor still reports broad pre-existing issues, including design-system unused files/exports, cycling-word animation state, and likely false positives such as static schema SQL and click-handler randomUUID. Those need separate scoped work rather than a blind sweep.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Remove unused workspace chat primitives and stale exports, and drop two unused dependencies. This cleans up the codebase and reduces bundle size with no UI changes.

  • Refactors

    • Deleted legacy chat tool components and prompt-input menu/select helpers.
    • Removed unused parseMarkdownToTiptapDocument export.
    • Simplified document editor auth session query destructuring.
  • Dependencies

    • Removed @cloudflare/ai-chat and @shadcn/react.

Written for commit f135b4b. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Refactor

    • Simplified the document editor’s session handling for more consistent user data access.
    • Streamlined the AI chat UI by removing unused controls and reducing the number of supported submenus/options.
  • Chores

    • Removed unused AI chat-related dependencies and UI components.
    • Cleaned up markdown handling internals while keeping document serialization behavior unchanged.

@capy-ai

capy-ai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Capy auto-review is paused for this organization because the usage-cycle auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 92b8cd36-2847-45fe-8981-a0c91b7d1b3c

📥 Commits

Reviewing files that changed from the base of the PR and between f63f9f1 and f135b4b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • package.json
  • src/features/workspaces/components/ai-chat/AiChatToolCard.tsx
  • src/features/workspaces/components/ai-chat/ai-chat-prompt-input.tsx
  • src/features/workspaces/components/ai-chat/ai-chat-tool.tsx
  • src/features/workspaces/components/document-editor/DocumentEditorSurface.tsx
  • src/features/workspaces/documents/document-markdown.ts
💤 Files with no reviewable changes (4)
  • package.json
  • src/features/workspaces/components/ai-chat/AiChatToolCard.tsx
  • src/features/workspaces/components/ai-chat/ai-chat-tool.tsx
  • src/features/workspaces/documents/document-markdown.ts

📝 Walkthrough

Walkthrough

Removes ai-chat-tool.tsx and AiChatToolCard.tsx entirely. Strips dropdown menu, add-attachments, and select subcomponents from ai-chat-prompt-input.tsx. Removes the parseMarkdownToTiptapDocument export, refactors a session query destructure in DocumentEditorSurface, and drops two unused package dependencies.

AI Chat Component Cleanup and Minor Refactors

Layer / File(s) Summary
Remove AI tool card, tool UI, and prompt input subcomponents
src/features/workspaces/components/ai-chat/AiChatToolCard.tsx, src/features/workspaces/components/ai-chat/ai-chat-tool.tsx, src/features/workspaces/components/ai-chat/ai-chat-prompt-input.tsx
Deletes AiChatToolCard and the full ai-chat-tool.tsx module; removes PromptInputActionMenu*, PromptInputActionAddAttachments, and PromptInputSelect* exported components/types from the prompt input file, along with their icon and UI primitive imports.
Markdown helper removal, session refactor, and dependency cleanup
src/features/workspaces/documents/document-markdown.ts, src/features/workspaces/components/document-editor/DocumentEditorSurface.tsx, package.json
Removes the parseMarkdownToTiptapDocument export; replaces sessionQuery.data?.user with a direct data-as-session destructure; drops @cloudflare/ai-chat and @shadcn/react from package.json.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • ThinkEx-OSS/new-thinkex#40: Adds AiChatToolActivityRow as the replacement for the removed AiChatToolCard and ai-chat-tool.tsx components deleted in this PR.

Suggested labels

capy

🐇 Snip, snip, away they go,
Old tool cards lost in the snow,
Dropdown menus? No more fuss!
The chat stays neat, just like us.
Less is more, the rabbit knows — 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main cleanup: removing unused workspace chat primitives and related code.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cleanup/main-checker-findings

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.

@urjitc
urjitc merged commit af9e205 into main Jun 27, 2026
5 checks passed
@greptile-apps

greptile-apps Bot commented Jun 27, 2026

Copy link
Copy Markdown

Greptile Summary

This PR removes unused workspace chat code and related dependencies. The main changes are:

  • Removed legacy AI chat tool card and tool primitive files.
  • Removed unused prompt input action menu and select wrapper exports.
  • Removed the unused markdown parsing helper export.
  • Dropped unused @cloudflare/ai-chat and @shadcn/react dependencies from package.json and pnpm-lock.yaml.
  • Destructured the document editor auth session query result without changing behavior.

Confidence Score: 5/5

The changes are narrowly scoped removals of unused exports and dependencies, with no identified functional regressions.

Repository verification reported successful checks, dependency analysis, tests, and build for this cleanup-focused change set.

T-Rex T-Rex Logs

What T-Rex did

  • Checked the initial repository state and confirmed dependencies and UI components were present, including @cloudflare/ai-chat and @shadcn/react in package.json and lockfile, AiChatToolCard and ai-chat-tool files, prompt input action/select exports, parseMarkdownToTiptapDocument export, and legacy DocumentEditorSurface session-user derivation values.
  • Installed dependencies with Node 22 and ran the head runtime validation, observing vp test and vp build exit with status 0.
  • After changes, verified the post-change state where dependencies are removed from package.json and lockfile; AiChatToolCard and ai-chat-tool are removed; removed prompt input wrapper exports, and parseMarkdownToTiptapDocument export; while the projection helper remains and the destructured DocumentEditorSurface derivation values are equal across representative session cases.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "chore(workspaces): remove unused chat pr..." | Re-trigger Greptile

@urjitc
urjitc deleted the cleanup/main-checker-findings branch June 28, 2026 02:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant