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prompt": "Make a supernatural-suspense animated short drama — at midnight inside the old wing of a psychiatric hospital, the new male intern discovers that Room 304 plays a thirty-year-old recording every single night by itself. When he finally pushes that door open, he sees his ten-year-old self standing inside. Add ambient sounds: faint electrical hum, hollow corridor reverb, and distant sobbing.",
|
| 6 |
+
"videos": [
|
| 7 |
+
{
|
| 8 |
+
"model": "ours",
|
| 9 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_016_ours.mp4"
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"model": "baseline",
|
| 13 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_016_baseline.mp4"
|
| 14 |
+
}
|
| 15 |
+
]
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"id": "cr_023",
|
| 19 |
+
"category": "cr",
|
| 20 |
+
"prompt": "Make a period rebirth-revenge palace-intrigue animated short drama — the disgraced former Empress Liu Ruyan, poisoned to death in a cold palace by her own elder sister in her past life, wakes up reborn on the day before she enters the palace. This time she vows to force every betrayer in her past life to kneel before her, one by one.",
|
| 21 |
+
"videos": [
|
| 22 |
+
{
|
| 23 |
+
"model": "ours",
|
| 24 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_023_ours.mp4"
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"model": "baseline",
|
| 28 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_023_baseline.mp4"
|
| 29 |
+
}
|
| 30 |
+
]
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"id": "cr_030",
|
| 34 |
+
"category": "cr",
|
| 35 |
+
"prompt": "Make a CEO-chasing-his-wife animated short drama — Su Nian, the contract-marriage wife, returns three years later with twin children to deliver divorce papers to the heir of the Huo family. The man who once treated her merely as a stand-in for someone else, kneels before her for the very first time. Add a heart-tugging string BGM.",
|
| 36 |
+
"videos": [
|
| 37 |
+
{
|
| 38 |
+
"model": "ours",
|
| 39 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_030_ours.mp4"
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"model": "baseline",
|
| 43 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_030_baseline.mp4"
|
| 44 |
+
}
|
| 45 |
+
]
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"id": "cr_042",
|
| 49 |
+
"category": "cr",
|
| 50 |
+
"prompt": "Make a cultivation / xianxia animated short drama — a prodigy disciple is framed by his senior brother and his cultivation core is crippled. With nothing but his family's broken sword, he refounds his foundation, slays ancient demons, and finally breaks through the nine heavenly tribulations to ascend to godhood.",
|
| 51 |
+
"videos": [
|
| 52 |
+
{
|
| 53 |
+
"model": "ours",
|
| 54 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_042_ours.mp4"
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"model": "baseline",
|
| 58 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_042_baseline.mp4"
|
| 59 |
+
}
|
| 60 |
+
]
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"id": "cr_049",
|
| 64 |
+
"category": "cr",
|
| 65 |
+
"prompt": "Make a modern-urban rebirth-revenge animated short drama — a top-tier lawyer is framed by his business partner and thrown in prison; by the time he gets out, his wife and daughter are dead. Granted a second chance, he wakes up ten years earlier on the rainy night that changed everything, determined to drag every single one of his betrayers down with him.",
|
| 66 |
+
"videos": [
|
| 67 |
+
{
|
| 68 |
+
"model": "ours",
|
| 69 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_049_ours.mp4"
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"model": "baseline",
|
| 73 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_049_baseline.mp4"
|
| 74 |
+
}
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"id": "cr_059",
|
| 79 |
+
"category": "cr",
|
| 80 |
+
"prompt": "Make a high-school revenge animated short drama — Gu Xiuning, the ice-cold transfer student who always ranks first, is discovered on his very first day to be the only survivor of an arson that struck this school ten years ago. The new homeroom teacher, Mr. Lin, turns out to be the very man who dragged him out of the flames back then. Add a restrained, suppressed piano BGM.",
|
| 81 |
+
"videos": [
|
| 82 |
+
{
|
| 83 |
+
"model": "ours",
|
| 84 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_059_ours.mp4"
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"model": "baseline",
|
| 88 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_059_baseline.mp4"
|
| 89 |
+
}
|
| 90 |
+
]
|
| 91 |
+
},
|
| 92 |
+
{
|
| 93 |
+
"id": "cr_064",
|
| 94 |
+
"category": "cr",
|
| 95 |
+
"prompt": "Make a zombie-apocalypse animated short drama — day seven of the outbreak, a small squad led by a former special-ops captain and a female doctor cuts through zombie-infested underground tunnels in search of the legendary vaccine lab. Add ambient sounds: zombie shrieks, distant air-raid sirens, and wind whipping through ruined corridors.",
|
| 96 |
+
"videos": [
|
| 97 |
+
{
|
| 98 |
+
"model": "ours",
|
| 99 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_064_ours.mp4"
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"model": "baseline",
|
| 103 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_064_baseline.mp4"
|
| 104 |
+
}
|
| 105 |
+
]
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"id": "cr_072",
|
| 109 |
+
"category": "cr",
|
| 110 |
+
"prompt": "Make a Chinese-mythology fantasy animated short drama — at the close of the Investiture of the Gods war, the last surviving little nine-tailed fox demon is dragged up onto the Investiture Platform by Jiang Ziya. Just before her execution, she suddenly remembers a man who has been appearing in her dreams. Add ambient sounds of the nine-heaven thunder rolling, and a mournful classical-Chinese BGM.",
|
| 111 |
+
"videos": [
|
| 112 |
+
{
|
| 113 |
+
"model": "ours",
|
| 114 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_072_ours.mp4"
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
"model": "baseline",
|
| 118 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_072_baseline.mp4"
|
| 119 |
+
}
|
| 120 |
+
]
|
| 121 |
+
},
|
| 122 |
+
{
|
| 123 |
+
"id": "cr_104",
|
| 124 |
+
"category": "cr",
|
| 125 |
+
"prompt": "Make a wuxia / xianxia revenge animated short drama — the only surviving young Daoist after his sect is massacred by the demonic cult carries his master's severed head all the way back to Mount Kunlun, vowing to perform the blood-moon vengeance rite that very night. Add ambient sounds: howling mountain wind, ringing sword strikes, and rolling distant thunder.",
|
| 126 |
+
"videos": [
|
| 127 |
+
{
|
| 128 |
+
"model": "ours",
|
| 129 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_104_ours.mp4"
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"model": "baseline",
|
| 133 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_104_baseline.mp4"
|
| 134 |
+
}
|
| 135 |
+
]
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"id": "cr_107",
|
| 139 |
+
"category": "cr",
|
| 140 |
+
"prompt": "Make a period war-epic animated short drama — General Murong Rong's only son has guarded the western frontier for ten years without returning home. In his final stand he charges alone into ten thousand enemy soldiers, only to reclaim the family's ancestral green-dragon polearm from the body of his fallen father. Add ambient sounds: war horses neighing, bowstrings drawn taut, frozen wind sweeping the snow plains. Add a stirring period war-drum BGM.",
|
| 141 |
+
"videos": [
|
| 142 |
+
{
|
| 143 |
+
"model": "ours",
|
| 144 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_107_ours.mp4"
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"model": "baseline",
|
| 148 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/cr_107_baseline.mp4"
|
| 149 |
+
}
|
| 150 |
+
]
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"id": "intake_img_005",
|
| 154 |
+
"category": "intake_img",
|
| 155 |
+
"prompt": "Use this uploaded photo as the look of the cultivation male lead. Make a cultivation-rebirth animated short drama — in his previous life he was the Heavenly Emperor who suppressed all under heaven, killed by the joint betrayal of nine sacred lands. He is now reborn into the body of the trash junior disciple every senior in the sect mocks; every one of those who once stepped on him has no idea they are already standing at the edge of doom.",
|
| 156 |
+
"videos": [
|
| 157 |
+
{
|
| 158 |
+
"model": "ours",
|
| 159 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_005_ours.mp4"
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"model": "baseline",
|
| 163 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_005_baseline.mp4"
|
| 164 |
+
}
|
| 165 |
+
],
|
| 166 |
+
"reference_image": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/refs/intake_img_005.png"
|
| 167 |
+
},
|
| 168 |
+
{
|
| 169 |
+
"id": "intake_img_008",
|
| 170 |
+
"category": "intake_img",
|
| 171 |
+
"prompt": "Use this uploaded photo as the fantasy female lead. Make a post-apocalyptic super-power animated short drama — the day the virus broke out she awakened the power to bend metal inside a subway car. Now she leads a band of survivors through the zombie-flooded city, dodging the military's super-power task force as she hunts for whoever truly released the pathogen.",
|
| 172 |
+
"videos": [
|
| 173 |
+
{
|
| 174 |
+
"model": "ours",
|
| 175 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_008_ours.mp4"
|
| 176 |
+
},
|
| 177 |
+
{
|
| 178 |
+
"model": "baseline",
|
| 179 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_008_baseline.mp4"
|
| 180 |
+
}
|
| 181 |
+
],
|
| 182 |
+
"reference_image": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/refs/intake_img_008.png"
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"id": "intake_img_018",
|
| 186 |
+
"category": "intake_img",
|
| 187 |
+
"prompt": "Use this uploaded photo as the wealthy-heir male lead. Make a modern-urban wealthy-clan tortured-romance animated short drama — seven years ago he watched her jump off a yacht into the deep sea; seven years later she returns under a different name, becomes his biggest business rival, and the one shadow he can never quite catch.",
|
| 188 |
+
"videos": [
|
| 189 |
+
{
|
| 190 |
+
"model": "ours",
|
| 191 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_018_ours.mp4"
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"model": "baseline",
|
| 195 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_018_baseline.mp4"
|
| 196 |
+
}
|
| 197 |
+
],
|
| 198 |
+
"reference_image": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/refs/intake_img_018.png"
|
| 199 |
+
},
|
| 200 |
+
{
|
| 201 |
+
"id": "intake_img_019",
|
| 202 |
+
"category": "intake_img",
|
| 203 |
+
"prompt": "Use this uploaded photo as the face of the rebirth-revenge female lead. Make a period rebirth-revenge palace-intrigue animated short drama — she is the former empress who was forced to drink poisoned wine. Reborn back to the day of the imperial selection, this time she will personally send every soul who once owed her a life into the underworld.",
|
| 204 |
+
"videos": [
|
| 205 |
+
{
|
| 206 |
+
"model": "ours",
|
| 207 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_019_ours.mp4"
|
| 208 |
+
},
|
| 209 |
+
{
|
| 210 |
+
"model": "baseline",
|
| 211 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_019_baseline.mp4"
|
| 212 |
+
}
|
| 213 |
+
],
|
| 214 |
+
"reference_image": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/refs/intake_img_019.png"
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"id": "intake_img_030",
|
| 218 |
+
"category": "intake_img",
|
| 219 |
+
"prompt": "Use this uploaded photo as the suspense male lead. Make an urban crime-suspense animated short drama — the new deputy captain of the homicide unit takes his very first case: a serial-disposal cold case that has been silent for fifteen years. As he closes in on the truth, he finds his own father's name plainly listed among the original suspects. Add Chinese subtitles for short-video platform distribution.",
|
| 220 |
+
"videos": [
|
| 221 |
+
{
|
| 222 |
+
"model": "ours",
|
| 223 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_030_ours.mp4"
|
| 224 |
+
},
|
| 225 |
+
{
|
| 226 |
+
"model": "baseline",
|
| 227 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_030_baseline.mp4"
|
| 228 |
+
}
|
| 229 |
+
],
|
| 230 |
+
"reference_image": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/refs/intake_img_030.png"
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"id": "intake_img_036",
|
| 234 |
+
"category": "intake_img",
|
| 235 |
+
"prompt": "Use this uploaded photo as the look of the CEO male lead. Make a modern-urban wealthy-clan tortured-romance animated short drama — three years after the car crash that erased her memory, the little contract wife Su Nian reappears in front of CEO Huo with a small boy who looks exactly like him. Add bilingual Chinese-English subtitles for overseas distribution.",
|
| 236 |
+
"videos": [
|
| 237 |
+
{
|
| 238 |
+
"model": "ours",
|
| 239 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_036_ours.mp4"
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"model": "baseline",
|
| 243 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_036_baseline.mp4"
|
| 244 |
+
}
|
| 245 |
+
],
|
| 246 |
+
"reference_image": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/refs/intake_img_036.png"
|
| 247 |
+
},
|
| 248 |
+
{
|
| 249 |
+
"id": "intake_img_037",
|
| 250 |
+
"category": "intake_img",
|
| 251 |
+
"prompt": "Use this uploaded photo as the fantasy female lead. Make a demon-empress rebirth animated short drama — in her previous life she was the demon empress who guarded the human realm, killed by the joint betrayal of her most trusted disciple and the heavenly court. Reborn to the day before her demonic awakening, this time she will personally drag every one of those self-righteous heavenly beings down from their pedestals. Add bilingual Chinese-English subtitles for overseas short-video distribution.",
|
| 252 |
+
"videos": [
|
| 253 |
+
{
|
| 254 |
+
"model": "ours",
|
| 255 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_037_ours.mp4"
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"model": "baseline",
|
| 259 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_037_baseline.mp4"
|
| 260 |
+
}
|
| 261 |
+
],
|
| 262 |
+
"reference_image": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/refs/intake_img_037.png"
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"id": "intake_img_039",
|
| 266 |
+
"category": "intake_img",
|
| 267 |
+
"prompt": "Use this uploaded photo as the high-school female lead. Make a contemporary high-school sweet-and-bitter romance animated short drama — rumor says she is the secret daughter of the largest private-academy benefactor in northern Jiangbei; on her very first day as a transfer student she clashes head-on with the school's most untouchable bully. Add a light-yet-bittersweet piano BGM.",
|
| 268 |
+
"videos": [
|
| 269 |
+
{
|
| 270 |
+
"model": "ours",
|
| 271 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_039_ours.mp4"
|
| 272 |
+
},
|
| 273 |
+
{
|
| 274 |
+
"model": "baseline",
|
| 275 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_039_baseline.mp4"
|
| 276 |
+
}
|
| 277 |
+
],
|
| 278 |
+
"reference_image": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/refs/intake_img_039.png"
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"id": "intake_img_046",
|
| 282 |
+
"category": "intake_img",
|
| 283 |
+
"prompt": "Use this uploaded photo as the period female lead. Make a palace-intrigue rise-from-the-ashes animated short drama — she is the disgraced empress who climbed all the way back from the cold palace to the principal palace; the only one who still remembers her real name on this revenge road is the little eunuch who once took a knife for her. Add a sweeping classical-Chinese BGM.",
|
| 284 |
+
"videos": [
|
| 285 |
+
{
|
| 286 |
+
"model": "ours",
|
| 287 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_046_ours.mp4"
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"model": "baseline",
|
| 291 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_046_baseline.mp4"
|
| 292 |
+
}
|
| 293 |
+
],
|
| 294 |
+
"reference_image": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/refs/intake_img_046.png"
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"id": "intake_img_049",
|
| 298 |
+
"category": "intake_img",
|
| 299 |
+
"prompt": "Use this uploaded photo as the wealthy-clan tortured-romance female lead. Make a modern-urban stand-in-bride wealthy-clan animated short drama — she was brought in to replace his dead first love. The day her three-year contract expires she hands him divorce papers, and the man who never once truly looked at her in those three years suddenly begins hunting for her like a madman across the whole city. Add Chinese subtitles for short-video platform distribution and a sad piano BGM.",
|
| 300 |
+
"videos": [
|
| 301 |
+
{
|
| 302 |
+
"model": "ours",
|
| 303 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_049_ours.mp4"
|
| 304 |
+
},
|
| 305 |
+
{
|
| 306 |
+
"model": "baseline",
|
| 307 |
+
"path": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/videos/intake_img_049_baseline.mp4"
|
| 308 |
+
}
|
| 309 |
+
],
|
| 310 |
+
"reference_image": "https://huggingface.co/datasets/dehezhang2/Frameworker_User_Study/resolve/main/refs/intake_img_049.png"
|
| 311 |
+
}
|
| 312 |
+
]
|
index.html
ADDED
|
@@ -0,0 +1,1184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Video user study — side-by-side rating</title>
|
| 6 |
+
<style>
|
| 7 |
+
:root {
|
| 8 |
+
--bg: #0f1115;
|
| 9 |
+
--panel: #161922;
|
| 10 |
+
--panel-2: #1c2030;
|
| 11 |
+
--panel-3: #232839;
|
| 12 |
+
--border: #2a2f42;
|
| 13 |
+
--border-strong: #3a4060;
|
| 14 |
+
--fg: #e6e8ef;
|
| 15 |
+
--muted: #8b91a8;
|
| 16 |
+
--muted-2: #5e6480;
|
| 17 |
+
--accent: #6aa9ff;
|
| 18 |
+
--accent-strong: #8ec0ff;
|
| 19 |
+
--good: #28c76f;
|
| 20 |
+
--warn: #ff9f43;
|
| 21 |
+
--bad: #ea5455;
|
| 22 |
+
--tag: #232a3d;
|
| 23 |
+
--score-1: #ea5455;
|
| 24 |
+
--score-2: #ff7d52;
|
| 25 |
+
--score-3: #ffa84a;
|
| 26 |
+
--score-4: #8acf6d;
|
| 27 |
+
--score-5: #28c76f;
|
| 28 |
+
}
|
| 29 |
+
* { box-sizing: border-box; }
|
| 30 |
+
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg);
|
| 31 |
+
font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue",
|
| 32 |
+
"PingFang SC", "Microsoft YaHei", sans-serif;
|
| 33 |
+
height: 100%; font-size: 14px; line-height: 1.5; }
|
| 34 |
+
#app { display: flex; flex-direction: column; height: 100vh; }
|
| 35 |
+
|
| 36 |
+
/* ---------- header ---------- */
|
| 37 |
+
header.top { padding: 10px 18px; border-bottom: 1px solid var(--border);
|
| 38 |
+
background: var(--panel); display: flex; gap: 16px; align-items: center;
|
| 39 |
+
flex-wrap: wrap; }
|
| 40 |
+
.title { font-weight: 600; font-size: 15px; }
|
| 41 |
+
.subtitle { color: var(--muted); font-size: 12px; }
|
| 42 |
+
.progress { margin-left: auto; display: flex; gap: 14px; align-items: center; }
|
| 43 |
+
.progress-bar { width: 200px; height: 6px; background: var(--panel-3);
|
| 44 |
+
border-radius: 3px; overflow: hidden; }
|
| 45 |
+
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--good));
|
| 46 |
+
width: 0%; transition: width 0.3s; }
|
| 47 |
+
.progress-text { font-size: 12px; color: var(--muted); white-space: nowrap; }
|
| 48 |
+
.progress-text .num { color: var(--fg); font-weight: 600; }
|
| 49 |
+
|
| 50 |
+
/* ---------- toolbar ---------- */
|
| 51 |
+
.toolbar { padding: 8px 18px; background: var(--panel); border-bottom: 1px solid var(--border);
|
| 52 |
+
display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
| 53 |
+
.btn { background: var(--panel-3); border: 1px solid var(--border-strong);
|
| 54 |
+
color: var(--fg); padding: 5px 12px; border-radius: 4px; font-size: 12px;
|
| 55 |
+
cursor: pointer; font-family: inherit; transition: background 0.15s; }
|
| 56 |
+
.btn:hover { background: #2c3450; }
|
| 57 |
+
.btn.primary { background: var(--accent); color: #0a1a2a; border-color: var(--accent); font-weight: 600; }
|
| 58 |
+
.btn.primary:hover { background: var(--accent-strong); }
|
| 59 |
+
.btn.ghost { background: transparent; border-color: var(--border); color: var(--muted); }
|
| 60 |
+
.btn.ghost:hover { color: var(--fg); border-color: var(--border-strong); }
|
| 61 |
+
.toolbar .sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
|
| 62 |
+
.rater-box { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
|
| 63 |
+
.rater-box input { background: var(--panel-3); border: 1px solid var(--border);
|
| 64 |
+
color: var(--fg); padding: 4px 8px; border-radius: 3px; font-family: inherit;
|
| 65 |
+
font-size: 12px; width: 140px; }
|
| 66 |
+
|
| 67 |
+
/* ---------- main layout ---------- */
|
| 68 |
+
main { flex: 1; display: flex; min-height: 0; }
|
| 69 |
+
aside.list { width: 240px; border-right: 1px solid var(--border); background: var(--panel);
|
| 70 |
+
overflow-y: auto; flex-shrink: 0; }
|
| 71 |
+
.list-header { padding: 10px 14px; font-size: 11px; color: var(--muted);
|
| 72 |
+
text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border);
|
| 73 |
+
position: sticky; top: 0; background: var(--panel); }
|
| 74 |
+
.case-row { padding: 9px 14px; border-bottom: 1px solid var(--border); cursor: pointer;
|
| 75 |
+
display: flex; align-items: center; gap: 8px; font-size: 13px; }
|
| 76 |
+
.case-row:hover { background: var(--panel-2); }
|
| 77 |
+
.case-row.active { background: var(--panel-2); border-left: 3px solid var(--accent);
|
| 78 |
+
padding-left: 11px; }
|
| 79 |
+
.case-row .id { font-family: ui-monospace, "SF Mono", Menlo, monospace; flex: 1; }
|
| 80 |
+
.case-row .status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
|
| 81 |
+
background: var(--muted-2); }
|
| 82 |
+
.case-row.partial .status-dot { background: var(--warn); }
|
| 83 |
+
.case-row.complete .status-dot { background: var(--good); }
|
| 84 |
+
|
| 85 |
+
section.detail { flex: 1; overflow-y: auto; padding: 18px 24px 80px; min-width: 0; }
|
| 86 |
+
|
| 87 |
+
/* ---------- instructions panel ---------- */
|
| 88 |
+
.instructions { background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
|
| 89 |
+
padding: 14px 18px; margin-bottom: 18px; }
|
| 90 |
+
.instructions summary { font-weight: 600; cursor: pointer; user-select: none;
|
| 91 |
+
list-style: none; display: flex; align-items: center; gap: 8px; }
|
| 92 |
+
.instructions summary::before { content: '▸'; color: var(--muted); font-size: 11px; }
|
| 93 |
+
.instructions[open] summary::before { content: '▾'; }
|
| 94 |
+
.instructions h4 { font-size: 13px; color: var(--accent-strong);
|
| 95 |
+
margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.4px; }
|
| 96 |
+
.instructions ul { margin: 4px 0 4px 18px; padding: 0; color: var(--muted); }
|
| 97 |
+
.instructions li { margin: 3px 0; }
|
| 98 |
+
.instructions p { color: var(--muted); margin: 6px 0; }
|
| 99 |
+
.instructions code { background: var(--panel-3); padding: 1px 5px; border-radius: 3px;
|
| 100 |
+
font-size: 12px; color: var(--accent-strong); }
|
| 101 |
+
.scale-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
|
| 102 |
+
.scale-row .scale-pill { padding: 3px 10px; border-radius: 12px; font-size: 11px;
|
| 103 |
+
font-weight: 600; color: #0a1a0a; }
|
| 104 |
+
|
| 105 |
+
/* ---------- prompt + ref ---------- */
|
| 106 |
+
.case-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px;
|
| 107 |
+
flex-wrap: wrap; }
|
| 108 |
+
.case-header .case-id { font-family: ui-monospace, monospace; font-size: 18px;
|
| 109 |
+
font-weight: 600; }
|
| 110 |
+
.case-header .case-counter { color: var(--muted); font-size: 12px; }
|
| 111 |
+
.prompt-box { background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
|
| 112 |
+
padding: 12px 14px; line-height: 1.6; font-size: 14px; flex: 1; min-width: 280px; }
|
| 113 |
+
.prompt-box .label { font-size: 10px; text-transform: uppercase; color: var(--muted);
|
| 114 |
+
letter-spacing: 0.5px; margin-bottom: 4px; }
|
| 115 |
+
.ref-img { max-height: 140px; max-width: 220px; border-radius: 6px;
|
| 116 |
+
border: 1px solid var(--border); display: block; }
|
| 117 |
+
|
| 118 |
+
/* ---------- video grid ---------- */
|
| 119 |
+
.video-grid { display: grid; gap: 12px; margin-bottom: 14px; }
|
| 120 |
+
.video-grid.cols-2 { grid-template-columns: 1fr 1fr; }
|
| 121 |
+
.video-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
|
| 122 |
+
.video-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
|
| 123 |
+
@media (max-width: 1100px) {
|
| 124 |
+
.video-grid.cols-3, .video-grid.cols-4 { grid-template-columns: 1fr 1fr; }
|
| 125 |
+
}
|
| 126 |
+
.video-tile { display: flex; flex-direction: column; gap: 6px; }
|
| 127 |
+
.video-tile .slot-label { font-size: 12px; color: var(--muted);
|
| 128 |
+
font-family: ui-monospace, monospace; display: flex; align-items: center; gap: 8px; }
|
| 129 |
+
.video-tile .slot-label .slot-num { padding: 2px 8px; background: var(--panel-3);
|
| 130 |
+
border-radius: 3px; color: var(--fg); font-weight: 600; }
|
| 131 |
+
.video-frame { position: relative; background: #000; border: 1px solid var(--border);
|
| 132 |
+
border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 9; }
|
| 133 |
+
.video-frame video { width: 100%; height: 100%; display: block; background: #000; }
|
| 134 |
+
.video-frame .empty-state { position: absolute; inset: 0; display: flex;
|
| 135 |
+
flex-direction: column; align-items: center; justify-content: center;
|
| 136 |
+
background: repeating-linear-gradient(45deg, #1a1d28 0 10px, #16191f 10px 20px);
|
| 137 |
+
color: var(--muted); font-size: 12px; gap: 6px; padding: 12px; text-align: center; }
|
| 138 |
+
.video-frame .empty-state .icon { font-size: 28px; opacity: 0.3; }
|
| 139 |
+
.video-frame .empty-state .path { font-family: ui-monospace, monospace; font-size: 10px;
|
| 140 |
+
color: var(--muted-2); word-break: break-all; max-width: 90%; }
|
| 141 |
+
|
| 142 |
+
/* ---------- video controls ---------- */
|
| 143 |
+
.video-controls { background: var(--panel); border: 1px solid var(--border);
|
| 144 |
+
border-radius: 6px; padding: 8px 12px; display: flex; gap: 10px;
|
| 145 |
+
align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-size: 12px;
|
| 146 |
+
color: var(--muted); }
|
| 147 |
+
.video-controls .ctl-btn { background: var(--panel-3); border: 1px solid var(--border-strong);
|
| 148 |
+
color: var(--fg); padding: 4px 10px; border-radius: 3px; font-size: 12px;
|
| 149 |
+
cursor: pointer; font-family: inherit; }
|
| 150 |
+
.video-controls .ctl-btn:hover { background: #2c3450; }
|
| 151 |
+
.video-controls .ctl-btn.on { background: var(--accent); color: #0a1a2a; border-color: var(--accent); }
|
| 152 |
+
.video-controls select { background: var(--panel-3); border: 1px solid var(--border);
|
| 153 |
+
color: var(--fg); padding: 3px 6px; border-radius: 3px; font-size: 12px; font-family: inherit; }
|
| 154 |
+
|
| 155 |
+
/* ---------- ratings table ---------- */
|
| 156 |
+
.ratings-table { background: var(--panel); border: 1px solid var(--border);
|
| 157 |
+
border-radius: 8px; overflow: hidden; }
|
| 158 |
+
.ratings-table table { width: 100%; border-collapse: collapse; }
|
| 159 |
+
.ratings-table th, .ratings-table td { padding: 8px 10px; text-align: left;
|
| 160 |
+
border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
|
| 161 |
+
.ratings-table thead th { background: var(--panel-2); color: var(--muted);
|
| 162 |
+
font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
|
| 163 |
+
font-weight: 600; position: sticky; top: 0; }
|
| 164 |
+
.ratings-table thead th.q-col { width: 38%; }
|
| 165 |
+
.ratings-table thead th.video-col { text-align: center; }
|
| 166 |
+
.dim-row td { background: var(--panel-2); padding-top: 10px; padding-bottom: 6px;
|
| 167 |
+
font-weight: 600; font-size: 12px; text-transform: uppercase;
|
| 168 |
+
letter-spacing: 0.5px; color: var(--accent-strong); border-bottom: 1px solid var(--border-strong); }
|
| 169 |
+
.dim-row .dim-hint { font-weight: 400; color: var(--muted); margin-left: 8px;
|
| 170 |
+
font-size: 11px; text-transform: none; letter-spacing: 0; }
|
| 171 |
+
.q-cell { color: var(--fg); }
|
| 172 |
+
.q-cell .q-name { font-weight: 500; }
|
| 173 |
+
.q-cell .q-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }
|
| 174 |
+
.rate-cell { text-align: center; min-width: 200px; }
|
| 175 |
+
.likert { display: inline-flex; gap: 3px; }
|
| 176 |
+
.likert button { width: 32px; height: 32px; border: 1px solid var(--border);
|
| 177 |
+
background: var(--panel-3); color: var(--fg); border-radius: 4px;
|
| 178 |
+
cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 500;
|
| 179 |
+
transition: transform 0.08s, border-color 0.15s; }
|
| 180 |
+
.likert button:hover { border-color: var(--accent); transform: translateY(-1px); }
|
| 181 |
+
.likert button.selected { color: #0a1a0a; font-weight: 700;
|
| 182 |
+
border-color: rgba(255,255,255,0.2); }
|
| 183 |
+
.likert button.selected[data-score="1"] { background: var(--score-1); }
|
| 184 |
+
.likert button.selected[data-score="2"] { background: var(--score-2); }
|
| 185 |
+
.likert button.selected[data-score="3"] { background: var(--score-3); }
|
| 186 |
+
.likert button.selected[data-score="4"] { background: var(--score-4); }
|
| 187 |
+
.likert button.selected[data-score="5"] { background: var(--score-5); }
|
| 188 |
+
|
| 189 |
+
/* ---------- footer / nav ---------- */
|
| 190 |
+
footer.bottom { position: fixed; bottom: 0; left: 240px; right: 0;
|
| 191 |
+
background: var(--panel); border-top: 1px solid var(--border);
|
| 192 |
+
padding: 10px 24px; display: flex; gap: 12px; align-items: center;
|
| 193 |
+
z-index: 10; }
|
| 194 |
+
footer.bottom .summary { color: var(--muted); font-size: 12px; flex: 1; }
|
| 195 |
+
footer.bottom .summary .num { color: var(--fg); font-weight: 600; }
|
| 196 |
+
footer.bottom .nav-btns { display: flex; gap: 8px; }
|
| 197 |
+
|
| 198 |
+
/* ---------- placeholder when no manifest ---------- */
|
| 199 |
+
.empty-app { padding: 40px; max-width: 760px; margin: 0 auto; }
|
| 200 |
+
.empty-app h2 { color: var(--fg); margin-bottom: 8px; }
|
| 201 |
+
.empty-app p { color: var(--muted); margin: 8px 0; line-height: 1.7; }
|
| 202 |
+
.empty-app pre { background: var(--panel); border: 1px solid var(--border);
|
| 203 |
+
border-radius: 6px; padding: 14px; font-size: 12px; color: var(--accent-strong);
|
| 204 |
+
overflow-x: auto; line-height: 1.5; }
|
| 205 |
+
.empty-app code { background: var(--panel-3); padding: 1px 5px; border-radius: 3px;
|
| 206 |
+
font-size: 12px; color: var(--accent-strong); }
|
| 207 |
+
|
| 208 |
+
/* ---------- toast ---------- */
|
| 209 |
+
.toast { position: fixed; bottom: 70px; right: 20px; background: var(--good);
|
| 210 |
+
color: #0a1a0a; padding: 10px 16px; border-radius: 6px; font-size: 13px;
|
| 211 |
+
font-weight: 600; opacity: 0; transition: opacity 0.2s; z-index: 100;
|
| 212 |
+
pointer-events: none; }
|
| 213 |
+
|
| 214 |
+
.sync-pill { padding: 4px 10px; border-radius: 12px; font-size: 11px;
|
| 215 |
+
font-family: ui-monospace, monospace; background: var(--panel-3); color: var(--muted);
|
| 216 |
+
border: 1px solid var(--border); white-space: nowrap; cursor: help; }
|
| 217 |
+
.sync-pill[data-state="syncing"] { background: #1f2a44; color: var(--accent); border-color: #3a4a78; }
|
| 218 |
+
.sync-pill[data-state="synced"] { background: #1c3422; color: var(--good); border-color: #2a5a37; }
|
| 219 |
+
.sync-pill[data-state="local-only"] { background: #3a3520; color: var(--warn); border-color: #5a4a25; }
|
| 220 |
+
.sync-pill[data-state="error"] { background: #3a2020; color: var(--bad); border-color: #5a2828; }
|
| 221 |
+
.toast.show { opacity: 1; }
|
| 222 |
+
|
| 223 |
+
kbd { background: var(--panel-3); border: 1px solid var(--border-strong);
|
| 224 |
+
border-radius: 3px; padding: 1px 5px; font-family: ui-monospace, monospace;
|
| 225 |
+
font-size: 11px; color: var(--fg); }
|
| 226 |
+
</style>
|
| 227 |
+
</head>
|
| 228 |
+
<body>
|
| 229 |
+
<div id="app"></div>
|
| 230 |
+
<div class="toast" id="toast"></div>
|
| 231 |
+
|
| 232 |
+
<script>
|
| 233 |
+
/* =========================================================================
|
| 234 |
+
* Rubric — 4 dimensions × 13 sub-questions
|
| 235 |
+
* ========================================================================= */
|
| 236 |
+
const DIMENSIONS = [
|
| 237 |
+
{
|
| 238 |
+
key: "instruction_following",
|
| 239 |
+
name: "Instruction following",
|
| 240 |
+
hint: "Does the video do what the prompt asked?",
|
| 241 |
+
questions: [
|
| 242 |
+
{ key: "controllability",
|
| 243 |
+
name: "Controllability",
|
| 244 |
+
desc: "Does the video respond to control signals (camera motion, conditioning, scene cues)?" },
|
| 245 |
+
{ key: "editing_correctness",
|
| 246 |
+
name: "Editing correctness",
|
| 247 |
+
desc: "Are requested edits applied without breaking unrelated content?" },
|
| 248 |
+
{ key: "prompt_adherence",
|
| 249 |
+
name: "Prompt adherence",
|
| 250 |
+
desc: "Does the content match what the prompt described (subjects, actions, setting)?" },
|
| 251 |
+
],
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
key: "visual_quality",
|
| 255 |
+
name: "Visual quality",
|
| 256 |
+
hint: "How good does each frame look?",
|
| 257 |
+
questions: [
|
| 258 |
+
{ key: "aesthetics",
|
| 259 |
+
name: "Aesthetics",
|
| 260 |
+
desc: "Composition, color, lighting, overall pleasing look." },
|
| 261 |
+
{ key: "sharpness",
|
| 262 |
+
name: "Sharpness",
|
| 263 |
+
desc: "Clarity and detail; absence of blur or compression artifacts." },
|
| 264 |
+
{ key: "realism",
|
| 265 |
+
name: "Realism",
|
| 266 |
+
desc: "Photorealism or stylistic fidelity (no uncanny / broken artifacts)." },
|
| 267 |
+
],
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
key: "temporal_consistency",
|
| 271 |
+
name: "Temporal consistency",
|
| 272 |
+
hint: "How stable is the content across frames?",
|
| 273 |
+
questions: [
|
| 274 |
+
{ key: "anti_flicker",
|
| 275 |
+
name: "Anti-flicker",
|
| 276 |
+
desc: "Absence of frame-to-frame brightness, color, or texture flicker." },
|
| 277 |
+
{ key: "person_stability",
|
| 278 |
+
name: "Person stability",
|
| 279 |
+
desc: "Faces, identities, and body proportions stay consistent across frames." },
|
| 280 |
+
{ key: "object_stability",
|
| 281 |
+
name: "Object stability",
|
| 282 |
+
desc: "Props, clothing, and objects keep their shape and position over time." },
|
| 283 |
+
{ key: "environment_stability",
|
| 284 |
+
name: "Environment stability",
|
| 285 |
+
desc: "Background, lighting, and scene layout stay coherent across frames." },
|
| 286 |
+
],
|
| 287 |
+
},
|
| 288 |
+
{
|
| 289 |
+
key: "motion_realism",
|
| 290 |
+
name: "Motion realism",
|
| 291 |
+
hint: "Does motion behave plausibly?",
|
| 292 |
+
questions: [
|
| 293 |
+
{ key: "physics",
|
| 294 |
+
name: "Physics",
|
| 295 |
+
desc: "Gravity, collisions, fluid / cloth dynamics behave plausibly." },
|
| 296 |
+
{ key: "movement",
|
| 297 |
+
name: "Movement",
|
| 298 |
+
desc: "Body and object motion flows smoothly without warping or teleporting." },
|
| 299 |
+
{ key: "camera",
|
| 300 |
+
name: "Camera",
|
| 301 |
+
desc: "Camera movement (pan, dolly, focal change) feels natural and intentional." },
|
| 302 |
+
],
|
| 303 |
+
},
|
| 304 |
+
];
|
| 305 |
+
|
| 306 |
+
const SCALE_LABELS = {
|
| 307 |
+
1: "Very poor",
|
| 308 |
+
2: "Poor",
|
| 309 |
+
3: "Fair",
|
| 310 |
+
4: "Good",
|
| 311 |
+
5: "Excellent",
|
| 312 |
+
};
|
| 313 |
+
|
| 314 |
+
const STORAGE_KEY = "user_study_video_ratings_v1";
|
| 315 |
+
const TOTAL_QUESTIONS = DIMENSIONS.reduce((n, d) => n + d.questions.length, 0);
|
| 316 |
+
|
| 317 |
+
/* =========================================================================
|
| 318 |
+
* State
|
| 319 |
+
* ========================================================================= */
|
| 320 |
+
let CASES = []; // raw manifest
|
| 321 |
+
let SHUFFLE = {}; // case_id -> [orig_idx, ...] (slot -> orig)
|
| 322 |
+
let RATINGS = {}; // case_id -> slot_idx -> { qkey: 1..5 }
|
| 323 |
+
let RATER = { id: "", note: "", started_at: null };
|
| 324 |
+
let currentIdx = 0;
|
| 325 |
+
let anonymize = true;
|
| 326 |
+
|
| 327 |
+
// Sync state — driven by ./submit endpoint when present, no-op when missing.
|
| 328 |
+
let SYNC_STATUS = "idle"; // idle | syncing | synced | local-only | error
|
| 329 |
+
let SYNC_TIMERS = {}; // case_id -> setTimeout handle (debounce)
|
| 330 |
+
let SYNC_ENDPOINT = "./submit"; // server-side write target; 404/503 → fall through to local-only
|
| 331 |
+
let SYNC_LAST_DETAIL = "";
|
| 332 |
+
|
| 333 |
+
/* =========================================================================
|
| 334 |
+
* Storage
|
| 335 |
+
* ========================================================================= */
|
| 336 |
+
function loadState() {
|
| 337 |
+
try {
|
| 338 |
+
const raw = localStorage.getItem(STORAGE_KEY);
|
| 339 |
+
if (!raw) return null;
|
| 340 |
+
return JSON.parse(raw);
|
| 341 |
+
} catch (e) { return null; }
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
function saveState() {
|
| 345 |
+
const blob = {
|
| 346 |
+
rater: RATER,
|
| 347 |
+
anonymize,
|
| 348 |
+
shuffle: SHUFFLE,
|
| 349 |
+
ratings: RATINGS,
|
| 350 |
+
saved_at: new Date().toISOString(),
|
| 351 |
+
};
|
| 352 |
+
try {
|
| 353 |
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(blob));
|
| 354 |
+
} catch (e) {
|
| 355 |
+
showToast("⚠ failed to save: " + e.message, true);
|
| 356 |
+
}
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
function genRaterId() {
|
| 360 |
+
return "rater_" + Math.random().toString(36).slice(2, 8) +
|
| 361 |
+
"_" + Date.now().toString(36).slice(-4);
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
/* =========================================================================
|
| 365 |
+
* Shuffling (anonymization)
|
| 366 |
+
* ========================================================================= */
|
| 367 |
+
function buildShuffle(cases) {
|
| 368 |
+
// Deterministic per (rater, case) so refresh keeps the same order.
|
| 369 |
+
for (const c of cases) {
|
| 370 |
+
if (SHUFFLE[c.id] && SHUFFLE[c.id].length === c.videos.length) continue;
|
| 371 |
+
const indices = c.videos.map((_, i) => i);
|
| 372 |
+
if (anonymize) {
|
| 373 |
+
// Fisher–Yates seeded by hash of rater_id + case_id
|
| 374 |
+
const seed = hashStr(RATER.id + ":" + c.id);
|
| 375 |
+
let s = seed;
|
| 376 |
+
for (let i = indices.length - 1; i > 0; i--) {
|
| 377 |
+
s = (s * 1664525 + 1013904223) >>> 0;
|
| 378 |
+
const j = s % (i + 1);
|
| 379 |
+
[indices[i], indices[j]] = [indices[j], indices[i]];
|
| 380 |
+
}
|
| 381 |
+
}
|
| 382 |
+
SHUFFLE[c.id] = indices;
|
| 383 |
+
}
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
function hashStr(s) {
|
| 387 |
+
let h = 2166136261 >>> 0;
|
| 388 |
+
for (let i = 0; i < s.length; i++) {
|
| 389 |
+
h ^= s.charCodeAt(i);
|
| 390 |
+
h = (h * 16777619) >>> 0;
|
| 391 |
+
}
|
| 392 |
+
return h;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
/* =========================================================================
|
| 396 |
+
* Rating helpers
|
| 397 |
+
* ========================================================================= */
|
| 398 |
+
function getCaseRatings(caseId) {
|
| 399 |
+
if (!RATINGS[caseId]) RATINGS[caseId] = {};
|
| 400 |
+
return RATINGS[caseId];
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
function getSlotRatings(caseId, slotIdx) {
|
| 404 |
+
const m = getCaseRatings(caseId);
|
| 405 |
+
if (!m[slotIdx]) m[slotIdx] = {};
|
| 406 |
+
return m[slotIdx];
|
| 407 |
+
}
|
| 408 |
+
|
| 409 |
+
function setRating(caseId, slotIdx, qkey, score) {
|
| 410 |
+
const r = getSlotRatings(caseId, slotIdx);
|
| 411 |
+
r[qkey] = score;
|
| 412 |
+
saveState();
|
| 413 |
+
updateProgress();
|
| 414 |
+
updateCaseStatus(caseId);
|
| 415 |
+
scheduleSubmit(caseId);
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
/* =========================================================================
|
| 419 |
+
* Server sync — POST per-case state to ./submit (debounced).
|
| 420 |
+
* Falls through to local-only mode when the endpoint is absent (static host)
|
| 421 |
+
* or unconfigured (HF Space without HF_TOKEN). localStorage is always the
|
| 422 |
+
* source of truth on the client.
|
| 423 |
+
* ========================================================================= */
|
| 424 |
+
function buildCaseSubmitPayload(caseId) {
|
| 425 |
+
const c = CASES.find(x => x.id === caseId);
|
| 426 |
+
if (!c) return null;
|
| 427 |
+
const slots = SHUFFLE[c.id] || c.videos.map((_, i) => i);
|
| 428 |
+
return {
|
| 429 |
+
rater_id: RATER.id || "anon",
|
| 430 |
+
case_id: c.id,
|
| 431 |
+
payload: {
|
| 432 |
+
rater: RATER,
|
| 433 |
+
anonymize_used: anonymize,
|
| 434 |
+
submitted_at: new Date().toISOString(),
|
| 435 |
+
prompt: c.prompt,
|
| 436 |
+
videos: slots.map((origIdx, slotIdx) => ({
|
| 437 |
+
slot: String.fromCharCode(65 + slotIdx),
|
| 438 |
+
slot_index: slotIdx,
|
| 439 |
+
original_index: origIdx,
|
| 440 |
+
model: c.videos[origIdx].model,
|
| 441 |
+
path: c.videos[origIdx].path,
|
| 442 |
+
ratings: (RATINGS[c.id] || {})[slotIdx] || {},
|
| 443 |
+
})),
|
| 444 |
+
},
|
| 445 |
+
};
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
function scheduleSubmit(caseId, delayMs = 1500) {
|
| 449 |
+
// Once we know the server isn't there, stop trying — every keystroke would
|
| 450 |
+
// otherwise eat a network round-trip.
|
| 451 |
+
if (SYNC_STATUS === "local-only") return;
|
| 452 |
+
if (SYNC_TIMERS[caseId]) clearTimeout(SYNC_TIMERS[caseId]);
|
| 453 |
+
SYNC_TIMERS[caseId] = setTimeout(() => {
|
| 454 |
+
delete SYNC_TIMERS[caseId];
|
| 455 |
+
submitCaseToServer(caseId);
|
| 456 |
+
}, delayMs);
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
async function submitCaseToServer(caseId) {
|
| 460 |
+
const body = buildCaseSubmitPayload(caseId);
|
| 461 |
+
if (!body) return;
|
| 462 |
+
setSyncStatus("syncing");
|
| 463 |
+
try {
|
| 464 |
+
const resp = await fetch(SYNC_ENDPOINT, {
|
| 465 |
+
method: "POST",
|
| 466 |
+
headers: { "Content-Type": "application/json" },
|
| 467 |
+
body: JSON.stringify(body),
|
| 468 |
+
});
|
| 469 |
+
if (resp.ok) setSyncStatus("synced", `last write: ${body.case_id} @ ${new Date().toLocaleTimeString()}`);
|
| 470 |
+
else if (resp.status === 404 || resp.status === 503)
|
| 471 |
+
setSyncStatus("local-only", `server not configured (HTTP ${resp.status})`);
|
| 472 |
+
else setSyncStatus("error", `HTTP ${resp.status}`);
|
| 473 |
+
} catch (e) {
|
| 474 |
+
setSyncStatus("local-only", "no /submit endpoint reachable");
|
| 475 |
+
}
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
function setSyncStatus(state, detail) {
|
| 479 |
+
SYNC_STATUS = state;
|
| 480 |
+
if (detail) SYNC_LAST_DETAIL = detail;
|
| 481 |
+
const pill = document.getElementById("syncPill");
|
| 482 |
+
if (!pill) return;
|
| 483 |
+
const label = {
|
| 484 |
+
idle: "💾 local",
|
| 485 |
+
syncing: "↻ syncing…",
|
| 486 |
+
synced: "✓ synced",
|
| 487 |
+
"local-only": "💾 local-only",
|
| 488 |
+
error: "✕ sync error",
|
| 489 |
+
}[state] || state;
|
| 490 |
+
pill.textContent = label;
|
| 491 |
+
pill.dataset.state = state;
|
| 492 |
+
pill.title = SYNC_LAST_DETAIL || "ratings autosave to your browser; ./submit forwards to the server when available";
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
async function probeSyncEndpoint() {
|
| 496 |
+
try {
|
| 497 |
+
const resp = await fetch(SYNC_ENDPOINT.replace(/\/submit$/, "/submit/health"),
|
| 498 |
+
{ method: "GET", cache: "no-cache" });
|
| 499 |
+
if (resp.ok) {
|
| 500 |
+
const j = await resp.json().catch(() => ({}));
|
| 501 |
+
setSyncStatus(j.configured ? "idle" : "local-only",
|
| 502 |
+
j.configured ? "server ready — ratings will sync to dataset" : (j.reason || "server not configured"));
|
| 503 |
+
} else {
|
| 504 |
+
setSyncStatus("local-only", `health probe HTTP ${resp.status}`);
|
| 505 |
+
}
|
| 506 |
+
} catch (e) {
|
| 507 |
+
setSyncStatus("local-only", "no /submit endpoint reachable");
|
| 508 |
+
}
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
function caseProgress(caseCase) {
|
| 512 |
+
const slots = SHUFFLE[caseCase.id] || [];
|
| 513 |
+
const expected = slots.length * TOTAL_QUESTIONS;
|
| 514 |
+
let done = 0;
|
| 515 |
+
for (let s = 0; s < slots.length; s++) {
|
| 516 |
+
const r = (RATINGS[caseCase.id] || {})[s] || {};
|
| 517 |
+
done += Object.keys(r).length;
|
| 518 |
+
}
|
| 519 |
+
return { done, expected };
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
function totalProgress() {
|
| 523 |
+
let done = 0, expected = 0;
|
| 524 |
+
for (const c of CASES) {
|
| 525 |
+
const p = caseProgress(c);
|
| 526 |
+
done += p.done; expected += p.expected;
|
| 527 |
+
}
|
| 528 |
+
return { done, expected };
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
/* =========================================================================
|
| 532 |
+
* DOM helpers
|
| 533 |
+
* ========================================================================= */
|
| 534 |
+
function el(tag, attrs = {}, ...children) {
|
| 535 |
+
const e = document.createElement(tag);
|
| 536 |
+
for (const [k, v] of Object.entries(attrs)) {
|
| 537 |
+
if (k === "class") e.className = v;
|
| 538 |
+
else if (k === "html") e.innerHTML = v;
|
| 539 |
+
else if (k.startsWith("on") && typeof v === "function") {
|
| 540 |
+
e.addEventListener(k.slice(2).toLowerCase(), v);
|
| 541 |
+
} else if (v !== false && v != null) e.setAttribute(k, v);
|
| 542 |
+
}
|
| 543 |
+
for (const c of children) {
|
| 544 |
+
if (c == null || c === false) continue;
|
| 545 |
+
e.appendChild(typeof c === "string" ? document.createTextNode(c) : c);
|
| 546 |
+
}
|
| 547 |
+
return e;
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
function escapeHtml(s) {
|
| 551 |
+
return String(s).replace(/[&<>"']/g, c =>
|
| 552 |
+
({'&':'&','<':'<','>':'>','"':'"',"'":'''})[c]);
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
function showToast(msg, isError = false) {
|
| 556 |
+
const t = document.getElementById("toast");
|
| 557 |
+
t.textContent = msg;
|
| 558 |
+
t.style.background = isError ? "var(--bad)" : "var(--good)";
|
| 559 |
+
t.style.color = isError ? "#fff" : "#0a1a0a";
|
| 560 |
+
t.classList.add("show");
|
| 561 |
+
setTimeout(() => t.classList.remove("show"), 1800);
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
/* =========================================================================
|
| 565 |
+
* Rendering — shell
|
| 566 |
+
* ========================================================================= */
|
| 567 |
+
function renderShell() {
|
| 568 |
+
const app = document.getElementById("app");
|
| 569 |
+
app.innerHTML = "";
|
| 570 |
+
app.appendChild(renderHeader());
|
| 571 |
+
app.appendChild(renderToolbar());
|
| 572 |
+
const main = el("main");
|
| 573 |
+
main.appendChild(renderSidebar());
|
| 574 |
+
main.appendChild(el("section", { class: "detail", id: "detail" }));
|
| 575 |
+
app.appendChild(main);
|
| 576 |
+
app.appendChild(renderFooter());
|
| 577 |
+
renderDetail();
|
| 578 |
+
updateProgress();
|
| 579 |
+
}
|
| 580 |
+
|
| 581 |
+
function renderHeader() {
|
| 582 |
+
return el("header", { class: "top" },
|
| 583 |
+
el("div", {},
|
| 584 |
+
el("div", { class: "title" }, "Video user study — side-by-side rating"),
|
| 585 |
+
el("div", { class: "subtitle" },
|
| 586 |
+
`${CASES.length} cases · 4 dimensions · ${TOTAL_QUESTIONS} sub-questions per video · 1–5 Likert`),
|
| 587 |
+
),
|
| 588 |
+
el("div", { class: "progress" },
|
| 589 |
+
el("div", { class: "progress-bar" },
|
| 590 |
+
el("div", { class: "progress-fill", id: "progressFill" })),
|
| 591 |
+
el("span", { class: "progress-text", id: "progressText" }, "0 / 0"),
|
| 592 |
+
),
|
| 593 |
+
);
|
| 594 |
+
}
|
| 595 |
+
|
| 596 |
+
function renderToolbar() {
|
| 597 |
+
const tb = el("div", { class: "toolbar" });
|
| 598 |
+
|
| 599 |
+
const raterInput = el("input", {
|
| 600 |
+
type: "text",
|
| 601 |
+
placeholder: "rater id",
|
| 602 |
+
value: RATER.id,
|
| 603 |
+
onchange: (e) => {
|
| 604 |
+
RATER.id = e.target.value.trim() || genRaterId();
|
| 605 |
+
// re-shuffle since seed depends on rater id
|
| 606 |
+
SHUFFLE = {};
|
| 607 |
+
buildShuffle(CASES);
|
| 608 |
+
saveState();
|
| 609 |
+
renderDetail();
|
| 610 |
+
},
|
| 611 |
+
});
|
| 612 |
+
|
| 613 |
+
tb.appendChild(el("div", { class: "rater-box" },
|
| 614 |
+
el("span", {}, "Rater:"), raterInput));
|
| 615 |
+
tb.appendChild(el("div", { class: "sep" }));
|
| 616 |
+
|
| 617 |
+
tb.appendChild(el("button", {
|
| 618 |
+
class: "btn ghost",
|
| 619 |
+
onclick: toggleAnon,
|
| 620 |
+
}, anonymize ? "🔒 Anonymized" : "👁 Reveal models"));
|
| 621 |
+
|
| 622 |
+
tb.appendChild(el("div", { class: "sep" }));
|
| 623 |
+
|
| 624 |
+
tb.appendChild(el("span", {
|
| 625 |
+
id: "syncPill", class: "sync-pill",
|
| 626 |
+
"data-state": SYNC_STATUS,
|
| 627 |
+
title: SYNC_LAST_DETAIL || "ratings autosave to your browser; ./submit forwards to the server when available",
|
| 628 |
+
}, "💾 local"));
|
| 629 |
+
|
| 630 |
+
tb.appendChild(el("div", { class: "sep" }));
|
| 631 |
+
|
| 632 |
+
tb.appendChild(el("button", {
|
| 633 |
+
class: "btn primary",
|
| 634 |
+
onclick: exportJSON,
|
| 635 |
+
}, "↓ Export JSON"));
|
| 636 |
+
|
| 637 |
+
tb.appendChild(el("button", {
|
| 638 |
+
class: "btn ghost",
|
| 639 |
+
onclick: resetCurrentCase,
|
| 640 |
+
}, "↺ Reset this case"));
|
| 641 |
+
|
| 642 |
+
tb.appendChild(el("button", {
|
| 643 |
+
class: "btn ghost",
|
| 644 |
+
onclick: resetAll,
|
| 645 |
+
}, "✕ Reset all"));
|
| 646 |
+
|
| 647 |
+
return tb;
|
| 648 |
+
}
|
| 649 |
+
|
| 650 |
+
function renderSidebar() {
|
| 651 |
+
const aside = el("aside", { class: "list" });
|
| 652 |
+
aside.appendChild(el("div", { class: "list-header" }, `Cases (${CASES.length})`));
|
| 653 |
+
CASES.forEach((c, i) => {
|
| 654 |
+
const p = caseProgress(c);
|
| 655 |
+
let cls = "case-row";
|
| 656 |
+
if (i === currentIdx) cls += " active";
|
| 657 |
+
if (p.done === 0) { /* untouched */ }
|
| 658 |
+
else if (p.done < p.expected) cls += " partial";
|
| 659 |
+
else cls += " complete";
|
| 660 |
+
aside.appendChild(el("div", {
|
| 661 |
+
class: cls,
|
| 662 |
+
"data-case-id": c.id,
|
| 663 |
+
onclick: () => goTo(i),
|
| 664 |
+
},
|
| 665 |
+
el("span", { class: "status-dot" }),
|
| 666 |
+
el("span", { class: "id" }, c.id),
|
| 667 |
+
el("span", { style: "font-size:11px;color:var(--muted)" },
|
| 668 |
+
`${p.done}/${p.expected}`),
|
| 669 |
+
));
|
| 670 |
+
});
|
| 671 |
+
return aside;
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
function renderFooter() {
|
| 675 |
+
return el("footer", { class: "bottom" },
|
| 676 |
+
el("div", { class: "summary", id: "footerSummary" }),
|
| 677 |
+
el("div", { class: "nav-btns" },
|
| 678 |
+
el("button", { class: "btn", onclick: () => step(-1) }, "← Prev"),
|
| 679 |
+
el("button", { class: "btn", onclick: () => step(1) }, "Next →"),
|
| 680 |
+
),
|
| 681 |
+
);
|
| 682 |
+
}
|
| 683 |
+
|
| 684 |
+
/* =========================================================================
|
| 685 |
+
* Rendering — detail (instructions + videos + ratings)
|
| 686 |
+
* ========================================================================= */
|
| 687 |
+
function renderDetail() {
|
| 688 |
+
const detail = document.getElementById("detail");
|
| 689 |
+
if (!detail) return;
|
| 690 |
+
detail.innerHTML = "";
|
| 691 |
+
if (!CASES.length) return;
|
| 692 |
+
|
| 693 |
+
detail.appendChild(renderInstructions(currentIdx === 0));
|
| 694 |
+
|
| 695 |
+
const c = CASES[currentIdx];
|
| 696 |
+
detail.appendChild(renderCaseHeader(c));
|
| 697 |
+
detail.appendChild(renderVideoGrid(c));
|
| 698 |
+
detail.appendChild(renderVideoControls(c));
|
| 699 |
+
detail.appendChild(renderRatingsTable(c));
|
| 700 |
+
|
| 701 |
+
// Update sidebar active row + footer
|
| 702 |
+
document.querySelectorAll(".case-row").forEach((row, i) => {
|
| 703 |
+
row.classList.toggle("active", i === currentIdx);
|
| 704 |
+
});
|
| 705 |
+
updateFooterSummary();
|
| 706 |
+
}
|
| 707 |
+
|
| 708 |
+
function renderInstructions(forceOpen) {
|
| 709 |
+
const det = el("details", { class: "instructions" });
|
| 710 |
+
if (forceOpen) det.setAttribute("open", "");
|
| 711 |
+
det.appendChild(el("summary", {},
|
| 712 |
+
"How to rate (click to expand) — 4 dimensions, " + TOTAL_QUESTIONS + " sub-questions, 1–5 each"));
|
| 713 |
+
|
| 714 |
+
const body = el("div");
|
| 715 |
+
body.innerHTML = `
|
| 716 |
+
<p>For each case, watch all videos side by side, then rate <strong>each video independently</strong>
|
| 717 |
+
on every sub-question. The rating table groups sub-questions by dimension; videos appear as columns.</p>
|
| 718 |
+
|
| 719 |
+
<h4>Likert scale (1 = worst, 5 = best)</h4>
|
| 720 |
+
<div class="scale-row">
|
| 721 |
+
<span class="scale-pill" style="background:var(--score-1)">1 · Very poor</span>
|
| 722 |
+
<span class="scale-pill" style="background:var(--score-2)">2 · Poor</span>
|
| 723 |
+
<span class="scale-pill" style="background:var(--score-3)">3 · Fair</span>
|
| 724 |
+
<span class="scale-pill" style="background:var(--score-4)">4 · Good</span>
|
| 725 |
+
<span class="scale-pill" style="background:var(--score-5)">5 · Excellent</span>
|
| 726 |
+
</div>
|
| 727 |
+
|
| 728 |
+
<h4>Dimensions</h4>
|
| 729 |
+
<ul>
|
| 730 |
+
<li><strong>Instruction following</strong> — controllability, editing correctness, prompt adherence.</li>
|
| 731 |
+
<li><strong>Visual quality</strong> — aesthetics, sharpness, realism.</li>
|
| 732 |
+
<li><strong>Temporal consistency</strong> — anti-flicker, person / object / environment stability.</li>
|
| 733 |
+
<li><strong>Motion realism</strong> — physics, movement, camera motion.</li>
|
| 734 |
+
</ul>
|
| 735 |
+
|
| 736 |
+
<h4>Tips</h4>
|
| 737 |
+
<ul>
|
| 738 |
+
<li>Use <kbd>Space</kbd> to play / pause all videos in sync, <kbd>R</kbd> to restart, <kbd>L</kbd> to toggle loop.</li>
|
| 739 |
+
<li>Use <kbd>←</kbd> / <kbd>→</kbd> (or <kbd>j</kbd> / <kbd>k</kbd>) to jump between cases.</li>
|
| 740 |
+
<li>Ratings autosave to your browser's localStorage. Click <code>↓ Export JSON</code> when finished.</li>
|
| 741 |
+
<li>Videos are <strong>anonymized by default</strong> — model identity is hidden until you toggle reveal.</li>
|
| 742 |
+
<li>If a tile shows "no video file", the manifest path doesn't exist on disk yet — drop a real <code>.mp4</code> at that path and refresh.</li>
|
| 743 |
+
</ul>
|
| 744 |
+
`;
|
| 745 |
+
det.appendChild(body);
|
| 746 |
+
return det;
|
| 747 |
+
}
|
| 748 |
+
|
| 749 |
+
function renderCaseHeader(c) {
|
| 750 |
+
const wrap = el("div", { class: "case-header" });
|
| 751 |
+
const left = el("div", { style: "flex:0 0 auto;display:flex;flex-direction:column;gap:4px" },
|
| 752 |
+
el("span", { class: "case-id" }, c.id),
|
| 753 |
+
el("span", { class: "case-counter" },
|
| 754 |
+
`Case ${currentIdx + 1} of ${CASES.length}`),
|
| 755 |
+
);
|
| 756 |
+
wrap.appendChild(left);
|
| 757 |
+
|
| 758 |
+
const promptBox = el("div", { class: "prompt-box" });
|
| 759 |
+
promptBox.appendChild(el("div", { class: "label" }, "Prompt / instruction"));
|
| 760 |
+
promptBox.appendChild(el("div", {}, c.prompt || "(no prompt provided)"));
|
| 761 |
+
wrap.appendChild(promptBox);
|
| 762 |
+
|
| 763 |
+
if (c.reference_image) {
|
| 764 |
+
const img = el("img", {
|
| 765 |
+
class: "ref-img", src: c.reference_image,
|
| 766 |
+
alt: "reference",
|
| 767 |
+
onerror: function () { this.style.display = "none"; },
|
| 768 |
+
});
|
| 769 |
+
wrap.appendChild(img);
|
| 770 |
+
}
|
| 771 |
+
return wrap;
|
| 772 |
+
}
|
| 773 |
+
|
| 774 |
+
function renderVideoGrid(c) {
|
| 775 |
+
const slots = SHUFFLE[c.id];
|
| 776 |
+
const n = slots.length;
|
| 777 |
+
const grid = el("div", { class: `video-grid cols-${Math.min(n, 4)}` });
|
| 778 |
+
slots.forEach((origIdx, slotIdx) => {
|
| 779 |
+
const v = c.videos[origIdx];
|
| 780 |
+
const tile = el("div", { class: "video-tile" });
|
| 781 |
+
const labelText = anonymize
|
| 782 |
+
? `Video ${String.fromCharCode(65 + slotIdx)}`
|
| 783 |
+
: `Video ${String.fromCharCode(65 + slotIdx)} · ${v.model}`;
|
| 784 |
+
tile.appendChild(el("div", { class: "slot-label" },
|
| 785 |
+
el("span", { class: "slot-num" }, String.fromCharCode(65 + slotIdx)),
|
| 786 |
+
el("span", {}, labelText),
|
| 787 |
+
));
|
| 788 |
+
|
| 789 |
+
const frame = el("div", { class: "video-frame" });
|
| 790 |
+
const video = el("video", {
|
| 791 |
+
"data-slot": String(slotIdx),
|
| 792 |
+
"data-case": c.id,
|
| 793 |
+
preload: "metadata",
|
| 794 |
+
playsinline: "",
|
| 795 |
+
controls: "",
|
| 796 |
+
});
|
| 797 |
+
const source = el("source", { src: v.path, type: "video/mp4" });
|
| 798 |
+
video.appendChild(source);
|
| 799 |
+
|
| 800 |
+
const empty = el("div", { class: "empty-state", style: "display:none" },
|
| 801 |
+
el("div", { class: "icon" }, "▶"),
|
| 802 |
+
el("div", {}, "no video file at this path"),
|
| 803 |
+
el("div", { class: "path" }, v.path),
|
| 804 |
+
el("div", { style: "font-size:11px;color:var(--muted-2);margin-top:4px" },
|
| 805 |
+
"drop the .mp4 there, then refresh"),
|
| 806 |
+
);
|
| 807 |
+
frame.appendChild(video);
|
| 808 |
+
frame.appendChild(empty);
|
| 809 |
+
|
| 810 |
+
// Detect missing video file
|
| 811 |
+
video.addEventListener("error", () => {
|
| 812 |
+
empty.style.display = "flex";
|
| 813 |
+
video.style.display = "none";
|
| 814 |
+
});
|
| 815 |
+
source.addEventListener("error", () => {
|
| 816 |
+
empty.style.display = "flex";
|
| 817 |
+
video.style.display = "none";
|
| 818 |
+
});
|
| 819 |
+
|
| 820 |
+
tile.appendChild(frame);
|
| 821 |
+
grid.appendChild(tile);
|
| 822 |
+
});
|
| 823 |
+
return grid;
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
+
function renderVideoControls(c) {
|
| 827 |
+
const ctl = el("div", { class: "video-controls" });
|
| 828 |
+
ctl.appendChild(el("button", {
|
| 829 |
+
class: "ctl-btn", onclick: playAll,
|
| 830 |
+
}, "▶ Play all"));
|
| 831 |
+
ctl.appendChild(el("button", {
|
| 832 |
+
class: "ctl-btn", onclick: pauseAll,
|
| 833 |
+
}, "⏸ Pause"));
|
| 834 |
+
ctl.appendChild(el("button", {
|
| 835 |
+
class: "ctl-btn", onclick: restartAll,
|
| 836 |
+
}, "⏮ Restart"));
|
| 837 |
+
|
| 838 |
+
const loopBtn = el("button", {
|
| 839 |
+
class: "ctl-btn", id: "loopBtn",
|
| 840 |
+
onclick: () => toggleLoop(loopBtn),
|
| 841 |
+
}, "↻ Loop");
|
| 842 |
+
ctl.appendChild(loopBtn);
|
| 843 |
+
|
| 844 |
+
const muteBtn = el("button", {
|
| 845 |
+
class: "ctl-btn", id: "muteBtn",
|
| 846 |
+
onclick: () => toggleMute(muteBtn),
|
| 847 |
+
}, "🔇 Mute");
|
| 848 |
+
ctl.appendChild(muteBtn);
|
| 849 |
+
|
| 850 |
+
ctl.appendChild(el("span", { style: "margin-left:auto" }, "Speed:"));
|
| 851 |
+
const speedSel = el("select", {
|
| 852 |
+
onchange: (e) => setSpeed(parseFloat(e.target.value)),
|
| 853 |
+
});
|
| 854 |
+
["0.25", "0.5", "0.75", "1", "1.5", "2"].forEach(v => {
|
| 855 |
+
const opt = el("option", { value: v }, v + "×");
|
| 856 |
+
if (v === "1") opt.setAttribute("selected", "");
|
| 857 |
+
speedSel.appendChild(opt);
|
| 858 |
+
});
|
| 859 |
+
ctl.appendChild(speedSel);
|
| 860 |
+
|
| 861 |
+
return ctl;
|
| 862 |
+
}
|
| 863 |
+
|
| 864 |
+
function renderRatingsTable(c) {
|
| 865 |
+
const slots = SHUFFLE[c.id];
|
| 866 |
+
const wrap = el("div", { class: "ratings-table" });
|
| 867 |
+
const table = el("table");
|
| 868 |
+
const thead = el("thead");
|
| 869 |
+
const headRow = el("tr");
|
| 870 |
+
headRow.appendChild(el("th", { class: "q-col" }, "Sub-question"));
|
| 871 |
+
slots.forEach((origIdx, slotIdx) => {
|
| 872 |
+
const v = c.videos[origIdx];
|
| 873 |
+
const label = anonymize
|
| 874 |
+
? `Video ${String.fromCharCode(65 + slotIdx)}`
|
| 875 |
+
: `${String.fromCharCode(65 + slotIdx)} · ${v.model}`;
|
| 876 |
+
headRow.appendChild(el("th", { class: "video-col" }, label));
|
| 877 |
+
});
|
| 878 |
+
thead.appendChild(headRow);
|
| 879 |
+
table.appendChild(thead);
|
| 880 |
+
|
| 881 |
+
const tbody = el("tbody");
|
| 882 |
+
for (const dim of DIMENSIONS) {
|
| 883 |
+
const dimRow = el("tr", { class: "dim-row" });
|
| 884 |
+
const dimCell = el("td", { colspan: String(slots.length + 1) });
|
| 885 |
+
dimCell.appendChild(el("span", {}, dim.name));
|
| 886 |
+
dimCell.appendChild(el("span", { class: "dim-hint" }, dim.hint));
|
| 887 |
+
dimRow.appendChild(dimCell);
|
| 888 |
+
tbody.appendChild(dimRow);
|
| 889 |
+
|
| 890 |
+
for (const q of dim.questions) {
|
| 891 |
+
const row = el("tr");
|
| 892 |
+
const qCell = el("td", { class: "q-cell" });
|
| 893 |
+
qCell.appendChild(el("div", { class: "q-name" }, q.name));
|
| 894 |
+
qCell.appendChild(el("div", { class: "q-desc" }, q.desc));
|
| 895 |
+
row.appendChild(qCell);
|
| 896 |
+
|
| 897 |
+
slots.forEach((origIdx, slotIdx) => {
|
| 898 |
+
row.appendChild(renderLikertCell(c.id, slotIdx, q.key));
|
| 899 |
+
});
|
| 900 |
+
tbody.appendChild(row);
|
| 901 |
+
}
|
| 902 |
+
}
|
| 903 |
+
table.appendChild(tbody);
|
| 904 |
+
wrap.appendChild(table);
|
| 905 |
+
return wrap;
|
| 906 |
+
}
|
| 907 |
+
|
| 908 |
+
function renderLikertCell(caseId, slotIdx, qkey) {
|
| 909 |
+
const cell = el("td", { class: "rate-cell" });
|
| 910 |
+
const group = el("div", { class: "likert" });
|
| 911 |
+
const cur = getSlotRatings(caseId, slotIdx)[qkey];
|
| 912 |
+
for (let s = 1; s <= 5; s++) {
|
| 913 |
+
const btn = el("button", {
|
| 914 |
+
"data-score": String(s),
|
| 915 |
+
title: `${s} — ${SCALE_LABELS[s]}`,
|
| 916 |
+
onclick: () => {
|
| 917 |
+
setRating(caseId, slotIdx, qkey, s);
|
| 918 |
+
// re-render only this group
|
| 919 |
+
Array.from(group.children).forEach((b, i) => {
|
| 920 |
+
b.classList.toggle("selected", (i + 1) === s);
|
| 921 |
+
});
|
| 922 |
+
},
|
| 923 |
+
}, String(s));
|
| 924 |
+
if (cur === s) btn.classList.add("selected");
|
| 925 |
+
group.appendChild(btn);
|
| 926 |
+
}
|
| 927 |
+
cell.appendChild(group);
|
| 928 |
+
return cell;
|
| 929 |
+
}
|
| 930 |
+
|
| 931 |
+
/* =========================================================================
|
| 932 |
+
* Video sync controls
|
| 933 |
+
* ========================================================================= */
|
| 934 |
+
function allVideos() {
|
| 935 |
+
return Array.from(document.querySelectorAll("video[data-slot]"));
|
| 936 |
+
}
|
| 937 |
+
function playAll() { allVideos().forEach(v => { try { v.play(); } catch(e){} }); }
|
| 938 |
+
function pauseAll() { allVideos().forEach(v => v.pause()); }
|
| 939 |
+
function restartAll() {
|
| 940 |
+
allVideos().forEach(v => { v.currentTime = 0; try { v.play(); } catch(e){} });
|
| 941 |
+
}
|
| 942 |
+
let LOOPING = false;
|
| 943 |
+
function toggleLoop(btn) {
|
| 944 |
+
LOOPING = !LOOPING;
|
| 945 |
+
allVideos().forEach(v => v.loop = LOOPING);
|
| 946 |
+
btn.classList.toggle("on", LOOPING);
|
| 947 |
+
}
|
| 948 |
+
let MUTED = false;
|
| 949 |
+
function toggleMute(btn) {
|
| 950 |
+
MUTED = !MUTED;
|
| 951 |
+
allVideos().forEach(v => v.muted = MUTED);
|
| 952 |
+
btn.classList.toggle("on", MUTED);
|
| 953 |
+
btn.textContent = MUTED ? "🔇 Muted" : "🔊 Sound";
|
| 954 |
+
}
|
| 955 |
+
function setSpeed(rate) { allVideos().forEach(v => v.playbackRate = rate); }
|
| 956 |
+
function togglePlayAll() {
|
| 957 |
+
const vids = allVideos();
|
| 958 |
+
if (!vids.length) return;
|
| 959 |
+
const anyPlaying = vids.some(v => !v.paused);
|
| 960 |
+
if (anyPlaying) pauseAll(); else playAll();
|
| 961 |
+
}
|
| 962 |
+
|
| 963 |
+
/* =========================================================================
|
| 964 |
+
* Navigation + status updates
|
| 965 |
+
* ========================================================================= */
|
| 966 |
+
function goTo(idx) {
|
| 967 |
+
if (idx < 0 || idx >= CASES.length) return;
|
| 968 |
+
currentIdx = idx;
|
| 969 |
+
pauseAll();
|
| 970 |
+
renderDetail();
|
| 971 |
+
// Scroll detail to top
|
| 972 |
+
const det = document.getElementById("detail");
|
| 973 |
+
if (det) det.scrollTop = 0;
|
| 974 |
+
}
|
| 975 |
+
function step(delta) { goTo((currentIdx + delta + CASES.length) % CASES.length); }
|
| 976 |
+
|
| 977 |
+
function updateProgress() {
|
| 978 |
+
const { done, expected } = totalProgress();
|
| 979 |
+
const pct = expected > 0 ? (done / expected) * 100 : 0;
|
| 980 |
+
const fill = document.getElementById("progressFill");
|
| 981 |
+
const txt = document.getElementById("progressText");
|
| 982 |
+
if (fill) fill.style.width = pct.toFixed(1) + "%";
|
| 983 |
+
if (txt) txt.innerHTML =
|
| 984 |
+
`<span class="num">${done}</span> / ${expected} ratings (${pct.toFixed(0)}%)`;
|
| 985 |
+
}
|
| 986 |
+
|
| 987 |
+
function updateFooterSummary() {
|
| 988 |
+
const c = CASES[currentIdx];
|
| 989 |
+
if (!c) return;
|
| 990 |
+
const p = caseProgress(c);
|
| 991 |
+
const el = document.getElementById("footerSummary");
|
| 992 |
+
if (!el) return;
|
| 993 |
+
el.innerHTML =
|
| 994 |
+
`Case <span class="num">${currentIdx + 1}</span> / ${CASES.length} · ` +
|
| 995 |
+
`<span class="num">${p.done}</span> / ${p.expected} ratings on this case` +
|
| 996 |
+
(p.done === p.expected && p.expected > 0 ? " · ✓ complete" : "");
|
| 997 |
+
}
|
| 998 |
+
|
| 999 |
+
function updateCaseStatus(caseId) {
|
| 1000 |
+
const c = CASES.find(x => x.id === caseId);
|
| 1001 |
+
if (!c) return;
|
| 1002 |
+
const p = caseProgress(c);
|
| 1003 |
+
const row = document.querySelector(`[data-case-id="${caseId}"]`);
|
| 1004 |
+
if (!row) return;
|
| 1005 |
+
row.classList.remove("partial", "complete");
|
| 1006 |
+
if (p.done === p.expected && p.expected > 0) row.classList.add("complete");
|
| 1007 |
+
else if (p.done > 0) row.classList.add("partial");
|
| 1008 |
+
const counter = row.querySelector("span:last-child");
|
| 1009 |
+
if (counter) counter.textContent = `${p.done}/${p.expected}`;
|
| 1010 |
+
updateFooterSummary();
|
| 1011 |
+
}
|
| 1012 |
+
|
| 1013 |
+
/* =========================================================================
|
| 1014 |
+
* Toolbar actions
|
| 1015 |
+
* ========================================================================= */
|
| 1016 |
+
function toggleAnon() {
|
| 1017 |
+
anonymize = !anonymize;
|
| 1018 |
+
// Re-shuffle (or un-shuffle) since the visual order can change
|
| 1019 |
+
SHUFFLE = {};
|
| 1020 |
+
buildShuffle(CASES);
|
| 1021 |
+
saveState();
|
| 1022 |
+
renderShell();
|
| 1023 |
+
}
|
| 1024 |
+
|
| 1025 |
+
function resetCurrentCase() {
|
| 1026 |
+
const c = CASES[currentIdx];
|
| 1027 |
+
if (!confirm(`Reset all ratings for ${c.id}?`)) return;
|
| 1028 |
+
delete RATINGS[c.id];
|
| 1029 |
+
saveState();
|
| 1030 |
+
renderDetail();
|
| 1031 |
+
document.querySelector(`[data-case-id="${c.id}"]`)?.classList.remove("partial", "complete");
|
| 1032 |
+
updateProgress();
|
| 1033 |
+
updateCaseStatus(c.id);
|
| 1034 |
+
showToast("Cleared ratings for " + c.id);
|
| 1035 |
+
}
|
| 1036 |
+
|
| 1037 |
+
function resetAll() {
|
| 1038 |
+
if (!confirm("Reset all ratings, all cases, and rater id? This cannot be undone.")) return;
|
| 1039 |
+
RATINGS = {};
|
| 1040 |
+
SHUFFLE = {};
|
| 1041 |
+
RATER = { id: genRaterId(), note: "", started_at: new Date().toISOString() };
|
| 1042 |
+
buildShuffle(CASES);
|
| 1043 |
+
saveState();
|
| 1044 |
+
renderShell();
|
| 1045 |
+
showToast("All ratings reset");
|
| 1046 |
+
}
|
| 1047 |
+
|
| 1048 |
+
function exportJSON() {
|
| 1049 |
+
// De-anonymize for the export so downstream analysis maps slot → real model.
|
| 1050 |
+
const out = {
|
| 1051 |
+
rater: RATER,
|
| 1052 |
+
anonymize_used: anonymize,
|
| 1053 |
+
exported_at: new Date().toISOString(),
|
| 1054 |
+
rubric: DIMENSIONS,
|
| 1055 |
+
cases: CASES.map(c => {
|
| 1056 |
+
const slots = SHUFFLE[c.id] || c.videos.map((_, i) => i);
|
| 1057 |
+
return {
|
| 1058 |
+
id: c.id,
|
| 1059 |
+
prompt: c.prompt,
|
| 1060 |
+
videos: slots.map((origIdx, slotIdx) => ({
|
| 1061 |
+
slot: String.fromCharCode(65 + slotIdx),
|
| 1062 |
+
slot_index: slotIdx,
|
| 1063 |
+
original_index: origIdx,
|
| 1064 |
+
model: c.videos[origIdx].model,
|
| 1065 |
+
path: c.videos[origIdx].path,
|
| 1066 |
+
ratings: (RATINGS[c.id] || {})[slotIdx] || {},
|
| 1067 |
+
})),
|
| 1068 |
+
};
|
| 1069 |
+
}),
|
| 1070 |
+
};
|
| 1071 |
+
const blob = new Blob([JSON.stringify(out, null, 2)], { type: "application/json" });
|
| 1072 |
+
const url = URL.createObjectURL(blob);
|
| 1073 |
+
const a = el("a", {
|
| 1074 |
+
href: url,
|
| 1075 |
+
download: `user_study_${RATER.id || "anon"}_${new Date().toISOString().slice(0, 10)}.json`,
|
| 1076 |
+
});
|
| 1077 |
+
document.body.appendChild(a); a.click(); a.remove();
|
| 1078 |
+
URL.revokeObjectURL(url);
|
| 1079 |
+
showToast("Exported JSON");
|
| 1080 |
+
}
|
| 1081 |
+
|
| 1082 |
+
/* =========================================================================
|
| 1083 |
+
* Empty / error state
|
| 1084 |
+
* ========================================================================= */
|
| 1085 |
+
function renderEmptyApp(reason) {
|
| 1086 |
+
document.getElementById("app").innerHTML = `
|
| 1087 |
+
<div class="empty-app">
|
| 1088 |
+
<h2>Video user study</h2>
|
| 1089 |
+
<p style="color:var(--bad)">${escapeHtml(reason)}</p>
|
| 1090 |
+
<p>This page expects a manifest at <code>./cases.json</code> describing the cases to rate.
|
| 1091 |
+
A working example lives at <code>./cases.example.json</code>.</p>
|
| 1092 |
+
<h3 style="color:var(--accent-strong);font-size:13px;text-transform:uppercase;letter-spacing:0.4px">cases.json format</h3>
|
| 1093 |
+
<pre>[
|
| 1094 |
+
{
|
| 1095 |
+
"id": "case_001",
|
| 1096 |
+
"prompt": "A cat in a chef's hat tossing pancakes...",
|
| 1097 |
+
"reference_image": "refs/case_001.png", // optional
|
| 1098 |
+
"videos": [
|
| 1099 |
+
{ "model": "ours", "path": "videos/case_001_ours.mp4" },
|
| 1100 |
+
{ "model": "baseline_a", "path": "videos/case_001_a.mp4" }
|
| 1101 |
+
]
|
| 1102 |
+
}
|
| 1103 |
+
]</pre>
|
| 1104 |
+
<p>Then serve this directory and open the page:</p>
|
| 1105 |
+
<pre>cd evals/user_study
|
| 1106 |
+
python -m http.server 8765
|
| 1107 |
+
# open http://localhost:8765/</pre>
|
| 1108 |
+
<p style="color:var(--muted-2)">Tip: missing video files render as a striped "no video" placeholder, so you
|
| 1109 |
+
can scaffold the rating UI before any real <code>.mp4</code>s exist.</p>
|
| 1110 |
+
</div>`;
|
| 1111 |
+
}
|
| 1112 |
+
|
| 1113 |
+
/* =========================================================================
|
| 1114 |
+
* Keyboard
|
| 1115 |
+
* ========================================================================= */
|
| 1116 |
+
document.addEventListener("keydown", e => {
|
| 1117 |
+
if (e.target.tagName === "INPUT" || e.target.tagName === "TEXTAREA") return;
|
| 1118 |
+
if (e.metaKey || e.ctrlKey || e.altKey) return;
|
| 1119 |
+
switch (e.key) {
|
| 1120 |
+
case "ArrowLeft": case "k": e.preventDefault(); step(-1); break;
|
| 1121 |
+
case "ArrowRight": case "j": e.preventDefault(); step(1); break;
|
| 1122 |
+
case " ": e.preventDefault(); togglePlayAll(); break;
|
| 1123 |
+
case "r": case "R": e.preventDefault(); restartAll(); break;
|
| 1124 |
+
case "l": case "L":
|
| 1125 |
+
e.preventDefault();
|
| 1126 |
+
const lb = document.getElementById("loopBtn");
|
| 1127 |
+
if (lb) toggleLoop(lb);
|
| 1128 |
+
break;
|
| 1129 |
+
}
|
| 1130 |
+
});
|
| 1131 |
+
|
| 1132 |
+
/* =========================================================================
|
| 1133 |
+
* Init
|
| 1134 |
+
* ========================================================================= */
|
| 1135 |
+
async function fetchManifest() {
|
| 1136 |
+
for (const path of ["./cases.json", "./cases.example.json"]) {
|
| 1137 |
+
try {
|
| 1138 |
+
const resp = await fetch(path, { cache: "no-cache" });
|
| 1139 |
+
if (resp.ok) {
|
| 1140 |
+
const data = await resp.json();
|
| 1141 |
+
return { data, path };
|
| 1142 |
+
}
|
| 1143 |
+
} catch (e) { /* try next */ }
|
| 1144 |
+
}
|
| 1145 |
+
return null;
|
| 1146 |
+
}
|
| 1147 |
+
|
| 1148 |
+
(async function init() {
|
| 1149 |
+
const found = await fetchManifest();
|
| 1150 |
+
if (!found) {
|
| 1151 |
+
renderEmptyApp("Could not load ./cases.json or ./cases.example.json — " +
|
| 1152 |
+
"either run via python -m http.server, or drop a manifest in this directory.");
|
| 1153 |
+
return;
|
| 1154 |
+
}
|
| 1155 |
+
CASES = found.data || [];
|
| 1156 |
+
if (!Array.isArray(CASES) || CASES.length === 0) {
|
| 1157 |
+
renderEmptyApp("Manifest is empty — add at least one case to cases.json.");
|
| 1158 |
+
return;
|
| 1159 |
+
}
|
| 1160 |
+
|
| 1161 |
+
// Restore prior state, if any
|
| 1162 |
+
const prior = loadState();
|
| 1163 |
+
if (prior) {
|
| 1164 |
+
RATER = prior.rater || { id: genRaterId(), note: "", started_at: new Date().toISOString() };
|
| 1165 |
+
anonymize = prior.anonymize !== false;
|
| 1166 |
+
RATINGS = prior.ratings || {};
|
| 1167 |
+
SHUFFLE = prior.shuffle || {};
|
| 1168 |
+
} else {
|
| 1169 |
+
RATER = { id: genRaterId(), note: "", started_at: new Date().toISOString() };
|
| 1170 |
+
}
|
| 1171 |
+
|
| 1172 |
+
buildShuffle(CASES);
|
| 1173 |
+
saveState();
|
| 1174 |
+
renderShell();
|
| 1175 |
+
if (found.path.endsWith("example.json")) {
|
| 1176 |
+
showToast("Loaded cases.example.json — drop a real cases.json to override");
|
| 1177 |
+
}
|
| 1178 |
+
// Probe the optional ./submit endpoint. Done after first render so the pill
|
| 1179 |
+
// exists in the DOM and can flip from "local" → "idle"/"local-only" cleanly.
|
| 1180 |
+
probeSyncEndpoint();
|
| 1181 |
+
})();
|
| 1182 |
+
</script>
|
| 1183 |
+
</body>
|
| 1184 |
+
</html>
|