Skip to content

fix(web): make hover fills visible in the light theme - #65

Merged
kalaspuff merged 1 commit into
mainfrom
fctl/33-look-into-https-github-com-hyperstructur
Oct 18, 2026
Merged

kalaspuff merged 1 commit into
mainfrom
fctl/33-look-into-https-github-com-hyperstructur

Conversation

@fctl-sh

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

Copy link
Copy Markdown
Contributor

In the light theme, hovering a session row, a tool call in a transcript, a sidebar item, an icon button, a copy button or the repository picker showed no fill you could see. They filled with raised, which is white in the light theme, as surface is: a hovered session row was #fcfcfc on the #fafafa canvas, and a dialog's close button #ffffff on white. hyperstructure/design#6 adds hover, a translucent ink fill (5% whiteish on dark, 6% blackish on light). The web app now fills with it.

@hyperstructure/design is pinned to hyperstructure/design#6's commit (b598996) until that is released as v0.4.0. This pull request then moves to the tag, so merge it after that.

Where the fix lives

#37 left this to a person. This pull request takes the first option, a token in hyperstructure/design, because:

  • A light raised that isn't white would turn every raised thing gray in the light theme too: menus, the Select's list, toasts, checkboxes, kbd and secondary buttons.
  • Classes in this repository, such as hover:bg-line or hover:bg-ink/5, would give both themes the same opacity, which shows less on light. And line is a border color.
  • A token can be tuned per theme and shows on the canvas and on surfaces. fctl.sh can use it for the same problem on its copy button.

What changes

Each hover fill moves from raised to hover at the strength it had:

  • session rows on the floor and on a project's page: hover:bg-hover/30;
  • tool calls in a transcript, sidebar items and the account button: /60;
  • ghost buttons: /70;
  • icon buttons, copy buttons, the dialog's close button, the image viewer's buttons, the claude.ai link in a session's rail, small Selects and the repository picker: hover:bg-hover;
  • the command palette's current entry, which the pointer and the arrow keys move: bg-hover.

Menus and the Select's list keep their line and line-strong fills, which already show in both themes. Secondary buttons keep raised, because their border darkens on hover.

AGENTS.md and docs/development.md now say that hovered rows and buttons fill with hover, not raised.

Measured

With cargo xtask dev: main's web app on :5175 and this branch's on :5173, against the same control plane and data. In Chromium, each element hovered and not, its fill sampled from screenshots, with the contrast ratio between the fill and what is under it:

Element Under it, dark / light Dark, before → after Light, before → after
Session row (floor) #171717 / #fafafa #1b1b1b → #1a1a1a (1.04 → 1.03) #fcfcfc → #f5f5f5 (1.02 → 1.04)
Tool call in a transcript #171717 / #fafafa #1e1e1e → #1e1e1e (1.08 → 1.08) #fdfdfd → #f2f2f2 (1.03 → 1.07)
Sidebar project #1b1b1b / #fefefe #1f1f1f → #222222 (1.04 → 1.08) #ffffff → #f6f6f6 (1.01 → 1.07)
Icon button (Share) #171717 / #fafafa #232323 → #222222 (1.14 → 1.13) #ffffff → #ececec (1.04 → 1.13)
Copy button (rail) #191919 / #fcfcfc #232323 → #242424 (1.12 → 1.13) #ffffff → #eeeeee (1.03 → 1.13)
Ghost button (Disable) #171717 / #fafafa #1f1f1f → #1f1f1f (1.09 → 1.09) #fefdfe → #f0f0f0 (1.03 → 1.09)
Small Select (composer) #1b1b1b / #fefefe #232323 → #272727 (1.10 → 1.15) #ffffff → #f0f0f0 (1.01 → 1.13)
Command palette entry #1d1d1d / #f5f5f5 #232323 → #282828 (1.07 → 1.14) #ffffff → #e7e7e7 (1.09 → 1.13)
Repository picker #171717 / #fafafa #232323 → #222222 (1.14 → 1.13) #ffffff → #ececec (1.04 → 1.13)
Dialog's close button #1c1c1c / #ffffff #232323 → #272727 (1.08 → 1.14) #ffffff → #f1f1f1 (1.00 → 1.13)
Menu item (unchanged) #222222 / #ffffff #323232 → #323232 (1.24 → 1.24) #ededed → #ededed (1.17 → 1.17)

In the light theme the fills now show as much as in the dark theme, both on the canvas (the floor, transcripts) and on surfaces (the sidebar, dialogs, the palette). On the canvas, the dark theme is within one level of what it was. On surfaces it shows a little more than before, because raised was close to their color.

Screenshots

From the same runs, of the web app at c3bb12c, 1440 px wide: contact sheets of each element not hovered, hovered on main, and hovered here, in each theme. In the light theme, the hovered column on main is white or near white. Here, each element gets a gray fill about as strong as the menu item's, which already worked. In the dark theme the columns look the same.

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

Verification

  • cargo xtask check passes.
  • npm ci installs b598996 from the lockfile, and the lockfile entry has the same shape as main's.
  • The measurements and screenshots above, in both themes. Nothing moves, so there are no phone-width screenshots.

Also found

On a project's page, the selected filter ("All", "Active", "Mine") also uses bg-raised, so in the light theme it is a white pill on the #fafafa canvas, marked mainly by its text color. It isn't a hover fill, so this pull request leaves it as it is.

Fixes #37

Session: https://app.fctl.sh/s/ses_01M57HTNZ0QVWB2TG8Q0CV38Q2

Hovered rows and buttons filled with `raised`, which is white in the light
theme: a hovered session row was #fcfcfc on the #fafafa canvas, and a
dialog's close button #ffffff on white. They now fill with `hover`, a
translucent ink from @hyperstructure/design (hyperstructure/design#6), at
the strength each had. It shows on the canvas and surfaces alike, about as
much in the light theme as in the dark one, and the dark theme looks as it
did on the canvas.

The command palette's current entry, which the pointer and the arrow keys
move, uses it too. Menus and the Select's list keep their line fills,
which already show in both themes.

@hyperstructure/design is pinned to hyperstructure/design#6's commit until
it is released.
@kalaspuff
kalaspuff merged commit 711744f into main Oct 18, 2026
4 checks passed
@kalaspuff
kalaspuff deleted the fctl/33-look-into-https-github-com-hyperstructur branch October 18, 2026 13:38
kalaspuff pushed a commit to hyperstructure/design that referenced this pull request Oct 18, 2026
fctl's web app fills hovered rows and buttons with `raised`. In the
light theme `raised` is `#ffffff`, as `surface` is, so a hovered session
row is `#fcfcfc` on the `#fafafa` canvas and a dialog's close button is
`#ffffff` on `#ffffff`. You can't see either (hyperstructure/fctl#37).
`hover` is a fill for this: a translucent ink.

| Token | Dark | Light |
|---|---|---|
| `--c-hover` (`bg-hover`) | `rgb(250 250 250 / 0.05)` | `rgb(23 23 23 /
0.06)` |

## Why these values

- **Translucent**, so it shows on whatever it sits on: the canvas,
surfaces, and raised menus and dialogs. `raised` as a fill shows only on
something darker than itself, and in the light theme nothing is.
- **Dark looks as it did.** On the dark canvas, 5% whiteish is
`#222222`, within a level of `raised` (`#232323`). Partial strengths
match too: `hover/60` is `#1e1e1e`, as `raised/60` was.
- **Light is a little stronger (6%), so it shows as much.** The contrast
between the fill and what's under it comes out the same in both themes,
at every strength:

| Fill | On | Dark | Light |
|---|---|---|---|
| `raised` (what fctl used) | canvas | 1.14 | 1.04, and lighter than the
canvas |
| `raised` (what fctl used) | surface | 1.08 | 1.00 |
| `hover` | canvas | 1.13 | 1.13 |
| `hover` | surface | 1.14 | 1.13 |
| `hover/60` | canvas | 1.07 | 1.07 |
| `hover/30` | canvas | 1.03 | 1.04 |

(WCAG contrast ratios of the composited colors.) `line` is about as
strong in both themes too, but it is a border color and stronger than a
hover fill should be: 1.18 to 1.25.

Not breaking: this adds a token and changes nothing else. `brand.ts`
holds the brand palette, not the theme tokens, so it doesn't change.

## Verification

- `npm run check`, `npm test` (6 tests) and `npm run build`. Biome's one
info (`biome migrate`) is on `main` too.
- The playground lists `hover` in both themes: `rgb(250 250 250 / 0.05)`
on dark, and on light `rgb(23 23 23 / 0.06)`, a visible gray where
`raised` is white.
- In fctl (hyperstructure/fctl#65), with `cargo xtask dev`: 11 kinds of
hovered rows and buttons, measured on fctl's `main` and on that branch
in both themes, sampled from screenshots. That pull request has the
table.

## Releasing

After this merges, release it (`gh workflow run release.yml --repo
hyperstructure/design --ref main -f bump=auto`), which makes it v0.4.0.
Then move hyperstructure/fctl#65 from this branch's commit to the tag.

fctl.sh has the same problem on its copy button (`.copy:hover` in
`src/site.css` fills with `--c-raised`). It can use `--c-hover` once it
moves to v0.4.0.

`node scripts/release.mjs --dry-run` previews 0.3.1 for this, but the
workflow will release 0.4.0, which is what `--bump auto --dry-run`
previews (#7).

Session: https://app.fctl.sh/s/ses_01M57HTNZ0QVWB2TG8Q0CV38Q2

Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
kalaspuff pushed a commit that referenced this pull request Oct 18, 2026
#65 was merged while `web/package.json` still pinned
`@hyperstructure/design` to hyperstructure/design#6's commit
(`b598996`). That pull request is now merged and released as
[v0.4.0](https://github.com/hyperstructure/design/releases/tag/v0.4.0),
so the web app moves to the tag. Its release notes:

> **Features**
> - **tokens:** Add hover, a fill for hovered rows and buttons
(hyperstructure/design#6)
>
> **Fixes**
> - **release:** Follow the commits when --bump is not given
(hyperstructure/design#8)

Nothing changes in the app. v0.4.0 ships the same `src/` and `assets/`
as `b598996`: `git diff b598996 v0.4.0 -- src assets README.md LICENSE`
is empty. Between the two, only the version, the changelog and the
release scripts changed, and the scripts aren't in the package.

## Verification

- `cargo xtask check` passes.
- `npm ci` installs v0.4.0 (`cf990d7`) from the lockfile. The lockfile
entry has the same shape as the v0.3.0 one did: the version and the
resolved commit, with no integrity line.
- With `cargo xtask dev`, I measured again, in both themes, the 13
hovered rows and buttons from #65's measurements. They come out pixel
for pixel as they did on `b598996`, and the floor looks as it did in
both themes.

No screenshots, because nothing people see changes.

Fixes #66

Session: https://app.fctl.sh/s/ses_01M57HTNZ0QVWB2TG8Q0CV38Q2

Co-authored-by: fctl-sh[bot] <343971779+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.

Hover fills are invisible in the light theme

1 participant