feat(agentapi,claude-code): add web_app variable to disable the web app#764
feat(agentapi,claude-code): add web_app variable to disable the web app#764DevelopmentCats merged 4 commits intomainfrom
web_app variable to disable the web app#764Conversation
|
While this is technically possible to add. I think we may need a better solution for this since the tasks ui will not work unless the claude-code coder app is available in the workspace. |
a176a25 to
607f934
Compare
430d63e to
d88d1b7
Compare
web_app variable to disable the web appweb_app variable to disable the web app
ed775a0 to
dc5b548
Compare
Adds a web_app variable (default: true) to both the agentapi and claude-code modules. When set to false, AgentAPI still runs but the web UI app icon is not shown in the Coder dashboard. The web app is automatically enabled when the workspace is a Task (via data.coder_task.me.enabled), regardless of the web_app setting, since coder_ai_task requires the app to function. Also bumps agentapi module version to 2.4.0 and claude-code to 4.9.0.
dc5b548 to
a8a9960
Compare
agentapi 2.4.0 does not exist on the registry yet (latest is 2.3.0), and 2.3.0 does not have the web_app variable. Defer the pass-through until after agentapi is published with web_app support.
|
For CI to pass we will need to defer these changes in a PR that we will make and merge after I test this logic, and then the CI will pass for both PR's it will just require a patch version bump for the |
There was a problem hiding this comment.
Pull request overview
Adds a web_app toggle (default true) intended to allow hiding the web UI app icon while keeping AgentAPI running, mirroring the existing cli_app pattern.
Changes:
agentapi: introduceweb_appvariable and gate creation ofcoder_app.agentapi_webviacount, with Task-safe override to always create the app in Tasks.agentapi: adjusttask_app_idoutput to return an empty string when the web app is not created.claude-code: add aweb_appvariable and bump documented module versions (Claude Code to4.9.0, AgentAPI dependency to2.3.0), with a TODO to wireweb_appthrough later.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
registry/coder/modules/claude-code/README.md |
Updates usage examples to pin Claude Code module version 4.9.0. |
registry/coder/modules/claude-code/main.tf |
Adds a web_app variable and bumps the agentapi submodule version; includes TODO to pass web_app later. |
registry/coder/modules/agentapi/README.md |
Updates the version shown in the example to 2.4.0. |
registry/coder/modules/agentapi/main.tf |
Adds web_app variable and conditional creation of the web app, with Task-safe behavior and updated output indexing. |
Now that agentapi v2.4.0 is published with web_app support, this bumps the agentapi dependency from v2.3.0 to v2.4.0 and replaces the TODO comment with the actual web_app = var.web_app parameter. This is the follow-up to #764.
…#831) Follow-up to #764. Now that the `agentapi` module `v2.4.0` is published with `web_app` support, this PR completes the wiring: ## Changes ### `claude-code/main.tf` - Bump agentapi dependency from `v2.3.0` → `v2.4.0` - Replace `# TODO: pass web_app = var.web_app once agentapi module is published with web_app support` with `web_app = var.web_app` ### `claude-code/README.md` - Bump version references from `4.9.0` → `4.9.1` ## Result Setting `web_app = false` on the `claude-code` module now correctly passes through to the `agentapi` module, hiding the web UI app icon from the Coder dashboard while still running AgentAPI. The task-safe behavior (auto-enabling for `coder_ai_task`) is handled by the `agentapi` module. --------- Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
Adds a
web_appvariable (default:true) to both theclaude-codeandagentapimodules. When set tofalse, AgentAPI still runs but the web UI app icon is not shown in the Coder dashboard.This mirrors the existing
cli_apptoggle pattern.Changes
agentapimoduleweb_appvariable (bool, defaulttrue)coder_app.agentapi_webnow hascount = local.web_app ? 1 : 0local.web_appis computed asvar.web_app || local.is_task, whereis_task = try(data.coder_task.me.enabled, false). This means the web app is always created when the workspace is a Task, regardless of theweb_appvariable.task_app_idoutput returns""whenlocal.web_appisfalseclaude-codemoduleweb_appvariable (bool, defaulttrue)TODOcomment to wireweb_appthrough to agentapi once publishedUsage (once fully wired)
Setting
web_app = falseis safe even in templates that usecoder_ai_task— the module detects Tasks viadata.coder_task.me.enabledand automatically enables the web app.Merge strategy
This needs to land in two steps:
web_appsupport, and adds theweb_appvariable to claude-code (not yet wired through)TODOwithweb_app = var.web_app