VB-044: Overlay filters by scope, and claims on the overlay
Status: done (2026-11-25)
Priority: 3
Size: M
Arch: debt
Phase: implement
Design ref: Claims, ownership and territory (Overlay, Filters: Decided); Land and rights (Owner and user: the overlay shows both).
Goal: VB-004 tints tiles by owner, unfiltered. Let the player pick a scope (level and entities) and show only its tiles, with claims drawn apart from ownership, and, once slice 5 has tenancies, the owner apart from the user. Depends on VB-004, VB-042 and VB-043; if any is not done, mark this blocked.
Acceptance criteria (Kim, 2026-10-30: household and village levels first):
A filter control next to the overlay toggle: level (household or village; culture comes later), dimension (owns or works, from VB-311’s rights) and, optionally, one entity (the selected one, highlighted).
Owned tiles in scope are tinted; realised claims show as a solid edge, unrealised as a dashed edge (as VB-004 draws them now, kept).
Changing the filter recolours from cached data; nothing is recomputed from the simulation.
Smoke test: each filter level on and off with no console errors.
3 Nov 2026 (docs/slices.md, section 3.5; the slices Decided by Kim): moved to slice 5, arch debt (from claims). blocked until the slice’s plan (VB-184) confirms, rewrites or closes it.
11 Nov 2026 (VB-184, slice 5’s plan): confirmed, with a dimension “owns or works” for slice 5’s tenancies; VB-004 already draws claims as rings (solid realised, dashed unrealised), so the second criterion keeps them. Waits for VB-043 (and through it for Kim’s bodies decision).
Touches: page/land (landScope, landCode, claimShown, drawLandChunk, refreshLand, paintLandKey); src/body.html; src/head.html; tests/smoke.js; new tests/landscope.js
Notes (VB-044, 25 Nov 2026):
The filter sits at the head of the Land key, which shows beside the overlay button while the overlay is on; it is the page’s, never st.
Levels: everyone (VB-004’s drawing, the default), households (village land hidden), villages (a household’s tile drawn as its village’s).
Dimension: sim/scopes’ owns and works (fields, meadows, common fields). VB-311 is not done, so no tile shows an owner apart from
its worker yet: the control is there, the split waits for VB-311’s titles, read through inScope.
The selected entity (a pawn’s or farm’s household, a village, or the tile’s owner) is outlined in white; “Only the selected one” narrows to it.
Cached scope: inScope’s tiles and bodies (review F2), asked again on a change of filter, selection or bodies (all chunks stale) and,
at most twice a second, when land changed hands (F5). Claims are shown by claimant in scope; contested hatching kept.