You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Colour the Live packet lines by scope (#dk, #dk-mj, #eu, no scope …) instead of by packet type or hash, with a small legend of the scopes currently visible. Fits the community's ongoing scope discussions and makes regional traffic visible.
Constraints
Check what scope data a Live packet actually carries (transmission scope_name, region scope resolution) before building (AGENTS.md rule 4). Unknown/unscoped gets its own neutral colour.
A stable colour per scope (hash → palette from CSS variables, so the theme/customizer controls it); the legend lists only scopes seen in the last N minutes, bounded.
A new colour mode next to the existing ones (packet type / colour by hash); deep-linkable (#/live?color=scope), remembered like the other toggles.
Perf: O(1) per packet, no extra API calls.
Phones: legend readable at 375×560.
Plan first (M0, no code)
Data availability, palette and legend design, interaction with existing colour modes, tests.
Scope: design plan for "Live: colour packet lines by scope". Read-only; everything below comes from origin/master (fetched at the start of this session, via git show). No code written, no commits, no network access to external sources. Line numbers refer to origin/master today and will drift.
Legend: VERIFIED = read in the code at origin/master. ASSUMED = not verified, or an inference.
1. Conclusion and recommendation
The feature is feasible without any backend or API change. The Live WebSocket packet already carries scope_name and route_type, and the Live page already has one hook where line, dot and feed colours are decided.
Recommended shape (smallest that does not change existing behaviour):
A new, independent "Color by scope" checkbox next to "Color by hash". When on, it takes precedence over hash colouring. It does not overwrite the saved hash preference. Foreign-origin red still wins.
Palette as CSS variables with light and dark values, so the theme controls it.
A small "SCOPES (last 15 min)" section in the existing legend, shown only in scope mode, capped at 12 rows plus "+N more".
Deep link #/live?color=scope, remembered in localStorage like the other toggles.
One milestone (M1). The customizer exposure is M2 (rule 8).
One caveat the owner should know up front: scope is only known for packets whose route type is TRANSPORT_FLOOD (0) or TRANSPORT_DIRECT (3), and only named if the name is in the configured/approved region list. Plain FLOOD (1) and DIRECT (2) packets have no scope and will be neutral. The unscoped share of real traffic was not measured (see §2.5).
2. Findings — data availability (VERIFIED unless stated)
matchScope (cmd/ingestor/main.go ~1785): one HMAC-SHA256 per configured region (inline hashRegions, hashRegionsPath, plus admin-approved overlay). Returns the name only when exactly one region matches Code1; zero matches or a 16-bit collision (2+ matches) returns "".
scopeNameForDB (db.go ~2128) stores three states in transmissions.scope_name:
NULL: not transport-scoped;
'': transport-scoped but region unknown or ambiguous;
'#name': resolved region.
The HMAC input includes the payload type byte, so resolution works for every payload type. What decides presence is the route type / transport codes, not the payload type.
2.2 What reaches the Live page
Live WS "packet" broadcasts are built in cmd/server/store.go (broadcastMap["packet"] = pkt, ~3836 and ~4139). The pkt maps contain "scope_name": strOrNil(tx.ScopeName) (~3797, ~4116) plus route_type, payload_type, hash, observer_id, path_json, decoded_json.
VCR/replay rows come from /api/packets and also contain scope_name (cmd/server/db.go ~500 and ~964).
Lossy detail:strOrNil maps "" to JSON null. So on the wire, "unscoped" and "scoped but unknown name" are both scope_name: null. They are distinguishable only through route_type. The frontend already encodes this rule: isUnscopedFlood(rt) is rt === 1, and scopeCellHtml/transportBadge in public/app.js (~140–215) treat isTransportRoute(rt) as the gate.
public/live.js does not read scope_name today (grep: no hits). renderPacketTree(packets, isReplay) (~3794) receives a group of observations of one transmission; packets[0] is the representative, and scope_name is a transmission attribute, so any observation gives the same value.
2.3 Resulting classification (3 states plus one bucket)
route_type
scope_name
Class
0 or 3
non-empty
named scope (e.g. #dk)
0 or 3
null/""
"unknown scope" (the T? badge case)
1 (FLOOD)
null
"no scope"
2 (DIRECT) / missing
null
"no scope" (treated the same; not flood-scope)
2.4 Limits on names
Only names present in the server-side region list (or approved overlay) can ever resolve. A scope used on the mesh but not configured shows as "unknown". Names like #dk-mj from the issue only appear if configured. The owner should confirm the configured list covers the scopes they care about.
Names are node/config-controlled strings → treat as untrusted in the DOM (use textContent; the XSS preflight gate flags innerHTML with these).
nodes.default_scope / configured_scope exist, but they describe a node, not the packet. Using them to colour unscoped packets would mislabel traffic. Rejected.
2.5 Fraction of unscoped traffic — NOT VERIFIED
I did not sample real traffic. By construction it is "every packet that is not route 0/3 with matched code", and the existing "no scope" recommendation (#480) suggests unscoped floods are common. ASSUMED: unscoped is the majority. Consequence for the design: the neutral colour will dominate the map, which is fine and arguably the point, but it must not look like "broken/empty". Suggest the owner check the scope-stats analytics (routes.go ~4715) for the real ratio before choosing opacity for neutral lines.
3. Colour model
Palette: 12 CSS variables --scope-1 … --scope-12 defined on :root, with dark overrides under the same theme selectors the stylesheet already uses. Use a colour-blind-safe qualitative set (ASSUMED: an Okabe-Ito-style base, extended; Okabe & Ito 2008 is a public, freely usable palette, not fetched here, so licence not verified). Light and dark variants need contrast ≥ 3:1 against the map tiles and the canvas background; verify visually.
Neutrals:--scope-none (no scope) and --scope-unknown (route 0/3, name unknown) as two different greys, so "scoped but unresolved" is not confused with "unscoped". They must also differ from the ghost-hop grey (#94a3b8, dashed, opacity 0.3) — ghost lines are dashed and faint, so they remain distinguishable; check in M1.
Name → colour: FNV-1a 32-bit of the scope name, modulo 12 → preferred slot. Stable across sessions and users, independent of arrival order.
Collisions: with ~4 active scopes in 12 slots a collision is likely (~40%), so pure hashing is not enough. Decision: a session-sticky Map<name, slot>; on collision, linear-probe to the next slot not used by a scope currently in the legend window. Cap the map at 64 entries (LRU). Beyond 12 simultaneous active scopes the extra ones share --scope-other and the legend shows "+N other". Trade-off: a colour for a scope can differ between two users if they saw scopes in a different order and collided; the legend with named swatches is what makes this safe to read. Alternative (rejected): pure hash with no probing (simpler, but two visible scopes can share a colour with no signal).
Theme change: lines are drawn on a canvas and need concrete colour strings. Resolve the 14 variables once with getComputedStyle into a cached array and invalidate on theme change. ASSUMED: the existing theme-change signal can be reused (live.js reads document.documentElement.dataset.theme per packet via _liveTheme()); M1 must confirm which event customize.js fires, and fall back to re-resolving when _liveTheme() changes.
Customizer:THEME_CSS_MAP/THEME_COLOR_KEYS (customize.js ~116, ~145) and every preset need light+dark values per key, so exposing 14 colours is a real piece of work. M1 ships CSS defaults only; M2 adds a "Scope colours" group (rule 8).
Hierarchical hues (#dk and #dk-mj in one colour family) are attractive but YAGNI; listed as an open question.
4. UI
Toggle: a new <label><input type="checkbox" id="liveColorScopeToggle"> Color by scope</label> right after liveColorHashToggle in the .live-toggles block (~1571), wired through the existing TOGGLES array (~1317) with its restore/onChange contract. Persist in meshcore-color-packets-by-scope (same key style as hash). Effective mode = scope ? 'scope' : hash ? 'hash' : 'type'. While scope is on, the hash checkbox gets disabled plus an aria-describedby note so the precedence is explicit; the saved hash preference is untouched, so switching scope off restores the previous behaviour. Alternative (rejected for M1): turn both into a 3-way select. It is cleaner but changes the DOM id liveColorHashToggle that existing tests and users' saved state rely on.
Precedence for a path: foreign-origin red (existing forceColor) > scope > hash > packet type. Matrix mode (drawMatrixLine) ignores colour modes today and keeps doing so.
Deep link:#/live?color=scope, following the ?heard= precedent (wireHeardFilter, ~1390): a valid param wins over the stored value and is saved; toggling rewrites the param with the existing setLiveHashParam (replaceState, no router re-init). Accepted values: scope (also hash, type for symmetry — type = both off). Unknown values ignored.
Where colour is applied: in renderPacketTree compute the scope colour once per transmission and pass it down the same route the foreign colour takes (animatePath(... color, ..., forceColor) → drawAnimatedLine(..., color)); the feed item gets the same 4 px border-left stripe that hash mode uses (~4869, ~4957). The packet-type colour for the icon/label text stays.
Phone 375×560: the legend is already hidden/collapsible (live-legend-hidden, ~2623) and height-capped via --live-legend-* vars. With ≤12 rows of ~20 px the section fits inside the scrollable body; names use overflow-wrap:anywhere. Do not auto-open a collapsed legend on mode switch (open question). The new checkbox sits in the existing toggles block, so it inherits the existing touch-target sizing; verify ≥44 px hit area by real tap.
5. Performance
Per packet: one Map.get on the scope name (FNV hash only the first time a name is seen) plus one Map.set for lastSeen. O(1), no API calls, no DOM work except legend re-render.
Legend state: Map<name,{lastTs,slot}>, hard cap 64 entries; prune entries older than 15 min on a single 30 s timer (cleared in destroy()); render at most the 12 most recent plus a "+N more" row. Re-render coalesced to ≤1/s with requestAnimationFrame/timeout, and only when the visible key set or order changed. Registry updates happen in all modes so the legend is populated the moment the mode is turned on; skip updates for isReplay packets (VCR), whose timestamps are not "now".
Mode switch: lines already drawn are unchanged. drawAnimatedLine copies lineColor/contrailColor into the animation object at creation (~4784), registerClickablePath stores the colour at completion, and feed stripes are set at item creation. Same behaviour as toggling "Color by hash" today. Only new packets use the new mode. No retroactive recolouring (it would need per-line bookkeeping for little value).
This touches a hot path (packet rendering), so the PR needs the perf justification above plus a benchmark-style assertion (e.g. 30 000 scopeColorFor() calls over 50 names < 50 ms).
6. Licence and terms
No external data, services or third-party code were used; nothing fetched. The only outside reference is the colour-blind-safe palette idea (Okabe & Ito); ASSUMED freely usable, not checked against a source URL. M1 should define its own hex values rather than copy a library.
7. Open questions for the owner (with the default I would take)
Two checkboxes with scope taking precedence (recommended, no behaviour change) vs a 3-way select (cleaner, breaks existing ids)?
Legend window 15 min and 12 rows OK? (Hardcoded in M1, customizer later.)
Should DIRECT (2) packets be "no scope" like FLOOD, or a third "n/a" neutral? Recommended: same neutral, to keep it simple.
Should "unknown scope" (T?) be a visibly different grey from "no scope"? Recommended: yes.
Hierarchical colour families for #dk / #dk-mj? Recommended: no (YAGNI).
Auto-open a collapsed legend when scope mode is switched on (phone)? Recommended: no.
What is the real unscoped share? Please check the scope-stats analytics before final styling of the neutral line.
Do you want color=hash|type accepted in the deep link as well, or only color=scope? Recommended: all three.
8. Proposed M1 plan (one commit, after owner sign-off)
Step 0 (rule 4): capture one real WS packet and one /api/packets row from a running instance and confirm scope_name/route_type shapes (I read the server code but did not run a server).
Changes
New public/live-scope-color.js (IIFE, window.LiveScopeColor, pure, DI like live-heard-filter.js): classify(routeType, scopeName), slotFor(name), ScopeRegistry (touch / prune / visible list, caps), resolveInitialMode(hashParam, stored). Script tag with __BUST__ in index.html.
live.js: new toggle + TOGGLES entry, ?color= handling via setLiveHashParam, colour computed in renderPacketTree, passed to animatePath/drawAnimatedLine/feed stripe, legend section + timer (cleared in destroy()).
CSS: --scope-* variables (light + dark) in the stylesheet, legend styles in live.css, no hardcoded hex outside :root.
Tests
Unit test-live-scope-color.js: classification table (§2.3, including "" vs null and route 0/1/2/3); stable slot across call order; collision probing; overflow to "other"; registry cap, expiry and ordering; resolveInitialMode precedence; perf assertion (30 000 lookups < 50 ms).
E2E (Playwright, stubbed WS, pattern of test-live-heard-filter-e2e.js): #/live?color=scope selects the mode, three scoped packets + one unscoped + one unknown produce legend rows with distinct swatches, neutral rows labelled; toggle persists across reload; deep link is rewritten on toggle; foreign-origin still red; a mode switch leaves existing lines untouched.
Phone 375×560: real tap (page.tap) on the checkbox and on the legend toggle, assert legend inside the viewport, no horizontal page scroll, rows reachable by scroll.
Both themes: screenshot light and dark, check swatch contrast.
Run scripts/check-xss-sinks.sh --diff, and the existing live tests (test-live*.js) unchanged.
Browser validation: local instance, screenshot at desktop and 375×560 in light and dark; say so explicitly if it cannot be done.
Customizer implication (rule 8): M1 hardcodes palette defaults (CSS vars), N=15 min, 12 rows, cap 64. M2 exposes palette and legend window in the customizer (needs THEME_CSS_MAP keys + preset values), and optionally per-scope counts in the legend.
Risks: neutral dominating the map (§2.5); colour collisions across users (§3); legend scroll-rail re-measure (§4); theme-change signal (§3).
Owner decision (2026-11-18): the M0 plan is approved as recommended, with one addition for M1.
A "Show only scoped packets" toggle. When it is on, Live draws only packets with a scope (route type 0/3), and skips the neutral "no scope" lines.
It is independent of the colour mode, but it is offered next to "Colour by scope".
It is deep-linkable (for example #/live?color=scope&scoped=1) and remembered like the other toggles.
Decide whether "unknown scope" packets count as scoped. Recommended: yes, because they carry a scope and only the name is unknown. Show them in the --scope-unknown grey.
It costs O(1) per packet, with no extra API calls.
Context for the design: on a staging copy over 24 h, about 17 % of packets were scoped, 83 % unscoped and fewer than 1 % had an unknown scope. Of the scoped packets, #dk was 76 %. Among channel messages alone, 73 % were scoped.
Still open: M2, which exposes the scope palette and the legend window in the customizer (THEME_CSS_MAP keys plus preset values for light and dark), per AGENTS.md rule 8. Today the palette is CSS defaults only.
Activity
dborup commentedon Nov 17, 2026
Research (M0) — CS-VM1 #882
Scope: design plan for "Live: colour packet lines by scope". Read-only; everything below comes from
origin/master(fetched at the start of this session, viagit show). No code written, no commits, no network access to external sources. Line numbers refer toorigin/mastertoday and will drift.Legend: VERIFIED = read in the code at
origin/master. ASSUMED = not verified, or an inference.1. Conclusion and recommendation
The feature is feasible without any backend or API change. The Live WebSocket packet already carries
scope_nameandroute_type, and the Live page already has one hook where line, dot and feed colours are decided.Recommended shape (smallest that does not change existing behaviour):
public/live-scope-color.js(name → palette slot, bounded recent-scope registry, mode resolution).#/live?color=scope, remembered inlocalStoragelike the other toggles.One caveat the owner should know up front: scope is only known for packets whose route type is TRANSPORT_FLOOD (0) or TRANSPORT_DIRECT (3), and only named if the name is in the configured/approved region list. Plain FLOOD (1) and DIRECT (2) packets have no scope and will be neutral. The unscoped share of real traffic was not measured (see §2.5).
2. Findings — data availability (VERIFIED unless stated)
2.1 Where scope is set (ingestor)
cmd/ingestor/db.go~2822:if decoded.TransportCodes != nil && decoded.TransportCodes.Code1 != "0000" { pd.IsTransportScoped = true; pd.ScopeName = matchScope(regionKeys, payloadType, payloadRaw, Code1) }.matchScope(cmd/ingestor/main.go~1785): one HMAC-SHA256 per configured region (inlinehashRegions,hashRegionsPath, plus admin-approved overlay). Returns the name only when exactly one region matches Code1; zero matches or a 16-bit collision (2+ matches) returns"".scopeNameForDB(db.go~2128) stores three states intransmissions.scope_name:NULL: not transport-scoped;'': transport-scoped but region unknown or ambiguous;'#name': resolved region.2.2 What reaches the Live page
cmd/server/store.go(broadcastMap["packet"] = pkt, ~3836 and ~4139). Thepktmaps contain"scope_name": strOrNil(tx.ScopeName)(~3797, ~4116) plusroute_type,payload_type,hash,observer_id,path_json,decoded_json./api/packetsand also containscope_name(cmd/server/db.go~500 and ~964).strOrNilmaps""to JSONnull. So on the wire, "unscoped" and "scoped but unknown name" are bothscope_name: null. They are distinguishable only throughroute_type. The frontend already encodes this rule:isUnscopedFlood(rt)isrt === 1, andscopeCellHtml/transportBadgeinpublic/app.js(~140–215) treatisTransportRoute(rt)as the gate.public/live.jsdoes not readscope_nametoday (grep: no hits).renderPacketTree(packets, isReplay)(~3794) receives a group of observations of one transmission;packets[0]is the representative, andscope_nameis a transmission attribute, so any observation gives the same value.2.3 Resulting classification (3 states plus one bucket)
#dk)T?badge case)2.4 Limits on names
#dk-mjfrom the issue only appear if configured. The owner should confirm the configured list covers the scopes they care about.textContent; the XSS preflight gate flagsinnerHTMLwith these).nodes.default_scope/configured_scopeexist, but they describe a node, not the packet. Using them to colour unscoped packets would mislabel traffic. Rejected.2.5 Fraction of unscoped traffic — NOT VERIFIED
I did not sample real traffic. By construction it is "every packet that is not route 0/3 with matched code", and the existing "no scope" recommendation (#480) suggests unscoped floods are common. ASSUMED: unscoped is the majority. Consequence for the design: the neutral colour will dominate the map, which is fine and arguably the point, but it must not look like "broken/empty". Suggest the owner check the scope-stats analytics (
routes.go~4715) for the real ratio before choosing opacity for neutral lines.3. Colour model
--scope-1 … --scope-12defined on:root, with dark overrides under the same theme selectors the stylesheet already uses. Use a colour-blind-safe qualitative set (ASSUMED: an Okabe-Ito-style base, extended; Okabe & Ito 2008 is a public, freely usable palette, not fetched here, so licence not verified). Light and dark variants need contrast ≥ 3:1 against the map tiles and the canvas background; verify visually.--scope-none(no scope) and--scope-unknown(route 0/3, name unknown) as two different greys, so "scoped but unresolved" is not confused with "unscoped". They must also differ from the ghost-hop grey (#94a3b8, dashed, opacity 0.3) — ghost lines are dashed and faint, so they remain distinguishable; check in M1.Map<name, slot>; on collision, linear-probe to the next slot not used by a scope currently in the legend window. Cap the map at 64 entries (LRU). Beyond 12 simultaneous active scopes the extra ones share--scope-otherand the legend shows "+N other". Trade-off: a colour for a scope can differ between two users if they saw scopes in a different order and collided; the legend with named swatches is what makes this safe to read. Alternative (rejected): pure hash with no probing (simpler, but two visible scopes can share a colour with no signal).getComputedStyleinto a cached array and invalidate on theme change. ASSUMED: the existing theme-change signal can be reused (live.js readsdocument.documentElement.dataset.themeper packet via_liveTheme()); M1 must confirm which event customize.js fires, and fall back to re-resolving when_liveTheme()changes.THEME_CSS_MAP/THEME_COLOR_KEYS(customize.js ~116, ~145) and every preset need light+dark values per key, so exposing 14 colours is a real piece of work. M1 ships CSS defaults only; M2 adds a "Scope colours" group (rule 8).#dkand#dk-mjin one colour family) are attractive but YAGNI; listed as an open question.4. UI
<label><input type="checkbox" id="liveColorScopeToggle"> Color by scope</label>right afterliveColorHashTogglein the.live-togglesblock (~1571), wired through the existingTOGGLESarray (~1317) with itsrestore/onChangecontract. Persist inmeshcore-color-packets-by-scope(same key style as hash). Effective mode =scope ? 'scope' : hash ? 'hash' : 'type'. While scope is on, the hash checkbox getsdisabledplus anaria-describedbynote so the precedence is explicit; the saved hash preference is untouched, so switching scope off restores the previous behaviour. Alternative (rejected for M1): turn both into a 3-way select. It is cleaner but changes the DOM idliveColorHashTogglethat existing tests and users' saved state rely on.forceColor) > scope > hash > packet type. Matrix mode (drawMatrixLine) ignores colour modes today and keeps doing so.#/live?color=scope, following the?heard=precedent (wireHeardFilter, ~1390): a valid param wins over the stored value and is saved; toggling rewrites the param with the existingsetLiveHashParam(replaceState, no router re-init). Accepted values:scope(alsohash,typefor symmetry —type= both off). Unknown values ignored.renderPacketTreecompute the scope colour once per transmission and pass it down the same route the foreign colour takes (animatePath(... color, ..., forceColor)→drawAnimatedLine(..., color)); the feed item gets the same 4 pxborder-leftstripe that hash mode uses (~4869, ~4957). The packet-type colour for the icon/label text stays.<h3 class="legend-title">SCOPES (last 15 min)</h3>+<ul class="legend-list" id="scopeLegendList">inside the existing.legend-body, placed first,hiddenunless scope mode is on. Rows are built withcreateElement+textContent(XSS gate): swatch + name; neutrals are labelled "No scope" and "Unknown scope (T?)" so the meaning never rests on colour alone. The panel keeps its corner/hide/drag behaviour; its body stays click-through (Live: the legend toggle is hidden under the open legend, and the legend has no close button #875), so the section needs no pointer handlers. The scroll rail (initLegendScrollRail, ~474) must re-measure after the section changes; M1 to confirm whether a call to it is enough (not verified how it reacts to content changes).live-legend-hidden, ~2623) and height-capped via--live-legend-*vars. With ≤12 rows of ~20 px the section fits inside the scrollable body; names useoverflow-wrap:anywhere. Do not auto-open a collapsed legend on mode switch (open question). The new checkbox sits in the existing toggles block, so it inherits the existing touch-target sizing; verify ≥44 px hit area by real tap.5. Performance
Map.geton the scope name (FNV hash only the first time a name is seen) plus oneMap.setforlastSeen. O(1), no API calls, no DOM work except legend re-render.Map<name,{lastTs,slot}>, hard cap 64 entries; prune entries older than 15 min on a single 30 s timer (cleared indestroy()); render at most the 12 most recent plus a "+N more" row. Re-render coalesced to ≤1/s withrequestAnimationFrame/timeout, and only when the visible key set or order changed. Registry updates happen in all modes so the legend is populated the moment the mode is turned on; skip updates forisReplaypackets (VCR), whose timestamps are not "now".drawAnimatedLinecopieslineColor/contrailColorinto the animation object at creation (~4784),registerClickablePathstores the colour at completion, and feed stripes are set at item creation. Same behaviour as toggling "Color by hash" today. Only new packets use the new mode. No retroactive recolouring (it would need per-line bookkeeping for little value).scopeColorFor()calls over 50 names < 50 ms).6. Licence and terms
No external data, services or third-party code were used; nothing fetched. The only outside reference is the colour-blind-safe palette idea (Okabe & Ito); ASSUMED freely usable, not checked against a source URL. M1 should define its own hex values rather than copy a library.
7. Open questions for the owner (with the default I would take)
#dk/#dk-mj? Recommended: no (YAGNI).color=hash|typeaccepted in the deep link as well, or onlycolor=scope? Recommended: all three.8. Proposed M1 plan (one commit, after owner sign-off)
Step 0 (rule 4): capture one real WS packet and one
/api/packetsrow from a running instance and confirmscope_name/route_typeshapes (I read the server code but did not run a server).Changes
public/live-scope-color.js(IIFE,window.LiveScopeColor, pure, DI likelive-heard-filter.js):classify(routeType, scopeName),slotFor(name),ScopeRegistry(touch / prune / visible list, caps),resolveInitialMode(hashParam, stored). Script tag with__BUST__inindex.html.live.js: new toggle +TOGGLESentry,?color=handling viasetLiveHashParam, colour computed inrenderPacketTree, passed toanimatePath/drawAnimatedLine/feed stripe, legend section + timer (cleared indestroy()).--scope-*variables (light + dark) in the stylesheet, legend styles inlive.css, no hardcoded hex outside:root.Tests
test-live-scope-color.js: classification table (§2.3, including""vs null and route 0/1/2/3); stable slot across call order; collision probing; overflow to "other"; registry cap, expiry and ordering;resolveInitialModeprecedence; perf assertion (30 000 lookups < 50 ms).test-live-heard-filter-e2e.js):#/live?color=scopeselects the mode, three scoped packets + one unscoped + one unknown produce legend rows with distinct swatches, neutral rows labelled; toggle persists across reload; deep link is rewritten on toggle; foreign-origin still red; a mode switch leaves existing lines untouched.page.tap) on the checkbox and on the legend toggle, assert legend inside the viewport, no horizontal page scroll, rows reachable by scroll.scripts/check-xss-sinks.sh --diff, and the existing live tests (test-live*.js) unchanged.Browser validation: local instance, screenshot at desktop and 375×560 in light and dark; say so explicitly if it cannot be done.
Customizer implication (rule 8): M1 hardcodes palette defaults (CSS vars), N=15 min, 12 rows, cap 64. M2 exposes palette and legend window in the customizer (needs THEME_CSS_MAP keys + preset values), and optionally per-scope counts in the legend.
Risks: neutral dominating the map (§2.5); colour collisions across users (§3); legend scroll-rail re-measure (§4); theme-change signal (§3).
dborup commentedon Nov 18, 2026
Owner decision (2026-11-18): the M0 plan is approved as recommended, with one addition for M1.
A "Show only scoped packets" toggle. When it is on, Live draws only packets with a scope (route type 0/3), and skips the neutral "no scope" lines.
#/live?color=scope&scoped=1) and remembered like the other toggles.--scope-unknowngrey.Context for the design: on a staging copy over 24 h, about 17 % of packets were scoped, 83 % unscoped and fewer than 1 % had an unknown scope. Of the scoped packets,
#dkwas 76 %. Among channel messages alone, 73 % were scoped.M1 starts now.
fix(live): append the scope toggles after every existing control (#882)
ci: re-trigger CI (no run was created for f79d4e9)
Merge pull request #919 from dborup/feat/882-live-colour-by-scope
dborup commentedon Nov 27, 2026
Status after v0.2.10:
Leaving this open for M2.
🤖 Generated with Claude Code
reviewfix(live): dark-mode and case tests, achromat neutrals, one pal…
Merge pull request #999 from dborup/feat/882-m2-scope-palette-customizer
dborup commentedon Nov 28, 2026
Fixed by #999 (M2: scope palette and legend window in the customizer). M1 shipped in #919. All milestones are done.