Skip to content

feat(tokens): add hover, a fill for hovered rows and buttons - #6

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

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 (fix(web): make hover fills visible in the light theme 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. hyperstructure/fctl#65 is already merged and deployed, pinned to this branch's commit, and hyperstructure/fctl#66 moves fctl to the tag after the release.

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

Consumers filled hovered rows and buttons with `raised`, which is white in
the light theme, as `surface` is: on the canvas the fill was close to
invisible, and on surfaces it was invisible. `hover` is a translucent ink
for that fill: 5% whiteish on dark, 6% blackish on light. It shows on the
canvas, surfaces and raised alike, and about as much in each theme.
kalaspuff pushed a commit to hyperstructure/fctl that referenced this pull request Oct 18, 2026
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

Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
@kalaspuff
kalaspuff merged commit b38df6b 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:39
kalaspuff pushed a commit that referenced this pull request Oct 18, 2026
`node scripts/release.mjs --dry-run`, the preview that AGENTS.md and the
`release` skill give, now reports the version the Release workflow would
make. The script took the argument after `--bump` as the bump, so
without `--bump` it took the first argument: `--dry-run` became the
bump, and `nextVersion()` treats anything that isn't `major` or `minor`
as a patch. With #6 (a `feat`) since v0.3.0:

```
$ node scripts/release.mjs --dry-run    # main
@hyperstructure/design 0.3.1 (--dry-run bump since v0.3.0)

$ node scripts/release.mjs --dry-run    # this branch
@hyperstructure/design 0.4.0 (minor bump since v0.3.0)
```

`releaseOptions()` reads the arguments now, with `node:util`'s
`parseArgs`. It is in `scripts/commits.mjs`, next to `bumpOf()` and
`nextVersion()`, so `npm test` covers it without running a release.

- Without `--bump`, the bump is `auto`: the commits pick it.
- `--bump` takes `auto`, `patch`, `minor` or `major`, as `--bump minor`
or `--bump=minor`, before or after `--dry-run`.
- Anything else stops the script with exit code 2 and the usage: an
unknown option, a stray argument, or a missing or unknown bump. Before,
a bare `--bump` meant `auto`, and other arguments were ignored or, when
first, taken as a patch: on `main`, a mistyped `--dryrun` commits and
tags v0.3.1 locally instead of previewing.

fctl's `cargo xtask release` already defaults to `auto` and rejects
arguments it doesn't know. Releases from the workflow don't change,
since it always passes `--bump "$BUMP"` (with `--dry-run` for a dry
run). Tooling only: nothing in the package changes.

## Verification

- `npm run check`, `npm test` (7 tests; the new one is "release
options") and `npm run build`.
- The new test fails on the old argument handling, at `--dry-run`:
`bump` is `'--dry-run'` where `'auto'` is expected.
- On this branch, `--dry-run` and `--bump auto --dry-run` print the same
preview (0.4.0), `--bump patch --dry-run` previews 0.3.1, and `--bump`,
`--bump huge`, `--dryrun` and `minor` exit with code 2 without changing
anything.
- In a throwaway local clone of this branch, `node scripts/release.mjs`
with no arguments wrote 0.4.0 to `package.json`, `package-lock.json` and
`CHANGELOG.md`, and committed and tagged v0.4.0. A clone of `main` given
`--dryrun` committed and tagged v0.3.1.

Fixes #7

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

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
The Release workflow now also runs after every merge to `main`, and
releases when the commits since the last tag include a `feat`, `fix`,
`perf`, `revert` or breaking change. Other changes (`docs`, `refactor`,
`test`, `build`, `ci`, `chore`) wait for the next release. Running it by
hand works as before: it releases whatever is new, with any bump, or
does a dry run.

This automates what has been done by hand so far: each feature was
released by hand within minutes of merging (#4 → v0.2.0, #5 → v0.3.0, #6
and #8 → v0.4.0), while #1–#3 (`ci`, `ci`, `docs`) waited and went out
with v0.2.0. It is also semantic-release's default rule. Consumers pin
exact tags, so a release changes nothing for fctl or fctl.sh until they
move their pin.

## How

- **`scripts/release.mjs --if-due`**: releases only when `releaseDue()`
says the changes call for it. Otherwise it prints `No release: no feat,
fix, perf, revert or breaking change since vX.Y.Z.`, adds that to the
job summary, and exits 0. The workflow passes it for merges (`push` to
`main`), not for runs by hand.
- **The workflow** checks out `main` as it is when the run starts, not
the commit that started it, so a run that waited behind another one sees
that one's release and finds nothing to do. Runs are already queued one
at a time (`concurrency: release`). If a merge lands while a run is
releasing, the atomic push of the commit and tag is rejected. A run
after a merge then leaves the release to the newer merge's run (a
notice, exit 0) instead of failing. Any other rejected push still fails.
- **`releaseOptions()` moves from `scripts/commits.mjs` to
`scripts/release.mjs`**, which exports it with `releaseDue()` and
releases only when run as a script, as `icons.mjs` does.
hyperstructure/fctl-site copies `commits.mjs` and its test and is told
to keep them in step. #8 added a function there that only this script
uses, so the copies had drifted. Both files are now the same as
fctl-site's again, and the tests are in `scripts/release.test.mjs`. The
check for being run as a script compares real paths, because through a
symlink `argv[1]` and `import.meta.url` differ and a release script must
not silently do nothing.
- **Docs**: README.md's release section said to bump the version and
push a tag by hand, which the workflow has done since #1. It, AGENTS.md
and the `release`, `commit` and `pull-requests` skills now say which
merges release, how to release the rest by hand, and how to find the
release a merge made (`gh run list --workflow release.yml --commit
MERGE_SHA`, then `git tag --contains`). The commit skill's type table
says when each type is released.

Merging this releases nothing: since v0.4.0 there are only this pull
request's `refactor`, `ci` and `docs` commits.

fctl's and fctl-site's AGENTS.md say to change design, "tag a release",
then bump the tag. That stays true: a merge now makes the tag.

## Verification

- `npm run check`, `npm test` (8 tests: "release options", and "a merge
releases features, fixes, reverts and breaking changes") and `npm run
build`.
- `node scripts/release.mjs` still runs by relative path, absolute path
and through a symlinked directory, and importing it in the tests
releases nothing.
- The release step's shell, extracted from the workflow, run against a
local bare repository standing in for GitHub, with a stub `gh` that
records its arguments:

| Case | Result |
|---|---|
| This pull request merges | No release, exit 0 |
| A `feat` merges | v0.5.0: commit and tag pushed, `gh release create
v0.5.0 … --notes-file …` |
| A run that waited behind that release | No release, exit 0 |
| A `docs` merge | No release, exit 0 |
| A `fix` merges, and a `feat` lands during its run | The push is
rejected; notice, exit 0, nothing pushed |
| The newer merge's run | v0.6.0 with the `docs`, `fix` and `feat`
together |
| By hand, nothing new | `nothing to release since v0.6.0`, exit 1 (as
before) |
| By hand, only `docs` | v0.6.1 |
| A merge whose push is rejected by the server | exit 1 |

- The workflow file parses, and the step's script passes `bash -n`.
- Not run on GitHub: this session can't start workflows (HTTP 403, no
Actions write access). A dry run on this branch checks the run-by-hand
path there: `gh workflow run release.yml --repo hyperstructure/design
--ref fctl/36-look-into-https-github-com-hyperstructur -f dry_run=true`.
The merge path first runs when this merges, and should end with "No
release".

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

---------

Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
kalaspuff pushed a commit to hyperstructure/fctl 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.

1 participant