From 4e9fef02a574f16bb6fe3f7cef4f967e009d2a5d Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Thu, 18 Jun 2026 20:48:55 +0800
Subject: [PATCH] Add App Shelf index markers

---
 C3.tools/round1-app-shelf-fixture-qa.sh |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/C3.tools/round1-app-shelf-fixture-qa.sh b/C3.tools/round1-app-shelf-fixture-qa.sh
index e066efc..586ee5f 100755
--- a/C3.tools/round1-app-shelf-fixture-qa.sh
+++ b/C3.tools/round1-app-shelf-fixture-qa.sh
@@ -104,6 +104,13 @@
         print(json.dumps(report, indent=2, ensure_ascii=False), file=sys.stderr)
         sys.exit(1)
 
+def expected_index_text(index):
+    symbols = list("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ")
+    if index < len(symbols):
+        return symbols[index]
+    overflow = index - len(symbols)
+    return symbols[10 + (overflow // 26) % 26] + symbols[10 + overflow % 26]
+
 root = report.get("rootView", {})
 items = root.get("appShelfItems", [])
 columns = root.get("waterfallColumns", [])
@@ -171,6 +178,12 @@
 require(normal_items, "fixture must include normal app items")
 require(all(item.get("iconFrame", {}).get("width") == expected_icon_size for item in normal_items), "normal app icons must match expected fixture icon size")
 require(all(item.get("labelTruncationMode") == "middle" for item in items), "all App Shelf labels must use middle truncation")
+require(all(item.get("indexVisible") is True for item in items), "all App Shelf items must expose a visible hand-written index marker")
+require(all(item.get("indexText") == expected_index_text(index) for index, item in enumerate(items)), "App Shelf index markers must follow 1234567890ABCDEFG order")
+require(all(item.get("indexFontSize", 0) >= 13 for item in items), "App Shelf index markers must keep readable font size")
+require(all(0 < item.get("indexColor", {}).get("alpha", 0) <= 0.5 for item in items), "App Shelf index markers must stay low-noise with light alpha")
+require(all(item.get("indexFrame", {}).get("width", 0) >= 14 for item in items), "App Shelf index markers must reserve enough width")
+require(all(item.get("indexFrame", {}).get("x", 99) < item.get("iconFrame", {}).get("x", -99) for item in items), "App Shelf index markers must sit beside the icon, not over the icon center")
 
 row_y_values = {round(item.get("frame", {}).get("y", 0), 2) for item in items}
 require(len(row_y_values) == expected_rows, "fixture App Shelf visible rows must match expected rows")
@@ -192,6 +205,7 @@
     "hoveredColumnTitleColor": hovered_title_color,
     "hoveredColumnCountColor": hovered_count_color,
     "blueReference": blue_reference,
+    "firstIndexes": [item.get("indexText") for item in items[:min(12, len(items))]],
     "selectedZ": selected_z,
     "hoverZ": hover_z,
     "scrollable": root.get("appShelfScrollable"),

--
Gitblit v1.9.3