Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Aug 6, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a modular, provider-based queue system for background job processing with PostgreSQL support, including delayed execution, retries, job prioritization, and cron scheduling.
    • Added type-safe queue definitions and handlers with full TypeScript support.
    • Provided automatic worker script generation and a centralized queue registry for easy job management.
    • Included web-based UI components for configuring queue plugins and implementations.
  • Enhancements

    • Improved script naming conventions for development and production workflows.
    • Added new npm scripts for linting (including auto-fix), worker management, and utility tasks.
  • Documentation

    • Added comprehensive README and LICENSE files for the new queue plugin.
  • Style & Configuration

    • Added configuration files for ESLint, Prettier, Tailwind CSS, TypeScript, Vite, and Vitest to support consistent development and testing.
  • Chores

    • Updated project references and dependencies to integrate the new queue plugin.

@vercel
Copy link

vercel bot commented Aug 6, 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 Aug 6, 2025 11:24pm

@changeset-bot
Copy link

changeset-bot bot commented Aug 6, 2025

🦋 Changeset detected

Latest commit: 58d9f35

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

This PR includes changesets to release 18 packages
Name Type
@baseplate-dev/plugin-queue Patch
@baseplate-dev/core-generators Patch
@baseplate-dev/react-generators Patch
@baseplate-dev/fastify-generators Patch
@baseplate-dev/project-builder-common Patch
@baseplate-dev/project-builder-server Patch
@baseplate-dev/plugin-auth Patch
@baseplate-dev/plugin-storage 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/create-project 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 Aug 6, 2025

Walkthrough

This change introduces a new modular, provider-based queue plugin for Baseplate projects, implemented with a pg-boss backend for PostgreSQL-based background job processing. It adds code generation templates, TypeScript types, Fastify integration, React-based configuration UIs, and registry patterns for queue management. Supporting scripts, configuration, and documentation are included.

Changes

Cohort / File(s) Change Summary
New Plugin: Queue System Implementation
plugins/plugin-queue/*, packages/project-builder-common/package.json, tsconfig.build.json
Introduces the @baseplate-dev/plugin-queue package, providing a modular queue system using pg-boss as the backend. Includes TypeScript types, Fastify and React integration, code generation templates, registry pattern, job management features (delays, retries, priorities, cron, retention), and supporting configuration, scripts, and documentation. Adds dependency and build references in project builder and root configs.
Fastify & Node Script Naming and Dev Command Enhancements
packages/fastify-generators/src/generators/core/fastify-scripts/fastify-scripts.generator.ts, packages/fastify-generators/src/generators/core/fastify/fastify.generator.ts, .changeset/script-naming-improvements.md
Refactors generated script names for clarity and consistency, introducing script:run, script:dev, dev:server, dev:workers, and start:workers. Adds support for running multiple dev scripts in parallel via a new config flag.
Linting Script Improvements
packages/core-generators/src/generators/node/eslint/eslint.generator.ts
Adds a lint:fix script alongside lint for automatic ESLint fixing in generated node scripts.
Documentation and Licensing
plugins/plugin-queue/README.md, plugins/plugin-queue/LICENSE, .changeset/queue-plugin-implementation.md
Adds detailed README and MPL-2.0 license with generated code exception. Documents the new queue plugin and its architecture.
Build, Test, and Formatting Configurations
plugins/plugin-queue/tsconfig*.json, plugins/plugin-queue/vite.config.ts, plugins/plugin-queue/vitest.config.js, plugins/plugin-queue/prettier.config.js, plugins/plugin-queue/eslint.config.js
Adds TypeScript, Vite, Vitest, Prettier, and ESLint configurations for the new plugin, enabling build, test, and formatting support.
Supporting Files and Assets
plugins/plugin-queue/.gitignore, plugins/plugin-queue/index.html, plugins/plugin-queue/src/styles.css, plugins/plugin-queue/package.json, plugins/plugin-queue/src/web-export.ts
Adds ignore rules, HTML entrypoint, styles, package metadata, and a placeholder web export for the plugin.
Queue Core Modules and Schema
plugins/plugin-queue/src/queue/core/*
Adds queue core platform plugin, schema definitions, React configuration editor, generators for queue types and registry, node compiler integration, web UI integration, and utilities for queue plugin definition extraction.
PgBoss Core Modules and Schema
plugins/plugin-queue/src/pg-boss/core/*
Adds pg-boss core platform plugin, schema definitions, React configuration editor, Fastify plugin integration, node compiler integration, web UI integration, generators for pg-boss service, scripts, and plugin module, and service implementation managing pg-boss lifecycle and job processing.
Queue Providers and Import Maps
plugins/plugin-queue/src/queue/providers/*
Adds queue service import provider schema and exports for consistent dependency injection of queue service imports.
Code Generation Templates and Index Modules
plugins/plugin-queue/src/queue/core/generators/queues/*, plugins/plugin-queue/src/pg-boss/core/generators/pg-boss/*
Adds code generation templates and generator modules for queue registry, queue types, pg-boss plugin, service, and worker scripts, supporting automated code scaffolding for the queue plugin.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ReactConfigUI
    participant ProjectBuilder
    participant QueuePlugin
    participant PgBossPlugin
    participant PgBossService
    participant FastifyApp
    participant WorkerScript

    User->>ReactConfigUI: Configure queue plugin and select implementation
    ReactConfigUI->>ProjectBuilder: Save queue config (provider, options)
    ProjectBuilder->>QueuePlugin: Register queue config and provider
    QueuePlugin->>PgBossPlugin: Initialize backend with config
    PgBossPlugin->>PgBossService: Setup pg-boss, register queues
    FastifyApp->>PgBossPlugin: Register plugin on startup
    WorkerScript->>PgBossService: Start all queue workers
    PgBossService->>PgBoss: Process jobs, handle retries, schedule, shutdown
    User->>ReactConfigUI: Monitor/edit queue/job status
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 58d9f35 and 00499e4.

📒 Files selected for processing (2)
  • plugins/plugin-queue/tsconfig.build.json (1 hunks)
  • tsconfig.build.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tsconfig.build.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/plugin-queue/tsconfig.build.json
⏰ 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). (1)
  • GitHub Check: Test E2E
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kingston/eng-835-implement-simplified-queue-plugin-architecture

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

Support

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

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 generate unit tests to generate unit tests for 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: 7

🧹 Nitpick comments (6)
plugins/plugin-queue/.gitignore (1)

64-82: Duplicate .cache patterns – safe but noisy

.cache is ignored twice (Lines 64–66 and Lines 78–81).
While harmless, removing the duplicate keeps the ignore list tidy and avoids future merge noise.

Also applies to: 78-82

tsconfig.build.json (1)

38-42: Keep references array alphabetically ordered

For quicker look-ups and to minimise merge conflicts, keep the references list sorted.
plugin-queue should come before plugin-storage.

-    {
-      "path": "./plugins/plugin-storage/tsconfig.build.json"
-    },
-    {
-      "path": "./plugins/plugin-queue/tsconfig.build.json"
-    }
+    {
+      "path": "./plugins/plugin-queue/tsconfig.build.json"
+    },
+    {
+      "path": "./plugins/plugin-storage/tsconfig.build.json"
+    }
plugins/plugin-queue/tsconfig.node.json (1)

1-9: Prefer extending the repo’s base tsconfig to avoid option drift
If the monorepo already has a shared tsconfig.node.json, consider inheriting from it and overriding only what’s unique:

-{
-  "compilerOptions": {
-    "composite": true,
-    "moduleResolution": "bundler",
-    "module": "ES2022",
-    "strict": true
-  },
-  "include": ["vite.config.ts"]
-}
+{
+  "extends": "../../tsconfig.node.json",
+  "compilerOptions": {
+    "composite": true
+  },
+  "include": ["vite.config.ts"]
+}

Keeps compiler options consistent across packages and reduces maintenance.

plugins/plugin-queue/index.html (1)

17-17: Consider using a more descriptive title.

The generic title "React Remote" doesn't clearly indicate this is for the queue plugin. Consider using something more descriptive like "Queue Plugin Configuration" or "Baseplate Queue Plugin".

-    <title>React Remote</title>
+    <title>Queue Plugin Configuration</title>
plugins/plugin-queue/README.md (1)

27-27: Add missing newline at end of file.

Line 27 is missing a proper newline termination, which is a common convention for text files.

-This package is part of the Baseplate monorepo and extends Baseplate projects with comprehensive background job processing functionality.
+This package is part of the Baseplate monorepo and extends Baseplate projects with comprehensive background job processing functionality.
+
plugins/plugin-queue/src/pg-boss/core/generators/pg-boss/templates/src/services/pg-boss.service.ts (1)

259-259: Consider preserving type information in pg-boss operations.

The type casting to object on lines 259 and 272 might lose valuable type information. For the error on line 272, consider preserving the error stack:

-          await boss.complete(this.name, job.id, result as object);
+          await boss.complete(this.name, job.id, result as object ?? undefined);
-          await boss.fail(this.name, job.id, { err: String(error) });
+          await boss.fail(this.name, job.id, { 
+            err: error instanceof Error ? error.message : String(error),
+            stack: error instanceof Error ? error.stack : undefined
+          });

Also applies to: 272-272

Comment on lines +275 to +318
- *
- 6. Disclaimer of Warranty \*
- ------------------------- \*
- *
- Covered Software is provided under this License on an "as is" \*
- basis, without warranty of any kind, either expressed, implied, or \*
- statutory, including, without limitation, warranties that the \*
- Covered Software is free of defects, merchantable, fit for a \*
- particular purpose or non-infringing. The entire risk as to the \*
- quality and performance of the Covered Software is with You. \*
- Should any Covered Software prove defective in any respect, You \*
- (not any Contributor) assume the cost of any necessary servicing, \*
- repair, or correction. This disclaimer of warranty constitutes an \*
- essential part of this License. No use of any Covered Software is \*
- authorized under this License except under this disclaimer. \*
- *

---

---

- *
- 7. Limitation of Liability \*
- -------------------------- \*
- *
- Under no circumstances and under no legal theory, whether tort \*
- (including negligence), contract, or otherwise, shall any \*
- Contributor, or anyone who distributes Covered Software as \*
- permitted above, be liable to You for any direct, indirect, \*
- special, incidental, or consequential damages of any character \*
- including, without limitation, damages for lost profits, loss of \*
- goodwill, work stoppage, computer failure or malfunction, or any \*
- and all other commercial damages or losses, even if such party \*
- shall have been informed of the possibility of such damages. This \*
- limitation of liability shall not apply to liability for death or \*
- personal injury resulting from such party's negligence to the \*
- extent applicable law prohibits such limitation. Some \*
- jurisdictions do not allow the exclusion or limitation of \*
- incidental or consequential damages, so this exclusion and \*
- limitation may not apply to You. \*
- *

---

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix formatting issues in disclaimer and limitation sections.

Sections 6 and 7 have unusual formatting with asterisks and dashes that don't match the rest of the document. These sections should follow the standard MPL-2.0 format:

----
-
--                                                                      *
-- 6.  Disclaimer of Warranty \*
-- ------------------------- \*
--                                                                      *
-- Covered Software is provided under this License on an "as is" \*
-- basis, without warranty of any kind, either expressed, implied, or \*
-- statutory, including, without limitation, warranties that the \*
-- Covered Software is free of defects, merchantable, fit for a \*
-- particular purpose or non-infringing. The entire risk as to the \*
-- quality and performance of the Covered Software is with You. \*
-- Should any Covered Software prove defective in any respect, You \*
-- (not any Contributor) assume the cost of any necessary servicing, \*
-- repair, or correction. This disclaimer of warranty constitutes an \*
-- essential part of this License. No use of any Covered Software is \*
-- authorized under this License except under this disclaimer. \*
--                                                                      *
-
----
+6. Disclaimer of Warranty
+
+---
+
+Covered Software is provided under this License on an "as is"
+basis, without warranty of any kind, either expressed, implied, or
+statutory, including, without limitation, warranties that the
+Covered Software is free of defects, merchantable, fit for a
+particular purpose or non-infringing. The entire risk as to the
+quality and performance of the Covered Software is with You.
+Should any Covered Software prove defective in any respect, You
+(not any Contributor) assume the cost of any necessary servicing,
+repair, or correction. This disclaimer of warranty constitutes an
+essential part of this License. No use of any Covered Software is
+authorized under this License except under this disclaimer.

Apply similar formatting fixes to Section 7 (Limitation of Liability).

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In plugins/plugin-queue/LICENSE between lines 275 and 318, sections 6 and 7 have
inconsistent formatting with asterisks and dashes that deviate from the standard
MPL-2.0 license style. Remove the extra asterisks and dashes, and reformat these
sections to match the typical MPL-2.0 layout, ensuring clean, plain text
paragraphs with proper headings and spacing consistent with the rest of the
license document.

@@ -0,0 +1 @@
export { default } from '@baseplate-dev/tools/prettier-react';
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify dependency placement for @baseplate-dev/tools.

Static analysis indicates that @baseplate-dev/tools should be listed in dependencies rather than devDependencies since this file re-exports from it at runtime.


🏁 Script executed:

#!/bin/bash
# Check if @baseplate-dev/tools is correctly placed in package.json dependencies
echo "Checking dependency placement in package.json:"
cat plugins/plugin-queue/package.json | jq '{dependencies, devDependencies}' | grep -A 10 -B 10 "baseplate-dev/tools"

# Check other plugins for consistency
echo -e "\nChecking other plugin prettier configs for comparison:"
find plugins/ -name "prettier.config.js" -exec echo "=== {} ===" \; -exec cat {} \;

Length of output: 1455


Move @baseplate-dev/tools into dependencies

The shared Prettier config is loaded at runtime by Prettier, so @baseplate-dev/tools must be a runtime dependency, not a dev-only one. Update plugins/plugin-queue/package.json (and likewise in plugin-auth/plugin-storage) as follows:

--- a/plugins/plugin-queue/package.json
+++ b/plugins/plugin-queue/package.json
@@
   "dependencies": {
+    "@baseplate-dev/tools": "workspace:*",
     /* other deps… */
   },
   "devDependencies": {
-    "@baseplate-dev/tools": "workspace:*",
     /* other devDeps… */
   }
📝 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
export { default } from '@baseplate-dev/tools/prettier-react';
// plugins/plugin-queue/package.json
{
"dependencies": {
"@baseplate-dev/tools": "workspace:*",
/* other deps… */
},
"devDependencies": {
/* other devDeps… */
}
}
🧰 Tools
🪛 ESLint

[error] 1-1: '@baseplate-dev/tools' should be listed in the project's dependencies, not devDependencies.

(import-x/no-extraneous-dependencies)

🤖 Prompt for AI Agents
In plugins/plugin-queue/prettier.config.js at line 1, the package
'@baseplate-dev/tools' is imported but currently listed only as a devDependency
in package.json. To fix this, move '@baseplate-dev/tools' from devDependencies
to dependencies in plugins/plugin-queue/package.json and also update plugin-auth
and plugin-storage package.json files similarly to ensure it is available at
runtime when Prettier loads the config.

Comment on lines +4 to +11
import {
cleanupOrphanedSchedules,
initializePgBoss,
shutdownPgBoss,
} from '$pgBossService';
import { logError } from '%errorHandlerServiceImports';
import { logger } from '%loggerServiceImports';
import { QUEUE_REGISTRY } from '%queuesImports';
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix import ordering to comply with ESLint rules.

The imports should be sorted with external dependencies first, then local imports.

 import {
   cleanupOrphanedSchedules,
   initializePgBoss,
   shutdownPgBoss,
 } from '$pgBossService';
-import { logError } from '%errorHandlerServiceImports';
-import { logger } from '%loggerServiceImports';
-import { QUEUE_REGISTRY } from '%queuesImports';
+import { logError } from '%errorHandlerServiceImports';
+import { logger } from '%loggerServiceImports';
+import { QUEUE_REGISTRY } from '%queuesImports';

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 ESLint

[error] 9-9: Expected "%errorHandlerServiceImports" to come before "$pgBossService".

(perfectionist/sort-imports)

🤖 Prompt for AI Agents
In
plugins/plugin-queue/src/pg-boss/core/generators/pg-boss/templates/src/scripts/run-workers.ts
between lines 4 and 11, the import statements are not ordered according to
ESLint rules. Reorder the imports so that external dependencies come first,
followed by local imports. This means placing imports from external packages or
modules before imports from local paths or aliases.

Comment on lines +104 to +107
main().catch((error: unknown) => {
logError(error, { source: 'run-workers' });
process.exit(1);
});
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Use top-level await instead of promise chain.

Modern Node.js supports top-level await, which is cleaner than promise chains.

-// Start the worker process
-main().catch((error: unknown) => {
-  logError(error, { source: 'run-workers' });
-  process.exit(1);
-});
+// Start the worker process
+try {
+  await main();
+} catch (error: unknown) {
+  logError(error, { source: 'run-workers' });
+  process.exit(1);
+}
📝 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
main().catch((error: unknown) => {
logError(error, { source: 'run-workers' });
process.exit(1);
});
// Start the worker process
try {
await main();
} catch (error: unknown) {
logError(error, { source: 'run-workers' });
process.exit(1);
}
🧰 Tools
🪛 ESLint

[error] 104-104: Prefer top-level await over using a promise chain.

(unicorn/prefer-top-level-await)

🤖 Prompt for AI Agents
In
plugins/plugin-queue/src/pg-boss/core/generators/pg-boss/templates/src/scripts/run-workers.ts
around lines 104 to 107, replace the main().catch promise chain with top-level
await syntax. Remove the .catch block and instead use a try-catch block around
the top-level await call to main(), logging errors and exiting the process
inside the catch block for cleaner and more modern asynchronous handling.

@@ -0,0 +1 @@
export type * from './core/index.js';
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Syntax error – export type * is invalid TypeScript

export type * from './core/index.js'; does not compile.
Type-only re-exports must use named bindings:

-export type * from './core/index.js';
+export * from './core/index.js';            // re-export everything (types & values)
+// or, if you truly need a type-only re-export:
+// export type { SomeType, OtherType } from './core/index.js';

This will currently break the build under tsc --strict.

📝 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
export type * from './core/index.js';
export * from './core/index.js'; // re-export everything (types & values)
// or, if you truly need a type-only re-export:
// export type { SomeType, OtherType } from './core/index.js';
🤖 Prompt for AI Agents
In plugins/plugin-queue/src/pg-boss/index.ts at line 1, the statement `export
type * from './core/index.js';` is invalid TypeScript syntax for type-only
exports. Replace this with named type exports by explicitly listing the types to
export from './core/index.js' using `export type { TypeName1, TypeName2 } from
'./core/index.js';` to fix the syntax error and ensure the build passes under
`tsc --strict`.

Comment on lines +3 to +4
@import 'tailwindcss/theme.css' layer(theme) prefix(queue);
@import 'tailwindcss/utilities.css' layer(utilities) prefix(queue);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid @import … prefix() syntax – will fail CSS parsing

prefix(queue) is not a valid parameter in the CSS @import rule (see Biome parse errors).
Tailwind class prefixing is configured in tailwind.config.{js,cjs} via the prefix option, not at import-time.

-@import 'tailwindcss/theme.css' layer(theme) prefix(queue);
-@import 'tailwindcss/utilities.css' layer(utilities) prefix(queue);
+@import 'tailwindcss/theme.css' layer(theme);
+@import 'tailwindcss/utilities.css' layer(utilities);

Add prefix: 'queue-' (or similar) in the plugin’s Tailwind config to satisfy the style-isolation guideline.

🧰 Tools
🪛 Biome (2.1.2)

[error] 3-3: expected , but instead found (

Remove (

(parse)


[error] 4-4: expected , but instead found (

Remove (

(parse)


[error] 3-3: Don't use unknown media feature names.

Unexpected unknown media feature name.
You should use media feature names defined in the CSS Specifications.

(lint/correctness/noUnknownMediaFeatureName)


[error] 4-4: Don't use unknown media feature names.

Unexpected unknown media feature name.
You should use media feature names defined in the CSS Specifications.

(lint/correctness/noUnknownMediaFeatureName)

🤖 Prompt for AI Agents
In plugins/plugin-queue/src/styles.css at lines 3 to 4, the use of prefix(queue)
in the @import statements is invalid CSS syntax and causes parsing errors.
Remove the prefix(queue) from both @import lines. Instead, configure the
Tailwind class prefix by adding a prefix option like prefix: 'queue-' in the
plugin's tailwind.config.js or tailwind.config.cjs file to properly isolate
styles.

getModuleFederationTargets,
rewriteDistToSrc,
} from '@baseplate-dev/project-builder-lib/plugin-tools';
import { srcSubpathImportPlugin } from '@baseplate-dev/tools/src-subpath-import-plugin';
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix dependency classification for @baseplate-dev/tools.

The static analysis correctly identifies that @baseplate-dev/tools should be listed in dependencies rather than devDependencies since it's imported in production code.

Move @baseplate-dev/tools from devDependencies to dependencies in the package.json file.

🧰 Tools
🪛 ESLint

[error] 7-7: '@baseplate-dev/tools' should be listed in the project's dependencies, not devDependencies.

(import-x/no-extraneous-dependencies)

🤖 Prompt for AI Agents
In plugins/plugin-queue/vite.config.ts at line 7, the import from
'@baseplate-dev/tools' is used in production code, so update the package.json by
moving '@baseplate-dev/tools' from devDependencies to dependencies to correctly
classify it as a runtime dependency.

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

♻️ Duplicate comments (1)
plugins/plugin-queue/vite.config.ts (1)

7-7: Fix dependency classification for @baseplate-dev/tools.

The static analysis correctly identifies that @baseplate-dev/tools should be listed in dependencies rather than devDependencies since it's imported in production code.

🧹 Nitpick comments (1)
plugins/plugin-queue/vite.config.ts (1)

14-14: Use consistent directory reference.

Line 14 uses __dirname while line 30 uses import.meta.dirname. For consistency and modern Node.js practices, use import.meta.dirname throughout the file.

-  const viteTargets = await getModuleFederationTargets(__dirname, {
+  const viteTargets = await getModuleFederationTargets(import.meta.dirname, {
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d993244 and 58d9f35.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • plugins/plugin-queue/vite.config.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

**/*.{ts,tsx}: Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.
Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.
If a particular interface or type is not exported, change the file so it is exported.

**/*.{ts,tsx}: TypeScript with strict type checking
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/)
If a particular interface or type is not exported, change the file so it is exported

Files:

  • plugins/plugin-queue/vite.config.ts
**/*.{js,ts,tsx}

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

Node 16 module resolution - include file extensions in imports (.js)

Files:

  • plugins/plugin-queue/vite.config.ts
**/*.{ts,tsx,js}

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

**/*.{ts,tsx,js}: Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
Order functions such that functions are placed below the variables/functions they use
We use the prefer using nullish coalescing operator (??) ESLint rule instead of a logical or (||), as it is a safer operator
Use console.info/warn/error instead of console.log

Files:

  • plugins/plugin-queue/vite.config.ts
**/*

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

Use kebab-case for file names

Files:

  • plugins/plugin-queue/vite.config.ts
🧠 Learnings (8)
📚 Learning: applies to {packages/project-builder-web/**,packages/ui-components/**}/*.tsx : use shadcn-based comp...
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/**,packages/ui-components/**}/*.tsx : Use ShadCN-based components from `baseplate-dev/ui-components` and always prefer these components over creating custom ones

Applied to files:

  • plugins/plugin-queue/vite.config.ts
📚 Learning: applies to {packages/project-builder-web/**,packages/ui-components/**}/*.tsx : in plugins, prefix al...
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/**,packages/ui-components/**}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., `auth-`, `storage-`)

Applied to files:

  • plugins/plugin-queue/vite.config.ts
📚 Learning: run `pnpm lint:affected` and `pnpm typecheck` before committing changes....
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Run `pnpm lint:affected` and `pnpm typecheck` before committing changes.

Applied to files:

  • plugins/plugin-queue/vite.config.ts
📚 Learning: ignore eslint import ordering rules for files in templates/** directories as these are code generati...
Learnt from: kingston
PR: halfdomelabs/baseplate#623
File: plugins/plugin-auth/src/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx:6-12
Timestamp: 2025-07-30T13:27:20.000Z
Learning: Ignore ESLint import ordering rules for files in templates/** directories as these are code generation templates, not direct source code.

Applied to files:

  • plugins/plugin-queue/vite.config.ts
📚 Learning: applies to **/*.{ts,tsx} : import ui components from the `@baseplate-dev/ui-components` package as s...
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the `baseplate-dev/ui-components` package as shown in the provided examples.

Applied to files:

  • plugins/plugin-queue/vite.config.ts
📚 Learning: applies to **/*.{ts,tsx} : if a particular interface or type is not exported, change the file so it ...
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Applied to files:

  • plugins/plugin-queue/vite.config.ts
📚 Learning: avoid importing directly from 'dist' directories. instead, expose functionality through the package'...
Learnt from: kingston
PR: halfdomelabs/baseplate#428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.

Applied to files:

  • plugins/plugin-queue/vite.config.ts
📚 Learning: in react projects using vite, keep the .env file naming convention as .env.development, .env.product...
Learnt from: kingston
PR: halfdomelabs/baseplate#598
File: packages/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/index.ts:18-18
Timestamp: 2025-07-10T06:49:07.714Z
Learning: In React projects using Vite, keep the .env file naming convention as .env.development, .env.production, etc. even when internal application environment values use shorter abbreviations like 'dev', 'stage', 'prod'. This follows Vite's mode conventions.

Applied to files:

  • plugins/plugin-queue/vite.config.ts
🧬 Code Graph Analysis (1)
plugins/plugin-queue/vite.config.ts (2)
packages/project-builder-lib/src/plugin-tools/plugin-loader.ts (2)
  • getModuleFederationTargets (352-410)
  • rewriteDistToSrc (340-342)
packages/tools/src-subpath-import-plugin.js (1)
  • srcSubpathImportPlugin (26-68)
🪛 ESLint
plugins/plugin-queue/vite.config.ts

[error] 7-7: '@baseplate-dev/tools' should be listed in the project's dependencies, not devDependencies.

(import-x/no-extraneous-dependencies)

⏰ 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: Lint
  • GitHub Check: Test E2E
  • GitHub Check: test
🔇 Additional comments (2)
plugins/plugin-queue/vite.config.ts (2)

17-28: LGTM! Well-configured build options for plugin development.

The build configuration is well-suited for plugin development with appropriate settings for debugging (sourcemap), development builds (minify: false), and external dependency handling.


29-51: LGTM! Plugins configuration follows best practices.

The plugin configuration is well-structured:

  • Proper use of srcSubpathImportPlugin for internal path resolution
  • Correct module federation setup with appropriate shared dependencies
  • Standard React and Tailwind CSS plugin integration

@kingston kingston merged commit d79b0cf into main Aug 6, 2025
9 checks passed
@kingston kingston deleted the kingston/eng-835-implement-simplified-queue-plugin-architecture branch August 6, 2025 23:31
@github-actions github-actions bot mentioned this pull request Aug 6, 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