Datasets:
File size: 9,077 Bytes
148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 4385304 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 c14c78f 148f3c7 4385304 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | {
"task_id": "c42",
"layer": "composite",
"seed_type": "prd",
"operators": [
"generate",
"wire up data",
"add state",
"remove section",
"make interactive"
],
"difficulty": "challenging",
"levers": [
"state coupling",
"cross-requirement combined state",
"exact numeric assertions"
],
"domain": "e-commerce",
"repair": false,
"inject_type": null,
"seed_meta": {
"authored_by": "hand",
"materials": "none"
},
"title": "Shiwuji: e-commerce list from build to inventory linkage and filter takedown",
"milestones": [
{
"operator": "generate",
"request": "Build a niche-goods e-commerce list page called \"Shiwuji\". Put the shop name and a \"Cart (0)\" in the top bar. Below, a category bar: All / Objects / Study / Textiles, defaulting to \"All\".\n\nThere are 18 products in total: Objects 7, Study 6, Textiles 5. Each needs a name, category, price, and an \"Add to cart\" button. Prices start at 88 and each subsequent item adds 37 (88, 125, 162…), sorted by price low to high. The list fits on one page, no pagination."
},
{
"operator": "wire up data",
"request": "Add an inventory number behind each product. Inventory follows this rule: in the current display order, the n-th item's inventory = (n × 7) mod 5 plus 1, i.e. cycling between 1 and 5. Products with inventory 1 must be marked \"Only 1 left\"."
},
{
"operator": "add state",
"request": "The cart has to actually work. Clicking \"Add to cart\" increments the top-bar count by 1, and the same item can be added up to its inventory limit; once at the limit the button changes to \"Reached limit\" and can't be clicked. Also add a \"Total ¥X\" to the top bar, where X is the sum of added products' prices times quantities, and it must be accurate."
},
{
"operator": "remove section",
"request": "We're not doing the \"Textiles\" category any more — remove the category tab and those 5 products together. After removal, the product total and the inventory numbering rule are recomputed in the new order (i.e. the n-th item still computes inventory by its new position)."
},
{
"operator": "make interactive",
"request": "Add an \"In stock only\" toggle to the category bar; when on, hide products with inventory 0 — there are none with 0 inventory right now, so the list doesn't change when it's on, but the toggle itself must be able to turn on and off, and the toggle state must persist after switching categories. Also, the cart count and total must not be lost after switching categories or toggling the filter."
}
],
"checklist": [
{
"id": "gen.cats.four",
"m": 1,
"dimension": "visual",
"w": 1.5,
"description": "The category bar has exactly 4 tabs: All / Objects / Study / Textiles, with \"All\" in the selected state and distinguishable from the others."
},
{
"id": "gen.count.18",
"m": 1,
"dimension": "functional",
"w": 1.5,
"description": "Under the All category there are exactly 18 products, all displayed on one page, with no pagination controls on the page."
},
{
"id": "gen.price.seq",
"m": 1,
"dimension": "functional",
"w": 1.5,
"description": "In price ascending order: item 1 is ¥88, item 2 is ¥125, item 3 is ¥162."
},
{
"id": "gen.price.last",
"m": 1,
"dimension": "functional",
"w": 1.0,
"description": "The last item (the 18th) has a price of ¥717."
},
{
"id": "gen.cat.split",
"m": 1,
"dimension": "functional",
"w": 1.0,
"description": "After switching category: Objects 7, Study 6, Textiles 5."
},
{
"id": "gen.card.parts",
"m": 1,
"dimension": "visual",
"w": 1.0,
"description": "Each product card simultaneously shows name, category, price, and an \"Add to cart\" button."
},
{
"id": "gen.cart.zero",
"m": 1,
"dimension": "visual",
"w": 1.0,
"description": "The top bar shows the shop name \"Shiwuji\" and the cart entry, with an initial count of 0."
},
{
"id": "data.stock.first",
"m": 2,
"dimension": "functional",
"w": 1.5,
"description": "Inventory is computed by position: item 1 inventory 3, item 2 inventory 5, item 3 inventory 2 (n×7 mod 5 + 1)."
},
{
"id": "data.stock.only1",
"m": 2,
"dimension": "visual",
"w": 1.5,
"description": "The \"Only 1 left\" mark is visible on product cards whose inventory is 1, and that mark appears only on cards with inventory 1."
},
{
"id": "data.stock.visible",
"m": 2,
"dimension": "visual",
"w": 1.0,
"description": "Every product card shows an inventory number."
},
{
"id": "data.stock.range",
"m": 2,
"dimension": "functional",
"w": 1.0,
"description": "Checking item by item, all inventory values fall between 1 and 5, with no 0 or values greater than 5."
},
{
"id": "st.cart.add",
"m": 3,
"dimension": "interaction",
"w": 1.5,
"description": "Clicking \"Add to cart\" on item 1 changes the top-bar count to 1 and the total to ¥88."
},
{
"id": "st.cart.sum2",
"m": 3,
"dimension": "interaction",
"w": 1.5,
"description": "Adding item 2 changes the top-bar count to 2 and the total to ¥213 (88+125)."
},
{
"id": "st.cart.limit",
"m": 3,
"dimension": "interaction",
"w": 1.5,
"description": "Clicking item 3 (inventory 2) three times in a row increases the count by only 2, and the button changes to \"Reached limit\" and can't be clicked."
},
{
"id": "st.cart.sum.exact",
"m": 3,
"dimension": "functional",
"w": 1.5,
"description": "After adding 1 of item 1, 1 of item 2, and filling 2 of item 3, the total is exactly ¥537 (88+125+162×2)."
},
{
"id": "st.cart.keep.cat",
"m": 3,
"dimension": "interaction",
"w": 1.5,
"description": "After adding, switching to Study and back to All leaves the top-bar count and total unchanged."
},
{
"id": "st.cart.display",
"m": 3,
"dimension": "visual",
"w": 1.0,
"description": "The top bar simultaneously shows the cart count and the \"Total ¥X\"."
},
{
"id": "del.textile.gone",
"m": 4,
"dimension": "coverage",
"w": 1.5,
"description": "The category bar has only 3 tabs left, and \"Textiles\" no longer appears."
},
{
"id": "del.count.13",
"m": 4,
"dimension": "functional",
"w": 1.5,
"description": "Under the All category the products become 13."
},
{
"id": "del.no.textile",
"m": 4,
"dimension": "coverage",
"w": 1.0,
"description": "Browsing all 13 items, none has the category Textiles."
},
{
"id": "del.stock.recalc",
"m": 4,
"dimension": "functional",
"w": 1.5,
"description": "Inventory is recomputed by the new positions: after deletion item 1 has inventory 3, item 2 has inventory 5, item 3 has inventory 2."
},
{
"id": "del.keep.cart",
"m": 4,
"dimension": "interaction",
"w": 1.5,
"description": "Add 2 Objects items before deletion; after deleting Textiles the top-bar count and total stay unchanged."
},
{
"id": "int.stock.toggle",
"m": 5,
"dimension": "visual",
"w": 1.5,
"description": "An \"In stock only\" toggle control exists near the category bar, is clickable, and has clear on/off states."
},
{
"id": "int.stock.on",
"m": 5,
"dimension": "interaction",
"w": 1.5,
"description": "After turning on \"In stock only\" the product count is still 13 (there are currently no zero-inventory products), and the list has not been emptied."
},
{
"id": "int.stock.off",
"m": 5,
"dimension": "interaction",
"w": 1.0,
"description": "After turning the toggle off it returns to the off state, and the product count is still 13."
},
{
"id": "int.stock.keep.cat",
"m": 5,
"dimension": "interaction",
"w": 1.5,
"description": "After turning on \"In stock only\" and switching to Study, the toggle is still on (not reset)."
},
{
"id": "int.cart.keep.filter",
"m": 5,
"dimension": "interaction",
"w": 1.5,
"description": "After adding 2 items, toggling \"In stock only\" twice leaves the top-bar count and total unchanged."
},
{
"id": "int.combo.all",
"m": 5,
"dimension": "interaction",
"w": 1.5,
"description": "Adding 2 items → switching to Study → turning on In stock only → switching back to All leaves the top-bar count, total, and toggle state all correct at the same time."
},
{
"id": "int.layout.stable",
"m": 5,
"dimension": "visual",
"w": 1.0,
"description": "After the toggle filter, each card's name/price/inventory information is still fully visible, with no misalignment or truncation."
},
{
"id": "int.cat.select",
"m": 5,
"dimension": "visual",
"w": 1.0,
"description": "After switching category the current category tab is in the selected state, and only one tab is selected."
}
],
"inject": null,
"qc_static": [],
"review_status": "hand_authored",
"hand_notes": {
"cross_requirement_items": 5,
"dim_counts": {
"visual": 9,
"functional": 9,
"interaction": 10,
"coverage": 2
}
}
} |