Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Jul 7, 2025

Summary by CodeRabbit

  • Refactor

    • Updated GraphQL integration to use typed document nodes and Apollo Client's generic hooks for queries and mutations, replacing previously generated React Apollo hooks.
    • Migrated GraphQL code generation configuration from YAML to TypeScript for improved type safety and maintainability.
    • Updated package dependencies to support the new typed document node approach.
  • Chores

    • Improved internal code structure and configuration management for GraphQL and TypeScript integration.

@vercel
Copy link

vercel bot commented Jul 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baseplate-project-builder-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 6:53am

@changeset-bot
Copy link

changeset-bot bot commented Jul 7, 2025

🦋 Changeset detected

Latest commit: aa2a8ed

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

This PR includes changesets to release 17 packages
Name Type
@baseplate-dev/react-generators Patch
@baseplate-dev/plugin-storage Patch
@baseplate-dev/plugin-auth Patch
@baseplate-dev/project-builder-server Patch
@baseplate-dev/project-builder-common Patch
@baseplate-dev/project-builder-cli Patch
@baseplate-dev/project-builder-test Patch
@baseplate-dev/project-builder-web Patch
@baseplate-dev/code-morph Patch
@baseplate-dev/core-generators Patch
@baseplate-dev/create-project Patch
@baseplate-dev/fastify-generators Patch
@baseplate-dev/project-builder-lib Patch
@baseplate-dev/sync Patch
@baseplate-dev/tools Patch
@baseplate-dev/ui-components Patch
@baseplate-dev/utils 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

@coderabbitai
Copy link

coderabbitai bot commented Jul 7, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (12)
  • tests/simple/packages/web/baseplate/file-id-map.json is excluded by !tests/**
  • tests/simple/packages/web/baseplate/generated/codegen.ts is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/packages/web/baseplate/generated/codegen.yml is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/packages/web/baseplate/generated/package.json is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/packages/web/baseplate/generated/tsconfig.node.json is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/packages/web/codegen.ts is excluded by !tests/**
  • tests/simple/packages/web/codegen.yml is excluded by !tests/**
  • tests/simple/packages/web/package.json is excluded by !tests/**
  • tests/simple/packages/web/src/generated/graphql.tsx is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/packages/web/src/routes/index.tsx is excluded by !tests/**
  • tests/simple/packages/web/tsconfig.node.json is excluded by !tests/**
  • tests/simple/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !tests/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This change updates several packages and code generation workflows to switch from using Apollo-generated React hooks to a typed GraphQL documents approach. It replaces YAML-based GraphQL codegen configuration with TypeScript, updates dependencies, and modifies React code to use generic Apollo Client hooks (useQuery, useMutation) with explicit document references instead of generated hooks.

Changes

File(s) / Group Change Summary
.changeset/bright-parrots-watch.md Documents the switch from Apollo React hooks to typed GraphQL documents in three packages.
packages/react-generators/src/constants/react-packages.ts Updates GraphQL codegen package versions, removes typescript-react-apollo, adds typed-document-node and related dependencies.
packages/react-generators/src/generators/admin/admin-crud-queries/admin-crud-queries.generator.ts Renames hookExpression to documentExpression in interface and usage, updates to use document names instead of hook names.
packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts Switches template variables and generated code to use GraphQL document expressions and generic Apollo hooks.
packages/react-generators/src/generators/admin/admin-crud-edit/templates/create.tsx Changes mutation setup to use useMutation with document node, adds import.
packages/react-generators/src/generators/admin/admin-crud-edit/templates/edit.tsx Updates mutation hook instantiation to use useMutation with document node, adds import.
packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts Changes list query and delete mutation usage to use document expressions and generic Apollo hooks.
packages/react-generators/src/generators/admin/admin-crud-list/templates/index.tsx Updates delete mutation to use useMutation with document node and adds refetch logic, adds import.
packages/react-generators/src/generators/admin/_utils/foreign-data-dependency.ts Replaces generated query hook with generic useQuery and explicit document reference.
packages/react-generators/src/generators/admin/admin-bull-board/templates/routes/bull-board/index.tsx Replaces generated mutation hook with useMutation using document node.
packages/react-generators/src/generators/apollo/react-apollo/extractor.json Switches codegen template from YAML to TypeScript, updates template metadata and variables, adds provider and export info.
packages/react-generators/src/generators/apollo/react-apollo/react-apollo.generator.ts Updates to TypeScript-based codegen config, adds TypeScript provider, updates dependencies, modifies build and post-write logic.
packages/react-generators/src/generators/apollo/react-apollo/templates/package/codegen.ts Adds new TypeScript codegen config file exporting CodegenConfig object.
packages/react-generators/src/generators/apollo/react-apollo/templates/package/codegen.yml Removes YAML codegen config file.
packages/react-generators/src/generators/core/react-typescript/react-typescript.generator.ts Adds ReactTypescriptProvider interface and provider, enables dynamic inclusion of Node TypeScript files in tsconfig-node.json.
plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts Replaces generated query hook with useQuery and document node, updates imports.
plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx Switches from generated mutation hook to useMutation with document node, updates imports.

Sequence Diagram(s)

sequenceDiagram
    participant ReactComponent
    participant ApolloClient
    participant GraphQLServer

    ReactComponent->>ApolloClient: useQuery(DocumentNode, variables)
    ApolloClient->>GraphQLServer: Send GraphQL query
    GraphQLServer-->>ApolloClient: Respond with data
    ApolloClient-->>ReactComponent: Provide data/error via hook

    ReactComponent->>ApolloClient: useMutation(DocumentNode, variables)
    ApolloClient->>GraphQLServer: Send GraphQL mutation
    GraphQLServer-->>ApolloClient: Respond with mutation result
    ApolloClient-->>ReactComponent: Provide result/error via hook
Loading
sequenceDiagram
    participant Dev
    participant Codegen
    participant TypeScriptConfig

    Dev->>Codegen: Run codegen with codegen.ts config
    Codegen->>TypeScriptConfig: Read schema, documents, plugins from codegen.ts
    Codegen->>Dev: Output generated TypeScript types and documents
Loading

🪧 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.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai 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:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

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

Documentation and Community

  • 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.

Copy link

@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

🔭 Outside diff range comments (1)
plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx (1)

132-263: Add CSS class prefixing for plugin components.

According to the coding guidelines, plugin components must prefix all CSS classes with the plugin name (storage-) to avoid style conflicts. The current implementation uses unprefixed classes like max-w-md, flex, h-12, etc.

Consider implementing a utility function to automatically prefix classes:

+const storageClass = (className: string) => className.split(' ').map(c => `storage-${c}`).join(' ');

// Then use it throughout the component:
-    <div className={cn('max-w-md', className)}>
+    <div className={cn(storageClass('max-w-md'), className)}>

Or use the cn() utility with prefixed classes:

-      className={cn('max-w-md', className)}
+      className={cn('storage-max-w-md', className)}
🧹 Nitpick comments (1)
packages/react-generators/src/generators/apollo/react-apollo/extractor.json (1)

15-17: Drop redundant importMapProviders to keep the template definition minimal

importMapProviders is left as an empty object. The template extractor already auto-infers providers when none are required, so the empty entry only adds noise.

-      "importMapProviders": {},
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de9e1b4 and 0536012.

⛔ Files ignored due to path filters (4)
  • packages/react-generators/src/generators/apollo/react-apollo/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • packages/react-generators/src/generators/apollo/react-apollo/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/react-generators/src/generators/apollo/react-apollo/generated/ts-import-providers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/react-generators/src/generators/apollo/react-apollo/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
📒 Files selected for processing (17)
  • .changeset/bright-parrots-watch.md (1 hunks)
  • packages/react-generators/src/constants/react-packages.ts (1 hunks)
  • packages/react-generators/src/generators/admin/_utils/foreign-data-dependency.ts (1 hunks)
  • packages/react-generators/src/generators/admin/admin-bull-board/templates/routes/bull-board/index.tsx (2 hunks)
  • packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts (4 hunks)
  • packages/react-generators/src/generators/admin/admin-crud-edit/templates/create.tsx (2 hunks)
  • packages/react-generators/src/generators/admin/admin-crud-edit/templates/edit.tsx (2 hunks)
  • packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts (2 hunks)
  • packages/react-generators/src/generators/admin/admin-crud-list/templates/index.tsx (2 hunks)
  • packages/react-generators/src/generators/admin/admin-crud-queries/admin-crud-queries.generator.ts (3 hunks)
  • packages/react-generators/src/generators/apollo/react-apollo/extractor.json (1 hunks)
  • packages/react-generators/src/generators/apollo/react-apollo/react-apollo.generator.ts (5 hunks)
  • packages/react-generators/src/generators/apollo/react-apollo/templates/package/codegen.ts (1 hunks)
  • packages/react-generators/src/generators/apollo/react-apollo/templates/package/codegen.yml (0 hunks)
  • packages/react-generators/src/generators/core/react-typescript/react-typescript.generator.ts (4 hunks)
  • plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts (2 hunks)
  • plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx (2 hunks)
💤 Files with no reviewable changes (1)
  • packages/react-generators/src/generators/apollo/react-apollo/templates/package/codegen.yml
🧰 Additional context used
📓 Path-based instructions (8)
`**/*.{ts,tsx}`: TypeScript with strict type checking Node 16 module resolution ...

**/*.{ts,tsx}: TypeScript with strict type checking
Node 16 module resolution - include file extensions in imports (.js)
Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
Always include return types on top-level functions including React components (React.ReactElement)
Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)
Order functions such that functions are placed below the variables/functions they use
If a particular interface or type is not exported, change the file so it is exported
Prefer using nullish coalescing operator (??) instead of logical or (||)
Use console.info/warn/error instead of console.log
Always use .js extensions in imports, even for TypeScript files
Specify explicit return types on all functions

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • packages/react-generators/src/generators/admin/admin-crud-edit/templates/edit.tsx
  • packages/react-generators/src/generators/admin/admin-crud-edit/templates/create.tsx
  • packages/react-generators/src/generators/admin/admin-crud-list/templates/index.tsx
  • plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts
  • packages/react-generators/src/generators/admin/admin-bull-board/templates/routes/bull-board/index.tsx
  • plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx
  • packages/react-generators/src/generators/admin/_utils/foreign-data-dependency.ts
  • packages/react-generators/src/generators/apollo/react-apollo/templates/package/codegen.ts
  • packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts
  • packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts
  • packages/react-generators/src/generators/admin/admin-crud-queries/admin-crud-queries.generator.ts
  • packages/react-generators/src/generators/apollo/react-apollo/react-apollo.generator.ts
  • packages/react-generators/src/generators/core/react-typescript/react-typescript.generator.ts
  • packages/react-generators/src/constants/react-packages.ts
`**/*`: Use kebab-case for file names

**/*: Use kebab-case for file names

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • packages/react-generators/src/generators/admin/admin-crud-edit/templates/edit.tsx
  • packages/react-generators/src/generators/admin/admin-crud-edit/templates/create.tsx
  • packages/react-generators/src/generators/admin/admin-crud-list/templates/index.tsx
  • plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts
  • packages/react-generators/src/generators/admin/admin-bull-board/templates/routes/bull-board/index.tsx
  • plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx
  • packages/react-generators/src/generators/admin/_utils/foreign-data-dependency.ts
  • packages/react-generators/src/generators/apollo/react-apollo/templates/package/codegen.ts
  • packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts
  • packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts
  • packages/react-generators/src/generators/admin/admin-crud-queries/admin-crud-queries.generator.ts
  • packages/react-generators/src/generators/apollo/react-apollo/react-apollo.generator.ts
  • packages/react-generators/src/generators/core/react-typescript/react-typescript.generator.ts
  • packages/react-generators/src/generators/apollo/react-apollo/extractor.json
  • packages/react-generators/src/constants/react-packages.ts
`**/*.tsx`: Use ShadCN-based components from `@baseplate-dev/ui-components` inst...

**/*.tsx: Use ShadCN-based components from @baseplate-dev/ui-components instead of creating custom ones
Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes
Use icons from react-icons/md (Material Design icons); avoid using other icon libraries

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • packages/react-generators/src/generators/admin/admin-crud-edit/templates/edit.tsx
  • packages/react-generators/src/generators/admin/admin-crud-edit/templates/create.tsx
  • packages/react-generators/src/generators/admin/admin-crud-list/templates/index.tsx
  • packages/react-generators/src/generators/admin/admin-bull-board/templates/routes/bull-board/index.tsx
  • plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx
`{packages,plugins}/**/*.{ts,tsx}`: Use TypeScript with strict type checking ena...

{packages,plugins}/**/*.{ts,tsx}: Use TypeScript with strict type checking enabled
All functions (excluding one-liner arrow functions) require explicit return types
Use camelCase for variables and functions
Use PascalCase for types and classes
Prefer functional programming patterns
Extract repeated components into distinct functions or components where applicable

📄 Source: CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

List of files the instruction was applied to:

  • packages/react-generators/src/generators/admin/admin-crud-edit/templates/edit.tsx
  • packages/react-generators/src/generators/admin/admin-crud-edit/templates/create.tsx
  • packages/react-generators/src/generators/admin/admin-crud-list/templates/index.tsx
  • plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts
  • packages/react-generators/src/generators/admin/admin-bull-board/templates/routes/bull-board/index.tsx
  • plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx
  • packages/react-generators/src/generators/admin/_utils/foreign-data-dependency.ts
  • packages/react-generators/src/generators/apollo/react-apollo/templates/package/codegen.ts
  • packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts
  • packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts
  • packages/react-generators/src/generators/admin/admin-crud-queries/admin-crud-queries.generator.ts
  • packages/react-generators/src/generators/apollo/react-apollo/react-apollo.generator.ts
  • packages/react-generators/src/generators/core/react-typescript/react-typescript.generator.ts
  • packages/react-generators/src/constants/react-packages.ts
`**/index.{ts,tsx}`: Prefer barrel exports e.g. `export * from './foo.js'` instead of individual named exports

**/index.{ts,tsx}: Prefer barrel exports e.g. export * from './foo.js' instead of individual named exports

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • packages/react-generators/src/generators/admin/admin-crud-list/templates/index.tsx
  • packages/react-generators/src/generators/admin/admin-bull-board/templates/routes/bull-board/index.tsx
`plugins/*/**/*.tsx`: In plugins, prefix all Tailwind classes with the plugin name (e.g., `auth-`, `storage-`)

plugins/*/**/*.tsx: In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx
`plugins/plugin-*/**/*.tsx`: All CSS classes used in `className` attributes with...

plugins/plugin-*/**/*.tsx: All CSS classes used in className attributes within plugin components MUST be prefixed with the plugin name to avoid style conflicts.
When using utility functions like cn(), all CSS classes passed to cn() in plugin components MUST be prefixed with the plugin name.

📄 Source: CodeRabbit Inference Engine (plugins/CLAUDE.md)

List of files the instruction was applied to:

  • plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx
`.changeset/*.md`: If you are adding a new feature or changing an existing feature, add a new Changeset in the `.changeset/` directory

.changeset/*.md: If you are adding a new feature or changing an existing feature, add a new Changeset in the .changeset/ directory

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • .changeset/bright-parrots-watch.md
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use TypeScript with strict type checking enabled
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always include return types on top-level functions including React components (`React.ReactElement`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking
packages/react-generators/src/generators/admin/admin-crud-edit/templates/edit.tsx (4)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always include return types on top-level functions including React components (`React.ReactElement`)
packages/react-generators/src/generators/admin/admin-crud-edit/templates/create.tsx (4)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always include return types on top-level functions including React components (`React.ReactElement`)
Learnt from: kingston
PR: halfdomelabs/baseplate#544
File: packages/ui-components/src/components/Command/Command.tsx:16-31
Timestamp: 2025-05-12T08:29:52.819Z
Learning: In React 19, function components automatically receive refs as regular props, eliminating the need for React.forwardRef. This allows components to directly destructure and use the ref prop, simplifying component definitions while maintaining the same ref forwarding functionality.
packages/react-generators/src/generators/admin/admin-crud-list/templates/index.tsx (3)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
packages/react-generators/src/generators/admin/admin-bull-board/templates/routes/bull-board/index.tsx (1)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx (2)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
packages/react-generators/src/generators/admin/_utils/foreign-data-dependency.ts (5)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts:90-94
Timestamp: 2025-05-05T06:36:50.687Z
Learning: In this codebase, import paths can include `.ts` extensions, and the `resolveModuleSpecifier` function will handle them appropriately. There's no need to strip file extensions before passing paths to functions like `TsCodeUtils.importFragment`.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Node 16 module resolution - include file extensions in imports (`.js`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (`@src/` is the alias for `src/`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
.changeset/bright-parrots-watch.md (7)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-06-30T11:52:33.318Z
Learning: Applies to *.{tsx},packages/project-builder-web/**,packages/ui-components/** : We use a rough analog of ShadCN components that can be imported from @baseplate-dev/ui-components
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use TypeScript with strict type checking enabled
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking
packages/react-generators/src/generators/apollo/react-apollo/templates/package/codegen.ts (12)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use TypeScript with strict type checking enabled
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always include return types on top-level functions including React components (`React.ReactElement`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking
Learnt from: kingston
PR: halfdomelabs/baseplate#592
File: plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-required-user-id.ts:1-2
Timestamp: 2025-07-07T18:24:17.476Z
Learning: Files under templates/** directories can use `// @ts-nocheck` because they are templates meant for code generation, not direct type checking.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (`@src/` is the alias for `src/`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Specify explicit return types on all functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.test.ts : Leverage TypeScript for type-safe mocking in tests
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts (2)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts:90-94
Timestamp: 2025-05-05T06:36:50.687Z
Learning: In this codebase, import paths can include `.ts` extensions, and the `resolveModuleSpecifier` function will handle them appropriately. There's no need to strip file extensions before passing paths to functions like `TsCodeUtils.importFragment`.
packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts (2)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
packages/react-generators/src/generators/admin/admin-crud-queries/admin-crud-queries.generator.ts (4)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
packages/react-generators/src/generators/apollo/react-apollo/react-apollo.generator.ts (21)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-06-30T11:52:33.318Z
Learning: Applies to *.{tsx},packages/project-builder-web/**,packages/ui-components/** : We use a rough analog of ShadCN components that can be imported from @baseplate-dev/ui-components
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always include return types on top-level functions including React components (`React.ReactElement`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Node 16 module resolution - include file extensions in imports (`.js`)
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (`@src/` is the alias for `src/`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts:90-94
Timestamp: 2025-05-05T06:36:50.687Z
Learning: In this codebase, import paths can include `.ts` extensions, and the `resolveModuleSpecifier` function will handle them appropriately. There's no need to strip file extensions before passing paths to functions like `TsCodeUtils.importFragment`.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use TypeScript with strict type checking enabled
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : All functions (excluding one-liner arrow functions) require explicit return types
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{unit,int}.test.ts : Always import vitest globals explicitly (describe, it, expect)
Learnt from: kingston
PR: halfdomelabs/baseplate#562
File: plugins/plugin-auth/package.json:32-36
Timestamp: 2025-06-03T09:11:29.651Z
Learning: With TypeScript project references, TypeScript compilation is watched from the root level using "watch:tsc:root" script, so individual packages no longer need to include their "tsc:watch" scripts in their local "watch" commands. The local "tsc:watch" scripts are renamed from "watch:tsc" but are not meant to be run as part of the package's watch command since TypeScript watching is handled centrally at the workspace root.
Learnt from: kingston
PR: halfdomelabs/baseplate#592
File: plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-required-user-id.ts:1-2
Timestamp: 2025-07-07T18:24:17.476Z
Learning: Files under templates/** directories can use `// @ts-nocheck` because they are templates meant for code generation, not direct type checking.
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Use camelCase for variables/functions, PascalCase for types/classes
packages/react-generators/src/generators/core/react-typescript/react-typescript.generator.ts (23)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always include return types on top-level functions including React components (`React.ReactElement`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Node 16 module resolution - include file extensions in imports (`.js`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (`@src/` is the alias for `src/`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use TypeScript with strict type checking enabled
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Specify explicit return types on all functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-06-30T11:52:33.318Z
Learning: Applies to *.{tsx},packages/project-builder-web/**,packages/ui-components/** : We use a rough analog of ShadCN components that can be imported from @baseplate-dev/ui-components
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : All functions (excluding one-liner arrow functions) require explicit return types
Learnt from: kingston
PR: halfdomelabs/baseplate#592
File: plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-required-user-id.ts:1-2
Timestamp: 2025-07-07T18:24:17.476Z
Learning: Files under templates/** directories can use `// @ts-nocheck` because they are templates meant for code generation, not direct type checking.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{unit,int}.test.ts : Always import vitest globals explicitly (describe, it, expect)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.test.ts : Import test functions from 'vitest' (no globals)
Learnt from: kingston
PR: halfdomelabs/baseplate#562
File: plugins/plugin-auth/package.json:32-36
Timestamp: 2025-06-03T09:11:29.651Z
Learning: With TypeScript project references, TypeScript compilation is watched from the root level using "watch:tsc:root" script, so individual packages no longer need to include their "tsc:watch" scripts in their local "watch" commands. The local "tsc:watch" scripts are renamed from "watch:tsc" but are not meant to be run as part of the package's watch command since TypeScript watching is handled centrally at the workspace root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-06-30T11:52:28.745Z
Learning: Applies to src/tests/**/*.{ts,tsx} : Test helpers are located in `src/tests/` directory
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to src/tests/**/*.{ts,tsx} : Test helpers are located in `src/tests/` directory
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.test.ts : Extract common setup code into test helpers
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Sort imports by group: external libs first, then local imports
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.test.ts : Always import vitest globals explicitly (describe, it, expect)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always use `.js` extensions in imports, even for TypeScript files
packages/react-generators/src/generators/apollo/react-apollo/extractor.json (12)
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-06-30T11:52:33.318Z
Learning: Applies to *.{tsx},packages/project-builder-web/**,packages/ui-components/** : We use a rough analog of ShadCN components that can be imported from @baseplate-dev/ui-components
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: kingston
PR: halfdomelabs/baseplate#592
File: plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-required-user-id.ts:1-2
Timestamp: 2025-07-07T18:24:17.476Z
Learning: Files under templates/** directories can use `// @ts-nocheck` because they are templates meant for code generation, not direct type checking.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use TypeScript with strict type checking enabled
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
packages/react-generators/src/constants/react-packages.ts (8)
Learnt from: kingston
PR: halfdomelabs/baseplate#539
File: scripts/check-changesets.ts:70-79
Timestamp: 2025-05-08T12:56:11.723Z
Learning: In the check-changesets.ts script for monorepo validation, `npm pack ${pkg.name}@latest` is intentionally used to pack the most recently published version (not local changes) for comparison purposes to determine if changes require new changesets.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: kingston
PR: halfdomelabs/baseplate#562
File: plugins/plugin-auth/package.json:32-36
Timestamp: 2025-06-03T09:11:29.651Z
Learning: With TypeScript project references, TypeScript compilation is watched from the root level using "watch:tsc:root" script, so individual packages no longer need to include their "tsc:watch" scripts in their local "watch" commands. The local "tsc:watch" scripts are renamed from "watch:tsc" but are not meant to be run as part of the package's watch command since TypeScript watching is handled centrally at the workspace root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-06-30T11:52:33.318Z
Learning: Applies to *.{tsx},packages/project-builder-web/**,packages/ui-components/** : We use a rough analog of ShadCN components that can be imported from @baseplate-dev/ui-components
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use TypeScript with strict type checking enabled
🧬 Code Graph Analysis (3)
packages/react-generators/src/generators/admin/_utils/foreign-data-dependency.ts (1)
packages/core-generators/src/renderers/typescript/imports/builder.ts (1)
  • tsImportBuilder (74-82)
packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts (1)
packages/core-generators/src/renderers/typescript/imports/builder.ts (1)
  • tsImportBuilder (74-82)
packages/react-generators/src/generators/core/react-typescript/react-typescript.generator.ts (2)
packages/sync/src/providers/providers.ts (1)
  • createProviderType (151-210)
packages/core-generators/src/providers/scopes.ts (1)
  • packageScope (3-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: test
  • GitHub Check: Lint
  • GitHub Check: Test E2E
🔇 Additional comments (38)
packages/react-generators/src/generators/admin/admin-crud-edit/templates/edit.tsx (2)

6-6: LGTM: Correct Apollo Client import added

The import of useMutation from @apollo/client is properly added to support the typed GraphQL documents approach.


19-19: LGTM: Proper mutation hook usage

The change from TPL_UPDATE_MUTATION() to useMutation(TPL_UPDATE_MUTATION) correctly follows Apollo Client's hook pattern with typed document nodes.

packages/react-generators/src/generators/admin/admin-crud-edit/templates/create.tsx (2)

6-6: LGTM: Correct Apollo Client import added

The import of useMutation from @apollo/client is properly added to support the typed GraphQL documents approach.


17-23: LGTM: Excellent mutation hook usage with cache management

The change to useMutation(TPL_CREATE_MUTATION, { refetchQueries: ... }) is well-implemented, properly including cache invalidation through refetchQueries to ensure the list updates after creation.

.changeset/bright-parrots-watch.md (1)

1-8: LGTM: Properly documented changeset

The changeset correctly documents the migration to typed GraphQL documents across the affected packages with appropriate patch-level versioning.

packages/react-generators/src/generators/admin/admin-bull-board/templates/routes/bull-board/index.tsx (3)

5-5: LGTM: Correct GraphQL document import

The import of CreateBullBoardAuthCodeDocument is properly added to support the typed GraphQL documents approach.


9-9: LGTM: Correct Apollo Client import added

The import of useMutation from @apollo/client is properly added to support the migration to generic hooks.


18-20: LGTM: Proper mutation hook usage

The change to useMutation(CreateBullBoardAuthCodeDocument) correctly follows Apollo Client's hook pattern with typed document nodes.

packages/react-generators/src/generators/admin/admin-crud-list/templates/index.tsx (2)

6-6: LGTM: Correct Apollo Client import added

The import of useMutation from @apollo/client is properly added to support the typed GraphQL documents approach.


15-21: LGTM: Excellent mutation hook usage with cache management

The change to useMutation(TPL_DELETE_MUTATION, { refetchQueries: ... }) is well-implemented, properly including cache invalidation through refetchQueries to ensure the list updates after deletion.

plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts (2)

5-6: LGTM! Clean migration to typed GraphQL documents.

The import changes correctly switch from the generated Apollo hook to the explicit document and generic useQuery hook, aligning with the PR's migration strategy.


18-21: LGTM! Consistent usage pattern with typed documents.

The query invocation correctly uses the generic useQuery hook with the explicit document reference. The destructuring and variable handling remain unchanged, maintaining compatibility.

plugins/plugin-storage/src/generators/react/upload-components/templates/src/components/file-input/file-input.tsx (3)

5-5: LGTM! Correct import of GraphQL document.

The import correctly switches to the explicit document reference for the mutation.


13-13: LGTM! Correct import of generic Apollo hook.

The import correctly adds the generic useMutation hook from Apollo Client.


60-60: LGTM! Consistent usage pattern with typed documents.

The mutation invocation correctly uses the generic useMutation hook with the explicit document reference, maintaining the same destructuring pattern.

packages/react-generators/src/generators/apollo/react-apollo/templates/package/codegen.ts (1)

1-24: LGTM! Well-structured TypeScript codegen configuration.

The configuration correctly implements the new typed document node approach:

  • Proper schema and document source configuration
  • Correct plugin setup with typed-document-node instead of typescript-react-apollo
  • Appropriate scalar mappings for custom types
  • Valid TypeScript imports configuration

The @ts-nocheck directive is acceptable for template files as per established patterns.

packages/react-generators/src/generators/admin/_utils/foreign-data-dependency.ts (1)

82-88: LGTM! Correct migration to typed GraphQL documents in code generation.

The generated code correctly switches from using generated hooks to the generic useQuery hook with explicit document references. The import configuration properly includes both the Apollo Client hook and the generated document, maintaining the same destructuring pattern.

packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts (3)

244-244: LGTM! Correct migration to document expression for create mutation.

The template variable correctly uses documentExpression instead of hookExpression, aligning with the typed GraphQL documents approach.


260-277: LGTM! Correct migration to generic Apollo hooks in generated code.

The generated code correctly:

  • Uses useQuery with explicit document reference
  • Includes proper imports for both React (useMemo) and Apollo Client (useQuery)
  • Maintains the same destructuring and logic patterns
  • Uses documentExpression for the query reference

This aligns perfectly with the migration strategy.


300-300: LGTM! Correct migration to document expression for update mutation.

The template variable correctly uses documentExpression instead of hookExpression for the update mutation, maintaining consistency with the migration strategy.

packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts (3)

100-103: LGTM! Correct Apollo Client import for the migration.

The import of useQuery from @apollo/client aligns with the migration to using generic Apollo Client hooks instead of generated hooks.


106-106: LGTM! Proper use of generic useQuery hook.

The change from using a generated hook to the generic useQuery hook with explicit document expression is correct and follows Apollo Client best practices.


141-141: LGTM! Consistent template variable naming.

The rename from TPL_DELETE_FUNCTION to TPL_DELETE_MUTATION and using documentExpression is consistent with the migration to typed document nodes.

packages/react-generators/src/constants/react-packages.ts (1)

45-50: Package version verification passed

All updated GraphQL Codegen (@graphql-codegen/cli 5.0.7, @graphql-codegen/typescript 4.1.6, @graphql-codegen/typescript-operations 4.6.1), Typed Document Node (@graphql-codegen/typed-document-node 5.1.2, @graphql-typed-document-node/core 3.2.0) and @parcel/watcher 2.5.1 packages were confirmed as the latest on npm. These updates correctly support the migration away from generated React Apollo hooks.

packages/react-generators/src/generators/admin/admin-crud-queries/admin-crud-queries.generator.ts (3)

44-47: LGTM! Interface updated for document-based approach.

The rename from hookExpression to documentExpression in the ApolloHookInfo interface correctly reflects the migration to typed document nodes.


120-128: LGTM! Function signature and implementation updated consistently.

The parameter rename from hookName to documentName and the corresponding update to return documentExpression is consistent with the migration pattern.


184-206: LGTM! All hook info calls updated consistently.

All the getHookInfo calls have been updated to pass document names (e.g., ${listQueryName}Document) instead of hook names, maintaining consistency throughout the migration.

packages/react-generators/src/generators/apollo/react-apollo/react-apollo.generator.ts (6)

31-31: LGTM! Added required import for schema location quoting.

The quot import is properly added to support wrapping the schema location in the TypeScript config template.


35-35: LGTM! Added import for TypeScript provider integration.

The reactTypescriptProvider import enables dynamic registration of the TypeScript codegen config file.


196-198: LGTM! Dependencies updated for typed document node support.

The addition of @graphql-codegen/typed-document-node and @graphql-typed-document-node/core correctly supports the migration to typed document nodes.


210-215: LGTM! Provider task correctly registers TypeScript config file.

The reactTypescript provider task properly registers codegen.ts as a Node TypeScript file, enabling it to be included in the TypeScript configuration.


529-538: LGTM! Migration to TypeScript-based codegen configuration.

The switch from YAML to TypeScript config generation is correctly implemented, using the new template and properly quoting the schema location.


589-589: LGTM! Post-write command updated for TypeScript config.

The file watching is correctly updated to monitor codegen.ts instead of the previous YAML configuration file.

packages/react-generators/src/generators/core/react-typescript/react-typescript.generator.ts (4)

15-20: LGTM! Well-defined provider interface.

The ReactTypescriptProvider interface follows the established pattern and correctly defines the method for dynamically adding Node TypeScript files.


31-33: LGTM! Provider properly exported with correct scope.

The provider is correctly exported using the packageScope, following the established pattern for project-wide providers.


35-35: LGTM! Dynamic file registration implementation.

The change from a const array to a mutable array and the provider implementation correctly enables dynamic registration of TypeScript files that will be included in the Node TypeScript configuration.

Also applies to: 69-75


113-113: LGTM! Dynamic include array for TypeScript config.

Using the sorted nodeTsFiles array in the tsconfig include ensures all dynamically registered TypeScript files are properly included in the Node TypeScript configuration.

packages/react-generators/src/generators/apollo/react-apollo/extractor.json (1)

18-19: Double-check that codegen.ts actually exports a symbol named config

projectExports maps "config" for re-export.
If the rendered codegen.ts uses a different identifier (e.g. const codegenConfig or default export = config), the barrel export will break.
Please verify the template outputs export const config (or adjust this mapping accordingly).

@socket-security
Copy link

@kingston kingston merged commit 3107a1b into main Jul 8, 2025
9 checks passed
@kingston kingston deleted the kingston/eng-777-switch-to-client-preset-for-graphql branch July 8, 2025 07:07
@github-actions github-actions bot mentioned this pull request Jul 8, 2025
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.

2 participants