refactor(roles): canonical ROLE_IDS + /roles colors from ROLE_COLORS (#7 #8)#103
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fourth PR of the Phase 18 consolidation program.
#8 — single canonical ROLE_IDS
Role ids/order lived in two places (RolesPage local
ROLESarray andutils/role-shareROLE_IDS). The two orderings agreed (R01..R12), so this is a safe dedup. Canonical list now lives insrc/data/roles.js;role-shareimports and re-exports it so existing importers and therole-sharetest are unchanged.Share URLs unaffected: they derive the role from
computeRole(scores)and validate viaisRoleIdmembership; neither depends on list order. Therole-sharetest still assertsROLE_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 fromROLE_COLORS(mm-design); the soft header strip is acolor-mixtint 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 passednpm run build: green🤖 Generated with Claude Code