feat: clarify PChome growth page responsibilities
All checks were successful
CD Pipeline / deploy (push) Successful in 1m8s

This commit is contained in:
ogt
2026-06-25 10:54:39 +08:00
parent b1c2959dea
commit 21e0e0c646
11 changed files with 48 additions and 9 deletions

View File

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

View File

@@ -92,6 +92,7 @@
- V10.655 起正式首頁 `/` 必須以 HTTP 200 原地渲染「業績成長指揮台」,不得 302 跳轉到 `/ai_intelligence`;側邊欄第一個主入口必須直連 `/``/ai_intelligence` 只作為相容入口保留,不得成為主導流路由。
- V10.656 起正式首頁首屏必須是「PChome 業績成長系統」專業儀表板,而非大段說明型頁首;第一屏需直接呈現近 7 天業績、比價可用率、下滑商品、待補比價、最大分類、下滑商品 TOP 5、PChome/MOMO 價格狀態圓環與處理狀態,且全部使用 `/api/ai/pchome-growth/opportunities` 真資料渲染。
- V10.658 起全站頁面必須回到「提升 PChome 業績」同一產品主線;共用 shell 需提供短流程骨架評估、分析、建議、解法、治理。頁首、hero、任務卡與提示區不得依賴大段文字讓使用者理解狀況首屏應以短指標、狀態分流、下一步動作與可執行入口呈現專業評估、分析、建議與解決方案。
- V10.659 起主要入口頁的首屏文案必須改為流程職責語言而不是功能說明書。當日業績負責找出下滑與價差壓力匯入負責資料新鮮度AI 建議負責把證據轉成銷售建議,比價負責同款與價差決策,缺貨負責避免主推商品斷貨,月結分析負責判斷成長、毛利與品類結構。
## 零之一、12 Agent 決策信封2026-05-24

View File

@@ -17,7 +17,7 @@
<h1 class="ai-recommend-title">
<i class="fas fa-robot"></i>AI 智慧推薦
</h1>
<small class="ar-hero__sub">根據資料庫商品分類、即時趨勢與 AI 生成紀錄,產出可追蹤的銷售文案</small>
<small class="ar-hero__sub">把價差、商品證據與趨勢轉成可追蹤的銷售建議</small>
</div>
<div class="ar-hero__actions">
<span id="ollamaStatus" class="ar-status {{ 'ar-status--ok' if ollama_status else 'ar-status--off' }}">

View File

@@ -19,7 +19,7 @@
<h1 class="ai-head__title">當日業績報表匯入</h1>
<p class="ai-head__subtitle">
<i class="fas fa-info-circle" aria-hidden="true"></i>
支援兩種匯入方式:<strong>Google Drive 自動匯入</strong>(每 30 分鐘檢查)或 <strong>手動上傳</strong>
保持 PChome 業績新鮮,讓評估、分析與建議有可靠資料。
</p>
</div>
</header>

View File

@@ -94,7 +94,7 @@
當日業績看板
</h1>
<p class="daily-hero__subtitle">
{% if is_month_view %}{{ calendar_data.month_name }} 月度總計{% else %}{{ selected_date }} 單日檢視{% endif %}
{% if is_month_view %}{{ calendar_data.month_name }} 月度總計:確認成長與缺口{% else %}{{ selected_date }}:找出下滑與價差壓力{% endif %}
</p>
</div>
<div class="daily-hero__controls">

View File

@@ -134,11 +134,18 @@
{% elif _page_group == 'ops' %}{% set _growth_stage = 'solve' %}
{% else %}{% set _growth_stage = 'govern' %}
{% endif %}
{% if _growth_stage == 'evaluate' %}{% set _growth_stage_brief = '現在:評估缺口' %}
{% elif _growth_stage == 'analyze' %}{% set _growth_stage_brief = '現在:分析原因' %}
{% elif _growth_stage == 'recommend' %}{% set _growth_stage_brief = '現在:產生建議' %}
{% elif _growth_stage == 'solve' %}{% set _growth_stage_brief = '現在:執行解法' %}
{% else %}{% set _growth_stage_brief = '現在:守住品質' %}
{% endif %}
<nav class="momo-growth-rail" aria-label="PChome 業績提升流程">
<span class="momo-growth-goal">
<i class="fas fa-arrow-trend-up" aria-hidden="true"></i>
<span>PChome 業績提升</span>
</span>
<span class="momo-growth-current">{{ _growth_stage_brief }}</span>
<span class="momo-growth-step {% if _growth_stage == 'evaluate' %}is-active{% endif %}">
<i class="fas fa-gauge-high" aria-hidden="true"></i><span>評估</span>
</span>

View File

@@ -24,7 +24,7 @@
<i class="fas fa-box-open" aria-hidden="true"></i>
廠商缺貨通知自動化系統
</h1>
<p class="home-hero__subtitle">理缺貨商品資料、廠商聯絡資訊,自動發送缺貨通知郵件</p>
<p class="home-hero__subtitle">理缺貨風險,避免主推商品斷貨。</p>
</div>
<div class="home-hero__decor" aria-hidden="true"></div>
</header>
@@ -35,7 +35,7 @@
'variant': 'list',
'icon': 'list-ul',
'title': '缺貨清單',
'desc': '查看、編輯、篩選已匯入的缺貨商品,支援批次操作、發送郵件與排序',
'desc': '找出會影響業績的缺貨商品',
'cta': '查看清單',
'cta_icon': 'search',
'href': '/vendor-stockout/list'
@@ -44,7 +44,7 @@
'variant': 'vendor',
'icon': 'building',
'title': '廠商管理',
'desc': '管理廠商基本資料與聯絡郵件,支援多個郵件地址設定',
'desc': '維護可聯絡的補貨窗口',
'cta': '管理廠商',
'cta_icon': 'users-cog',
'href': '/vendor-stockout/vendor-management'

View File

@@ -37,7 +37,7 @@
月份總表數據分析
</h1>
<p class="ms-page-head__sub">
以資料庫 <code class="ms-tag ms-tag--mono">monthly_summary_analysis</code> YoY
用月結資料判斷成長毛利與品類結
</p>
</div>
<div class="ms-page-head__meta">

View File

@@ -623,7 +623,7 @@
<header class="price-tool-head mb-4">
<div class="price-hero-copy">
<h2><i class="fas fa-balance-scale me-2"></i>PChome 商品比價決策台</h2>
<p class="text-muted mb-0">PChome 業績商品反查 MOMO,先找同款,再判斷售價、活動與曝光下一步。</p>
<p class="text-muted mb-0">PChome 反查 MOMO:確認同款、判斷價差、決定下一步。</p>
</div>
<div class="price-hero-kpis" aria-label="比價核心狀態">
<div class="price-hero-kpi">

View File

@@ -541,6 +541,11 @@ def test_sidebar_uses_growth_command_center_as_primary_entry():
assert "{% set _group_monitor = ['ai_intelligence', 'dashboard', 'edm', 'campaigns'] %}" in base
assert "momo-growth-rail" in base
assert "PChome 業績提升" in base
assert "現在:評估缺口" in base
assert "現在:分析原因" in base
assert "現在:產生建議" in base
assert "現在:執行解法" in base
assert "現在:守住品質" in base
assert "評估" in base
assert "分析" in base
assert "建議" in base
@@ -567,3 +572,19 @@ def test_global_ui_guard_keeps_pages_professional_and_responsive():
assert "momo-growth-step.is-active" in shell_css
assert ".momo-content .btn:not(.btn-close)" in guard_css
assert ":not(.btn-close)" in guard_css
def test_primary_pages_use_growth_outcome_copy_instead_of_feature_explaining():
from pathlib import Path
expected = {
"templates/daily_sales.html": "找出下滑與價差壓力",
"templates/ai_recommend.html": "把價差、商品證據與趨勢轉成可追蹤的銷售建議",
"templates/auto_import_index.html": "保持 PChome 業績新鮮",
"templates/price_comparison.html": "確認同款、判斷價差、決定下一步",
"templates/index.html": "避免主推商品斷貨",
"templates/monthly_summary_analysis.html": "判斷成長、毛利與品類結構",
}
for path, marker in expected.items():
assert marker in Path(path).read_text(encoding="utf-8")

View File

@@ -562,6 +562,7 @@ body.momo-v2-body {
}
.momo-growth-goal,
.momo-growth-current,
.momo-growth-step {
display: inline-flex;
flex: 0 0 auto;
@@ -584,6 +585,15 @@ body.momo-v2-body {
color: var(--momo-page-accent-dark);
}
.momo-growth-current {
padding: 0 9px;
border-left: 1px solid var(--momo-border-light);
color: var(--momo-page-accent-dark);
font-family: var(--momo-font-display);
font-size: var(--momo-text-label);
font-weight: 800;
}
.momo-growth-step {
padding: 0 10px;
border: 1px solid var(--momo-border-light);