This commit is contained in:
@@ -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"
|
||||
OBSERVABILITY_VISUAL_CONTRACT="$PROJECT_ROOT/scripts/check_observability_visual_contract.sh"
|
||||
RESPONSIVE_OVERFLOW_GUARD="$PROJECT_ROOT/scripts/check_responsive_overflow.sh"
|
||||
REVIEW_REPORT_HINT=0
|
||||
|
||||
@@ -88,6 +89,16 @@ run_observability_css_sync() {
|
||||
python3 "$OBSERVABILITY_CSS_SYNC" "$@"
|
||||
}
|
||||
|
||||
run_observability_visual_contract() {
|
||||
if [ ! -f "$OBSERVABILITY_VISUAL_CONTRACT" ]; then
|
||||
echo -e "${RED}❌ AI觀測台渲染後視覺契約不存在: $OBSERVABILITY_VISUAL_CONTRACT${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}🎨 開始 AI觀測台渲染後視覺契約檢查...${NC}"
|
||||
bash "$OBSERVABILITY_VISUAL_CONTRACT" "$@"
|
||||
}
|
||||
|
||||
run_responsive_overflow_guard() {
|
||||
if [ ! -f "$RESPONSIVE_OVERFLOW_GUARD" ]; then
|
||||
echo -e "${RED}❌ Responsive overflow guard 不存在: $RESPONSIVE_OVERFLOW_GUARD${NC}"
|
||||
@@ -126,6 +137,11 @@ if [ $# -gt 0 ]; then
|
||||
run_observability_css_sync --check
|
||||
exit $?
|
||||
;;
|
||||
--observability-visual)
|
||||
shift
|
||||
run_observability_visual_contract "$@"
|
||||
exit $?
|
||||
;;
|
||||
--responsive-overflow)
|
||||
shift
|
||||
run_responsive_overflow_guard "$@"
|
||||
@@ -144,6 +160,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.
|
||||
--observability-visual [--base-url URL] [--timeout SEC]
|
||||
Run rendered typography, surface, radius, contrast, and mobile density checks.
|
||||
--responsive-overflow [--base-url URL] [--route PATH ...]
|
||||
Run desktop/tablet/mobile body horizontal overflow checks for Flask routes.
|
||||
EOF
|
||||
@@ -165,8 +183,9 @@ if [ $# -eq 0 ]; then
|
||||
echo "8) AI觀測台完整 QA 套件"
|
||||
echo "9) 同步 AI觀測台 CSS static mirror"
|
||||
echo "10) 全頁 responsive overflow 檢查"
|
||||
echo "11) AI觀測台渲染後視覺契約檢查"
|
||||
echo ""
|
||||
read -p "請輸入選項 (1-10): " choice
|
||||
read -p "請輸入選項 (1-11): " choice
|
||||
|
||||
case $choice in
|
||||
1)
|
||||
@@ -216,6 +235,9 @@ if [ $# -eq 0 ]; then
|
||||
10)
|
||||
run_responsive_overflow_guard
|
||||
;;
|
||||
11)
|
||||
run_observability_visual_contract
|
||||
;;
|
||||
*)
|
||||
echo -e "${RED}❌ 無效選項${NC}"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user