diff --git a/docs/reference/file-map.md b/docs/reference/file-map.md index 9de4147..e157e8b 100644 --- a/docs/reference/file-map.md +++ b/docs/reference/file-map.md @@ -278,6 +278,7 @@ Wave 7 adds these: python tests/frame_check.py # B7/T7.1/D1 - is the iframe actually gone? 39 checks python tests/form_structure_check.py # F6/D3 - rail, disclosure, one open section 51 checks python tests/hold_check.py # CR-015/A1/D4 - the hold clears, gates hold 50 checks +python tests/warning_check.py # A2 - one warning, a badge from anywhere 17 checks ``` **Three probes were re-pointed at `T7.1`.** `sections_check.py` 5b drove the live diff --git a/html/wp-creation-app.js b/html/wp-creation-app.js index 78e7ca8..f95aec9 100644 --- a/html/wp-creation-app.js +++ b/html/wp-creation-app.js @@ -1006,8 +1006,11 @@ function updateReleaseBanner(){ txt+=` `; } } - b.innerHTML=`
${txt}
`; - updateStickyStatus(); + // A live region announces every rewrite, and this runs on saves and loads + // that change nothing - only touch the DOM when the message actually moved. + const html=`
${txt}
`; + if(b._rbLast!==html){ b._rbLast=html; b.innerHTML=html; } + updateConstraintBadge(); } // Releasing with an unclosed predecessor is allowed but must be explained. The // reason rides on the package (data.gateOverride) and the server writes it to the @@ -1489,7 +1492,7 @@ function setFormChrome(on){ if(save) save.style.display = on ? 'flex' : 'none'; document.body.classList.toggle('has-sticky-save', !!on); document.body.classList.toggle('has-sec-rail', !!on); - if(on){ initSectionNavAutoHide(); buildSectionRail(); updateStickyStatus(); } + if(on){ initSectionNavAutoHide(); buildSectionRail(); updateConstraintBadge(); } else positionSectionNav(); } // ── SECTION STRUCTURE (F6 / D3) ─────────────────────────────────────────────── @@ -1653,6 +1656,7 @@ function buildSectionRail(){ const want = (typeof WPUrl !== 'undefined' && WPUrl.get && WPUrl.get('section')) || ''; const target = cards.some(c => c.id === want) ? want : (cards[0] && cards[0].id) || ''; secApplyOpenState(target); + updateConstraintBadge(); secBindSpy(); } @@ -1766,13 +1770,24 @@ function initSectionNavAutoHide(){ try { setExpandAll(localStorage.getItem(SEC_EXPAND_KEY) === '1'); } catch(e){} } -function updateStickyStatus(){ - const el=document.getElementById('sticky-status'); if(!el) return; - const r=readiness(); const st=getRadio('status'); - if(st==='Issue'){ el.className='sticky-status ss-hold'; el.textContent=`⛔ On hold — ${r.open} constraint${r.open===1?'':'s'} reopened`; } - else if(r.ready){ el.className='sticky-status ss-ready'; el.textContent=`✓ Release-ready — all ${r.total} constraints cleared`; } - else if(r.constraintsClear){ el.className='sticky-status ss-notready'; el.textContent=`⚠ Waiting on ${r.blocking.length} predecessor${r.blocking.length===1?'':'s'}`; } - else { el.className='sticky-status ss-notready'; el.textContent=`⚠ ${r.open} of ${r.total} constraint${r.open===1?'':'s'} open`+(r.blocking.length?` · ${r.blocking.length} predecessor${r.blocking.length===1?'':'s'}`:''); } +// A2: the count badge on the Constraints rail entry. The rail is sticky at every +// width, so this is the thing a user can see from ANY section - the top banner +// is the warning, this is the pointer to it. It replaced updateStickyStatus(), +// which wrote the same warning a second time into the sticky save bar - and +// destroyed the B5 autosave indicator mounted in the same span every time it did. +function updateConstraintBadge(){ + const btn=document.querySelector('.sec-rail-item[data-sec="constraint-card"]'); + if(!btn) return; + let badge=btn.querySelector('.sec-badge'); + if(!badge){ + badge=document.createElement('span'); + badge.className='sec-badge'; + btn.appendChild(badge); + } + const open=readiness().open; + badge.hidden = open===0; + badge.textContent = open || ''; + btn.setAttribute('aria-label', 'Constraints'+(open?` — ${open} open`:'')); } // ── LOCATION (CR-004 / T6.3) ───────────────────────────────────────────────── diff --git a/html/wp-creation-index.html b/html/wp-creation-index.html index a4d41c1..29e5452 100644 --- a/html/wp-creation-index.html +++ b/html/wp-creation-index.html @@ -96,8 +96,12 @@
- -
+ +
+