Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Sep 12, 2025

Relates to coder/coder#18779

By default, we set subdomain = true. Most folks testing this out don't have a wildcard subdomain setup. This switches to path-based behaviour by default and adds a note to the troubleshooting section.

Testing notes below:

module "claude-code" {
  count               = data.coder_workspace.me.start_count
  source              = "/home/coder/src/coder/registry/registry/coder/modules/claude-code/"
  agent_id            = coder_agent.main.id
  folder              = "/home/coder"
  install_claude_code = true
  claude_code_version = "1.0.40"
  # Enable experimental features
  experiment_report_tasks = true
}
Screenshot 2025-09-12 at 13 51 14 Screenshot 2025-09-12 at 13 51 00

@johnstcn johnstcn requested a review from Copilot September 12, 2025 11:58
@johnstcn johnstcn self-assigned this Sep 12, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the default configuration for the claude-code module to use path-based routing instead of subdomain-based routing, making it more accessible for users without wildcard subdomain setups.

  • Changes the default value of the subdomain variable from true to false
  • Updates test logging to include the new AGENTAPI_CHAT_BASE_PATH environment variable
  • Adds comprehensive test coverage for both subdomain configurations
  • Updates documentation to explain the default behavior and recommend subdomain setup for production

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
main.tf Changes default subdomain variable from true to false
testdata/agentapi-mock.js Updates logging to include AGENTAPI_CHAT_BASE_PATH environment variable
main.test.ts Adds test coverage for subdomain behavior and imports missing it function
README.md Adds troubleshooting note about default path-based configuration

@johnstcn johnstcn marked this pull request as draft September 12, 2025 12:24
@matifali matifali added the version:patch Add to PRs requiring a patch version upgrade label Sep 12, 2025
Copy link

❌ Version Bump Validation Failed

Bump Type: patch

Module versions need to be updated but haven't been bumped yet.

Required Actions:

  1. Run the version bump script locally: ./.github/scripts/version-bump.sh patch
  2. Commit the changes: git add . && git commit -m "chore: bump module versions (patch)"
  3. Push the changes: git push

Script Output:

🔍 Detecting modified modules...
Found modules:
registry/coder/modules/claude-code

📦 Processing: coder/claude-code
Found git tag: release/coder/claude-code/v2.2.0 (v2.2.0)
Current version: 2.2.0
New version: 2.2.1
Updating version references for coder/claude-code in registry/coder/modules/claude-code/README.md

🔧 Running formatter to ensure consistent formatting...

📋 Summary:
Bump Type: patch

Modules Updated:

- coder/claude-code: v2.2.0 → v2.2.1

READMEs Updated:

- coder/claude-code

✅ Version bump completed successfully!
📝 README files have been updated with new versions.

Next steps:
1. Review the changes: git diff
2. Commit the changes: git add . && git commit -m 'chore: bump module versions (patch)'
3. Push the changes: git push

Please update the module versions and push the changes to continue.

Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

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

Thanks Cian. Looks good to me. ALso its non-breaking as path-based works everywhere.

@@ -114,4 +114,6 @@ module "claude-code" {

## Troubleshooting

By default, this module is configured to run the embedded chat interface as a path-based application. In production, we recommend that you configure a [wildcard access URL](https://coder.com/docs/admin/setup#wildcard-access-url) and set `subdomain = true`. See [here](https://coder.com/docs/tutorials/best-practices/security-best-practices#disable-path-based-apps) for more details.
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be a [!TIP] or [!NOTE] in first section of README.md instead of here.

@matifali
Copy link
Member

cc: @35C4n0r as you are working on a refactor please rebase when this is merged.

@johnstcn johnstcn marked this pull request as ready for review September 12, 2025 12:53
@35C4n0r
Copy link
Collaborator

35C4n0r commented Sep 12, 2025

default subdomain to false

I'll also add this change to my PR.

35C4n0r added a commit to 35C4n0r/registry that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version:patch Add to PRs requiring a patch version upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants