Skip to content

Chore: rename references to test projects, support self-hosted local deploys on macOS #2061

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

ericallam
Copy link
Member

@ericallam ericallam commented May 15, 2025

Summary by CodeRabbit

  • Documentation
    • Updated documentation and guides to reference the test-projects directory instead of references, improving clarity and accuracy in setup and usage instructions.
    • Enhanced formatting and clarity in setup instructions for test projects.
    • Removed outdated or redundant documentation and configuration files from deprecated reference projects.
  • Chores
    • Excluded the test-projects directory from Docker build context for cleaner builds.
    • Cleaned up the workspace configuration to include test-projects instead of deprecated references.
  • Bug Fixes
    • Improved environment variable handling for API URLs, preferring a specific origin when available.
  • Refactor
    • Adjusted Docker build scripts to ensure local servers are reachable on macOS by normalizing API URLs.
  • Removals
    • Deleted deprecated reference projects and their associated configuration, code, and environment files to streamline the codebase.

Copy link

changeset-bot bot commented May 15, 2025

⚠️ No Changeset found

Latest commit: afa8a00

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

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

Copy link
Contributor

coderabbitai bot commented May 15, 2025

Walkthrough

This update removes the entire references directory, eliminating multiple example, test, and catalog projects, their configuration files, and all associated code and documentation. All references to the old references directory are updated to point to the new test-projects directory. Documentation and ignore files are revised to reflect this structural change, and minor improvements to environment variable handling and documentation clarity are included.

Changes

Files/Paths Change Summary
.dockerignore, pnpm-workspace.yaml Updated ignore and workspace patterns to exclude/include test-projects instead of references.
CONTRIBUTING.md, ai/references/repo.md, apps/supervisor/README.md, packages/cli-v3/DEVELOPMENT.md, test-projects/README.md Updated documentation to reference test-projects instead of references, clarified setup/build steps, and improved formatting.
apps/webapp/app/routes/api.v1.projects.$projectRef.$env.ts Changed apiUrl assignment to prefer API_ORIGIN over APP_ORIGIN if defined.
packages/cli-v3/src/deploy/buildImage.ts Added normalizeApiUrlForBuild to adjust API URLs for Docker builds on macOS.
references/ (all subfolders and files) Entire directory deleted, removing all example/test projects, configurations, scripts, and documentation.
(No other files) No changes outside the above.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant CLI
    participant Docker
    participant Webapp

    Developer->>CLI: Build/test project in test-projects/
    CLI->>Docker: Build image (normalize API URL if on macOS)
    Docker->>Webapp: Connect using normalized API URL
    Webapp-->>Docker: Serve API (API_ORIGIN preferred over APP_ORIGIN)
Loading

Poem

🐇
Farewell to references, you served us well,
Now test-projects is where our test bunnies dwell.
Docs are updated, paths are clear—
Old examples vanish, new beginnings here!
With normalized URLs and Docker delight,
We hop into the future, code shining bright.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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
Contributor

@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

🧹 Nitpick comments (4)
packages/cli-v3/DEVELOPMENT.md (1)

10-10: Fix path consistency in documentation
The instruction now points to /test-projects, but most docs refer to directories relative to the repo root without a leading slash (e.g., test-projects). Consider removing the leading slash for consistency.

.dockerignore (1)

43-43: Clean up stale ignore entry?
test-projects is now ignored as expected. Since the references directory has been removed, consider deleting its entry to keep the .dockerignore file tidy.

CONTRIBUTING.md (2)

164-164: Minor grammatical improvement opportunity.

- 6. If you make any changes in the CLI/Core/SDK, you'll need to `CTRL+C` to exit the `dev` command and restart it to pickup changes. Any changes to the files inside of the `v3-catalog/src/trigger` dir will automatically be rebuilt by the `dev` command.
+ 6. If you make any changes in the CLI/Core/SDK, you'll need to `CTRL+C` to exit the `dev` command and restart it to pick up changes. Any changes to the files inside the `v3-catalog/src/trigger` dir will automatically be rebuilt by the `dev` command.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~164-~164: Possible missing article found.
Context: ... dev command and restart it to pickup changes. Any changes to the files inside of the...

(AI_HYDRA_LEO_MISSING_THE)


[style] ~164-~164: This phrase is redundant. Consider using “inside”.
Context: ...ickup changes. Any changes to the files inside of the v3-catalog/src/trigger dir will a...

(OUTSIDE_OF)


166-166: Consider adding a comma in compound sentence.

- 7. Navigate to the `v3-catalog` project in your local dashboard at localhost:3030 and you should see the list of tasks.
+ 7. Navigate to the `v3-catalog` project in your local dashboard at localhost:3030, and you should see the list of tasks.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~166-~166: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n your local dashboard at localhost:3030 and you should see the list of tasks. 8. G...

(COMMA_COMPOUND_SENTENCE)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between bb7173b and afa8a00.

⛔ Files ignored due to path filters (16)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • references/d3-openai-agents/public/file.svg is excluded by !**/*.svg
  • references/d3-openai-agents/public/globe.svg is excluded by !**/*.svg
  • references/d3-openai-agents/public/next.svg is excluded by !**/*.svg
  • references/d3-openai-agents/public/vercel.svg is excluded by !**/*.svg
  • references/d3-openai-agents/public/window.svg is excluded by !**/*.svg
  • references/nextjs-realtime/src/app/favicon.ico is excluded by !**/*.ico
  • test-projects/d3-chat/public/file.svg is excluded by !**/*.svg
  • test-projects/d3-chat/public/globe.svg is excluded by !**/*.svg
  • test-projects/d3-chat/public/next.svg is excluded by !**/*.svg
  • test-projects/d3-chat/public/vercel.svg is excluded by !**/*.svg
  • test-projects/d3-chat/public/window.svg is excluded by !**/*.svg
  • test-projects/d3-chat/src/app/favicon.ico is excluded by !**/*.ico
  • test-projects/nextjs-realtime/src/app/favicon.ico is excluded by !**/*.ico
  • test-projects/nextjs-realtime/src/app/fonts/GeistMonoVF.woff is excluded by !**/*.woff
  • test-projects/nextjs-realtime/src/app/fonts/GeistVF.woff is excluded by !**/*.woff
📒 Files selected for processing (49)
  • .dockerignore (1 hunks)
  • CONTRIBUTING.md (9 hunks)
  • ai/references/repo.md (1 hunks)
  • apps/supervisor/README.md (1 hunks)
  • apps/webapp/app/routes/api.v1.projects.$projectRef.$env.ts (1 hunks)
  • packages/cli-v3/DEVELOPMENT.md (1 hunks)
  • packages/cli-v3/src/deploy/buildImage.ts (2 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • references/bun-catalog/.env.example (0 hunks)
  • references/bun-catalog/package.json (0 hunks)
  • references/bun-catalog/src/trigger/bun.ts (0 hunks)
  • references/bun-catalog/trigger.config.ts (0 hunks)
  • references/d3-openai-agents/.gitignore (0 hunks)
  • references/d3-openai-agents/components.json (0 hunks)
  • references/d3-openai-agents/next.config.ts (0 hunks)
  • references/d3-openai-agents/package.json (0 hunks)
  • references/d3-openai-agents/postcss.config.mjs (0 hunks)
  • references/d3-openai-agents/requirements.in (0 hunks)
  • references/d3-openai-agents/requirements.txt (0 hunks)
  • references/d3-openai-agents/src/app/api/slack/interaction/route.ts (0 hunks)
  • references/d3-openai-agents/src/app/globals.css (0 hunks)
  • references/d3-openai-agents/src/app/layout.tsx (0 hunks)
  • references/d3-openai-agents/src/app/page.tsx (0 hunks)
  • references/d3-openai-agents/src/components/chat-interface.tsx (0 hunks)
  • references/d3-openai-agents/src/components/initial-prompt.tsx (0 hunks)
  • references/d3-openai-agents/src/components/main-app.tsx (0 hunks)
  • references/d3-openai-agents/src/extensions/playwright.ts (0 hunks)
  • references/d3-openai-agents/src/lib/migrate.ts (0 hunks)
  • references/d3-openai-agents/src/trigger/approval.ts (0 hunks)
  • references/d3-openai-agents/src/trigger/chat.ts (0 hunks)
  • references/d3-openai-agents/src/trigger/openaiAgent.ts (0 hunks)
  • references/d3-openai-agents/src/trigger/python/agent.py (0 hunks)
  • references/d3-openai-agents/src/trigger/schemas.ts (0 hunks)
  • references/d3-openai-agents/tailwind.config.ts (0 hunks)
  • references/d3-openai-agents/trigger.config.ts (0 hunks)
  • references/d3-openai-agents/tsconfig.json (0 hunks)
  • references/nextjs-realtime/README.md (0 hunks)
  • references/nextjs-realtime/src/lib/utils.ts (0 hunks)
  • references/python-catalog/tsconfig.json (0 hunks)
  • references/test-tasks/package.json (0 hunks)
  • references/test-tasks/src/trigger/helpers.ts (0 hunks)
  • references/test-tasks/src/trigger/test-heartbeats.ts (0 hunks)
  • references/test-tasks/src/trigger/test-reserve-concurrency-system.ts (0 hunks)
  • references/test-tasks/src/utils.ts (0 hunks)
  • references/test-tasks/trigger.config.ts (0 hunks)
  • references/test-tasks/tsconfig.json (0 hunks)
  • references/v3-catalog/.gitignore (0 hunks)
  • references/v3-catalog/README.md (0 hunks)
  • test-projects/README.md (3 hunks)
💤 Files with no reviewable changes (40)
  • references/v3-catalog/.gitignore
  • references/nextjs-realtime/README.md
  • references/d3-openai-agents/trigger.config.ts
  • references/d3-openai-agents/requirements.in
  • references/nextjs-realtime/src/lib/utils.ts
  • references/d3-openai-agents/components.json
  • references/v3-catalog/README.md
  • references/d3-openai-agents/src/components/initial-prompt.tsx
  • references/d3-openai-agents/tsconfig.json
  • references/d3-openai-agents/src/app/page.tsx
  • references/bun-catalog/.env.example
  • references/test-tasks/tsconfig.json
  • references/d3-openai-agents/src/extensions/playwright.ts
  • references/test-tasks/package.json
  • references/d3-openai-agents/tailwind.config.ts
  • references/test-tasks/trigger.config.ts
  • references/bun-catalog/src/trigger/bun.ts
  • references/d3-openai-agents/src/app/layout.tsx
  • references/d3-openai-agents/src/components/chat-interface.tsx
  • references/d3-openai-agents/next.config.ts
  • references/d3-openai-agents/src/trigger/schemas.ts
  • references/d3-openai-agents/requirements.txt
  • references/python-catalog/tsconfig.json
  • references/d3-openai-agents/postcss.config.mjs
  • references/d3-openai-agents/src/trigger/chat.ts
  • references/d3-openai-agents/.gitignore
  • references/bun-catalog/trigger.config.ts
  • references/bun-catalog/package.json
  • references/d3-openai-agents/src/lib/migrate.ts
  • references/test-tasks/src/utils.ts
  • references/test-tasks/src/trigger/test-heartbeats.ts
  • references/d3-openai-agents/src/app/api/slack/interaction/route.ts
  • references/d3-openai-agents/src/app/globals.css
  • references/d3-openai-agents/src/trigger/openaiAgent.ts
  • references/test-tasks/src/trigger/test-reserve-concurrency-system.ts
  • references/d3-openai-agents/src/components/main-app.tsx
  • references/d3-openai-agents/src/trigger/python/agent.py
  • references/d3-openai-agents/package.json
  • references/d3-openai-agents/src/trigger/approval.ts
  • references/test-tasks/src/trigger/helpers.ts
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
CONTRIBUTING.md

69-69: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

🪛 LanguageTool
CONTRIBUTING.md

[uncategorized] ~164-~164: Possible missing article found.
Context: ... dev command and restart it to pickup changes. Any changes to the files inside of the...

(AI_HYDRA_LEO_MISSING_THE)


[style] ~164-~164: This phrase is redundant. Consider using “inside”.
Context: ...ickup changes. Any changes to the files inside of the v3-catalog/src/trigger dir will a...

(OUTSIDE_OF)


[uncategorized] ~166-~166: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...n your local dashboard at localhost:3030 and you should see the list of tasks. 8. G...

(COMMA_COMPOUND_SENTENCE)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: units / 🧪 Unit Tests
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (12)
pnpm-workspace.yaml (1)

5-5: Workspace inclusion updated for renamed directory
The new entry - "test-projects/*" correctly replaces the old references/* workspace pattern. Verify there are no remaining references/* entries in other workspace configs to avoid stray inclusions.

apps/supervisor/README.md (1)

39-39: Terminology updated from reference to test project
Accurately replaces “reference project” with “test project” to reflect the renamed directory.

ai/references/repo.md (1)

30-30: Documentation path updated for test workspaces
The path <root>/test-projects/* now correctly replaces the previous references directory in this overview.

apps/webapp/app/routes/api.v1.projects.$projectRef.$env.ts (1)

91-91: Good change preferring API_ORIGIN over APP_ORIGIN.

This change appropriately prefers the more specific API_ORIGIN environment variable when available, while maintaining the fallback to APP_ORIGIN. This aligns with the Docker support for macOS implementation in buildImage.ts.

test-projects/README.md (3)

56-57: Improved clarity about HTTP tunnel requirements.

The updated formatting and clarification that this step is optional makes the setup instructions more user-friendly.


64-65: Better placeholder identification in examples.

Explicitly calling out placeholders that need to be replaced (<your-auth-token>, <your-app-port>) makes the instructions more accessible, especially for new contributors.

Also applies to: 72-77


104-104: Updated path reference from references to test-projects.

Correctly updated the path for copying the hello-world template to reflect the new directory structure.

packages/cli-v3/src/deploy/buildImage.ts (2)

330-330: Good update to normalize the API URL for Docker builds.

Using the helper function here ensures proper API connectivity when running in Docker containers, especially on macOS.


727-735: Excellent solution for macOS Docker networking.

This helper function correctly handles the platform-specific case for macOS, where Docker containers need to access the host using host.docker.internal instead of localhost. The implementation is clean and well-commented.

CONTRIBUTING.md (3)

70-70: Expanded build instructions to cover more packages.

The updated build command now includes both webapp and SDK packages, which provides a more complete development setup.


109-113: Successfully updated references/v3-catalog to test-projects/v3-catalog.

All directory references and commands have been correctly updated to use the new test-projects path.

Also applies to: 122-126, 153-154, 160-161


180-180: Consistent updates to all test project references.

All remaining references to the old directory structure have been updated properly, ensuring documentation consistency.

Also applies to: 187-187, 251-251, 253-253, 277-277

@ericallam ericallam closed this May 16, 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.

1 participant