Repository navigation
fix(web): make destructive actions and errors red instead of pink - #60
Merged
kalaspuff merged 2 commits intoOct 18, 2026
Merged
Conversation
Danger zones, delete buttons, error banners and failed states used the `danger` token, which was the brand's hot pink. @hyperstructure/design makes it red (hyperstructure/design, fctl/27 branch, b6905c1), and the web app moves to that commit until it is released. AGENTS.md and docs/development.md say that red is only for danger. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kalaspuff
pushed a commit
to hyperstructure/design
that referenced
this pull request
Oct 18, 2026
`danger` (destructive actions, errors, failures) was the brand's hot pink `#ff00d8`, the same color as `pink` and `violet`, so a danger zone looked like any other accent: in fctl's Settings, "Danger zone" and "Delete account…" read as purple. It is now red. | Token | Dark | Light | |---|---|---| | `--c-danger` | `#ff00d8` → `#ff4d4d` | `#c800aa` → `#cc1f1f` | | `--c-danger-soft` | `rgb(255 0 216 / 0.12)` → `rgb(255 77 77 / 0.12)` | `rgb(255 0 216 / 0.07)` → `rgb(255 77 77 / 0.07)` | Both reds have the same hue. The light one is the red's text-safe shade, as `#0070e0` and `#c800aa` are for blue and pink, and the soft fills keep their opacities. ## Why these reds They are about as legible as the pink they replace (WCAG contrast of the text): | Text on | Pink | Red | |---|---|---| | Dark canvas `#171717` | 5.33 | 5.48 | | Dark surface `#1c1c1c` | 5.07 | 5.21 | | Its soft fill on dark (danger buttons, error banners) | 4.88 | 4.81 | | Whiteish `#fafafa` | 4.98 | 5.32 | | White `#ffffff` | 5.20 | 5.55 | | Its soft fill on light | 4.45 | 4.90 | I compared `#ff3b30`, `#ff453a`, `#ff4d4d` and `#ff5045` in fctl's danger zone. All read as red, but `#ff3b30` drops to 4.51 on the soft fill (4.35 under fctl's 15% hover fill, where `#ff4d4d` has 4.60), and `#ff5045` looks coral. ## Also - `palette.red` in `src/brand.ts` has the red as a value for code that can't read the tokens, and `pink`'s comment no longer mentions errors. - Red is not a brand color: AGENTS.md, README.md and the comment in tokens.css say it is only for danger. - `--c-danger` stays a `#rrggbb` hex, because `cssColor()` only reads that format, and the orb's failed state uses it. - Not breaking: `danger` means what it did, and only its color changes. ## Verification - `npm run check`, `npm test` (6 tests) and `npm run build`. - The playground in both themes: the palette shows `red`, the tokens show `danger` as `#ff4d4d` on dark and `#cc1f1f` on light, and the Failed orb is dithered in red. - In fctl (hyperstructure/fctl#60), with `cargo xtask dev`, before and after: the account and project danger zones, the delete dialog and a sign-in error, in both themes and at 390 px. This session can't attach screenshots: GitHub accepts uploads only with a person's token (hyperstructure/fctl#40). ## Releasing After this merges, release it (`gh workflow run release.yml --repo hyperstructure/design --ref main -f bump=auto`), which makes it v0.3.0, then move hyperstructure/fctl#60 from this branch's commit to the tag. fctl.sh doesn't use `danger`, so it can stay on v0.2.0 until it needs something newer. Made in fctl session https://app.fctl.sh/s/ses_01M57CWW9M53BKG69NM03RP1EF Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <[email protected]>
v0.3.0 is hyperstructure/design#5, the commit this branch pinned before it was released; src/ and assets/ are the same, so nothing looks different. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kalaspuff
deleted the
fctl/27-let-s-make-the-dangerzone-red-instead-of
branch
October 18, 2026 12:15
kalaspuff
pushed a commit
that referenced
this pull request
Oct 31, 2026
## Summary A session with many pull requests listed them in the order its agent found them, so the row in session lists, which cuts off what doesn't fit, could show only merged ones, and the rail's Pull requests section put the open ones at the bottom. Now open, draft and queued pull requests come first, then those whose state nobody has looked up yet, then merged and closed ones. Each group keeps the order the agent found them in. The session header's list of links uses the same order, since all three take it from the same function. I added a unit test for the order, ran `npm run check`, and looked at a dev session with ten pull requests in mixed states, staged in its SQLite, against `main`'s web app and this branch's. ## Screenshots At 8051709, dark theme. The row in the project's session list, before and after:   The session page's Pull requests section: | Before | After | |---|---| |  |  | ## Worth confirming - **Decision:** Pull requests whose state fctl doesn't know yet (nobody has looked them up on GitHub) come after open, draft and queued ones and before merged and closed ones, because they are usually new and so likely still open. - **Decision:** Within each group the order stays the one the agent found them in, not most recent first. [fctl session](https://app.fctl.sh/s/ses_01M67MYGPFQBTW30B1AYNJ5R2Q) <!-- FCTL_REVIEW_SUMMARY --> --- > [!NOTE] > **Low risk.** It only changes the order in which the web app lists a session's pull requests, with a unit test; no data or API changes. > > **What it does.** `pullRequests` now lists a session's open, draft and queued pull requests first, then those not yet looked up, then merged and closed ones, each group in the order the agent found them. Sessions with many pull requests therefore keep the ones still under way visible when a list cuts off its end. > > <sub>[fctl review](https://app.fctl.sh/s/ses_01M67NF732Z1C722BJ2SRBWNJB)'s first look at [`8051709`](8051709) · 2 files, +32 −3 · [Review agent settings](https://app.fctl.sh/p/fctl?tab=reviews)</sub> <!-- /FCTL_REVIEW_SUMMARY --> Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.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.
Danger zones looked purple. "Danger zone" and "Delete account…" in Settings, like every other use of the
dangertoken, were the brand's hot pink (#ff00d8,#c800aaon light), the color fctl also uses for activity and attention. hyperstructure/design#5 makesdangerred, and the web app now uses it.@hyperstructure/designmoves from v0.2.0 to v0.3.0. Its release notes:What turns red
Everything that uses
danger, and nothing else:−4) in diffs.Pink stays for activity and attention: the working, waiting and paused orbs, paused sessions and a reached plan limit. The red is
#ff4d4don dark and#cc1f1fon light, and the text is about as legible as it was in pink. hyperstructure/design#5 has the contrast figures.AGENTS.md and docs/development.md now say that red is only for danger.
Screenshots
With
cargo xtask dev, main's web app on :5176 and this branch's on :5173, both against the same control plane and data, at 6108309 (pinned to the design commit before its release). Taken again at 2c30a7a (v0.3.0), they come out the same apart from antialiasing in a few pixels:This session can't attach them: GitHub accepts uploads only with a person's token (#40).
Verification
cargo xtask checkpasses, at 6108309 and at 2c30a7a.npm ciinstalls v0.3.0 (a9b4964) from the lockfile, and the lockfile entry has the same shape as main's. v0.3.0'ssrc/andassets/are the same as the commit pinned before the release.Made in fctl session https://app.fctl.sh/s/ses_01M57CWW9M53BKG69NM03RP1EF