Repository navigation
fix(viewer): 取得真 Kit 幀後語意面板與 live 3D 並存(CH-H3,修 element-semantics e2e) - #186
Conversation
…ics e2e) 問題:CH-H1 MockViewport gate 為 `viewerTab==="model" && !_hasRemoteVideoFrame()`, 有 GPU 出幀(本機 RTX 4060 Ti,實測 1920×1080)時語意面板(①②③④⑥)整片卸載, 真人無法「點構件看語意」,element-semantics browser e2e 在 GPU 環境恆紅。 修法(最小 additive): - MockViewport.tsx:+liveMode prop;liveMode 時套 gv-mock--live 左側語意側欄 + 誠實 banner (「live 3D 已出幀」,不再宣稱 no-GPU);reserved padding 僅 non-live。 - Window.render:MockViewport gate 移除 `!_hasRemoteVideoFrame()`,改傳 liveMode(取得真幀不卸載)。 - viewer.css:+.gv-mock--live(左 400px 側欄 / 單欄 grid / z18,不蓋中央 video、不與右側治理 overlay 重疊)。 部署真相:coordinator :8004 /ui/open 是 302 轉址至 viewer :5173(docker,vite dev 跑 baked source), 故 viewer 前端改動 MUST 重建 viewer image 始生效;此前建錯 dist-ui(:8004/ui) 致「改了沒效」假象。 驗證:tsc + viewer vitest 綠;Playwright 全 15 支綠(element-semantics 由紅轉綠、issues-tab 去 flaky、 gov-viewer-layout harness 回歸);node 全鏈 smoke 證 ②④⑥ 真資料(for-session 200 / 真實 psets+spatial+roadmap)。 截圖佐證左欄語意 + 中央 live 3D + 右側治理並存(artifacts/e2e/element-semantics.png)。 GitNexus:MockViewport upstream LOW(僅 Window.render d=1);App.render risk high(中央 hub, 本次 additive 改動,全 15 e2e 綠緩解)。 OpenSpec: console-live-semantic-coexist(strict valid) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 46 minutes and 11 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR updates the unified governance console semantic viewer so that the left semantic panel remains visible and coexists alongside live 3D video frames instead of disappearing. The change adds a ChangesSemantic Panel Live 3D Coexistence
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
PR Review Agent Summary
Blockers
Warnings
Validation Commands
Checks
Human Review Notes
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where the semantic panel (①Model Info ②IFC Semantics ③Structure ④Mapping Table ⑥Spatial) would disappear entirely when real Kit video frames arrived in environments with GPU support. Previously, MockViewport was unmounted via the !_hasRemoteVideoFrame() gate condition as soon as live 3D appeared. Now, the component stays mounted and transitions to a left-side semantic sidebar (liveMode) that coexists with the central live 3D video — aligning with the AI-BIM-Geo Viewer "panels surround central 3D" design.
Changes:
- Remove the
!_hasRemoteVideoFrame()unmount gate fromWindow.tsxand instead passliveMode={this._hasRemoteVideoFrame()}as a prop toMockViewport, keeping it mounted in both states. - Add
liveModeprop handling inMockViewport.tsxto switch between full-screen deterministic mock (non-live) and a left-side semantic sidebar (live), with honest banner messaging for each state. - Add
.gv-mock--liveCSS for the 400px left sidebar layout with appropriate z-index layering.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
web-viewer-sample/src/Window.tsx |
Remove !_hasRemoteVideoFrame() gate; pass liveMode prop to MockViewport |
web-viewer-sample/src/console/viewer/MockViewport.tsx |
Add liveMode prop; conditional banner text; skip reserved padding in live mode |
web-viewer-sample/src/console/viewer/viewer.css |
Add .gv-mock--live sidebar styles (400px left panel, single-column grid, z-index 18) |
openspec/changes/console-live-semantic-coexist/proposal.md |
OpenSpec proposal documenting the change rationale and scope |
openspec/changes/console-live-semantic-coexist/tasks.md |
Implementation task checklist |
openspec/changes/console-live-semantic-coexist/specs/unified-governance-console/spec.md |
Spec delta with verifiable requirements and scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {this.state.viewerTab === "model" | ||
| && !this._hasRemoteVideoFrame() | ||
| && (harnessEnabled() || (Boolean(this.state.reviewSessionId) && Boolean(this.state.expectedStageUrl))) | ||
| && ( | ||
| <MockViewport | ||
| liveMode={this._hasRemoteVideoFrame()} |
| z-index: 18; | ||
| } | ||
| .gv-mock.gv-mock--live .gv-mock__grid { grid-template-columns: 1fr; } | ||
| .gv-mock.gv-mock--live .gv-mock__banner { border-color: #2d3a17; } |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb8c5f87fe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const pad = | ||
| reservedRight || reservedLeft ? { paddingRight: reservedRight || undefined, paddingLeft: reservedLeft || undefined } : undefined; | ||
| !liveMode && (reservedRight || reservedLeft) | ||
| ? { paddingRight: reservedRight || undefined, paddingLeft: reservedLeft || undefined } | ||
| : undefined; |
There was a problem hiding this comment.
Preserve the left dock space in live semantic mode
In real live sessions, _completeStageLoad() requests Kit children and getChildrenResponse populates usdPrims, which renders usd-stage-left-dock at left: 0, width 300, z-index 25. Because live mode now suppresses reservedLeft, the new .gv-mock--live sidebar also starts at left: 0 with z-index 18, so the USDStage dock is drawn over the first 300px of the 400px semantic sidebar, hiding or blocking most of the model info/mapping/IFC semantic UI exactly when a live frame is available. Keep the live sidebar offset from the existing left dock, or avoid rendering the overlapping dock in this mode.
Useful? React with 👍 / 👎.
| .gv-mock.gv-mock--live { | ||
| right: auto; width: 400px; max-width: 46vw; | ||
| background: rgba(11, 13, 16, 0.94); | ||
| border-right: 1px solid #262c33; | ||
| z-index: 18; |
There was a problem hiding this comment.
Keep stage-truth visible beside the live sidebar
When a live frame is available, this absolute sidebar spans from top: 40px to bottom: 0 at left: 0 with z-index 18, while the existing .stage-truth-panel is fixed at bottom-left with z-index 6 and width up to 520px. In live sessions this covers most of the stage-truth/topbar panel, including the project/version/session and tri-ready status that operators use to verify the runtime, leaving only a clipped tail visible. Offset or restack one of these panels so the required runtime/status evidence remains readable.
Useful? React with 👍 / 👎.
| .gv-mock.gv-mock--live { | ||
| right: auto; width: 400px; max-width: 46vw; | ||
| background: rgba(11, 13, 16, 0.94); | ||
| border-right: 1px solid #262c33; | ||
| z-index: 18; |
There was a problem hiding this comment.
Reserve space instead of overlaying live 3D
For live sessions, this sidebar is painted above the <video> (z-index: 18 while the stream container has no higher stacking order) and starts at left: 0, so it occludes the first 400px of the live Kit viewport rather than laying out beside it. That blocks visibility and click/pick interaction for that part of the 3D scene, despite the change's stated requirement that the semantic panel coexist without covering the central live 3D. Shift/size the stream area or place the sidebar in reserved layout space instead of stacking it over the video.
Useful? React with 👍 / 👎.
…-op banner CSS reviewer(Copilot/Codex P1):liveMode 左緣語意側欄(z18) 在 usdPrims 已載入的真實 session 會被 usd-stage-left-dock(left:0, z25) 蓋住前 300px,隱藏 ①模型資訊/④對構/②IFC語意。 修法:.gv-mock--live z-index 18→26(高於 USD dock 25 與治理 overlay 20),語意內容恆在最上層可見; 模型置中不受遮蔽、右側治理 overlay 水平不重疊。並移除 no-op 的 .gv-mock--live .gv-mock__banner border-color。 P2(完整 reserved-space 不疊放 video 左緣 / 不蓋 stage-truth 尾端)列為 follow-up,已於 proposal 標註。 驗證:Playwright element-semantics + gov-viewer-layout + issues-tab 三支綠(viewer image 已重建)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR Review Agent Summary
Blockers
Warnings
Validation Commands
Checks
Human Review Notes
|
…nonical specs (#197) 於 worktree `.worktrees/openspec-converge-2026-06-09` 一次收斂 8 個 active OpenSpec change(對應已 merged 的 PR #182–#186 / #194 / #195),archive 至 `archive/2026-06-09-<id>/` 並把 spec delta 聯集併入 live canonical specs。 archive = 不可變歷史快照(delta 原樣保留,git 偵測為 R100 純改名); canonical = 聯集 + 跨 change 矛盾調和(沿用 2026-06-03 批次歸檔之收斂規約)。 收斂的 8 個 change: - unified-console-mvp (#182) - console-mapping-proxy (#183) - unified-console-fe-redesign (#184) - unified-console-semantic-viewer (#184/#186) - unified-console-issues-tab (#185) - console-live-semantic-coexist (#186) - product-governance-console-integration (#194;原 untracked,本次一併納入追蹤) - docs-design-spec-source-of-truth (#195) Canonical spec 同步: - `unified-governance-console`:5 → 21 requirements。新增 16 條 ugc delta requirement(mvp 1 / mapping-proxy 1 / fe-redesign 3 / semantic-viewer 3 / issues-tab 1 / live-coexist 2 / product-governance 5,逐條 byte-verbatim)。 - 跨 change 矛盾調和(operator console 掛載點):原 Req「operator 頁分離於三條 /console 獨立路由、A1–A10 overlay-only」(unified-console-mvp MVP 切片)經 fe-redesign(:8004/ui 六 hash 路由 + RK6 + CONSOLE_DIST_DIR)與 product-governance(PR #194 :8004/ui 改掛 EdgeConsole)演進,調和為 「:8004/ui EdgeConsole 產品操作台 shell,A1–A10 既為 console 頁亦為 viewer overlay 操作面」;fe-redesign「React UnifiedConsole 六路由」req 吸收進此調和 req (六路由 / RK6 / CONSOLE_DIST_DIR fallback / ?session 讓位 逐條保留),舊措辭標 superseded(保留歷史脈絡 blockquote)。 - 其餘調和:issues-tab 全幅「問題」分頁加 Req1 carve-out(同一 viewer 非互斥殼); semantic-viewer「中央切 <video>」與 live-coexist「語意側欄並存」coherent(中央 video + 左側欄不覆蓋);mvp req 的 :49100 ban 補「治理/資料 API 目的」scope(與 既有 :8004-only carve-out 一致,自洽於同 req 後句的 WebRTC DataChannel 著色)。 - `docker-web-plane-host-native-kit`:6 → 7(新增 product-governance 的 「Rebuild and E2E Evidence for Product Console」)。 - `documentation-source-of-truth` / `demo-fast-mvp-orchestration` / `agent-doc-context-budget`:docs-design 的 delta 已於 #195/#196 併入 canonical, 本次 archive-only(canonical 為 superset,不重複套用,避免污染)。 未完成 task 驗證分類(誠實鐵律;本批無新 runtime/E2E evidence): - verify-blocked-tooling(OpenSpec CLI 本機不可用:`npx openspec` 回 "could not determine executable to run"):console-mapping-proxy 4.1、 console-live-semantic-coexist 4.1、docs-design 4.6/4.7。改用結構驗證並通過 (21/7 requirement、每 req 有 scenario、無殘留 delta header、diff --check clean)。 - requires-runtime-not-observed(需 host-native Kit/GPU + scripts/deploy.ps1 + live browser 3D,headless 無法觀測,未捏造):unified-console-mvp 5.2、 console-mapping-proxy 4.3、unified-console-fe-redesign 5.3(streaming-server source_client_id 後端強制為明示 Non-goal/待補)。 - deferred-followup(明示後續 PR):unified-console-semantic-viewer 1.1/1.5/3.4 (完整 GovViewerLayout 重構 / orbit-pan-zoom DataChannel / CH-H1b 完整版面)。 - verify-pass:console-live-semantic-coexist 4.2(PR/CI/merge 已成,archive/sync 即本 commit)、unified-console-semantic-viewer 3.2(CH-H2 測試檔已落地)。 - 無 task 屬「與 repo 不一致需省略」——8 個 change implementation 皆已在 main 且 一致(triage 8 agent 逐一 code spot-check 確認)。 對抗驗證(3 agent 平行): - completeness:0 dropped;17 delta + 4 pre-existing = 21,math closes。 - contradiction:coherent;4 reconciliation 全過,1 minor :49100 wording 已修。 - structure/immutability/git:clean;24×R100 rename(delta 不可變)+ product-governance diff -r exit 0;active changes 僅剩 archive/。 GitNexus detect_changes:N/A——本變更僅動 openspec/ markdown spec(無 code symbol/flow),且 detect_changes 對 linked worktree staged 為盲(見既有 closeout note)。 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
摘要
修復「有 GPU 出真實 Kit 幀時,模型分頁語意面板(①模型資訊 ②IFC語意 ③結構 ④對構 ⑤幾何 ⑥空間)整片消失」的問題,使語意面板改以左側語意側欄與中央 live 3D 並存(對齊北極星範本 AI-BIM-Geo Viewer:面板環繞中央 3D,非二選一)。
element-semanticsbrowser E2E 由紅轉綠、issues-tab去 flaky。根因(兩層)
MockViewportmount gate 為viewerTab==="model" && !_hasRemoteVideoFrame()—— 取得真幀即卸載。本機有 GPU(RTX 4060 Ti,實測 1920×1080 frame),live 3D 一出現語意面板就消失,無法點構件看語意。coordinator :8004 /ui/open是 302 轉址至viewer :5173(dockerweb-viewer-sample,vite dev跑 baked source,無 bind-mount)。先前把 fix 建到:8004/ui的dist-uiconsole(npm run build:ui),但 e2e/入口實際走:5173,導致「改了卻沒效」的長時間假象。viewer 前端改動 MUST 重建 viewer image。變更(最小 additive)
web-viewer-sample/src/console/viewer/MockViewport.tsxliveModeprop;liveMode時左側語意側欄 + 誠實 banner(「live 3D 已出幀」,不再宣稱 no-GPU);reserved padding 僅 non-liveweb-viewer-sample/src/Window.tsxrender內 MockViewport gate 移除!_hasRemoteVideoFrame()、改傳liveMode={this._hasRemoteVideoFrame()}(取得真幀不卸載)web-viewer-sample/src/console/viewer/viewer.css.gv-mock--live(左 400px 側欄 / 單欄 grid / z-index 18,不蓋中央 video、不與右側 340px 治理 overlay 重疊)openspec/changes/console-live-semantic-coexist/邊界:無 API/邊界變更(前端只打 :8004;②④⑥ 仍走既有 coordinator for-session / element-mapping proxy;不直連 :49101/:49102;無新增 prod 依賴)。
驗證
npx tsc --noEmit綠;viewervitest綠。element-semantics由紅轉綠、issues-tab去 flaky、gov-viewer-layoutharness 不空白回歸)。for-session200 / 真實psets+spatial+roadmap(②④⑥ 資料路徑)。artifacts/e2e/element-semantics.png)。viewerimage(projectai-bim-web-plane-host-kit)後:5173入口生效。GitNexus 影響
MockViewportupstream LOW(僅Window.renderd=1)。App.renderrisk high(render 為中央 hub),本次為 additive(移一條件 + 傳一 prop),全 15 e2e 綠緩解。誠實鐵律
非目標
不改
GovernanceOverlay內部 A1–A10 邏輯;不改 streaming/coordinator data shape。🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes