Files
pbakaus_impeccable/extension/devtools/sidebar.html
T
5ddcce2574 extension: kinpaku UI for the popup, DevTools panel, sidebar and overlays (#729)
* extension: kinpaku UI for the popup, DevTools panel, sidebar and overlays

The extension still wore magenta (#d6336c on the toolbar badge, oklch(48%
0.25 350) through the DevTools panel and the Elements sidebar) and a cream
popup left over from the old dark system. It now wears the brand the site
ships in impeccable-site PR #34: paper and instruments, one light theme.

- extension/shared/kinpaku.css is the one token layer the three pages link.
  Values are copied from site/styles/kinpaku-tokens.css, and the header
  states the four rules that shape the rest: paper and ink, gold as
  jewelry, patina carries colored text, a dark surface is a control.
- Severity has one language. An AI tell gets the detector's gold tag and a
  lit gold dot; a quality issue gets patina; a scan that did not run gets
  vermilion. Selectors and details are patina-deep, which clears 4.5:1 on
  paper, and gold never carries text anywhere.
- Popup: neutral paper, the mark as a carved ink tile, an ink primary
  button and a paper cap for the secondary, and the count in ink over a
  rule that lights gold when there is something to report.
- Panel and sidebar: paper in both DevTools themes, since the brand has no
  dark theme any more. The panel handles the seam instead of inverting,
  with a hard top edge under .theme-dark. Segmented controls and the switch
  are paper hardware: a recessed track, a raised cap, a lit gold dot.
- Overlays in the page: a gold hairline plus a soft outer glow instead of a
  2px outline, and the label chip is now the tag, ink on gold in the mono
  face, matching what live mode draws.
- The toolbar badge is gold with dark ink text (about 11.8:1); Chrome's
  default white badge text does not clear 4.5:1 on gold.

Behavior is untouched: every id, class hook and message the popup, panel,
sidebar and content script depend on is unchanged, and the one markup
change beyond the stylesheet links is a severity class on the sidebar's
kind label. The extension smoke suite passes on all nine fixtures with no
service worker or offscreen errors, `bun run test` is green with a local
engine build, and `web-ext lint` reports the same two Firefox-only errors
and the same fifteen warnings as origin/main.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vau2X53xGTjjTCXWMVBoNY

* extension: guard setBadgeTextColor, and make the dark seam paint-only

Two review findings from #729.

setBadgeTextColor arrived in Chrome 110 and does not exist on Firefox's
action API. `chrome.action.setBadgeTextColor?.({...}).catch(...)` still
evaluates `.catch` on the undefined the optional call returns, so on a
browser without the method updateBadge raised a TypeError that escaped into
whatever asked for the badge update. Both the method and its return value
are checked now, and tests/extension-build.test.mjs pins the shape: no
`?.(...).catch`, an existence check around the call, a promise check before
`.catch`, and the gold and ink values with the magenta one gone.

The dark-DevTools seam is a fixed 2px line at the top of the sheet, above
the sticky toolbar because that is what keeps it in place while the panel
scrolls under it. It now sets pointer-events: none, so it is paint and
nothing else and the toolbar's top row of pixels stays clickable.

extension/shared/ joins the detector suite's trigger list, since the shared
stylesheet is part of extension packaging.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vau2X53xGTjjTCXWMVBoNY

* overlay: the page banner is a paper bar, not a gold fill

The last place gold was still upholstery. A full-width gold bar across
someone else's page is a fill, and the system holds gold to a mark, a line,
a lit dot, or a tag.

The banner is now paper with ink text, a gold hairline along its bottom
edge, and the detector's lit gold dot at its head, the same indicator the
panel puts on a section. Each page-level finding wears the tag the panel
gives it: gold with ink for an AI tell, a quiet gray chip for a quality
issue, with the detail beside it in ink rather than folded into the chip.
The bar carries a shadow of its own so it still separates from a dark host
page, and the standalone controls take muted ink now that they sit on
paper instead of gold.

crates/live/assets/detect-antipatterns-browser.js is the regenerated
tracked artifact, so live mode and the site's detector get the same banner.

Extension smoke: all nine fixtures pass, no service worker or offscreen
errors. bun run test green with a local engine build. web-ext lint reports
the same two Firefox-only errors and fifteen warnings as origin/main.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vau2X53xGTjjTCXWMVBoNY

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
2026-09-04 13:00:13 -07:00

15 lines
346 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../shared/kinpaku.css">
<link rel="stylesheet" href="sidebar.css">
</head>
<body>
<div id="sidebar-content">
<div class="state">Select an element to see Impeccable findings.</div>
</div>
<script src="sidebar.js"></script>
</body>
</html>