Skip to content

refactor(roles): canonical ROLE_IDS + /roles colors from ROLE_COLORS (#7 #8)#103

Merged
miquelmatoses merged 1 commit into
mainfrom
refactor/canonical-role-data
Jun 22, 2026
Merged

refactor(roles): canonical ROLE_IDS + /roles colors from ROLE_COLORS (#7 #8)#103
miquelmatoses merged 1 commit into
mainfrom
refactor/canonical-role-data

Conversation

@miquelmatoses

Copy link
Copy Markdown
Collaborator

Fourth PR of the Phase 18 consolidation program.

#8 — single canonical ROLE_IDS

Role ids/order lived in two places (RolesPage local ROLES array and utils/role-share ROLE_IDS). The two orderings agreed (R01..R12), so this is a safe dedup. Canonical list now lives in src/data/roles.js; role-share imports and re-exports it so existing importers and the role-share test are unchanged.

Share URLs unaffected: they derive the role from computeRole(scores) and validate via isRoleId membership; neither depends on list order. The role-share test still asserts ROLE_IDS[0]==='R01', [11]==='R12' and passes.

#7 — /roles colors from the canonical palette

RolesPage previously colored each role from a local Tailwind palette (text-emerald-600, bg-red-50, ...) that did not match the canonical role palette. Colors now come from ROLE_COLORS (mm-design); the soft header strip is a color-mix tint of that one color. This intentionally changes the visible /roles colors to the canonical palette. Layout, structure, and copy unchanged.

Gates

  • npm test -- --run: 248 passed
  • npm run build: green

🤖 Generated with Claude Code

…s from ROLE_COLORS

Audit items #7 and #8.

#8: role ids/order had two copies (RolesPage local ROLES array and
utils/role-share ROLE_IDS). The two orderings agreed (R01..R12), so this is a
safe dedup, not a behavior change. Established one canonical source in
src/data/roles.js; role-share imports and re-exports it (existing importers and
the role-share test keep working). Share URLs are unaffected: they derive the
role from computeRole(scores) and validate via isRoleId membership, neither of
which depends on list order.

#7: RolesPage previously colored each role from a local Tailwind palette
(text-emerald-600, bg-red-50, ...) that did not match the canonical role
palette. Colors now come from ROLE_COLORS (mm-design); the soft header strip is
a color-mix tint of that single canonical color. This intentionally changes the
visible /roles colors to the canonical palette. Layout, structure, and copy are
unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@miquelmatoses miquelmatoses merged commit 834c153 into main Jun 22, 2026
7 checks passed
@miquelmatoses miquelmatoses deleted the refactor/canonical-role-data branch June 22, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant