Skip to content

Commit d9bc62c

Browse files
sschabackerclaude
andcommitted
Bold Export sub-headers, rename toggles to "About", drop 3 redundant ones
Export section now has <h4> headers (Trial summary / Event detail / Project file) instead of three unlabeled blocks run together. "What does this mean?" / "What do these mean?" -> "About" on all 17 info-toggle/threshold-help disclosures, her direct call. Audited every one-liner + toggle pair for whether the full version actually said more than the short one, not just the same thing with extra words. Three didn't: the tracking-failure-strip blurb, the background-median explanation, and the event-detail export line. Each collapsed to a single line - the fuller, more complete phrasing kept, the short one dropped, per her instruction to prefer the more complete version when they're redundant rather than default to the shorter one. 75/75 tests pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 734c225 commit d9bc62c

1 file changed

Lines changed: 25 additions & 32 deletions

File tree

‎app/index.html‎

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ <h1>Barnes Maze Pipeline</h1>
714714
<h2>Videos</h2>
715715
<p class="subtitle">Click a video to switch to it.</p>
716716
<details class="info-toggle">
717-
<summary>What does this mean?</summary>
717+
<summary>About</summary>
718718
<p class="subtitle">Click a video to switch to it - your place in whichever one you're leaving gets saved automatically.</p>
719719
</details>
720720
<p class="placeholder-note" id="rosterEmptyNote">No videos yet - load one with Browse, drag/drop, or Open folder.</p>
@@ -796,7 +796,7 @@ <h2>Videos</h2>
796796
<div role="tabpanel" id="panel-path" aria-labelledby="tab-path" hidden>
797797
<p class="subtitle">The route the mouse took, colored dark to yellow as the trial goes on - click a point to seek the video there.</p>
798798
<details class="info-toggle">
799-
<summary>What does this mean?</summary>
799+
<summary>About</summary>
800800
<p class="subtitle">Trajectory from trial start to the end of the recording, colored by 8 equal bands of elapsed time (viridis - perceptually uniform, colorblind-safe, and survives greyscale printing; banded rather than a smooth blend so neighboring time periods stay visually distinct). The bands are a fixed, even split of time, not a detected behavioral phase - a color change marks a clock boundary, not an event. Click a point to seek the video there. Failed-tracking frames break the line rather than bridging it - a gap is never silently interpolated.</p>
801801
</details>
802802
<div class="canvas-wrap">
@@ -813,7 +813,7 @@ <h2>Videos</h2>
813813
<div role="tabpanel" id="panel-heatmap" aria-labelledby="tab-heatmap" hidden>
814814
<p class="subtitle">How much time was spent where on the platform, not the route taken - click a cell to seek the video there.</p>
815815
<details class="info-toggle">
816-
<summary>What does this mean?</summary>
816+
<summary>About</summary>
817817
<p class="subtitle">Occupancy over the platform, trial start to end of recording - how much time was spent where, not the route taken (see Path for that). Colored in the same 8 equal bins as Path, but here the bins are by visit density, not time. Click a cell to seek the video to the first frame that landed there.</p>
818818
</details>
819819
<div class="canvas-wrap">
@@ -830,7 +830,7 @@ <h2>Videos</h2>
830830
<div role="tabpanel" id="panel-raster" aria-labelledby="tab-raster" hidden>
831831
<p class="subtitle">One row per hole, one mark per visit, left to right in time - click a mark to seek the video there.</p>
832832
<details class="info-toggle">
833-
<summary>What does this mean?</summary>
833+
<summary>About</summary>
834834
<p class="subtitle">One row per hole, target hole marked with a star (not color alone), trial start to end of recording left to right. Each mark is a real hole-visit, shaped by type (poke/entry/thigmotaxis) so meaning never depends on color alone. Click a mark, or focus the raster and use arrow keys plus Enter, to seek the video there - this tab, unlike Path and Heat map, is fully keyboard-operable.</p>
835835
</details>
836836
<div id="rasterWrap" role="listbox" aria-label="Hole-visit raster, arrow keys to move, Enter to seek" tabindex="0"></div>
@@ -876,7 +876,7 @@ <h2>Videos</h2>
876876
<div id="trackSection" hidden>
877877
<p class="subtitle">Finds the mouse in each frame by comparing it against the empty-platform background, and marks a frame failed rather than guessing when it can't.</p>
878878
<details class="info-toggle">
879-
<summary>What does this mean?</summary>
879+
<summary>About</summary>
880880
<p class="subtitle">Background subtraction against the median, gated to the confirmed platform circle and a plausible size range. The largest matching blob wins each frame. A frame with no valid blob is marked failed, never guessed.</p>
881881
</details>
882882

@@ -886,7 +886,7 @@ <h2>Videos</h2>
886886
<label>Max blob area (px) <input type="number" id="trackMaxAreaInput" value="1500" min="1"></label>
887887
</div>
888888
<details class="threshold-help">
889-
<summary>What do these mean?</summary>
889+
<summary>About</summary>
890890
<dl>
891891
<dt>Mask threshold</dt>
892892
<dd>How different from the empty-platform background a pixel has to be before it counts as mouse. Lower values pick up more of the animal but also shadows and lighting drift; higher values lose the animal in dimmer frames. The default of 30 tracked all three test clips despite very different lighting between the three rigs, which is the only evidence there is - no other value has been tested, and the 1-255 range is the arithmetic limit of an 8-bit image, not a tested range.</dd>
@@ -908,11 +908,7 @@ <h2>Videos</h2>
908908
<dt>Compute time</dt><dd id="trackComputeTime">-</dd>
909909
</dl>
910910
<div id="trackFailureStripWrap" hidden>
911-
<p class="subtitle">A timeline of where tracking failed across the whole video - click anywhere to jump there.</p>
912-
<details class="info-toggle">
913-
<summary>What does this mean?</summary>
914-
<p class="subtitle">Where failures happened, not just how many - the whole video, start to end. Click anywhere to jump there.</p>
915-
</details>
911+
<p class="subtitle">Where failures happened, not just how many - the whole video, start to end. Click anywhere to jump there.</p>
916912
<canvas id="trackFailureStrip" width="640" height="24" aria-label="Tracking failure timeline: green is tracked, red is failed, across the whole video"></canvas>
917913
</div>
918914
<p class="subtitle" id="trackScrubHint" hidden>Scrub the frame viewer above - green crosshair = tracked, red X = failed frame.</p>
@@ -923,7 +919,7 @@ <h2>Videos</h2>
923919
<h3>Measures</h3>
924920
<p class="subtitle">Click a measure's name to see what it means and how it's calculated.</p>
925921
<details class="info-toggle">
926-
<summary>What does this mean?</summary>
922+
<summary>About</summary>
927923
<p class="subtitle">Click a measure's name for its definition and how it's calculated. A row marked <strong>audited</strong> was changed by a human-review override above - re-click "Compute measures" after changing one to recalculate.</p>
928924
</details>
929925
<button id="measuresBtn" type="button" disabled>Detect events first</button>
@@ -940,14 +936,14 @@ <h3>Measures</h3>
940936
<h3>Search strategy</h3>
941937
<p class="subtitle">Which search pattern this trial matches - spatial, serial, or random - or UNCLEAR when no single pattern fits.</p>
942938
<details class="info-toggle">
943-
<summary>What does this mean?</summary>
939+
<summary>About</summary>
944940
<p class="subtitle">Spatial (direct) / serial / random. The definitions of the three strategies come from Gawel et al. 2019 (Table 1, citing O'Leary &amp; Brown), including the "at most 1-2 holes adjacent to the target" limit that decides Direct - those are the literature's, not invented here. The 0-1 scores and the two bars that gate them are this project's own, and are described in the threshold notes below. A verdict requires exactly one categorical pattern to match; otherwise it's <strong>UNCLEAR</strong> and all three scores are shown for you to audit against the hole sequence, rather than forcing a guess.</p>
945941
</details>
946942
<div id="classifierControls">
947943
<label>Serial bar <input type="number" id="classifierSerialBarInput" value="0.6" min="0" max="1" step="0.05"></label>
948944
<label>Random bar <input type="number" id="classifierRandomBarInput" value="0.5" min="0" max="1" step="0.05"></label>
949945
<details class="threshold-help">
950-
<summary>What do these mean?</summary>
946+
<summary>About</summary>
951947
<dl>
952948
<dt>Serial bar / Random bar</dt>
953949
<dd>A trial is called serial or random only if its respective score clears this bar. Unlike the strategy definitions themselves, these two numbers are not from the literature - <code>serialScore</code> and <code>randomScore</code> are this project's own 0-1 metrics (adjacency and direction consistency; platform-centre crossings), and the defaults of 0.6 and 0.5 are locally-set cutoffs on them. They were set from the shape of the literature's categories rather than calibrated, on the explicit reasoning that three test clips cannot calibrate a classifier. No value other than the defaults has been tested, and moving them is not a way to resolve an UNCLEAR verdict: a verdict also requires a categorical pattern match, so a score clearing its bar is necessary but not sufficient.</dd>
@@ -959,9 +955,11 @@ <h3>Search strategy</h3>
959955
<div id="classifierResult" hidden></div>
960956

961957
<h3>Export</h3>
958+
959+
<h4>Trial summary</h4>
962960
<p class="subtitle">One spreadsheet row for this trial, with every measure, the search-strategy verdict, and the thresholds that produced them.</p>
963961
<details class="info-toggle">
964-
<summary>What does this mean?</summary>
962+
<summary>About</summary>
965963
<p class="subtitle">One tidy row for this trial: every measure above, the search-strategy verdict, the thresholds that produced them, and the tool version - opens directly in Excel, no legend needed. "Video file" is always included, so every exported row stays traceable on its own.</p>
966964
</details>
967965
<label id="exportLabelAuditedLabel"><input type="checkbox" id="exportLabelAuditedInput" checked> Label audited values (adds "(audited)" to a measure's value when a human correction changed it)</label>
@@ -974,14 +972,13 @@ <h3>Export</h3>
974972
</div>
975973
<button id="exportSummaryBtn" type="button" disabled>Detect events first</button>
976974
<div id="exportStatus" role="status" aria-live="polite"></div>
977-
<p class="subtitle">One spreadsheet row per hole visit, for looking at individual events instead of the trial total.</p>
978-
<details class="info-toggle">
979-
<summary>What does this mean?</summary>
980-
<p class="subtitle">Per-event detail: one row per hole visit (matches Merged Visits above, overrides included) - the "long form" alongside the trial summary's "short form."</p>
981-
</details>
975+
976+
<h4>Event detail</h4>
977+
<p class="subtitle">Per-event detail: one row per hole visit (matches Merged Visits above, overrides included) - the "long form" alongside the trial summary's "short form."</p>
982978
<button id="exportDetailBtn" type="button" disabled>Detect events first</button>
983979
<div id="exportDetailStatus" role="status" aria-live="polite"></div>
984980

981+
<h4>Project file</h4>
985982
<p class="subtitle">Not spreadsheet data - a reloadable copy of this trial's own work, to resume later without re-tracking.</p>
986983
<p class="subtitle" id="saveProjectFileHint" hidden>Save a portable <code>_AUDITED.bmp.json</code> file with everything except the video itself (which stays wherever it already lives) - open it later, on any computer, to resume without re-tracking. Save it in the same folder as the video, next to it - the name makes it obvious at a glance, to you or anyone else, that this trial's already been done.</p>
987984
<button id="saveProjectFileBtn" type="button" hidden>Save project file</button>
@@ -997,11 +994,7 @@ <h3>Export</h3>
997994
<summary>Background</summary>
998995
<p class="qc-placeholder">Load a video first.</p>
999996
<div id="medianSection" hidden>
1000-
<p class="subtitle">Builds a picture of the empty platform by taking the median of frames sampled across the video.</p>
1001-
<details class="info-toggle">
1002-
<summary>What does this mean?</summary>
1003-
<p class="subtitle">The maze is static and the mouse moves, so the per-pixel median across evenly-sampled frames gives a clean empty-platform image.</p>
1004-
</details>
997+
<p class="subtitle">The maze is static and the mouse moves, so the per-pixel median across evenly-sampled frames gives a clean empty-platform image.</p>
1005998
<button id="computeMedianBtn" type="button">Compute background</button>
1006999
<div id="medianStatus" role="status" aria-live="polite"></div>
10071000
<div class="canvas-wrap">
@@ -1025,7 +1018,7 @@ <h3>Export</h3>
10251018
<div id="detectSection" hidden>
10261019
<p class="subtitle">Finds the platform circle and the roughly 20 holes around its rim automatically - you confirm them on the next screen.</p>
10271020
<details class="info-toggle">
1028-
<summary>What does this mean?</summary>
1021+
<summary>About</summary>
10291022
<p class="subtitle">Hough circles on the background: one big circle for the platform, ~20 small ones on its rim for the holes, indexed in ring order by angle.</p>
10301023
</details>
10311024
<button id="detectBtn" type="button" disabled>Compute background first</button>
@@ -1052,7 +1045,7 @@ <h3>Export</h3>
10521045
<h3>Confirm &amp; adjust</h3>
10531046
<p class="subtitle">Fix any circle that's wrong by dragging it, then click the escape hole to mark it as the target.</p>
10541047
<details class="info-toggle">
1055-
<summary>What does this mean?</summary>
1048+
<summary>About</summary>
10561049
<p class="subtitle">Drag a circle's edge to resize it, drag its middle to move it. Click a hole (no drag) to mark it as the target - or use the dropdown below if clicking precisely is awkward on a small screen.</p>
10571050
</details>
10581051
<div id="roiKeyboardNudge">
@@ -1130,7 +1123,7 @@ <h3>Confirm &amp; adjust</h3>
11301123
</div>
11311124
<p class="subtitle">How many trials this animal has already done - a label for your records, never used in any calculation.</p>
11321125
<details class="info-toggle">
1133-
<summary>What does this mean?</summary>
1126+
<summary>About</summary>
11341127
<p class="subtitle">Prior trials completed is a human-entered label only - it's never read by the tracker, event detector, or classifier. It just rides along with this trial's numbers into the exported spreadsheet, so a researcher reading it later has context (e.g. "trial 1 of 5, still wandering" reads differently than "trial 9, still wandering").</p>
11351128
</details>
11361129
</div>
@@ -1152,12 +1145,12 @@ <h3>Confirm &amp; adjust</h3>
11521145
<div id="eventsQcSection" hidden>
11531146
<p class="subtitle">Finds hole visits from pixel change at each hole, then labels each one an entry or a poke.</p>
11541147
<details class="info-toggle">
1155-
<summary>What does this mean?</summary>
1148+
<summary>About</summary>
11561149
<p class="subtitle">Per-hole pixel-change signal, duration-gated. An <strong>entry</strong> is the signal plus the mouse's own tracked blob going invalid right after; a <strong>poke</strong> is the signal plus the mouse's speed dropping to at-or-below its own trial's median. Low-confidence candidates are shown, not hidden - disagreement gets flagged, not silently resolved.</p>
11571150
</details>
11581151
<p class="subtitle">Your corrections come back when you resume, except after re-detecting with different thresholds, which clears them.</p>
11591152
<details class="info-toggle">
1160-
<summary>What does this mean?</summary>
1153+
<summary>About</summary>
11611154
<p class="subtitle"><strong>Human review survives a reload:</strong> a correction here or on the search-strategy verdict below persists and comes back after resuming a session, or after loading a saved project file. Re-detecting events with DIFFERENT thresholds still clears overrides on purpose - frame ranges may have shifted, so a stale override would be misleading, not just outdated. See KNOWN_LIMITATIONS.md for what's still missing (a free-text note per override, a timestamped audit log).</p>
11621155
</details>
11631156

@@ -1169,7 +1162,7 @@ <h3>Confirm &amp; adjust</h3>
11691162
<label>Reengage fraction <input type="number" id="eventsReengageFractionInput" value="0.3" min="0" max="1" step="0.05"></label>
11701163
</div>
11711164
<details class="threshold-help">
1172-
<summary>What do these mean?</summary>
1165+
<summary>About</summary>
11731166
<dl>
11741167
<dt>Min center density</dt>
11751168
<dd>How much of a hole's centre has to change from the background before that frame counts as a candidate visit. Lower values catch more brief or partial investigations along with more noise; higher values miss real ones. The default of 0.30 sits close to real signal levels - a confirmed continuous investigation in test50 dipped to 0.257 partway through, which is why the reengage rule below exists - so raising it should be expected to fragment real visits into several reported ones. Only the default has been tested against the three clips.</dd>
@@ -1206,7 +1199,7 @@ <h3>Confirm &amp; adjust</h3>
12061199
<div role="tabpanel" id="panel-merged-visits" aria-labelledby="tab-merged-visits" hidden>
12071200
<p class="subtitle">Two visits to the same hole count as one unless the mouse fully disengaged in between.</p>
12081201
<details class="info-toggle">
1209-
<summary>What does this mean?</summary>
1202+
<summary>About</summary>
12101203
<p class="subtitle">Two events at the same hole are merged into one visit when the raw center-density signal between them never drops close to baseline (reengage fraction x min center density) - a brief dip under the qualifying threshold doesn't end a visit, but a real return to baseline does. See DECISIONS.md 2026-09-04. Feeds the search-strategy classifier's visit sequence and the errors/perseverative-errors measure - not shown elsewhere yet.</p>
12111204
</details>
12121205
<div id="visitsTableWrap" hidden>

0 commit comments

Comments
 (0)