Skip to content

fix(web): make destructive actions and errors red instead of pink - #60

Merged
kalaspuff merged 2 commits into
mainfrom
fctl/27-let-s-make-the-dangerzone-red-instead-of
Oct 18, 2026
Merged

kalaspuff merged 2 commits into
mainfrom
fctl/27-let-s-make-the-dangerzone-red-instead-of

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Danger zones looked purple. "Danger zone" and "Delete account…" in Settings, like every other use of the danger token, were the brand's hot pink (#ff00d8, #c800aa on light), the color fctl also uses for activity and attention. hyperstructure/design#5 makes danger red, and the web app now uses it.

@hyperstructure/design moves from v0.2.0 to v0.3.0. Its release notes:

Features

What turns red

Everything that uses danger, and nothing else:

  • the danger zones in Settings and in a project's settings, and the delete buttons in their dialogs;
  • destructive menu items, and remove, delete and interrupt buttons on hover;
  • error banners, form errors, invalid fields and error toasts;
  • failed sessions (status, dot and orb), failed tool calls, error lines in transcripts and failed attachments;
  • deleted files, removed lines and deletion counts (−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 #ff4d4d on dark and #cc1f1f on 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:

  • Settings → Danger zone (dark, light, 1440 px and 390 px): the heading, the border, the divider and "Delete account…" go from hot pink to red. The rest of the page doesn't change.
  • A project's danger zone and its delete dialog (the slug typed in, not submitted), dark and light: "Delete project…" and the dialog's "Delete project" button are red.
  • Sign-in with a wrong password, dark and light: the error banner's icon, border and fill are red. The text stays ink.

This session can't attach them: GitHub accepts uploads only with a person's token (#40).

Verification

  • cargo xtask check passes, at 6108309 and at 2c30a7a.
  • npm ci installs v0.3.0 (a9b4964) from the lockfile, and the lockfile entry has the same shape as main's. v0.3.0's src/ and assets/ are the same as the commit pinned before the release.
  • The screenshots above, compared side by side.

Made in fctl session https://app.fctl.sh/s/ses_01M57CWW9M53BKG69NM03RP1EF

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
kalaspuff merged commit f7a09b7 into main Oct 18, 2026
4 of 5 checks passed
@kalaspuff
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:

![Before: the row shows merged playground#72, #58, #59 and
#60](https://app.fctl.sh/api/v1/published/6LEmb7ECkKM3Hzk64T0ez4PHCQDWxyk9qkFeD9HAze6/before-row.png)

![After: the row shows open #74, draft #75, queued #73 and #76, whose
state isn't known
yet](https://app.fctl.sh/api/v1/published/TklVAQfGRDRnVTnvFkn7At2OTeveure74E26S8YFHzD/after-row.png)

The session page's Pull requests section:

| Before | After |
|---|---|
| ![Before: six merged and closed pull requests above the open, draft
and queued
ones](https://app.fctl.sh/api/v1/published/crf3daCylMT0PsXwM8As9nzWvj6kie5kCOQRSKUQ3yq/before-rail.png)
| ![After: open, draft and queued at the top, merged and closed at the
bottom](https://app.fctl.sh/api/v1/published/MUktZKgORZgWnAZD2zhYsOHUAJZSGcEQk2EunjMehgC/after-rail.png)
|

## 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant