Skip to content

Remove registry-backed add flow#224

Merged
eluce2 merged 3 commits intomainfrom
t3code/297bfd19
Apr 26, 2026
Merged

Remove registry-backed add flow#224
eluce2 merged 3 commits intomainfrom
t3code/297bfd19

Conversation

@eluce2
Copy link
Copy Markdown
Collaborator

@eluce2 eluce2 commented Apr 25, 2026

Summary

  • Remove the registry/template install path from proofkit add and limit it to supported ProofKit add-ons.
  • Delete docs, routes, and client code for the legacy templates/registry experience.
  • Update CLI/docs copy to point users at package-native tools for general component installs.
  • Add a CLI patch changeset.

Testing

  • Not run
  • pnpm run ci not run

Summary by CodeRabbit

  • Documentation

    • Removed registry/templates pages and legacy "Adding Components" guide; updated CLI guides and auth/setup docs to instruct direct package/config usage.
    • Simplified docs navigation and redirects to focus on CLI pages.
  • Refactor

    • Narrowed CLI add command to only support ProofKit add-ons; registry-based install and template browsing removed.
    • Removed registry template bundling from the docs build.
  • Tests

    • Added basic smoke and CLI argument tests.

- limit add to supported add-ons
- drop registry docs, routes, and build path
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 25, 2026

🦋 Changeset detected

Latest commit: 9f35ed5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@proofkit/cli Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 25, 2026

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

Project Deployment Actions Updated (UTC)
proofkit-docs Ready Ready Preview Apr 26, 2026 0:58am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0e5b6c84-884e-4d97-a15e-ed3a689672e5

📥 Commits

Reviewing files that changed from the base of the PR and between 18ade4d and 9f35ed5.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • apps/docs/content/docs/cli/guides/adding-components/index.mdx
  • apps/docs/content/docs/cli/guides/getting-started.mdx
  • apps/docs/content/docs/cli/meta.json
💤 Files with no reviewable changes (2)
  • apps/docs/content/docs/cli/meta.json
  • apps/docs/content/docs/cli/guides/adding-components/index.mdx
✅ Files skipped from review due to trivial changes (1)
  • apps/docs/content/docs/cli/guides/getting-started.mdx

📝 Walkthrough

Walkthrough

Removes the ProofKit registry and its templates/docs/API; restricts proofkit add to only support add-ons (proofkit add addon <target>); deletes registry build/bundling and template UI; updates docs, configs, CLI messages, and tests accordingly.

Changes

Cohort / File(s) Summary
Changeset & Docs edits
​.changeset/strong-rings-hide.md, apps/docs/content/docs/cli/guides/adding-components/index.mdx, apps/docs/content/docs/cli/guides/auth/add-on.mdx, apps/docs/content/docs/cli/guides/auth/clerk.mdx, apps/docs/content/docs/cli/v2.mdx, apps/docs/src/app/(home)/page.tsx, apps/docs/content/docs/cli/guides/getting-started.mdx, apps/docs/content/docs/cli/meta.json
Add changeset; remove legacy "adding components" docs and registry instructions; adjust CLI/auth docs and marketing text to reflect add-on-only CLI.
Docs metadata & templates removal
apps/docs/content/docs/cli/guides/adding-components/meta.json, apps/docs/content/docs/cli/guides/adding-components/templates.mdx, apps/docs/content/docs/cli/registry/index.mdx, apps/docs/content/docs/meta.json, apps/docs/content/docs/templates/index.mdx, apps/docs/content/docs/templates/meta.json
Delete template pages and related meta.json entries; remove templates from navigation.
Templates UI & libs removed
apps/docs/src/app/docs/templates/... ([...slug]/page.tsx, category-config.ts, layout.tsx, page.tsx, templates-client.tsx)
Delete all template listing/detail pages, layout, client components, category config, and route generation. Expect removed exports and deleted UI logic.
Registry routes & bundling removed
apps/docs/src/app/r/[[...name]]/registry.ts, apps/docs/src/app/r/[[...name]]/route.ts, apps/docs/scripts/bundle-registry-templates.js, apps/docs/next.config.ts, apps/docs/turbo.json
Remove /r registry handlers and bundler script; update next.config.ts (transpilePackages/redirects) and turbo outputs to stop treating registry templates as build artifacts.
Docs template helpers removed
apps/docs/src/lib/templates.ts, apps/docs/src/app/llms.txt/route.ts, apps/docs/src/app/llms/[package]/route.ts
Delete template-loading helpers and remove templates from package listings/routes used by LLM docs endpoints.
CLI: add command restriction & helpers removed
packages/cli/src/cli/add/index.ts, packages/cli/src/cli/add/auth.ts, packages/cli/src/index.ts, packages/cli/src/consts.ts, packages/cli/src/installers/envVars.ts
Limit proofkit add to addon target only; update help/errors/messages; remove DEFAULT_REGISTRY_URL constant and adjust env guidance.
CLI registry install infra removed
packages/cli/src/cli/add/registry/* (many files: getOptions.ts, http.ts, install.ts, listItems.ts, postInstall/*, preflight.ts, Handlebars helpers, provider wrapper, package-script, etc.), packages/cli/src/helpers/shadcn-cli.ts, packages/cli/src/lib/templates.ts
Delete full registry client, install/preflight/post-install pipelines, shadcn wrapper, Handlebars rendering, and template meta helpers. Many exported functions removed.
Package & config cleanup
apps/docs/package.json, apps/docs/tsconfig.json, packages/cli/package.json
Remove @proofkit/registry from docs/cli deps and scripts; stop excluding/producing public/registry-templates in config/build outputs.
Tests updated
apps/docs/tests/smoke.test.ts, apps/docs/tests/utils.manifest.test.ts, packages/cli/tests/cli.test.ts
Add minimal docs smoke test; delete registry/manifest tests; add CLI test asserting proofkit add page fails with new error message.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

🚥 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 'Remove registry-backed add flow' clearly and concisely describes the main objective of the pull request—removing the registry/template installation path from the proofkit add command and restricting it to supported ProofKit add-ons only.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/297bfd19

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

Copy link
Copy Markdown

@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: 2

🧹 Nitpick comments (5)
apps/docs/tests/smoke.test.ts (1)

3-6: Replace the tautological smoke assertion with a behavior check.

expect(true).toBe(true) doesn’t protect against regressions in docs content/routes. Consider asserting a real invariant tied to this PR (e.g., adding-components docs metadata/routing state).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/tests/smoke.test.ts` around lines 3 - 6, The current tautological
assertion inside describe("docs") / it("has a smoke test") should be replaced
with a real behavior check: import the docs routing/metadata helper (e.g., a
function like getDocsRoutes or docsMetadata) or the app router, invoke it in the
test and assert the expected invariant introduced by this PR (for example, that
a specific route path or metadata key for the new "adding-components" page
exists). Update the test body to call that helper and replace
expect(true).toBe(true) with an assertion such as
expect(routes).toContain("/adding-components") or
expect(metadata).toHaveProperty("adding-components"), so the test validates
actual docs state rather than a tautology.
apps/docs/next.config.ts (1)

24-24: Consider keeping a compatibility redirect for legacy /registry/* URLs.

Dropping this redirect entirely can cause link rot for previously shared docs links; a fallback to /docs/cli would preserve UX.

🔁 Compatibility redirect option
   async redirects() {
-    return [{ source: "/docs", destination: "/docs/cli", permanent: false }];
+    return [
+      { source: "/docs", destination: "/docs/cli", permanent: false },
+      { source: "/registry/:path*", destination: "/docs/cli", permanent: false },
+    ];
   },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/next.config.ts` at line 24, Add a compatibility redirect for legacy
/registry/* URLs by updating the redirects array returned in the redirects()
function (the return currently containing { source: "/docs", destination:
"/docs/cli", permanent: false }). Insert another redirect entry like { source:
"/registry/:path*", destination: "/docs/cli", permanent: false } before or
alongside the existing rule so old /registry links fall back to /docs/cli while
remaining non-permanent.
apps/docs/content/docs/cli/v2.mdx (1)

30-30: Minor style suggestion: simplify "are able to" to "can".

This is a minor readability improvement suggested by static analysis.

📝 Suggested wording
-Unfortunately, there is not an easy path for you to upgrade projects that were created with v1 to be fully compatible with v2. But if you are able to setup tailwindcss and shadcn in your existing project, you can still use package-native tools directly alongside ProofKit.
+Unfortunately, there is not an easy path for you to upgrade projects that were created with v1 to be fully compatible with v2. But if you can set up tailwindcss and shadcn in your existing project, you can still use package-native tools directly alongside ProofKit.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/cli/v2.mdx` at line 30, Replace the phrase "are able
to setup tailwindcss and shadcn in your existing project" with the simpler and
grammatically correct "can set up tailwindcss and shadcn in your existing
project" in the sentence that begins "Unfortunately, there is not an easy
path..." so the wording is concise and uses the correct verb form ("set up" vs
"setup").
apps/docs/content/docs/cli/guides/adding-components/index.mdx (1)

16-21: Consider documenting both supported add-on targets.

The CLI addon command supports two targets: webviewer and auth (per packages/cli/src/cli/add/addon.ts line 39). Currently only webviewer is shown as an example. Consider adding auth or listing both supported targets so users discover the full capability.

📝 Suggested documentation update
 The supported `add` flow is:
 
+**Supported targets:** `webviewer`, `auth`
 
 <CliCommand command="proofkit add addon webviewer" />
 
 Use package-native tools or agents for everything else.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/cli/guides/adding-components/index.mdx` around lines
16 - 21, The docs example only shows the webviewer target for the "proofkit add
addon" command but the CLI supports both "webviewer" and "auth"; update the
example in this guide to either list both supported targets or add a second
example (e.g., show "proofkit add addon webviewer" and "proofkit add addon
auth") so users discover both options; reference the CLI's addon implementation
(addon.ts) and the "proofkit add addon" command when making the change.
packages/cli/src/cli/add/index.ts (1)

6-12: Remove the unused noInstall option from the function signature.

The noInstall parameter is accepted in the function options but never passed to runAddAddonAction. Since the addon installation flow only copies FM add-on files and doesn't perform npm package installation (unlike the init flow), this parameter has no effect and can be removed from the options type signature.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/cli/add/index.ts` around lines 6 - 12, Remove the unused
noInstall option from the runAdd function signature: update the options type
from { noInstall?: boolean; target?: string } to only include target, and ensure
calls to runAdd (and any callers/types) expect options?: { target?: string } so
that runAdd passes only options?.target into runAddAddonAction; reference the
runAdd function and runAddAddonAction to locate and update the signature and
related types/usages.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs/content/docs/cli/guides/auth/add-on.mdx`:
- Line 97: Fix the wording typo in the sentence that currently reads "FileMaker
Add-on Auth will only setup email/password authentication for you" by changing
"setup" to the verb form "set up"; update the copy in the doc content (the
sentence containing "FileMaker Add-on Auth will only setup email/password
authentication for you, but any other...") so it reads "FileMaker Add-on Auth
will only set up email/password authentication for you..." and leave the rest
unchanged.

In `@packages/cli/src/cli/add/auth.ts`:
- Around line 95-97: There are two inconsistent shadcn messages in this module;
unify them by extracting a single constant (e.g., SHADCN_UNSUPPORTED_MESSAGE)
and use it wherever the code checks settings.ui === "shadcn" and throws (replace
the throw new Error("...") in the auth flow that currently uses "no longer
supported" and the other location that says "not yet supported" to reference
this constant); update the throw sites to throw new
Error(SHADCN_UNSUPPORTED_MESSAGE) so both auth paths show identical text.

---

Nitpick comments:
In `@apps/docs/content/docs/cli/guides/adding-components/index.mdx`:
- Around line 16-21: The docs example only shows the webviewer target for the
"proofkit add addon" command but the CLI supports both "webviewer" and "auth";
update the example in this guide to either list both supported targets or add a
second example (e.g., show "proofkit add addon webviewer" and "proofkit add
addon auth") so users discover both options; reference the CLI's addon
implementation (addon.ts) and the "proofkit add addon" command when making the
change.

In `@apps/docs/content/docs/cli/v2.mdx`:
- Line 30: Replace the phrase "are able to setup tailwindcss and shadcn in your
existing project" with the simpler and grammatically correct "can set up
tailwindcss and shadcn in your existing project" in the sentence that begins
"Unfortunately, there is not an easy path..." so the wording is concise and uses
the correct verb form ("set up" vs "setup").

In `@apps/docs/next.config.ts`:
- Line 24: Add a compatibility redirect for legacy /registry/* URLs by updating
the redirects array returned in the redirects() function (the return currently
containing { source: "/docs", destination: "/docs/cli", permanent: false }).
Insert another redirect entry like { source: "/registry/:path*", destination:
"/docs/cli", permanent: false } before or alongside the existing rule so old
/registry links fall back to /docs/cli while remaining non-permanent.

In `@apps/docs/tests/smoke.test.ts`:
- Around line 3-6: The current tautological assertion inside describe("docs") /
it("has a smoke test") should be replaced with a real behavior check: import the
docs routing/metadata helper (e.g., a function like getDocsRoutes or
docsMetadata) or the app router, invoke it in the test and assert the expected
invariant introduced by this PR (for example, that a specific route path or
metadata key for the new "adding-components" page exists). Update the test body
to call that helper and replace expect(true).toBe(true) with an assertion such
as expect(routes).toContain("/adding-components") or
expect(metadata).toHaveProperty("adding-components"), so the test validates
actual docs state rather than a tautology.

In `@packages/cli/src/cli/add/index.ts`:
- Around line 6-12: Remove the unused noInstall option from the runAdd function
signature: update the options type from { noInstall?: boolean; target?: string }
to only include target, and ensure calls to runAdd (and any callers/types)
expect options?: { target?: string } so that runAdd passes only options?.target
into runAddAddonAction; reference the runAdd function and runAddAddonAction to
locate and update the signature and related types/usages.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 66ad6cc2-4631-4965-b1e3-cff0ecee3120

📥 Commits

Reviewing files that changed from the base of the PR and between bf9fc95 and 18ade4d.

📒 Files selected for processing (47)
  • .changeset/strong-rings-hide.md
  • apps/docs/content/docs/cli/guides/adding-components/index.mdx
  • apps/docs/content/docs/cli/guides/adding-components/meta.json
  • apps/docs/content/docs/cli/guides/adding-components/templates.mdx
  • apps/docs/content/docs/cli/guides/auth/add-on.mdx
  • apps/docs/content/docs/cli/guides/auth/clerk.mdx
  • apps/docs/content/docs/cli/registry/index.mdx
  • apps/docs/content/docs/cli/v2.mdx
  • apps/docs/content/docs/meta.json
  • apps/docs/content/docs/templates/index.mdx
  • apps/docs/content/docs/templates/meta.json
  • apps/docs/next.config.ts
  • apps/docs/package.json
  • apps/docs/scripts/bundle-registry-templates.js
  • apps/docs/src/app/(home)/page.tsx
  • apps/docs/src/app/docs/templates/[...slug]/page.tsx
  • apps/docs/src/app/docs/templates/category-config.ts
  • apps/docs/src/app/docs/templates/layout.tsx
  • apps/docs/src/app/docs/templates/page.tsx
  • apps/docs/src/app/docs/templates/templates-client.tsx
  • apps/docs/src/app/llms.txt/route.ts
  • apps/docs/src/app/llms/[package]/route.ts
  • apps/docs/src/app/r/[[...name]]/registry.ts
  • apps/docs/src/app/r/[[...name]]/route.ts
  • apps/docs/src/lib/templates.ts
  • apps/docs/tests/smoke.test.ts
  • apps/docs/tests/utils.manifest.test.ts
  • apps/docs/tsconfig.json
  • apps/docs/turbo.json
  • packages/cli/package.json
  • packages/cli/src/cli/add/auth.ts
  • packages/cli/src/cli/add/index.ts
  • packages/cli/src/cli/add/registry/getOptions.ts
  • packages/cli/src/cli/add/registry/http.ts
  • packages/cli/src/cli/add/registry/install.ts
  • packages/cli/src/cli/add/registry/listItems.ts
  • packages/cli/src/cli/add/registry/postInstall/handlebars.ts
  • packages/cli/src/cli/add/registry/postInstall/index.ts
  • packages/cli/src/cli/add/registry/postInstall/package-script.ts
  • packages/cli/src/cli/add/registry/postInstall/wrap-provider.ts
  • packages/cli/src/cli/add/registry/preflight.ts
  • packages/cli/src/consts.ts
  • packages/cli/src/generators/auth.ts
  • packages/cli/src/helpers/shadcn-cli.ts
  • packages/cli/src/index.ts
  • packages/cli/src/installers/envVars.ts
  • packages/cli/tests/cli.test.ts
💤 Files with no reviewable changes (27)
  • apps/docs/content/docs/templates/index.mdx
  • apps/docs/content/docs/templates/meta.json
  • packages/cli/package.json
  • apps/docs/src/app/llms.txt/route.ts
  • packages/cli/src/cli/add/registry/listItems.ts
  • apps/docs/content/docs/cli/registry/index.mdx
  • apps/docs/src/app/r/[[...name]]/route.ts
  • packages/cli/src/consts.ts
  • apps/docs/src/app/docs/templates/page.tsx
  • packages/cli/src/cli/add/registry/preflight.ts
  • apps/docs/tests/utils.manifest.test.ts
  • packages/cli/src/cli/add/registry/http.ts
  • packages/cli/src/cli/add/registry/postInstall/package-script.ts
  • packages/cli/src/cli/add/registry/postInstall/index.ts
  • apps/docs/content/docs/cli/guides/adding-components/templates.mdx
  • apps/docs/scripts/bundle-registry-templates.js
  • apps/docs/src/app/docs/templates/category-config.ts
  • packages/cli/src/cli/add/registry/install.ts
  • packages/cli/src/cli/add/registry/getOptions.ts
  • apps/docs/src/app/docs/templates/templates-client.tsx
  • packages/cli/src/helpers/shadcn-cli.ts
  • apps/docs/src/app/docs/templates/layout.tsx
  • apps/docs/src/lib/templates.ts
  • apps/docs/src/app/docs/templates/[...slug]/page.tsx
  • apps/docs/src/app/r/[[...name]]/registry.ts
  • packages/cli/src/cli/add/registry/postInstall/handlebars.ts
  • packages/cli/src/cli/add/registry/postInstall/wrap-provider.ts

### Alternative Authentication Methods

At this time, FileMaker Add-on Auth will only setup email/password authentication for you, but any other authentication methods can be added by modifying the code yourself. Guides for integrating OAuth providers, passkeys (WebAuthn), two-factor, and more are available in the [Lucia documentation](https://lucia-auth.com/). Just keep in mind that you'll likely need to add more fields to the tables and layouts as mentioned above to support those additional features. No newline at end of file
At this time, FileMaker Add-on Auth will only setup email/password authentication for you, but any other authentication methods can be added by modifying the code yourself. Guides for integrating OAuth providers, passkeys (WebAuthn), two-factor, and more are available in the [Lucia documentation](https://lucia-auth.com/). Just keep in mind that you'll likely need to add more fields to the tables and layouts as mentioned above to support those additional features.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix wording typo: use “set up” (verb), not “setup”.

This is user-facing docs copy, so it’s worth tightening.

✏️ Proposed copy fix
-At this time, FileMaker Add-on Auth will only setup email/password authentication for you, but any other authentication methods can be added by modifying the code yourself. Guides for integrating OAuth providers, passkeys (WebAuthn), two-factor, and more are available in the [Lucia documentation](https://lucia-auth.com/). Just keep in mind that you'll likely need to add more fields to the tables and layouts as mentioned above to support those additional features.
+At this time, FileMaker Add-on Auth will only set up email/password authentication for you, but any other authentication methods can be added by modifying the code yourself. Guides for integrating OAuth providers, passkeys (WebAuthn), two-factor, and more are available in the [Lucia documentation](https://lucia-auth.com/). Just keep in mind that you'll likely need to add more fields to the tables and layouts as mentioned above to support those additional features.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
At this time, FileMaker Add-on Auth will only setup email/password authentication for you, but any other authentication methods can be added by modifying the code yourself. Guides for integrating OAuth providers, passkeys (WebAuthn), two-factor, and more are available in the [Lucia documentation](https://lucia-auth.com/). Just keep in mind that you'll likely need to add more fields to the tables and layouts as mentioned above to support those additional features.
At this time, FileMaker Add-on Auth will only set up email/password authentication for you, but any other authentication methods can be added by modifying the code yourself. Guides for integrating OAuth providers, passkeys (WebAuthn), two-factor, and more are available in the [Lucia documentation](https://lucia-auth.com/). Just keep in mind that you'll likely need to add more fields to the tables and layouts as mentioned above to support those additional features.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/cli/guides/auth/add-on.mdx` at line 97, Fix the
wording typo in the sentence that currently reads "FileMaker Add-on Auth will
only setup email/password authentication for you" by changing "setup" to the
verb form "set up"; update the copy in the doc content (the sentence containing
"FileMaker Add-on Auth will only setup email/password authentication for you,
but any other...") so it reads "FileMaker Add-on Auth will only set up
email/password authentication for you..." and leave the rest unchanged.

Comment on lines 95 to 97
if (settings.ui === "shadcn") {
throw new Error("Shadcn projects should add auth using the template registry");
throw new Error("`proofkit add auth` is no longer supported for shadcn projects");
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Unify the shadcn unsupported message across both auth paths.

Line 96 now says “no longer supported”, but Line 18 still says “not yet supported”. Please keep one shared message to avoid inconsistent UX.

Proposed refactor
+const SHADCN_AUTH_UNSUPPORTED_MESSAGE =
+  "`proofkit add auth` is no longer supported for shadcn projects";
+
 export async function runAddAuthAction() {
   const settings = getSettings();
   if (settings.appType !== "browser") {
     return cancel("Auth is not supported for your app type.");
   }
   if (settings.ui === "shadcn") {
-    return cancel("Adding auth is not yet supported for shadcn-based projects.");
+    return cancel(SHADCN_AUTH_UNSUPPORTED_MESSAGE);
   }
@@
     .action(async () => {
       const settings = getSettings();
       if (settings.ui === "shadcn") {
-        throw new Error("`proofkit add auth` is no longer supported for shadcn projects");
+        throw new Error(SHADCN_AUTH_UNSUPPORTED_MESSAGE);
       }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/cli/add/auth.ts` around lines 95 - 97, There are two
inconsistent shadcn messages in this module; unify them by extracting a single
constant (e.g., SHADCN_UNSUPPORTED_MESSAGE) and use it wherever the code checks
settings.ui === "shadcn" and throws (replace the throw new Error("...") in the
auth flow that currently uses "no longer supported" and the other location that
says "not yet supported" to reference this constant); update the throw sites to
throw new Error(SHADCN_UNSUPPORTED_MESSAGE) so both auth paths show identical
text.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 25, 2026

Open in StackBlitz

@proofkit/better-auth

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/better-auth@224

@proofkit/cli

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/cli@224

create-proofkit

pnpm add https://pkg.pr.new/proofsh/proofkit/create-proofkit@224

@proofkit/fmdapi

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/fmdapi@224

@proofkit/fmodata

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/fmodata@224

@proofkit/typegen

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/typegen@224

@proofkit/webviewer

pnpm add https://pkg.pr.new/proofsh/proofkit/@proofkit/webviewer@224

commit: 9f35ed5

- delete obsolete CLI guide
- update getting-started next steps
- drop guide from CLI nav
@eluce2 eluce2 merged commit c773a02 into main Apr 26, 2026
14 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Apr 26, 2026
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.

1 participant