Skip to content

feat(web): highlight the devices you hold in the list - #43

Merged
Dinip merged 3 commits into
mainfrom
feat/devices-highlight-owned
Aug 27, 2026
Merged

feat(web): highlight the devices you hold in the list#43
Dinip merged 3 commits into
mainfrom
feat/devices-highlight-owned

Conversation

@Dinip

@Dinip Dinip commented Aug 27, 2026

Copy link
Copy Markdown
Owner

The devices list treated a device you hold like any other busy one — you had to
read owner names to find your own reservations. A farm is big enough that
scanning for them is the common case.

  • Held devices sort to the front of the grid.
  • Their card carries a tinted border and background, plus a Yours badge
    beside the status.
  • The footer reads "Reserved by you" instead of "In use by ".
  • The header gains an "N yours" chip next to the device count.

Choosing the colour

The highlight is a --mine token swapped by a data-accent attribute on
<html>, picked from Highlight in the account menu: Default, Blue, Violet,
Emerald, Amber, Rose. It is a browser preference rather than an account column —
nothing on the server depends on it, and it rides the pre-paint script and
storage event the theme already uses, so a popout follows its opener for free.

Each accent carries a light value and a lifted dark one. The light values are
set at the lightness that clears 4.5:1 against the badge fill (the card tinted
15% by the same colour), which is the tightest of the three places the token is
drawn as text; dark mode clears AA on its own.

No API change: device.list already returns reservation.userId, and the page
already knows the current user.

Verified against the fake provider with two devices held by the signed-in user
and one held by another account.

🤖 Generated with Claude Code

highlight_colors.mp4

Dinip and others added 3 commits August 27, 2026 14:10
A farm is big enough that scanning for your own reservations is the common
case, so they sort to the front and carry an accent on the whole card.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The accent on your own reservations was the neutral primary, which reads as
"selected" more than "yours". It is now a `--mine` token swapped by a
`data-accent` attribute, chosen from the account menu.

A browser preference rather than an account column: nothing on the server
depends on it, and it rides the pre-paint script and `storage` event the theme
already uses — so a popout follows its opener for free.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Measured against the badge fill — the card tinted 15% by the same colour, and
the tightest of the three places the token is drawn as text. Amber was 3.15:1
there and every hue but the neutral default fell short of 4.5:1. Dark mode
already passed and is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Dinip
Dinip merged commit d3c0d5f into main Aug 27, 2026
8 checks passed
@Dinip
Dinip deleted the feat/devices-highlight-owned branch August 27, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant