From 0380d4c435c4cbad51e3f86be5cd948a07c29518 Mon Sep 17 00:00:00 2001 From: OoO Date: Wed, 13 May 2026 12:10:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E4=B8=8A=20responsive=20overflow=20qu?= =?UTF-8?q?ick=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/quick_review.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/quick_review.sh b/scripts/quick_review.sh index da3b470..686df3b 100755 --- a/scripts/quick_review.sh +++ b/scripts/quick_review.sh @@ -20,6 +20,7 @@ OBSERVABILITY_UI_GUARD="$PROJECT_ROOT/scripts/check_observability_ui.py" OBSERVABILITY_PAGE_SMOKE="$PROJECT_ROOT/scripts/check_observability_pages.py" OBSERVABILITY_QA_SUITE="$PROJECT_ROOT/scripts/check_observability_suite.sh" OBSERVABILITY_CSS_SYNC="$PROJECT_ROOT/scripts/sync_observability_css.py" +RESPONSIVE_OVERFLOW_GUARD="$PROJECT_ROOT/scripts/check_responsive_overflow.sh" REVIEW_REPORT_HINT=0 # 顯示標題 @@ -87,6 +88,16 @@ run_observability_css_sync() { python3 "$OBSERVABILITY_CSS_SYNC" "$@" } +run_responsive_overflow_guard() { + if [ ! -f "$RESPONSIVE_OVERFLOW_GUARD" ]; then + echo -e "${RED}❌ Responsive overflow guard 不存在: $RESPONSIVE_OVERFLOW_GUARD${NC}" + exit 1 + fi + + echo -e "${GREEN}📱 開始全頁 responsive overflow 檢查...${NC}" + bash "$RESPONSIVE_OVERFLOW_GUARD" "$@" +} + # 非互動入口:給部署腳本、CI、或 Codex session 直接呼叫。 if [ $# -gt 0 ]; then case "$1" in @@ -115,6 +126,11 @@ if [ $# -gt 0 ]; then run_observability_css_sync --check exit $? ;; + --responsive-overflow) + shift + run_responsive_overflow_guard "$@" + exit $? + ;; --observability-help) cat <<'EOF' AI observability quick-review flags: @@ -128,6 +144,8 @@ AI observability quick-review flags: Run production page/CSS smoke against the target URL. --observability-qa [--base-url URL] [--skip-production] Run the full QA suite. + --responsive-overflow [--base-url URL] [--route PATH ...] + Run desktop/tablet/mobile body horizontal overflow checks for Flask routes. EOF exit 0 ;; @@ -146,8 +164,9 @@ if [ $# -eq 0 ]; then echo "7) AI觀測台 10頁線上巡檢" echo "8) AI觀測台完整 QA 套件" echo "9) 同步 AI觀測台 CSS static mirror" + echo "10) 全頁 responsive overflow 檢查" echo "" - read -p "請輸入選項 (1-9): " choice + read -p "請輸入選項 (1-10): " choice case $choice in 1) @@ -194,6 +213,9 @@ if [ $# -eq 0 ]; then 9) run_observability_css_sync ;; + 10) + run_responsive_overflow_guard + ;; *) echo -e "${RED}❌ 無效選項${NC}" exit 1