Repository navigation
feat: remove glassSize, glass drawing and glass terminology (#159) - #231
Conversation
Tier rail 4/4 (parent #131). Retires the render-bound v2 section-difficulty surface now that Section Map reads the semantic v3 contract. - screen.js: drop SECTIONS_SCHEMA_V2 / SECTIONS_EVENT_V2, the v2 payload and the `difficulty:sections-updated` event; delete the legacy canvas overlay (GLASS_* constants, ensureHudCanvas, drawHud, _drawHudGlasses/_drawHudBadge, all _hud* helpers) and the retired `showGlasses` forward-migration. The only section-difficulty contract is now `difficulty:sections-updated-v3` (`difficulty_ladder.sections.v3`, #156/#157). `resetPerSongState` keeps the rail resync it needs; `getPlayerEl`/`isPlayerActive` are retained. - settings.html: read only `showDifficultyGuide` (default on). - tests: drop the v2 cases and retarget filters to the v3 event; pin the v3 payload's exact key sets. 419 tests pass. - docs: scrub glass terminology from README, INTEGRATION, COMPLIANCE, PLAYER_CONTEXT, CLAUDE, MIGRATION; record the breaking change in CHANGELOG. - plugin.json 0.40.3 -> 0.41.0. Breaking change for consumers still on sections.v2; Section Map's migration to v3 is tracked in feedback-plugin-sectionmap#14, and this removal ships only once that migration is in place.
Reviewer's GuideThis breaking change removes the v2 section-difficulty event and its presentation-bound glass payload, deletes the legacy canvas glass HUD and its setting migration, and standardizes all runtime consumers and tests on the render-neutral v3 tier contract; documentation and the plugin version are updated accordingly. Review the external Section Map migration gate before merging. Sequence diagram for v3 section difficulty emissionsequenceDiagram
participant Host
participant DifficultyLadder
participant SectionMap
Host->>DifficultyLadder: calculateAndEmitSectionDifficulties()
DifficultyLadder->>Host: getSections()
DifficultyLadder->>Host: getPhrases()
DifficultyLadder->>Host: getMastery()
DifficultyLadder->>DifficultyLadder: _sectionsV3Payload()
DifficultyLadder->>SectionMap: difficulty:sections-updated-v3
SectionMap->>SectionMap: render section difficulty from current_tier, top_tier, has_chart_content
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
ℹ️ Minor suggestions only — one doc inaccuracy inline, plus confirmation of the upstream merge gate below.
Reviewed changes — the full #159 removal on 13cd698: the v2 section-difficulty surface (difficulty:sections-updated, SECTIONS_SCHEMA_V2, _computeSectionDifficulties and friends), the legacy canvas glass HUD (drawHud, ensureHudCanvas, GLASS_*, _hud* cursors, its rAF lifecycle), the showGlasses forward-migration and cross-tab storage adoption, and all glass terminology in docs; tests retargeted to the v3 event with exact payload key-set pins; version bumped to 0.41.0.
screen.js— v2 event/payload and the entire dead canvas HUD path deleted;_emitSectionDifficultiescollapses to a v3-only call withmasterynulled when the host reports none, matching the oldreportsMastery ? mastery : nullsemantics. The DOM tier rail and scoring paths are untouched, so no runtime behavior changes on the active guide.settings.html— reads onlyshowDifficultyGuide; theguide !== falsedefault is preserved when the key is absent.- Tests/docs — 419/419 pass locally on this head, matching the updated
CLAUDE.mdcount;git grep -i glass(anddrawHud/_hud/showGlasses/sections.v2) hits onlyCHANGELOG.mdplus two intentional historical mentions, satisfying the acceptance criterion.
ℹ️ The upstream merge gate is real and not yet satisfied
The PR body gates on sectionmap#14; as of this review that issue is still open and its implementation PR (sectionmap#18) is open, not merged. Released Section Map 1.3.0 is v2-only: it finds the capability marker, subscribes to difficulty:sections-updated, and would silently render no section difficulty against this build. Keep the gate until #18 lands; after both sides ship, Section Map owes its own documented follow-up of deleting the now-dead v2 fallback (_smNormalizeSectionTiersV2 / _smOnSectionsUpdated).
Technical details
# Upstream gate status (verified 2026-10-17)
## Affected sites
- PR body / merge sequencing — sectionmap#14 open; sectionmap#18 (the v3
consumer) open, not merged.
- sectionmap 1.3.0 (released): subscribes to the v2 event after seeing
`window._ddCapabilities.sectionDifficulty`; this build no longer emits it.
## Required outcome
- Do not merge until sectionmap#18 is merged (and ideally released), so
upgraded Difficulty Ladder builds never pair with a v2-only Section Map in
the wild.
## Follow-up owed on the Section Map side
- sectionmap#18 keeps a bounded v2 fallback and its CLAUDE.md instructs
deleting it once the peer drops v2 — schedule that after both land.big-pickle (free) | 𝕏
|
The failed check was Fixed in Task list (7/7 completed)
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (13 files)
Reviewed by efficient · Input: 164.8K · Output: 9.9K · Cached: 364.8K |

Tier rail 4/4 (parent #131). Retires the render-bound v2 section-difficulty surface now that Section Map consumes the semantic v3 contract.
Important
Merge-gated on feedback-plugin-sectionmap#14 — Section Map's migration to the v3 fields is still open upstream. This PR must not merge until that lands; the milestone (M6) and the issue's acceptance criteria both require it.
What changed
screen.js— v2 surface removedSECTIONS_SCHEMA_V2/SECTIONS_EVENT_V2, the v2 payload, and thedifficulty:sections-updatedevent. The only section-difficulty contract is nowdifficulty:sections-updated-v3(difficulty_ladder.sections.v3, Tier rail 1/4: define the render-neutral v3 sections event and its transition policy #156/Tier rail 2/4: render the standalone tier rail (event-driven, accessible) #157).GLASS_*constants,ensureHudCanvas,drawHud,_drawHudGlasses/_drawHudBadgeand all_hud*sizing/measurement helpers._computeSectionDifficulties,_sectionDifficultyData, and_maxPhraseDifficulty;_emitSectionDifficulties→_sectionsV3Payloadonly.showGlassesone-time forward-migration; onlyshowDifficultyGuideis read (still default on).resetPerSongStatekeeps the_railPhraseIdxresync the rail needs;getPlayerEl/isPlayerActiveretained.settings.html— reads onlyshowDifficultyGuide(guide !== false).Tests — dropped the v2-only cases, retargeted all event filters to
difficulty:sections-updated-v3, and rewrote the presentation test to pin the exact top-level + phrase key sets.node --test→ 419 pass / 0 fail.Docs — scrubbed glass terminology from
README.md,INTEGRATION.md,COMPLIANCE.md,PLAYER_CONTEXT.md,CLAUDE.mdandMIGRATION.md.plugin.json—0.40.3→0.41.0;CHANGELOG.mdrecords the breaking change (the only file permitted to nameglassSize).Verification
node --test→ 419/419 pass.git grepforglass(case-insensitive) returns onlyCHANGELOG.md, satisfying the issue's acceptance criterion.Breaking change
Any third-party consumer still reading
difficulty_ladder.sections.v2(fillPercentage/glassSize) must migrate to the v3 fields (sections[].top_tier/.current_tier/.has_chart_content). No in-repo consumer remains.Closes #159.
big-pickle(free) | 𝕏Summary by Sourcery
Retire the render-bound v2 section-difficulty API and legacy canvas overlay in favor of the v3 semantic contract.
Enhancements:
Build:
Documentation:
Tests: