Fix #539: greens-only avatar figures #540

Merged
crueber merged 1 commit from fix/issue-539 into main 2026-09-14 21:29:54 +00:00
Owner

Follow-up to #525. The rings figure color fell through to the style's built-in 16-color rainbow (coral→blue→purple→pink), mixing app emerald (background) with indigo-family figures.

Change (3 files):

  • internal/identity/avatar.go: new userAvatarRingColors (Tailwind emerald-300→950 + black, bare hex) passed as the ringColor core-library option alongside seed/backgroundColor. Verified against vendored sources: option key is Color (internal/render/options.go), user list overrides the style collection (internal/render/resolver.go r.options.color(name)), JSON round-trip normalizes []string (render.go). Background stays emerald-600.
  • internal/identity/avatar_test.go: new TestGenerateGreensOnlyFigures — strong pin asserting NONE of the 16 style defaults appears across 8 ordinary+hostile seeds, and every fill is a palette member. Verified non-vacuous: old-code output contains a rainbow color.
  • docs/features/01_identity_permissions.md: Decisions entry (palette list, tone-on-tone note, no migration).

Seed contract + sanitize gate unchanged; existing holders keep avatars (no migration); no new deps (same dicebear modules).

Tests: go test ./internal/identity/ -race full package PASS; targeted avatar tests PASS; coverage 95.6% (≥95% gate); gofmt/vet clean.

Follow-up to #525. The rings figure color fell through to the style's built-in 16-color rainbow (coral→blue→purple→pink), mixing app emerald (background) with indigo-family figures. Change (3 files): - internal/identity/avatar.go: new userAvatarRingColors (Tailwind emerald-300→950 + black, bare hex) passed as the ringColor core-library option alongside seed/backgroundColor. Verified against vendored sources: option key is <colorName>Color (internal/render/options.go), user list overrides the style collection (internal/render/resolver.go r.options.color(name)), JSON round-trip normalizes []string (render.go). Background stays emerald-600. - internal/identity/avatar_test.go: new TestGenerateGreensOnlyFigures — strong pin asserting NONE of the 16 style defaults appears across 8 ordinary+hostile seeds, and every fill is a palette member. Verified non-vacuous: old-code output contains a rainbow color. - docs/features/01_identity_permissions.md: Decisions entry (palette list, tone-on-tone note, no migration). Seed contract + sanitize gate unchanged; existing holders keep avatars (no migration); no new deps (same dicebear modules). Tests: go test ./internal/identity/ -race full package PASS; targeted avatar tests PASS; coverage 95.6% (≥95% gate); gofmt/vet clean.
Pass userAvatarRingColors (emerald-300→950 + black) as the ringColor
core-library option so rings figures come from the app palette, not
the style's 16-color rainbow. TestGenerateGreensOnlyFigures pins none
of the 16 defaults across seeds. Seed contract + sanitize gate
unchanged; no migration; no new deps.
Sign in to join this conversation.
No description provided.