diff --git a/config.py b/config.py index 8077e6f..f9a3ec5 100644 --- a/config.py +++ b/config.py @@ -402,7 +402,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '') # ========================================== # 系統版本與路徑 # ========================================== -SYSTEM_VERSION = "V10.661" +SYSTEM_VERSION = "V10.662" LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log') public_url = PUBLIC_URL # 用於模板顯示 diff --git a/docs/AI_INTELLIGENCE_MODULE_SOT.md b/docs/AI_INTELLIGENCE_MODULE_SOT.md index c86a96e..d2477ba 100644 --- a/docs/AI_INTELLIGENCE_MODULE_SOT.md +++ b/docs/AI_INTELLIGENCE_MODULE_SOT.md @@ -738,3 +738,4 @@ POSTGRES_HOST=momo-db | 2026-05-21 | ElephantAlpha NIM/LLM 回應偶爾不是純 JSON,會觸發 `json.loads()` 失敗並落入舊式空泛策略 fallback | V10.383 起協調器容忍 fenced/混文字 JSON;無法解析時改用 DB/Hermes 實證 fallback,且 fallback 不再包含 OpenClaw `generate_*` 舊步驟或自動調價暗示 | | 2026-05-20 | Telegram HTML parse mode 不支援 `
`,可能導致告警或報告送出 400 | V10.321 起 Telegram template 發送前會把 `
` / `
` / `
` 轉為換行;保留其他 HTML 標籤,非 HTML parse mode 不改寫 | | 2026-05-20 | 部分舊 Telegram 入口繞過中央 sanitizer,且 RAG awaiting review 使用錯誤 `chat_id=` 參數會讓人工審核推播失敗 | V10.322 起 Bot API price decision 走 `send_telegram_with_result()`;`price_decision()` 補 `report_url` 相容並 escape 動態欄位;RAG awaiting review 改用 `chat_ids=[...]` 呼叫 `_send_telegram_raw()` | +| 2026-06-25 | UI/UX 不可只修首頁,導覽主入口必須同一套 PChome 業績提升語言 | V10.662 起作戰、分析、營運、AI 助手主入口與廠商缺貨子工具都使用短句對齊「評估、分析、建議、解法、治理」流程;首頁今日行動卡維持 980px 上限與高對比主按鈕,禁止回到全寬長文說明。 | diff --git a/templates/ai_intelligence.html b/templates/ai_intelligence.html index e750553..b02b5c3 100644 --- a/templates/ai_intelligence.html +++ b/templates/ai_intelligence.html @@ -394,6 +394,17 @@ .growth-command-alert-action { min-width: 108px; justify-self: end; + border-color: #8f442b; + background: #8f442b; + color: #fff; + box-shadow: 0 8px 18px rgba(143, 68, 43, 0.18); + } + + .growth-command-alert-action:hover, + .growth-command-alert-action:focus { + border-color: #743620; + background: #743620; + color: #fff; } .ai-intel-hero { diff --git a/templates/edm_dashboard_v2.html b/templates/edm_dashboard_v2.html index e808fd7..99155ed 100644 --- a/templates/edm_dashboard_v2.html +++ b/templates/edm_dashboard_v2.html @@ -41,6 +41,7 @@ ID · {{ current_promo_page|upper }}

{{ page_title }}

+

用活動價格異動找主推、補貨與曝光機會。

活動時段
diff --git a/templates/growth_analysis.html b/templates/growth_analysis.html index 34a904a..d5fea87 100644 --- a/templates/growth_analysis.html +++ b/templates/growth_analysis.html @@ -29,7 +29,10 @@
-

營運成長策略報表

+
+

營運成長策略報表

+

用月趨勢評估成長缺口、價差壓力與毛利品質。

+
數據更新至 {{ chart_data.labels[-1] if chart_data.labels else '-' }} diff --git a/templates/sales_analysis.html b/templates/sales_analysis.html index 6589ce7..d295076 100644 --- a/templates/sales_analysis.html +++ b/templates/sales_analysis.html @@ -56,6 +56,7 @@ 業績分析儀表板 +

用分類、品牌與毛利找出 PChome 成長槓桿。

{% if db_data_range %} diff --git a/templates/vendor_stockout_history_v2.html b/templates/vendor_stockout_history_v2.html index 62d0f5b..0576fe2 100644 --- a/templates/vendor_stockout_history_v2.html +++ b/templates/vendor_stockout_history_v2.html @@ -10,7 +10,7 @@
Vendor Stockout

發送歷史

-

保留廠商缺貨通知的操作歷程入口;目前進階查詢、統計圖表與重試機制仍在後續階段。

+

回看缺貨處理紀錄,找出需要補救的供貨風險。

總覽 @@ -27,7 +27,7 @@
- 此頁面功能將在 Phase 6 實作:記錄查詢、統計圖表與重試機制。現階段請先使用「郵件記錄」查看正式發送狀態。 + 現階段請先使用「郵件記錄」確認正式發送狀態。
diff --git a/templates/vendor_stockout_import_v2.html b/templates/vendor_stockout_import_v2.html index 39ce1c1..9efe858 100644 --- a/templates/vendor_stockout_import_v2.html +++ b/templates/vendor_stockout_import_v2.html @@ -18,7 +18,7 @@

Excel 匯入

- 上傳正式缺貨 Excel 後,系統會使用既有匯入 API 寫入 vendor_stockout,完成後直接回傳批次編號與成功、重複、失敗筆數。 + 補齊缺貨資料,先保住主推商品供貨。

@@ -44,7 +44,7 @@ 選擇或拖曳 Excel 檔案 - 支援 .xlsx / .xls。檔案送出後會寫入正式缺貨資料表,請確認內容是可匯入的正式清單。 + 支援 .xlsx / .xls。送出後直接回傳成功、重複與失敗筆數。 選擇檔案 diff --git a/templates/vendor_stockout_list_v2.html b/templates/vendor_stockout_list_v2.html index c4b9b20..61330ee 100644 --- a/templates/vendor_stockout_list_v2.html +++ b/templates/vendor_stockout_list_v2.html @@ -18,7 +18,7 @@

缺貨清單

- 依正式缺貨資料呈現,可用批次、廠商、商品與發送狀態篩選;桌機保留密度,手機改為逐筆資料卡。 + 先看待發送與失敗,避免主推商品斷貨拖累業績。

diff --git a/templates/vendor_stockout_send_email_v2.html b/templates/vendor_stockout_send_email_v2.html index 48ff74a..b17f3ca 100644 --- a/templates/vendor_stockout_send_email_v2.html +++ b/templates/vendor_stockout_send_email_v2.html @@ -10,7 +10,7 @@
Vendor Stockout

郵件發送記錄

-

追蹤廠商缺貨通知的發送狀態、成功率與錯誤訊息,方便營運快速補救。

+

先處理失敗通知,讓補貨協調不中斷。

總覽 diff --git a/templates/vendor_stockout_vendor_management_v2.html b/templates/vendor_stockout_vendor_management_v2.html index 15f8d0c..40be50d 100644 --- a/templates/vendor_stockout_vendor_management_v2.html +++ b/templates/vendor_stockout_vendor_management_v2.html @@ -10,7 +10,7 @@
Vendor Stockout

廠商管理

-

維護來源供應商、收件信箱與 Excel 匯入,所有異動直接接正式廠商缺貨資料。

+

維護供應商與收件人,讓缺貨補救能快速送達。

總覽 diff --git a/tests/test_pchome_revenue_growth_service.py b/tests/test_pchome_revenue_growth_service.py index 9304a3b..191e53e 100644 --- a/tests/test_pchome_revenue_growth_service.py +++ b/tests/test_pchome_revenue_growth_service.py @@ -584,7 +584,27 @@ def test_primary_pages_use_growth_outcome_copy_instead_of_feature_explaining(): "templates/price_comparison.html": "確認同款、判斷價差、決定下一步", "templates/vendor_stockout_index_v2.html": "避免主推商品斷貨", "templates/monthly_summary_analysis.html": "判斷成長、毛利與品類結構", + "templates/dashboard_v2.html": "先看業績,再決定調價、曝光與組合", + "templates/edm_dashboard_v2.html": "用活動價格異動找主推、補貨與曝光機會", + "templates/sales_analysis.html": "用分類、品牌與毛利找出 PChome 成長槓桿", + "templates/growth_analysis.html": "用月趨勢評估成長缺口、價差壓力與毛利品質", + "templates/vendor_stockout_import_v2.html": "補齊缺貨資料,先保住主推商品供貨", + "templates/vendor_stockout_list_v2.html": "先看待發送與失敗,避免主推商品斷貨拖累業績", + "templates/vendor_stockout_send_email_v2.html": "先處理失敗通知,讓補貨協調不中斷", + "templates/vendor_stockout_vendor_management_v2.html": "維護供應商與收件人,讓缺貨補救能快速送達", + "templates/vendor_stockout_history_v2.html": "回看缺貨處理紀錄,找出需要補救的供貨風險", } for path, marker in expected.items(): assert marker in Path(path).read_text(encoding="utf-8") + + +def test_homepage_next_action_cta_keeps_visible_primary_contrast(): + from pathlib import Path + + template = Path("templates/ai_intelligence.html").read_text(encoding="utf-8") + + assert ".growth-command-alert-action" in template + assert "background: #8f442b" in template + assert "color: #fff" in template + assert "width: min(100%, 980px)" in template diff --git a/web/static/css/page-edm-v2.css b/web/static/css/page-edm-v2.css index f783c39..29d7521 100644 --- a/web/static/css/page-edm-v2.css +++ b/web/static/css/page-edm-v2.css @@ -161,6 +161,16 @@ line-height: 1.05; } + .campaign-growth-copy { + max-width: 42ch; + margin: -8px 0 0; + color: var(--momo-text-secondary); + font-size: 0.9rem; + font-weight: 760; + line-height: 1.45; + letter-spacing: 0; + } + .campaign-meta-grid { display: flex; gap: 24px; @@ -784,6 +794,10 @@ font-size: 28px; } + .campaign-growth-copy { + font-size: 0.84rem; + } + .campaign-kpi-grid { grid-template-columns: 1fr 1fr; } diff --git a/web/static/css/page-growth-bem.css b/web/static/css/page-growth-bem.css index b615906..27a6828 100644 --- a/web/static/css/page-growth-bem.css +++ b/web/static/css/page-growth-bem.css @@ -36,6 +36,15 @@ line-height: var(--momo-line-height-tight); letter-spacing: 0; } +.growth-analysis-page .ga-page-head__brief { + max-width: 52ch; + margin: var(--momo-space-1, 4px) 0 0; + color: var(--momo-text-secondary); + font-size: 0.86rem; + font-weight: 760; + line-height: 1.45; + letter-spacing: 0; +} .growth-analysis-page .ga-page-head__meta { flex: 0 0 auto; color: var(--momo-text-secondary); diff --git a/web/static/css/page-sales-analysis-bem.css b/web/static/css/page-sales-analysis-bem.css index 105c879..eb8699e 100644 --- a/web/static/css/page-sales-analysis-bem.css +++ b/web/static/css/page-sales-analysis-bem.css @@ -32,6 +32,15 @@ gap: 0.6rem; } .sa-page-head__title i { color: var(--momo-page-accent); } +.sa-page-head__brief { + max-width: 52ch; + margin: 0; + color: var(--momo-text-secondary); + font-size: 0.86rem; + font-weight: 760; + line-height: 1.45; + letter-spacing: 0; +} .sa-tag { display: inline-flex;