Skip to content

fix(plans): 依 code 對帳重寫 BACKLOG 三條 viewer gap 的錯誤前提 - #338

Merged
monkey1sai merged 1 commit into
mainfrom
fix/backlog-viewer-gap-premises
Jul 14, 2026
Merged

monkey1sai merged 1 commit into
mainfrom
fix/backlog-viewer-gap-premises

Conversation

@monkey1sai

Copy link
Copy Markdown
Owner

Summary

BACKLOG 的三條 viewer gap 建立在已被 code 推翻的前提上。照它派工,會有人去重做一個早就存在的前端,而真正缺的後端資料源沒人碰。

源頭是 TRUTH §2 的「不足宣稱」(PROCESS §1 明文禁止:把已建寫成未建同樣是說謊)——它記載 viewer 區塊 3/5/6/7「viewer UI 未見」,但那些 UI 早已存在且真的在 fetch。TRUTH 已於 #336 更正,本 PR 讓 BACKLOG 跟上。

三條 gap 的重寫

gap 原前提 code 事實 處置
gap-viewer-m4-tree-filter 「viewer UI 未見」 空間巢狀樹已建(console/viewer/StructureStats.tsx 經 coordinator spatial-tree for-session proxy 真 fetch,loading/error/no_url/ok 四態齊全)。但 dim/iso 篩選模式確實不存在 範圍縮小:只剩篩選模式,距離由「PARTIAL×中」下修為「小×中」
gap-viewer-m4-geom-pset 「viewer UI 未見」=前端工項 ⑤幾何/分類碼卡已建且依誠實鐵律標 roadmap N/A;區塊 6 的 Pset/Qto 面板已建且真 fetch、逐 property 渲染(console/viewer/IfcSemanticPanel.tsx)。真正的缺口是後端 pipeline 沒有 BBox/體積/材質/分類碼來源,端點依 contracts §1 #6 誠實回 null 性質從前端工項改為後端工項。DONE 改為「pipeline 產出幾何與分類碼,使 geometry/classification 不再恆為 null」——前端無須改動即生效。blocker 補上「動工前先做 runtime probe」(比照 A3 clash 的 has_occ=False 教訓)
gap-viewer-m4-spatial 「viewer UI 未見」 空間包含鏈已建且真 fetch(IfcSemanticPanel.tsx),前端已達成其 DONE 定義 刪列。僅差 tracked browser trace,該取證併入 gap-status-calibration(已於該列註明,保留斷鏈救援線索)

順帶修正「viewer gap 實作接點註」

原註寫「viewer 前端真身…非 src/console/ 殼層」。它想表達的是「不是 EdgeConsole 殼層」(這點正確),但字面會被讀成「元件檔不在 src/console/ 目錄下」——而 repo 內根本沒有 src/viewer/ 目錄。照這條註去找檔案會找不到、去改地方會改錯。

實際結構(Window.tsx:45 為證):

  • 元件檔位置:web-viewer-sample/src/console/viewer/(MockViewport / StructureStats / IfcSemanticPanel / MappingTable)
  • 渲染入口:web-viewer-sample/src/Window.tsx = 經 /ui/open 302 進入的 :5173 baked viewer app,不是 :8004/ui 的 EdgeConsole——故改動仍須重建 viewer docker image 才會生效(原註這個警告是對的,保留)

現分列為「元件檔位置」與「渲染入口」兩點,兩個資訊都不漏。數量亦由六改為五(spatial 刪列後)。

AI Coding Governance

Item Result
Change lane B
Behavior contract changed no
Linked issue 無
Requirement source docs/plans
CODEOWNERS / owner review not needed
GitNexus evidence not needed
Browser E2E evidence not user-facing
Agent workflow changed? no
Required checks expected CI / Agent Governance / PR Review Agent

Requirement source 明細:PROCESS.md §1 誠實鐵律(「不足宣稱同樣是說謊」)、BACKLOG.md §0.1(gap 完成=刪列;本檔可整份重排)。本 PR 只修正 BACKLOG 對現況的記載,不新增任何需求、不改動任何 TARGET 規格。

GitNexus evidence:本 PR 僅改 docs/plans/BACKLOG.md,不觸碰 scripts/、四服務或 .github/workflows/,Test-PrReviewNeedsGitNexus 不成立,blast radius 為零。

Validation

code 對帳依據(逐條實讀原始碼,非推測):

  • web-viewer-sample/src/console/viewer/StructureStats.tsx — fetch(spatialUrl),SpatialTreeView 遞迴渲染 IfcProject>Site>Building>Storey 巢狀樹,四態齊全;無 session 時退回 element_mapping 類別計數,fake mapping 帶警示
  • web-viewer-sample/src/console/viewer/IfcSemanticPanel.tsx — fetch(/api/governance/elements/for-session/:sessionId/:guid)(經 coordinator,守邊界),五態齊全;IfcSemanticView 渲染②IFC 語意六欄、Pset/Quantity(逐 pset 逐 property,null 顯「—」)、⑥空間包含鏈、⑤幾何/分類碼(誠實標 roadmap N/A,不捏造)
  • web-viewer-sample/src/Window.tsx:45 — import { MockViewport } from "./console/viewer/MockViewport"(證實元件檔在 src/console/viewer/,渲染入口在 viewer app)
  • governance-service/app.py:215 / :277 — /api/elements/semantics、/api/spatial-tree 兩端點存在

一致性檢查:

  • grep -rn "gap-viewer-m4-spatial" --include=*.md → 主 checkout 內無殘留斷鏈引用(唯一命中是 gap-status-calibration 中我刻意保留的斷鏈救援註)
  • TRUTH §2 區塊 3/5/6/7 現皆為 PARTIAL+「UI 已建」,與新 BACKLOG 完全一致

Known Risks

  • 未動 gap-viewer-m4-select-semantic 與 gap-viewer-m4-mapping-table:本輪只對帳了區塊 3/5/6/7,未驗證這兩條的前提,故不憑推測改動。它們有可能同樣建立在失真的記載上——若要確認,需比照本輪做一次 code 對帳。(已知線索:IfcSemanticView 目前渲染 IFC Type/Name/GlobalId/PredefinedType/ObjectType/Tag 六欄,缺 gap-viewer-m4-select-semantic DONE 定義所要求的 Fidelity,故該 gap 至少部分仍成立。)
  • 本 PR 僅為文件對帳,未執行任何 runtime 驗證。「UI 已建且真 fetch」是 code 層級的事實(讀原始碼+grep 端點),不等於「跑起來會顯示正確資料」——後者屬 gap-status-calibration 的 runtime 取證範圍,TRUTH §2 對應列仍誠實標記「tracked browser trace 未觀測」。
  • .worktrees/codex-governance-20260714/ 內存有一份舊 BACKLOG 副本(另一 branch 的 checkout),不在本 PR 範圍。

🤖 Generated with Claude Code

https://claude.ai/code/session_01G3Mx7VchiGQwk3eUhxm43Z

2026-07-14 對 viewer 七區塊做 code 對帳,發現三條 gap 建立在已被 code 推翻的前提上
(源頭是 TRUTH §2 的「不足宣稱」,已於 #336 修正)。照原 BACKLOG 派工,會有人去重做
一個早已存在的前端,而真正缺的後端資料源沒人碰。

- `gap-viewer-m4-tree-filter`:**範圍縮小**。空間巢狀樹已建——console/viewer/
  StructureStats.tsx 經 coordinator spatial-tree for-session proxy 真 fetch、
  loading/error/no_url/ok 四態齊全。本 gap 只剩 dim/iso 篩選模式,距離由
  「PARTIAL×中」下修為「小×中」。

- `gap-viewer-m4-geom-pset`:**性質從前端工項改為後端工項**。前端的⑤幾何/分類碼卡與
  區塊 6 的 Pset/Qto 面板皆已建且真 fetch(console/viewer/IfcSemanticPanel.tsx),並依
  誠實鐵律標 roadmap N/A。真正的缺口是**後端 pipeline 無 BBox/體積/材質/分類碼來源**,
  端點依 contracts §1 #6 誠實回 null。DONE 定義改為「pipeline 產出幾何與分類碼,使
  geometry/classification 不再恆為 null」——前端無須改動即生效。blocker 補上「動工前先做
  runtime probe」(比照 A3 clash 的 has_occ=False 教訓)。

- `gap-viewer-m4-spatial`:**刪列**。空間包含鏈 UI 已建且真 fetch,前端已達成其 DONE
  定義;僅差 tracked browser trace,該取證併入 gap-status-calibration(已於該列註明)。

並修正「viewer gap 實作接點註」:
- 數量六→五(spatial 刪列後)。
- 原註寫「viewer 前端真身…非 src/console/ 殼層」,意在區隔 EdgeConsole,但字面易被誤讀成
  「元件檔不在 src/console/ 目錄下」。repo 內並無 src/viewer/ 目錄——元件實際位於
  src/console/viewer/,而渲染入口才是 src/Window.tsx(經 /ui/open 302 的 :5173 baked
  viewer app)。照原註會找錯位置。現分列「元件檔位置」與「渲染入口」兩點。

未動 gap-viewer-m4-select-semantic 與 gap-viewer-m4-mapping-table:本輪未對帳其前提,
不憑推測改動。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3Mx7VchiGQwk3eUhxm43Z
Copilot AI review requested due to automatic review settings July 14, 2026 10:17
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Next review available in: 9 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 416a3179-b4a5-4e10-8f36-1b06fa49796a

📥 Commits

Reviewing files that changed from the base of the PR and between 61a7560 and cc508d2.

📒 Files selected for processing (1)
  • docs/plans/BACKLOG.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/backlog-viewer-gap-premises

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@monkey1sai
monkey1sai merged commit 0eaac05 into main Jul 14, 2026
13 of 14 checks passed
@monkey1sai
monkey1sai deleted the fix/backlog-viewer-gap-premises branch July 14, 2026 10:19

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc508d235e

ℹ️ 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".

Comment thread docs/plans/BACKLOG.md
| `gap-viewer-m4-mapping-table` | `#viewer` | TARGET-viewer 區塊 4(AC-3) | TRUTH §2 區塊 4 列 | PARTIAL×高 | GUID⇔USD 對應表逐件顯示,prim 命名 `G_<sanitized_guid>`、路徑 `/World/Elements/<IfcClass>/…`;`name_fallback` 降級標警示並計入統計;E2E | fidelity 不得宣稱 100%;降級可視不隱藏 | 無 |
| `gap-viewer-m4-geom-pset` | `#viewer` | TARGET-viewer 區塊 5+6(AC-2/AC-5) | TRUTH §2 區塊 5/區塊 6 列 | PARTIAL×中 | 幾何條(world-mm BBox/體積/材質/樓層)+Pset/Qto 面板;缺值以「— 缺 —」一級可視化,不靜默省略;E2E | Qto 須由真幾何計算;示意值一律標範例值 | 無 |
| `gap-viewer-m4-spatial` | `#viewer` | TARGET-viewer 區塊 7(AC-4) | TRUTH §2 區塊 7 列 | PARTIAL×中 | 每件可見 IfcBuildingStorey/IfcBuilding/IfcSite 包含鏈;來源有分類系統(MasterFormat/OmniClass/Uniformat)則顯示;E2E | 來源無分類碼時誠實缺省,不補假碼 | 無 |
| `gap-viewer-m4-geom-pset` | `#viewer`(**實作落在後端**) | TARGET-viewer 區塊 5(AC-2) | TRUTH §2 區塊 5 列 | **後端資料源**×中(**前端已建**——`console/viewer/IfcSemanticPanel.tsx` 的⑤幾何/分類碼卡已在,且依誠實鐵律標 roadmap N/A;區塊 6 的 Pset/Qto 面板亦已真 fetch 並逐 property 渲染。**缺口在後端 pipeline 無 BBox/體積/材質/分類碼來源**,端點依 contracts §1 #6 誠實回 `null`) | 轉檔/語意 pipeline 產出 world-mm BBox、體積、材質、樓層與分類系統碼,使 `/api/elements/semantics` 的 `geometry`/`classification` 不再恆為 `null`;前端幾何卡自動由 roadmap 態轉為顯示真值(前端無須改動即生效);E2E | Qto 須由真幾何計算,不得以示意值填充;來源無分類碼時維持誠實缺省(contracts §1 #6 禁捏造) | 動工前先確認 ifcopenshell 幾何萃取在部署 runtime 可用——比照 A3 clash 的 `has_occ=False` 教訓,從 runtime probe 起步 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include frontend rendering in geometry gap

When this gap is implemented by following the new row, it directs the work to the backend only and says the geometry card will automatically switch from roadmap to true values. I checked web-viewer-sample/src/console/viewer/IfcSemanticPanel.tsx: the ⑤ card is hard-coded to the roadmap/N/A paragraph and never branches on data.geometry or data.classification, so a backend-only change would still leave BBox/volume/material/classification invisible in the viewer despite satisfying this backlog item. Please keep frontend rendering in scope or remove the “front-end no changes” claim.

Useful? React with 👍 / 👎.

Comment thread docs/plans/BACKLOG.md
| `gap-viewer-m4-mapping-table` | `#viewer` | TARGET-viewer 區塊 4(AC-3) | TRUTH §2 區塊 4 列 | PARTIAL×高 | GUID⇔USD 對應表逐件顯示,prim 命名 `G_<sanitized_guid>`、路徑 `/World/Elements/<IfcClass>/…`;`name_fallback` 降級標警示並計入統計;E2E | fidelity 不得宣稱 100%;降級可視不隱藏 | 無 |
| `gap-viewer-m4-geom-pset` | `#viewer` | TARGET-viewer 區塊 5+6(AC-2/AC-5) | TRUTH §2 區塊 5/區塊 6 列 | PARTIAL×中 | 幾何條(world-mm BBox/體積/材質/樓層)+Pset/Qto 面板;缺值以「— 缺 —」一級可視化,不靜默省略;E2E | Qto 須由真幾何計算;示意值一律標範例值 | 無 |
| `gap-viewer-m4-spatial` | `#viewer` | TARGET-viewer 區塊 7(AC-4) | TRUTH §2 區塊 7 列 | PARTIAL×中 | 每件可見 IfcBuildingStorey/IfcBuilding/IfcSite 包含鏈;來源有分類系統(MasterFormat/OmniClass/Uniformat)則顯示;E2E | 來源無分類碼時誠實缺省,不補假碼 | 無 |
| `gap-viewer-m4-geom-pset` | `#viewer`(**實作落在後端**) | TARGET-viewer 區塊 5(AC-2) | TRUTH §2 區塊 5 列 | **後端資料源**×中(**前端已建**——`console/viewer/IfcSemanticPanel.tsx` 的⑤幾何/分類碼卡已在,且依誠實鐵律標 roadmap N/A;區塊 6 的 Pset/Qto 面板亦已真 fetch 並逐 property 渲染。**缺口在後端 pipeline 無 BBox/體積/材質/分類碼來源**,端點依 contracts §1 #6 誠實回 `null`) | 轉檔/語意 pipeline 產出 world-mm BBox、體積、材質、樓層與分類系統碼,使 `/api/elements/semantics` 的 `geometry`/`classification` 不再恆為 `null`;前端幾何卡自動由 roadmap 態轉為顯示真值(前端無須改動即生效);E2E | Qto 須由真幾何計算,不得以示意值填充;來源無分類碼時維持誠實缺省(contracts §1 #6 禁捏造) | 動工前先確認 ifcopenshell 幾何萃取在部署 runtime 可用——比照 A3 clash 的 `has_occ=False` 教訓,從 runtime probe 起步 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Align the geometry gap with the frozen contract

If an agent implements this backlog item as written, the DONE condition requires /api/elements/semantics to return non-null geometry/classification, but TARGET-contracts.md §1 #6 is a frozen backend preservation contract that says this endpoint must keep those fields null with roadmap[]. Without adding an approved exception or updating the frozen contract first, the backlog now points future work at a change that the contract says should be reverted.

Useful? React with 👍 / 👎.

Comment thread docs/plans/BACKLOG.md
| `gap-a1-sourcepicker` | `#a1` | TARGET-shell `#a1` 選檔節 | TRUTH §1 `a1` 列 | 收斂型×中 | 選檔樣式三選一(dd/cascade/tree)收斂為一式並寫入 TARGET-shell `#a1` 節;PROTO 切換列自規格移除 | 未裁決前正式 UI 維持現行樣式;三式並陳僅存在於 prototype | OPEN 決策 #1 |
| `gap-reports-hub` | `#reports` | TARGET-shell `#reports` 節 | TRUTH §1 `reports` 列 | PARTIAL×低 | 中心化報表頁聚合既有匯出入口,一頁可達;E2E | 未接的報表項標 p1 待建,不列假報表 | 無 |
| `gap-status-calibration`(一次性) | 全站 | —(校正工項,不新增規格) | TRUTH §1/§2 全部 `not observed` 項 | 校正型×中 | runtime 逐頁截圖比對 prototype 錨,TRUTH `not observed` 項全數改為實測狀態或確認 NOT-BUILT;截圖入 `artifacts/e2e/`(`.gitignore` 擋 `*.png`,須 `git add -f`) | 校正寧可保守;無證據一律維持 `not observed` | 無 |
| `gap-status-calibration`(一次性) | 全站 | —(校正工項,不新增規格) | TRUTH §1/§2 全部 `not observed` 項 | 校正型×中 | runtime 逐頁截圖比對 prototype 錨,TRUTH `not observed` 項全數改為實測狀態或確認 NOT-BUILT;截圖入 `artifacts/e2e/`(`.gitignore` 擋全部 evidence 檔型別,須 `git add -f`)。**含 viewer 區塊 6/7 的取證**——2026-07-14 code 對帳確認兩者 UI 已建且經 coordinator 真 fetch(原 `gap-viewer-m4-spatial` 因前端已達成 DONE 定義而刪列),僅差 tracked browser trace。 | 校正寧可保守;無證據一律維持 `not observed` | 無 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep AC-4 work in the viewer backlog

This calibration row now says the old gap-viewer-m4-spatial was deleted because the frontend already met its DONE definition, leaving only evidence capture. However TARGET-viewer AC-4 still requires the Spatial block to show MasterFormat/OmniClass/Uniformat when the source has them, and the current IfcSemanticPanel spatial card only renders the containment chain while treating classification as a roadmap item. With the dedicated spatial gap removed, future work can mark block 7 as merely unobserved even though part of AC-4 is still unbuilt; keep a backlog item for that display path or explicitly move it to another gap.

Useful? React with 👍 / 👎.

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