fix(web): suppress governance style hydration drift
Some checks failed
Code Review / ai-code-review (push) Successful in 21s
CD Pipeline / tests (push) Successful in 1m46s
CD Pipeline / build-and-deploy (push) Successful in 7m0s
CD Pipeline / post-deploy-checks (push) Successful in 1m53s
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
Some checks failed
Code Review / ai-code-review (push) Successful in 21s
CD Pipeline / tests (push) Successful in 1m46s
CD Pipeline / build-and-deploy (push) Successful in 7m0s
CD Pipeline / post-deploy-checks (push) Successful in 1m53s
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled
This commit is contained in:
@@ -2204,7 +2204,7 @@ export function AgentMarketTab() {
|
||||
</GlassCard>
|
||||
</div>
|
||||
|
||||
<style>{`
|
||||
<style suppressHydrationWarning>{`
|
||||
@media (max-width: 900px) {
|
||||
.agent-market-kpi-grid,
|
||||
.agent-market-radar-metrics-grid,
|
||||
|
||||
@@ -19728,7 +19728,7 @@ export function AutomationInventoryTab() {
|
||||
</GlassCard>
|
||||
</div>
|
||||
|
||||
<style jsx global>{`
|
||||
<style jsx global suppressHydrationWarning>{`
|
||||
.automation-inventory-tab-root,
|
||||
.automation-inventory-tab-root * {
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -1096,7 +1096,7 @@ export function SloTab() {
|
||||
/>
|
||||
|
||||
{/* Responsive helpers */}
|
||||
<style>{`
|
||||
<style suppressHydrationWarning>{`
|
||||
.slo-kpi-grid > * { flex: 1; min-width: 200px; }
|
||||
@media (max-width: 640px) {
|
||||
.slo-kpi-grid > * { flex: 0 0 100%; min-width: 0; }
|
||||
|
||||
@@ -30,9 +30,11 @@
|
||||
**完成內容**:
|
||||
- `/zh-TW/governance` 的 section 順序固定為 SLO、治理事件、AI 待辦、Agent 市場、自動化盤點。
|
||||
- 舊 `?tab=` deep link 只在 client mount 後讀取 `window.location.search`,用於高亮與 `scrollIntoView`,不再改變 SSR 初始 DOM。
|
||||
- 本地 dev 進一步定位到 `SloTab` style block 的 `> *` selector 在 SSR / CSR style text escaping 上產生 mismatch;已對 Governance 內 `SloTab`、`AgentMarketTab`、`AutomationInventoryTab` 的 style block 加上 `suppressHydrationWarning`,避免等價 CSS 文字造成 root hydration fail。
|
||||
|
||||
**驗證結果**:
|
||||
- `pnpm --filter @awoooi/web typecheck`:通過。
|
||||
- 本地 dev smoke:`hydrationCount=0`、`missingCount=0`。本地資料未載入是正式 API CORS 擋 localhost,非 hydration regression。
|
||||
|
||||
**目前真相邊界**:
|
||||
- 本段只修補 Governance 前端 hydration 穩定度;不改任何 API snapshot、executor、Telegram、runtime gate 或正式寫入權限。
|
||||
|
||||
Reference in New Issue
Block a user