ข้ามสารบัญไปยังเนื้อหา
อัปเดต 2026-09-07
ScopeBanner (the UI surface)
one channel, four tiers
One severity-styled ScopeBanner component renders every scope note the backend returns — refuse as a hard error, blocking as a red banner that also disables the datasheet button, warn as orange, info as blue — replacing what used to be several scattered, inconsistent honesty signals across different endpoints.
เมื่อไรจึงใช้
- You're building a new UI surface (a new panel, a new result view) that needs to show solver honesty notes and want the one correct pattern to reuse.
- A blocking note fired but you don't see a banner on screen — that's a wiring bug, not a solver bug.
- You want to confirm end-to-end that a backend note actually reaches the screen, not just the API response.
คำนวณอย่างไร
Consumes a single structured scope[] array plus a has_blocking boolean from the API response and maps severity to banner colour/behaviour in one place, so every new endpoint that returns scope notes gets consistent UI for free instead of a bespoke render.
ข้อควรระวัง
noteEarly implementations gated the banner on which element was SELECTED, so a no-selection view showed 'Blocked — see notice above' with no notice actually rendered anywhere — this exact bug recurred more than once and is the standing regression to test for.
noteA banner keyed off an engine-name field will silently not render for engines that leave that field null (a real bug found and fixed on the marching path) — key off the presence of scope notes, not an engine-name side channel.
ที่เกี่ยวข้อง