V10.616 主商品看板繁中化
All checks were successful
CD Pipeline / deploy (push) Successful in 1m5s

This commit is contained in:
OoO
2026-06-16 10:24:24 +08:00
parent eb521fd6d8
commit 11b9ea6fef
5 changed files with 34 additions and 14 deletions

View File

@@ -402,7 +402,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '')
# ==========================================
# 系統版本與路徑
# ==========================================
SYSTEM_VERSION = "V10.615"
SYSTEM_VERSION = "V10.616"
LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log')
public_url = PUBLIC_URL # 用於模板顯示

View File

@@ -2,7 +2,7 @@
> **最後更新**: 2026-06-16 (台北時間)
> **狀態**: 🟢 四 AI Agent 自動化閉環已落地LLM 路由紅線升級為 Ollama-first 三主機級聯PChome 後台業績匯入韌性已補強產品定位正名為「PChome 業績成長自動化作戰系統」外部市場來源正規化層、自動同步、作戰清單與價格參考表優先讀取、CSV 備援預檢、前台操作入口與高可見頁面繁中化守門已建立
> **適用版本**: V10.615
> **適用版本**: V10.616
---
@@ -62,6 +62,7 @@
- V10.613 起高可見前台頁面必須以繁體中文呈現程式碼審查、AI 自動化健康檢查、PPT 產線與商品看板操作標籤不得使用英文工程標題或簡體字;測試需防止頁面文案退回英文。
- V10.614 起部署監控、基礎設施生命線與 PPT 產線狀態也納入繁中守門:前台不得顯示 `Dashboard``Pipeline``Runtime` 等工程詞,動態階段需轉成「測試 / 建置 / 部署」。
- V10.615 起 AI 智慧推薦頁必須把 Ollama 顯示為「Ollama 主路徑」Gemini 只能顯示為「Gemini 備援」且手動選項停用;使用者可見錯誤與搜尋流程不得出現 `Web Search``Token:`、半形英文冒號等工程文案。
- V10.616 起主商品看板 `/` 的統計與補強區塊也納入繁中守門:不得顯示 `ACTIVE``PICK COUNT``AVG CONFIDENCE``EVIDENCE GAP``PCHOME MATCH BACKFILL` 等工程標籤畫面需使用「有效商品」「挑品數」「平均信心」「待補證據」「PChome 比價補強」等白話營運文案。
## 零之一、12 Agent 決策信封2026-05-24

View File

@@ -245,3 +245,9 @@
- `/ai_recommend` 的 AI 路徑顯示改成「Ollama 主路徑 / Gemini 備援」Gemini 選項保留為角色提示但停用手動選擇,避免使用者誤以為可直接用 Gemini 生成文案。
- `page-ai-recommend.js` 的狀態 badge、生成結果 meta、搜尋/分析錯誤訊息改用繁中全形冒號與「權杖」用語。
- 新增測試守門:禁止 `Ollama (本地)``Gemini (雲端)``Web Search``Token:` 與半形英文錯誤前綴回到 AI 智慧推薦頁。
## 19. 2026-06-16 V10.616 主商品看板統計標籤繁中化
- `/` 主商品看板補齊高可見統計標籤繁中化,將 `ACTIVE``PICK COUNT``AVG CONFIDENCE``EVIDENCE GAP` 等工程詞改為「有效商品」「挑品數」「平均信心」「待補證據」。
- PChome 補強區塊標籤改為「PChome 比價補強」,空狀態改為「目前有效商品沒有高優先 PChome 覆核項目」。
- 測試新增禁止英文工程標籤回歸,讓主商品看板符合「所有內容包含頁面皆為繁體中文」紅線。

View File

@@ -13,7 +13,7 @@
<div class="dashboard-section-label">
<span class="num momo-mono">01</span>
<span class="title">比價監控總覽</span>
<span class="meta momo-mono">KPI · 最新有效價格 {{ overview.last_pchome_crawled or '待刷新' }}</span>
<span class="meta momo-mono">指標 · 最新有效價格 {{ overview.last_pchome_crawled or '待刷新' }}</span>
</div>
<div class="dashboard-kpi-grid">
<div class="dashboard-kpi dashboard-kpi--coverage">
@@ -22,7 +22,7 @@
<div class="dashboard-kpi-sub">可直接支援調價、挑品、簡報的有效比價資料</div>
<div class="dashboard-kpi-metrics momo-mono" aria-label="決策支援組成">
<span><em>支援</em><strong>{{ overview.decision_support_count | default(overview.decision_ready_count | default(0)) | number_format }}</strong></span>
<span><em>ACTIVE</em><strong>{{ overview.total_active | default(total_products) | number_format }}</strong></span>
<span><em>有效商品</em><strong>{{ overview.total_active | default(total_products) | number_format }}</strong></span>
<span><em>身份</em><strong>{{ overview.identity_coverage_rate | default(overview.match_rate | default(0)) }}%</strong></span>
<span><em>型錄</em><strong>{{ overview.catalog_comparable_count | default(0) | number_format }}</strong></span>
</div>
@@ -62,7 +62,7 @@
data-status-endpoint="/api/ai/pchome-match/backfill/status"
data-pchome-backfill-action="backfillPchomeMatches">
<div class="dashboard-backfill-main">
<div class="dashboard-backfill-label momo-mono">PCHOME MATCH BACKFILL</div>
<div class="dashboard-backfill-label momo-mono">PChome 比價補強</div>
<div class="dashboard-backfill-title">PChome 比價補強產線</div>
<div class="dashboard-backfill-meta">刷新過期、補抓未配對、清理近門檻候選,目標是提高可決策覆蓋率。</div>
<div class="dashboard-backfill-pills momo-mono" aria-label="補強產線隊列">
@@ -315,7 +315,7 @@
</div>
{% else %}
<div class="dashboard-focus-title">覆核隊列已清空</div>
<div class="dashboard-focus-sub momo-mono">目前 ACTIVE 商品沒有高優先 PChome 覆核項目</div>
<div class="dashboard-focus-sub momo-mono">目前有效商品沒有高優先 PChome 覆核項目</div>
{% endif %}
</div>
</div>
@@ -398,32 +398,32 @@
{% if current_filter == 'ai_picks' and ai_pick_summary %}
<div class="dashboard-ai-summary-grid">
<div class="dashboard-ai-summary-item">
<div class="dashboard-ai-summary-label">PICK COUNT</div>
<div class="dashboard-ai-summary-label">挑品數</div>
<div class="dashboard-ai-summary-value momo-mono">{{ ai_pick_summary.count | number_format }}</div>
<div class="dashboard-ai-summary-sub">目前清單上限 {{ ai_pick_list_limit }} 品</div>
</div>
<div class="dashboard-ai-summary-item">
<div class="dashboard-ai-summary-label">AVG CONFIDENCE</div>
<div class="dashboard-ai-summary-label">平均信心</div>
<div class="dashboard-ai-summary-value momo-mono">{{ (ai_pick_summary.avg_confidence * 100) | round(0) | int }}%</div>
<div class="dashboard-ai-summary-sub">高信心 {{ ai_pick_summary.high_confidence_count | number_format }} 品</div>
</div>
<div class="dashboard-ai-summary-item">
<div class="dashboard-ai-summary-label">EVIDENCE</div>
<div class="dashboard-ai-summary-label">證據完整度</div>
<div class="dashboard-ai-summary-value momo-mono">{{ ai_pick_summary.avg_evidence_quality | round(0) | int }}%</div>
<div class="dashboard-ai-summary-sub">需補證據 {{ ai_pick_summary.needs_evidence_count | number_format }} 品</div>
</div>
<div class="dashboard-ai-summary-item">
<div class="dashboard-ai-summary-label">AVG GAP</div>
<div class="dashboard-ai-summary-label">平均價差</div>
<div class="dashboard-ai-summary-value momo-mono">+{{ ai_pick_summary.avg_gap_pct | round(1) }}%</div>
<div class="dashboard-ai-summary-sub">PChome 相對 MOMO 價差</div>
</div>
<div class="dashboard-ai-summary-item">
<div class="dashboard-ai-summary-label">BEST GAP</div>
<div class="dashboard-ai-summary-label">最大價差</div>
<div class="dashboard-ai-summary-value momo-mono">+{{ ai_pick_summary.max_gap_pct | round(1) }}%</div>
<div class="dashboard-ai-summary-sub">清單內最大價格優勢</div>
</div>
<div class="dashboard-ai-summary-item">
<div class="dashboard-ai-summary-label">EVIDENCE GAP</div>
<div class="dashboard-ai-summary-label">待補證據</div>
<div class="dashboard-ai-summary-value momo-mono">
{% if ai_pick_summary.top_missing_evidence %}
{{ ai_pick_summary.top_missing_evidence[0].count | number_format }}

View File

@@ -772,7 +772,17 @@ def test_ai_product_pick_agent_uses_real_competitor_data_and_dashboard_action():
assert "top_missing_evidence" in dashboard_route_source
assert "證據 {{ item.ai_pick.evidence_quality" in dashboard_template
assert "dashboard-ai-evidence-chip" in dashboard_template
assert "EVIDENCE GAP" in dashboard_template
assert "挑品數" in dashboard_template
assert "平均信心" in dashboard_template
assert "證據完整度" in dashboard_template
assert "平均價差" in dashboard_template
assert "最大價差" in dashboard_template
assert "待補證據" in dashboard_template
assert "PICK COUNT" not in dashboard_template
assert "AVG CONFIDENCE" not in dashboard_template
assert "EVIDENCE GAP" not in dashboard_template
assert "AVG GAP" not in dashboard_template
assert "BEST GAP" not in dashboard_template
scheduler_source = (ROOT / "scheduler.py").read_text(encoding="utf-8")
run_scheduler_source = (ROOT / "run_scheduler.py").read_text(encoding="utf-8")
@@ -793,7 +803,10 @@ def test_ai_product_pick_agent_uses_real_competitor_data_and_dashboard_action():
assert "/api/ai/pchome-match/refresh-stale" in dashboard_template
assert "/api/ai/pchome-match/recover-stale" not in dashboard_template
assert "/api/ai/pchome-match/backfill/status" in dashboard_template
assert "PCHOME MATCH BACKFILL" in dashboard_template
assert "PChome 比價補強" in dashboard_template
assert "PCHOME MATCH BACKFILL" not in dashboard_template
assert ">ACTIVE<" not in dashboard_template
assert "目前 ACTIVE 商品" not in dashboard_template
assert "data-pchome-backfill-trigger" in dashboard_template
assert "data-pchome-refresh-stale-trigger" in dashboard_template
assert "data-pchome-recover-stale-trigger" not in dashboard_template