Repository navigation
Resizing the viewport restarts an in-progress interactive instrument #1480
Description
Activity
Closing: not reproducible, and the evidence in the report is wrong
The tasks do handle resize. The grep behind this issue only covered
index.ts. Every TMB task also ships two vendored scripts, andTestHelper.v1.May23.js/TestHelper.v1.Oct23.jsregistersresize,visualViewport resizeandorientationchangehandlers insetBodyScale()(lines 844-848), which every TMB task calls. So "the tasks have no way to react to a resize" does not hold, and the conclusion drawn from it — that the remount must be host-side — does not follow.We could not reproduce the reset. We ran
TMB_VISUAL_PA_STUDYwith a counter on every reload of the task's frame, while resizing the window (simulated and real), resizing 24 times rapidly, and forcing the browser out of fullscreen mid-task. Zero reloads. The task played all 24 image pairs through to the end screen.We do not know what causes it. We don't fully understand the TMB legacy scripts — they're vendored, undocumented, and we won't be modifying them. The reset could originate in that code or in ODC; nothing we have distinguishes the two. What we can say is that no host-side viewport handling remounts the task, which is the specific claim this issue was filed on.
Closing as not reproducible. If it happens again, reopen with the template below — it asks for the few things that would tell these apart.
If it happens again
Best case: record your screen. Windows
Win+Alt+R, MacCmd+Shift+5. A ten-second clip beats everything below.Otherwise, screenshot it the moment it happens (Windows
Win+Shift+S, MacCmd+Shift+4) and fill in as much of this as you can. Partial is fine.1. Date and time (to the minute): ______________________ 2. Task: [ ] Visual Paired Associates - Study [ ] Matrix Reasoning [ ] Other: ______________________ 3. How far in? (e.g. "pair 12 of 24", "just started") ______________________ 4. MOST IMPORTANT - did the WHOLE page reload, or only the task? Look at the blue sidebar and the Overview-Content-Summary bar at the top. [ ] Whole screen went blank and redrew, like pressing refresh [ ] Sidebar and top bar stayed put; only the middle changed [ ] Not sure 5. Any error message, red text, or "Try again" screen - even for a second? [ ] Yes: ______________________ [ ] No [ ] Not sure 6. What did you do just before? Tick all that apply. [ ] Dragged the window edge/corner [ ] Maximised or un-maximised [ ] Pressed F11 [ ] Pressed Esc [ ] Minimised, or switched program [ ] Plugged in / moved to another monitor [ ] Closed or opened the laptop lid [ ] Other key: ______________ [ ] Nothing, it just happened 7. Was the task filling the whole screen (no tabs or address bar visible)? [ ] Yes [ ] No [ ] Not sure 8. Error log (~20 seconds): Press F12 > click the "Console" tab > screenshot it > press F12 to close. Skip this if the panel doesn't open.Question 4 alone narrows this considerably.
If you're about to run a session where this might recur: press
F12, clickConsole, tickPreserve log, leave the panel open. That keeps the log alive through a reload — currently the exact moment we lose the evidence.
Reported downstream in DouglasNeuroInformatics/CPPQ#103.
What happens
Resizing the Google Chrome window while an interactive instrument is in progress restarts the task, returning the participant to the instructions page. Observed on
TMB_VISUAL_PA_STUDYandTMB_MATRIX_REASONING.Why this is a data-integrity bug, not a cosmetic one
For
TMB_VISUAL_PA_STUDYa restart means the participant sees the image pairs a second time. That instrument is the study phase of a paired-associates memory test — a second exposure invalidates the subsequent recall score, and nothing in the recorded data indicates it happened. The affected record looks like a normal, valid one.So the failure is silent: the score is wrong and nothing flags it. Same shape of problem for any timed or exposure-limited task.
Evidence it's host-side, not in the tasks
Neither task source contains any resize or viewport handling — no
resizelistener, noResizeObserver, nowindow.innerWidth/innerHeight/clientWidthreads, nomatchMedia, noorientationchange:(in
DouglasNeuroInformatics/ODC_instruments, 371 and 569 lines respectively)The tasks have no way to react to a resize themselves, so the remount is coming from the interactive-instrument host — something in the render path keyed on viewport dimensions, remounting the task component on a size change.
Expected behaviour
Resizing the viewport must not remount, restart, or reset an in-progress interactive instrument. The task should keep its state across viewport changes.
Questions
🤖 Generated with Claude Code