fix(dashboard): names toggle, cohort key users, ego-network web

Edits the bundled internal/renderer/static/src/*.js modules and commits the regenerated app.src.js. No browser tooling was run; the coordinator does the in-browser pass.

#5 — Names toggle showed slugs, not display names

userDisplay (01-core.js) now prefers ident.name over ident.username, so Names mode shows "Abraham Lincoln" instead of the slug "abraham_lincoln" across every page (Profiles, Influence, Groups, movers). Privacy/escaping unchanged — userDisplayHtml still routes through escapeHtml.

#2 — Workshop "key users" counted against a global threshold

The biggest, lowest-influence cohort showed "0 key users" because the count used the instance-wide top-10% influence threshold. Key users are now the top influencers within the cohort: a per-cohort ~90th-percentile threshold (cohortKeyThreshold / cohortKeyCount in 05-groups.js) with a floor of at least 1 for any non-empty cohort. The member-flow marks and the "recommended first workshop" callout use the same cohort-relative count.

state.influenceThreshold stays available for genuinely global views. 02-health.js audit: its highInfluenceCount is the instance-wide funnel "Target" stage (counts all profiled users in the global top-10%, narrative reads "Prioritize the N high-influence users"). That is a legitimately instance-wide count, not a cohort — left unchanged.

#4 — Ego graph was a sparse star with hidden edge labels

(a) Densify: renderEgoUsers (07-influence.js) added inter-neighbor review/merge edges (both endpoints in the neighbor set) and shared-project edges (neighbors co-member of the same project, derived from the dense membership connections), de-duped to one edge per pair so the web stays readable. Focal node stays central/distinct; existing neighbor cap kept.

(b) Restore labels: reverses the hover-only hiding from aa885208. Focal-edge labels (relationship type + weight) are visible by default; the denser neighbor-web labels are still revealed on hover so the center never piles up. Legend hint updated. SVG label text uses d3 .text() (textContent, not an innerHTML sink); node names still route through userDisplay/userDisplayHtml.

Tests (fail-on-old confirmed)

  • TestRender_UserDisplayPrefersName (#5)
  • TestRender_WorkshopKeyUsersCohortRelative (#2)
  • TestRender_InfluenceEgoGraphDensified (#4a)
  • TestRender_InfluenceEdgeLabelsVisible (#4b — replaces the now-stale TestRender_InfluenceEdgeLabelsHoverGated)

Each was confirmed red against the pre-fix bundle by reverting the corresponding source locally, rebuilding, and seeing the matching test fail, then restoring.

make check (go vet + go test, no -race) is green locally across all packages.

🤖 Generated with Claude Code

Merge request reports

Loading