Webdev-Bench / tasks /c41 /task.json
Roy-DOU's picture
Translate all 40 tasks to English
c14c78f verified
Raw History Blame Contribute Delete
9.22 kB
{
"task_id": "c41",
"layer": "composite",
"seed_type": "prd",
"operators": [
"generate",
"restyle",
"make interactive",
"remove section",
"wire up data"
],
"difficulty": "challenging",
"levers": [
"state coupling",
"cross-requirement combined state",
"exact numeric assertions"
],
"domain": "content & news",
"repair": false,
"inject_type": null,
"seed_meta": {
"authored_by": "hand",
"materials": "none"
},
"title": "Inkstone Express: a news site from scratch to dark mode and topic takedown",
"milestones": [
{
"operator": "generate",
"request": "Build the homepage of a news site called “Inkstone Express”, with the tagline “Seven minutes a day to make the world a little lighter”.\n\nFrom top to bottom: the header holds the site name and tagline, with a “My bookmarks (0)” entry on the right; below the header is a channel bar whose tabs are fixed as All / Tech / Finance / Culture / Sports, defaulting to “All”; below that is the article list, 8 per page, with pagination at the bottom.\n\nPut 26 articles in total. Every article needs a title, its channel, a read count, and an “Bookmark” button. Of the 26, Tech has 9, Finance 6, Culture 5 and Sports 6. Sort the read counts from high to low, with the first article at 9800 and each following article 300 less than the previous one. The list is sorted by read count, high to low, by default."
},
{
"operator": "restyle",
"request": "It is too harsh on the eyes at night. Add a “Night mode” toggle on the right of the header; when switched on the whole site goes dark: dark background, light body text. The toggle state must persist — going to page 2 or switching channels must not flip it back to day mode."
},
{
"operator": "make interactive",
"request": "The bookmarks must actually work. Clicking “Bookmark” turns the button into “Added”, and the N in the header’s “My bookmarks (N)” must go up; clicking again cancels it and N goes down. Both this count and each article’s button state must survive switching channels, paging and toggling night mode."
},
{
"operator": "remove section",
"request": "We are dropping “Sports” from the channel bar: remove that tab entirely, and withdraw the 6 Sports articles from the list as well. Afterwards the total article count and the number of pages must change accordingly; do not leave an empty page."
},
{
"operator": "wire up data",
"request": "Add a summary line below the header: “N articles · M total reads”. N is the number of articles in the current channel, M is the sum of their read counts, and it must change when the channel changes. The numbers must be exact."
}
],
"checklist": [
{
"id": "gen.channels.five",
"m": 1,
"dimension": "visual",
"w": 1.5,
"description": "Exactly 5 tabs in the channel bar, labelled in order All / Tech / Finance / Culture / Sports, with “All” in the selected state (visibly different from the other tabs)"
},
{
"id": "gen.count.26",
"m": 1,
"dimension": "functional",
"w": 1.5,
"description": "Under the All channel the total is 26 articles, paginated 8 per page for 4 pages (2 articles on page 4)"
},
{
"id": "gen.first.reads",
"m": 1,
"dimension": "functional",
"w": 1.5,
"description": "Default order is by read count descending: the 1st article has 9800, the 2nd 9500, the 3rd 9200"
},
{
"id": "gen.last.reads",
"m": 1,
"dimension": "functional",
"w": 1.0,
"description": "On page 4, the last article (the 26th) has a read count of 2300"
},
{
"id": "gen.chan.split",
"m": 1,
"dimension": "functional",
"w": 1.0,
"description": "Switching to Tech shows 9 articles, Finance 6, Culture 5, Sports 6"
},
{
"id": "gen.header.bm0",
"m": 1,
"dimension": "visual",
"w": 1.0,
"description": "A bookmark entry exists on the right of the header, and its initial text shows a count of 0"
},
{
"id": "gen.card.parts",
"m": 1,
"dimension": "visual",
"w": 1.0,
"description": "Every article card shows, at the same time, a title, its channel, a read count and a “Bookmark” button"
},
{
"id": "gen.slogan",
"m": 1,
"dimension": "visual",
"w": 1.0,
"description": "The header shows the site name “Inkstone Express” and the tagline “Seven minutes a day to make the world a little lighter”"
},
{
"id": "skin.toggle.exists",
"m": 2,
"dimension": "visual",
"w": 1.5,
"description": "A clickable “Night mode” toggle exists on the right of the header"
},
{
"id": "skin.dark.applied",
"m": 2,
"dimension": "visual",
"w": 1.5,
"description": "With night mode on, the page background is clearly darker and the body text becomes light (distinguishable from day mode)"
},
{
"id": "skin.persist.page",
"m": 2,
"dimension": "interaction",
"w": 1.5,
"description": "Turn night mode on, then go to page 2: it is still dark (not reverted to day mode)"
},
{
"id": "skin.persist.chan",
"m": 2,
"dimension": "interaction",
"w": 1.5,
"description": "Turn night mode on, then switch to the Finance channel: it is still dark"
},
{
"id": "skin.text.contrast",
"m": 2,
"dimension": "visual",
"w": 1.0,
"description": "In night mode article titles remain clearly readable (no dark-on-dark text)"
},
{
"id": "int.bm.add",
"m": 3,
"dimension": "interaction",
"w": 1.5,
"description": "Click “Bookmark” on the 1st article: the button text becomes “Added” and the header count becomes 1"
},
{
"id": "int.bm.three",
"m": 3,
"dimension": "interaction",
"w": 1.5,
"description": "Bookmark the 2nd and 3rd articles too: the header count becomes 3 and all three buttons read “Added”"
},
{
"id": "int.bm.cancel",
"m": 3,
"dimension": "interaction",
"w": 1.5,
"description": "Click the 2nd article again: the button returns to “Bookmark” and the header count becomes 2"
},
{
"id": "int.bm.keep.page",
"m": 3,
"dimension": "interaction",
"w": 1.5,
"description": "After bookmarking 3 articles, go to page 2 and back to page 1: the count is still 3 and those three still read “Added”"
},
{
"id": "int.bm.keep.chan",
"m": 3,
"dimension": "interaction",
"w": 1.5,
"description": "After bookmarking, switch to the Tech channel and back to All: the header count is unchanged"
},
{
"id": "int.bm.keep.skin",
"m": 3,
"dimension": "interaction",
"w": 1.5,
"description": "After bookmarking, turn on night mode: the header count and every button state are unchanged"
},
{
"id": "int.bm.no.dup",
"m": 3,
"dimension": "interaction",
"w": 1.0,
"description": "Clicking “Bookmark” twice in a row on the same article gives a net change of 0 (no double counting)"
},
{
"id": "del.sports.gone",
"m": 4,
"dimension": "coverage",
"w": 1.5,
"description": "The channel bar has only 4 tabs left; “Sports” no longer appears"
},
{
"id": "del.count.20",
"m": 4,
"dimension": "functional",
"w": 1.5,
"description": "Under the All channel the total is now 20 articles, paginated 8 per page for 3 pages (4 articles on page 3)"
},
{
"id": "del.no.empty",
"m": 4,
"dimension": "functional",
"w": 1.0,
"description": "No clickable empty page exists in the pagination control (page 4 does not exist or is unreachable)"
},
{
"id": "del.sports.items",
"m": 4,
"dimension": "coverage",
"w": 1.0,
"description": "Browsing all 20 articles page by page, none is labelled with the Sports channel"
},
{
"id": "del.keep.bm",
"m": 4,
"dimension": "interaction",
"w": 1.5,
"description": "Before removing Sports, bookmark 2 Tech articles; after removal the header count is still 2 and those 2 still read “Added”"
},
{
"id": "data.sum.all",
"m": 5,
"dimension": "functional",
"w": 1.5,
"description": "Under All the summary line shows “20 articles”, and the total reads is the exact sum of the read counts of these 20 articles"
},
{
"id": "data.sum.tech",
"m": 5,
"dimension": "functional",
"w": 1.5,
"description": "Switching to Tech, the summary count becomes 9 and the total reads equals the sum of these 9 read counts"
},
{
"id": "data.sum.exists",
"m": 5,
"dimension": "visual",
"w": 1.0,
"description": "The summary line sits below the header near the channel bar, worded like “N articles · M total reads”"
},
{
"id": "data.sum.switch",
"m": 5,
"dimension": "interaction",
"w": 1.5,
"description": "Switching back and forth between Tech and Culture twice, the summary count and total reads match the current channel every time"
},
{
"id": "data.sum.dark",
"m": 5,
"dimension": "visual",
"w": 1.0,
"description": "In night mode the summary line remains clearly readable"
}
],
"inject": null,
"qc_static": [],
"review_status": "hand_authored",
"hand_notes": {
"cross_requirement_items": 7,
"dim_counts": {
"visual": 9,
"functional": 8,
"interaction": 11,
"coverage": 2
}
}
}