Skip to content

fix(deploy): 生产工作台上线——/workbench/ 路由、nginx 前缀与 OIDC 回调集合对齐 - #1662

Merged
DeliciousBuding merged 5 commits into
masterfrom
fix/workbench-production-deploy
Aug 8, 2026
Merged

DeliciousBuding merged 5 commits into
masterfrom
fix/workbench-production-deploy

Conversation

@DeliciousBuding

@DeliciousBuding DeliciousBuding commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

approved-real 生产联调(#1656)发现并修复的部署缺口:

  1. 工作台从未上线:agenthub-web 镜像只构建未部署,nginx /workbench/ 指向首页站返回 404(生产 Web 工作台不可用)
  2. web 容器前缀处理:Dockerfile 新增 web/nginx.conf(Vite base=/workbench/ 前缀剥离 + SPA fallback)
  3. OIDC 回调集合修正(此前 feat(release): macOS 门控+预检、生产 compose 对齐 live、compose 干跑校验 #1659 误定 canonical):/api/auth/callback(首页 SPA)、/workbench/auth/tokendance/callback(工作台)、http://127.0.0.1/callback(桌面 loopback)——与 live .env 及 TDID 注册 redirect_uris 已对齐

生产侧已同步执行(hk3):Tunnel 补 hub-edge ingress、nginx server_name 补 hub-edge + sites-enabled 符号链接化、web 容器上线。本 PR 固化仓库侧镜像与模板。

Summary by CodeRabbit

  • New Features

    • Added web workbench hosting with support for /workbench/ asset paths and single-page application navigation.
    • Added standard error handling for web server failures.
  • Configuration

    • Expanded OIDC callback support for SPA, workbench, and desktop loopback sign-ins.
    • Updated production authentication documentation with synchronized redirect URI guidance.

approved-real 联调发现并修复生产缺口:agenthub-web 镜像从未部署导致 /workbench/ 404;web 容器补 /workbench/ 前缀剥离 + SPA fallback;OIDC 回调 canonical 集合修正(首页 SPA / 工作台 / 桌面 loopback)
Copilot AI lite review requested due to automatic review settings August 8, 2026 07:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@DeliciousBuding, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: be716aaf-16d3-44ce-9f37-bee4f0b7f06a

📥 Commits

Reviewing files that changed from the base of the PR and between 15a7c48 and 2ab886c.

⛔ Files ignored due to path filters (1)
  • app/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • .github/workflows/checks.yml
  • app/package.json
  • scripts/verify/verify-vulnerability-gates.sh
  • scripts/verify/vulnerability-exceptions.json
📝 Walkthrough

Walkthrough

The web container now installs nginx routing for the workbench and SPA fallbacks. Production OIDC configuration now supports SPA, workbench, and desktop loopback redirect URIs through the shared callback endpoint.

Changes

Web serving

Layer / File(s) Summary
Nginx workbench routing
app/web/nginx.conf, app/Dockerfile
The image installs an nginx configuration that serves the Vite build, rewrites /workbench/ paths, provides SPA fallbacks, and handles 50x errors.

OIDC callback configuration

Layer / File(s) Summary
Production OIDC callbacks
deployments/production/docker-compose.yml, deployments/production/.env.example
Production settings define an SPA callback default and allow SPA, workbench, and Tauri loopback redirect URIs. All clients exchange authorization codes through POST /client/auth/oidc/callback.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了生产工作台部署、/workbench/ 路由、nginx 前缀和 OIDC 回调配置的主要变更。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/workbench-production-deploy

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/Dockerfile (1)

24-25: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Make the healthcheck probe the deployed workbench route.

The existing healthcheck probes /. With this SPA fallback, / can return 200 even when /workbench/ prefix stripping is broken. Probe /workbench/ so the container health reflects the required production route.

Suggested healthcheck update
-  CMD wget -qO- http://localhost:80/ || exit 1
+  CMD wget -qO- http://localhost:80/workbench/ || exit 1
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/Dockerfile` around lines 24 - 25, Update the Dockerfile HEALTHCHECK
command to probe /workbench/ instead of /. Keep the existing healthcheck
mechanism and validation behavior unchanged so it verifies the deployed
workbench route.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deployments/production/docker-compose.yml`:
- Around line 92-93: Remove the production hostname from both OIDC variable
defaults in deployments/production/docker-compose.yml:92-93, making them
required deployment-provided values or safe placeholders. Replace the production
hostname with a non-production placeholder in
deployments/production/.env.example:25-27; both sites require direct changes so
no real production origin remains tracked.

---

Nitpick comments:
In `@app/Dockerfile`:
- Around line 24-25: Update the Dockerfile HEALTHCHECK command to probe
/workbench/ instead of /. Keep the existing healthcheck mechanism and validation
behavior unchanged so it verifies the deployed workbench route.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d866a359-4083-4ec7-b130-b9f658b43d57

📥 Commits

Reviewing files that changed from the base of the PR and between a17db84 and 15a7c48.

📒 Files selected for processing (4)
  • app/Dockerfile
  • app/web/nginx.conf
  • deployments/production/.env.example
  • deployments/production/docker-compose.yml

Comment on lines +92 to +93
AGENTHUB_TOKENDANCE_ID_REDIRECT_URI: ${AGENTHUB_TOKENDANCE_ID_REDIRECT_URI:-https://hub.tokendancelab.com/api/auth/callback}
AGENTHUB_TOKENDANCE_ID_ALLOWED_REDIRECT_URIS: ${AGENTHUB_TOKENDANCE_ID_ALLOWED_REDIRECT_URIS:-https://hub.tokendancelab.com/api/auth/callback,https://hub.tokendancelab.com/workbench/auth/tokendance/callback,http://127.0.0.1/callback}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Remove the production hostname from both tracked files.

Both changes commit the production hostname. Move the actual origin to deployment-only environment configuration and use required variables or placeholders in tracked files.

  • deployments/production/docker-compose.yml#L92-L93: remove production URL fallbacks from both OIDC variables.
  • deployments/production/.env.example#L25-L27: replace the production hostname with a non-production placeholder.

As per coding guidelines: **/*: 禁止提交 API key、token、cookie、私钥、证书、真实服务器或内网地址、生产账号、个人路径、生产数据库 dump、用户数据、敏感日志以及本机 Agent 记忆。

📍 Affects 2 files
  • deployments/production/docker-compose.yml#L92-L93 (this comment)
  • deployments/production/.env.example#L25-L27
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deployments/production/docker-compose.yml` around lines 92 - 93, Remove the
production hostname from both OIDC variable defaults in
deployments/production/docker-compose.yml:92-93, making them required
deployment-provided values or safe placeholders. Replace the production hostname
with a non-production placeholder in deployments/production/.env.example:25-27;
both sites require direct changes so no real production origin remains tracked.

Source: Coding guidelines

Codex (Delicious233) added 4 commits August 8, 2026 16:20
…ze 登记无修复例外 (#1663)

08-08 npm 公告:dompurify <=3.4.12(moderate XSS)、nanoid <3.3.17(high)、image-size <=2.0.2(high×2,无修复版)。可修复项走 pnpm.overrides;image-size 登记 vulnerability-exceptions.json 例外(门禁降级警告 + 追踪 #1663),待上游修复后移除。
pipefail 下 pnpm audit 发现漏洞返回非零会把例外登记后的通过误判为失败;显式捕获管道状态以 verifier 判定为准,fail-closed 语义保持。同步修复 package.json/lockfile/脚本 CRLF。
@DeliciousBuding
DeliciousBuding merged commit 5fc05db into master Aug 8, 2026
25 checks passed
@DeliciousBuding
DeliciousBuding deleted the fix/workbench-production-deploy branch August 8, 2026 09:08
DeliciousBuding added a commit that referenced this pull request Aug 11, 2026
* fix(deploy): 生产工作台上线——/workbench/ 路由、nginx 前缀与 OIDC 回调集合对齐

approved-real 联调发现并修复生产缺口:agenthub-web 镜像从未部署导致 /workbench/ 404;web 容器补 /workbench/ 前缀剥离 + SPA fallback;OIDC 回调 canonical 集合修正(首页 SPA / 工作台 / 桌面 loopback)

* fix(security): pnpm audit 新公告——dompurify/nanoid overrides 修复,image-size 登记无修复例外 (#1663)

08-08 npm 公告:dompurify <=3.4.12(moderate XSS)、nanoid <3.3.17(high)、image-size <=2.0.2(high×2,无修复版)。可修复项走 pnpm.overrides;image-size 登记 vulnerability-exceptions.json 例外(门禁降级警告 + 追踪 #1663),待上游修复后移除。

* fix(ci): pnpm audit 门禁例外通过时以 verifier 退出码为准(pipefail 交互)+ LF 行尾

pipefail 下 pnpm audit 发现漏洞返回非零会把例外登记后的通过误判为失败;显式捕获管道状态以 verifier 判定为准,fail-closed 语义保持。同步修复 package.json/lockfile/脚本 CRLF。

* fix(ci): pnpm audit 步骤去掉 pipefail——例外登记后以 verifier 判定为准

* fix(ci): pnpm audit 落盘后喂 verifier——GHA bash 默认 pipefail 无法脚本内关闭

---------

Co-authored-by: Codex <codex@vectorcontrol.tech>
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