0d147408e678df6e37e2a7e0a24934b80d0826e4 braney Wed Sep 30 06:51:55 2026 -0700 docent rm38279: follow the window-size density note to its new wording, "window too large, zoom in", from 32eec44ad31. The nightly went red at step 2 on the old string. Steps 1 and 2 now check the new string, and the header no longer describes the prefix overlap that the reword removed. refs #38279, #38252 diff --git src/hg/utils/docent/tests/regress/rm38279.docent.yaml src/hg/utils/docent/tests/regress/rm38279.docent.yaml index 85279c82b23..2c9d43c8443 100644 --- src/hg/utils/docent/tests/regress/rm38279.docent.yaml +++ src/hg/utils/docent/tests/regress/rm38279.docent.yaml @@ -1,96 +1,94 @@ # #38279 -- a track that switched to a density graph did not say why. # # Three different things put a bigBed, VCF or BAM track into density mode, and the display # looked the same whichever one did it: the user ticking "Display data as a density graph" # on the configuration page, the window being wider than the track's maxWindowCoverage, or # the track having more features in the window than it is willing to read. The two label # functions for this already existed but were reachable only through # labelTrackAsFilteredNumber(), whose callers all guard it with `if (filtered)`, so none of # the three automatic cases said anything at all. # # d83026b7d89 adds labelTrackAsDensityIfActive(), called once from makeActiveImage() after # every path into density mode has been settled, with one message per cause: # # the user asked for it (density graph: turn off on the track settings page) # too many items (density graph: too many items, zoom in or use dense) -# window too wide (density graph: too many items, zoom in) +# window too wide (density graph: window too large, zoom in) # # 07f0635fd35 reworded all three on 2026-09-18 after QA read them: say "density graph" to -# match the checkbox, and name only the escape that works for each cause. The wording -# above is that second wording, and the note below about the shared prefix is a direct -# consequence of it. +# match the checkbox, and name only the escape that works for each cause. 32eec44ad31 +# reworded the window-size one again on 2026-09-29: winTooBigDoWiggle() compares the window +# width against maxWindowCoverage and never counts anything, so "too many items" named the +# wrong cause. The wording above is the current one. # # Each step names the message it expects AND the message it must not get, because the whole # of the fix is picking the right one of the three. A version that appended the same # sentence to every density track would pass a test that only asked whether a note is there. # -# Since the reword, the window-size message is a strict PREFIX of the too-many-items one: -# -# density graph: too many items, zoom in -# density graph: too many items, zoom in or use dense -# -# mouseoverText*= is a substring match, so a bare `noHas` on the shorter one matches the -# longer one too and fails on the very track it is meant to pass. labelAddNote() wraps a -# note as " (%s)", so every check below carries the closing paren, which makes the shorter -# message match itself and nothing else. Do not drop it. +# labelAddNote() wraps a note as " (%s)", and every check below carries the parens. Between +# the two rewordings the window-size message was a strict prefix of the too-many-items one, +# and the closing paren was what kept a substring match on the shorter one from matching the +# longer one. The current three share no such prefix, but keep the parens: the next reword +# can bring the trap back. # # Where the note can be read, and where it cannot # ----------------------------------------------- # The note is appended to the track's longLabel, which reaches three places: the center # label drawn INSIDE the track image, the hgTracks JSON in a <script> block, and the title # of the track's link in the controls below the image. Only the third is markup a check # here can see -- body.innerText skips a script, and no check reads text out of the image. # # hgTracks' own tooltip code takes every title on the page, puts the text in a # `mouseoverText` attribute and blanks the title (utils.js, convertTitleTagsToMouseovers -> # titleTagToMouseover -> addMouseover), so the selector reads mouseoverText. README.txt # says to assert data-tooltip: that is right for a MAP BOX, where the server writes both # attributes, and wrong here, where the server writes only a title. # # All three tracks named below are TOP-LEVEL on purpose. The controls list a composite or # a superTrack under the container's own label, so a subtrack's note never reaches it: the # first draft of this script used jaspar2026, whose note is in the JSON and the pixels and # nowhere a check can reach. A subtrack is not testable this way. proof: - "assertion-only 2026-09-17 -- written from #38279 and d83026b7d89 after the fix reached genome-test" - "release-ab 2026-09-17 -- fails on v503 and passes on genome-test (v504). v503_branch 707b184e329 built into ticket sandbox 38316, CGIs, js and htdocs: the CRISPR Targets label carries none of the three density notes" - "assertion-only 2026-09-18 -- reworded for 07f0635fd35, which changed all three label strings; the four label steps were re-read off genome-test by hand and the release-ab line above still stands, since v503 carries no note at all and the reword cannot reach it" + - "assertion-only 2026-09-30 -- reworded for 32eec44ad31, which changed the window-size note to 'window too large'; the nightly went red at step 2 on the old string, steps 1 and 2 were re-read off genome-test, and the release-ab line still stands, since v503 carries no note at all" target: genome-test db: hg38 reset: true fast: true steps: # 1. Too many features to read. CRISPR Targets over 500 kb is far past the 10,000 # features hg.conf's bigBedMaxItems allows, so loadBigBedSummary() sets limitWiggle. - goto: "/cgi-bin/hgTracks?db=hg38&position=chr1:1000000-1500000&hideTracks=1&crisprAllTargets=pack&pix=1100" - expect: rows: [ruler, crisprAllTargets] has: 'a.trackLink[data-track="crisprAllTargets"][mouseoverText*="(density graph: too many items, zoom in or use dense)"]' noHas: - 'a.trackLink[data-track="crisprAllTargets"][mouseoverText*="turn off on the track settings page"]' - - 'a.trackLink[data-track="crisprAllTargets"][mouseoverText*="(density graph: too many items, zoom in)"]' + - 'a.trackLink[data-track="crisprAllTargets"][mouseoverText*="(density graph: window too large, zoom in)"]' # 2. Window wider than the track allows. UniProt Variants sets maxWindowCoverage # 10000000, so an 11 Mb window trips winTooBigDoWiggle() -- a different cause from step 1, # and the message says so. - goto: "/cgi-bin/hgTracks?db=hg38&position=chr1:1000000-12000000&hideTracks=1&spMut=pack&pix=1100" - expect: rows: [ruler, spMut] - has: 'a.trackLink[data-track="spMut"][mouseoverText*="(density graph: too many items, zoom in)"]' - noHas: 'a.trackLink[data-track="spMut"][mouseoverText*="zoom in or use dense"]' + has: 'a.trackLink[data-track="spMut"][mouseoverText*="(density graph: window too large, zoom in)"]' + noHas: 'a.trackLink[data-track="spMut"][mouseoverText*="too many items"]' # 3. The same track just inside its own threshold: 9.5 Mb, still drawn, and no note. This # is what says the note follows maxWindowCoverage rather than merely following the track, # and it is the cheapest check here -- one window change on a track already loaded. - goto: "/cgi-bin/hgTracks?db=hg38&position=chr1:1000000-10500000&hideTracks=1&spMut=pack&pix=1100" - expect: rows: [ruler, spMut] noHas: 'a.trackLink[data-track="spMut"][mouseoverText*="density graph"]' # 4. The user asked for it. mane.doWiggle=on is the configuration page's checkbox, set # here through the URL because Docent cannot tick one. This is the only one of the three # the user chose, and the only message that tells them how to undo it. - goto: "/cgi-bin/hgTracks?db=hg38&position=chr1:11102837-11267747&hideTracks=1&mane=full&mane.doWiggle=on&pix=1100" - expect: rows: [ruler, mane]