Skip to content

chore(web): replace snippet action with CLI guidance#183

Open
alan747271363-art wants to merge 2 commits into
tryabby:mainfrom
alan747271363-art:codex/replace-snippet-action-with-cli
Open

chore(web): replace snippet action with CLI guidance#183
alan747271363-art wants to merge 2 commits into
tryabby:mainfrom
alan747271363-art:codex/replace-snippet-action-with-cli

Conversation

@alan747271363-art

@alan747271363-art alan747271363-art commented May 31, 2026

Copy link
Copy Markdown

Summary

  • replaces the dashboard Generate Code Snippet menu action with a CLI setup link
  • keeps the existing project ID copy action intact
  • tracks the new CLI instruction click separately

Closes #78.

Validation

  • pnpm install --frozen-lockfile
  • pnpm exec biome check apps/web/src/components/CodeSnippetModalButton.tsx
  • pnpm --filter web test -- --run --passWithNoTests was attempted; the suite still fails during test collection due existing module resolution problems (server/queue/Manager and @tryabby/core) outside this UI component change.

Summary by CodeRabbit

  • New Features
    • Added "Setup via CLI" option to the menu that opens CLI documentation in a new tab

@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

@alan747271363-art is attempting to deploy a commit to the cstrnt's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 35f7ae3a-fe11-43d9-8d2c-6710c38ae79b

📥 Commits

Reviewing files that changed from the base of the PR and between 069894f and d623791.

📒 Files selected for processing (1)
  • apps/web/src/types/plausible-events.ts

Walkthrough

CodeSnippetModalButton removes its internal code snippet modal UI and replaces it with a dropdown menu item that opens CLI documentation. Modal-related state and imports are removed, DOCS_URL is added, and a new "Setup via CLI" menu item with event tracking opens the CLI reference guide in a new tab.

Changes

Replace Code Snippet Modal with CLI Documentation Link

Layer / File(s) Summary
Remove modal implementation and add CLI documentation menu item
apps/web/src/components/CodeSnippetModalButton.tsx, apps/web/src/types/plausible-events.ts
Imports updated to add DOCS_URL and use the Terminal icon; modal-related state/logic and imports removed; component now tracks Dashboard CLI Instructions Clicked and opens ${DOCS_URL}reference/cli in a new tab.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 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 clearly and concisely summarizes the main change: replacing the code snippet generation action with CLI guidance, which directly matches the PR's primary objective.
Linked Issues check ✅ Passed The PR implements the requirements from issue #78 by removing the Code Generation Button and replacing it with CLI setup instructions that open documentation.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked objective: CodeSnippetModalButton refactoring, new CLI event tracking, and no unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/src/components/CodeSnippetModalButton.tsx`:
- Line 47: Add the missing event name to the PlausibleEvents type so the call
trackEvent("Dashboard CLI Instructions Clicked") is statically allowed: edit the
PlausibleEvents declaration (the type used by useTracking) and add a property
"Dashboard CLI Instructions Clicked": never (or an appropriate props type if
needed). Ensure PlausibleEvents is exported/updated so useTracking and the call
in CodeSnippetModalButton.tsx pick up the new event name.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 664c3bd3-28e6-45aa-a881-c91b126ff623

📥 Commits

Reviewing files that changed from the base of the PR and between e763d1a and 069894f.

📒 Files selected for processing (1)
  • apps/web/src/components/CodeSnippetModalButton.tsx

Comment thread apps/web/src/components/CodeSnippetModalButton.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Code Snippet Generation Button in the Projects Dashboard

1 participant