Skip to content

chore(theme editor): a status border is measured like the icon, so its own exemption and note go - #13185

Closed
josephfarina wants to merge 1 commit into
mainfrom
josephfarina/editor-status-border-like-icon
Closed

josephfarina wants to merge 1 commit into
mainfrom
josephfarina/editor-status-border-like-icon

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

User impact

None. The theme editor writes the same colors before and after this change.

The change

The editor derives a status role's border and icon with the same search: the nearest shade to the fill's that reads at 3:1 on the page. So a border that reads at no shade always comes with an icon that reads at no shade, and that role keeps the base theme's colors. The border had its own exemption from that rule, and the why doc named "a border under 3:1" as a give-up; neither could ever apply. This removes the exemption and the wording, and regenerates the CLI's copy of the palette engine.

Testing

  • node scripts/generate-cli-palette-engine.mjs --check
  • CI=1 pnpm vitest run --project node packages/cli/api/theme/palette/generate packages/cli/api/theme-edit/theme-stress.test.mjs packages/cli/api/theme-edit/theme-category-colors-follow-the-look.test.mjs packages/cli/api/theme-edit/theme-status*.test.mjs

preflight: pass c8364bc

…s own exemption and note go

The status border and icon take the same search (the fill's shade, the page grounds, 3:1), so a border that reads at no shade always comes with an icon that reads at no shade, and the role keeps the base theme's colors. The border's exemption from that rule and the 'border under 3:1' wording never applied.
@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 4:26am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 21, 2026
@astracat-bot

astracat-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 4:38 AM UTC

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · c8364bc

This branch's preview address cannot be known in advance; open it from Vercel's comment.

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet. The CI workflow for this head was cancelled before its build and test jobs ran; Lint and the CLI smoke test passed.

The status border and icon take the same shade search, so letting a border that reads at no shade send its role to the base theme's colors changes no output, and the why doc now lists only what the code can report. Nothing needs to change in the code; the next step is a green CI run on this head.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: the editor and Core's palette source measure a status border like its icon. Verified: packages/core/src/palette/derive-look.ts:826-831 and the generated copy at packages/cli/api/theme/palette/generate/derive-look.mjs:979-984.
  • Claim: a role whose border reads at no shade keeps the base theme's colors, as an icon already does. Verified: derive-look.ts:959-972.
  • Claim: every border and icon take the same search, so no theme output changes. Verified: derive-look.ts:959-964; the base and head engines return identical results on 4,000 generated inputs, and all seven published themes build identical CSS.
  • Claim: user impact is none; the editor writes the same colors. Verified by the same evidence.
  • Claim: the search is the nearest shade to the fill's that reads at 3:1 on the page. Verified: derive-look.ts:959-964, with the 3:1 floor at line 161.
  • Claim: the border's exemption and the "a border under 3:1" wording could never apply. Verified: the base's flag and doc wording, unreachable because of the shared search.
  • Claim: the CLI's copy of the palette engine is regenerated. Verified: node scripts/generate-cli-palette-engine.mjs --check passes.
  • Claim: the listed tests pass. Verified: 11 files, 159 tests.
  • File .changeset/editor-status-border-like-icon.md: clear.
  • File packages/core/src/palette/derive-look.ts: clear.
  • File packages/cli/api/theme/palette/generate/derive-look.mjs: clear.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 21, 2026
josephfarina added a commit that referenced this pull request Nov 21, 2026
- #12742 fix(cli): a padding of two to four lengths where only one works is written as its sides
  Author: @josephfarina
- #13185 chore(theme editor): a status border is measured like the icon, so its own exemption and note go
  Author: @josephfarina
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #13189.

@github-actions
github-actions Bot deleted the josephfarina/editor-status-border-like-icon branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — c8364bc4 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant