From ecba8206e4c8cac76dd3e6f8844204abfda03dfd Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Thu, 04 Jun 2026 17:24:20 +0800
Subject: [PATCH] make quick switch overlay full bleed

---
 C3.tools/round1-session-snapshot-qa.sh |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/C3.tools/round1-session-snapshot-qa.sh b/C3.tools/round1-session-snapshot-qa.sh
index d45033c..23be5db 100755
--- a/C3.tools/round1-session-snapshot-qa.sh
+++ b/C3.tools/round1-session-snapshot-qa.sh
@@ -55,6 +55,9 @@
         print(json.dumps(report, indent=2, ensure_ascii=False), file=sys.stderr)
         sys.exit(1)
 
+def near(lhs, rhs, tolerance=0.01):
+    return abs((lhs or 0) - (rhs or 0)) <= tolerance
+
 require(report.get("snapshotLoaded") is True, "snapshotLoaded must be true")
 require(report.get("displayCount", 0) >= 1, "displayCount must be >= 1")
 require(report.get("spaceCount", 0) >= 1, "spaceCount must be >= 1")
@@ -70,9 +73,24 @@
 space_labels = report.get("spaceLabels", [])
 lane_labels = root_view.get("spaceLaneLabels", [])
 lane_segments = root_view.get("spaceLaneSegments", [])
+root_bounds = root_view.get("bounds", {})
+glass_frame = root_view.get("glassFrame", {})
+safe_area_top_inset = root_view.get("safeAreaTopInset", 0)
+safe_area_fill_frame = root_view.get("safeAreaFillFrame", {})
 lane_frame = root_view.get("spaceLaneFrame", {})
 shelf_frame = root_view.get("appShelfFrame", {})
 waterfall_frame = root_view.get("waterfallFrame", {})
+require(near(glass_frame.get("x"), root_bounds.get("x")), "Quick Switch glass layer x must match root bounds")
+require(near(glass_frame.get("y"), root_bounds.get("y")), "Quick Switch glass layer y must match root bounds")
+require(near(glass_frame.get("width"), root_bounds.get("width")), "Quick Switch glass layer width must match root bounds")
+require(near(glass_frame.get("height"), root_bounds.get("height")), "Quick Switch glass layer height must match root bounds")
+require(root_view.get("glassCornerRadius") == 0, "Quick Switch glass layer must not draw an outer rounded frame")
+require(root_view.get("glassBorderWidth") == 0, "Quick Switch glass layer must not draw an outer border")
+require(root_view.get("glassShadowOpacity") == 0, "Quick Switch glass layer must not draw an outer shadow")
+require(safe_area_top_inset >= 0, "safeAreaTopInset must be non-negative")
+if safe_area_top_inset > 0.5:
+    require(near(safe_area_fill_frame.get("height"), safe_area_top_inset), "safe-area fill height must match safeAreaTopInset")
+    require(near(safe_area_fill_frame.get("y") + safe_area_fill_frame.get("height"), root_bounds.get("height")), "safe-area fill must sit at the top edge")
 require(root_view.get("spaceLaneSegmentCount") == report.get("spaceCount"), "Space Lane segment count must match spaceCount")
 require(lane_labels == space_labels, "Space Lane labels must match report spaceLabels exactly")
 require(len(set(lane_labels)) == len(lane_labels), "Space Lane labels must be unique")

--
Gitblit v1.9.3