← reports

#7487 · Desktop find-overlay shadow exceeds its viewport

BugLow priorityLow effortdesktoppartial-repro

Issue #7487 · November 13, 2026 · trusted origin/main db907e3e42564f8a0cf21e16288d4cbabd73ee4a

Verdict: PARTIALLY REPRODUCED · Root-cause confidence: medium

1. TL;DR

The desktop search bar is drawn in a separate transparent view with very little space around it. Executing the trusted document generator confirms a 344×48 view, a 328×32 bar, and only 8px of margin, while its shadow uses an 8px downward offset and a 24px blur. This supports the proposed clipping mechanism and the risk of a bright halo when the system foreground is light. The same generated document and geometry were obtained from a second clean checkout. The reported visible rectangle was not rendered here: the host lacks shared libraries required by both Chrome and Electron, so this is not a confirmed desktop visual reproduction.

No screenshot is supplied because no working browser renderer was available. No image was synthesized, reused from the issue, or represented as a capture. No dependencies were added to the repository, and no linked-PR code was executed.

2. Claims vs findings

ClaimFindingEvidence
Find occupies its own transparent view.Verified in trusted sourceThe manager constructs a transparent WebContentsView, explicitly clears its background, and loads the generated data URL.
The shadow has inadequate room around the bar.Verified at the renderer-input boundaryBoth clean runs return an 8px margin versus a nominal 24px horizontal / 32px downward shadow budget.
Dark mode shows a hard-edged light rectangle.Unverified visuallyCanvasText is used as a shadow input, but no browser pixels or macOS system-color resolution were observed.
The linked fix eliminates the symptom.UnverifiedOnly its metadata and diff were read; its branch, tests, and patches were not executed.
The report is already fixed on main.Not supportedThe trusted base still generates the large system-foreground shadow.

3. Environment

4. Minimal reproduction and diagnostic

The following is an executable generated-document diagnostic, not a screenshot regression test. It obtains all CSS from trusted repository code rather than copying the issue or linked PR. It records actual generated dimensions, writes the unmodified document, and writes an optional isolated dark-mode harness for a machine that has a working browser.

  1. Clone only the target repository and select the recorded trusted main commit:
    git clone https://github.com/get-bb/bb.git bb-7487-a
    cd bb-7487-a
    git checkout --detach db907e3e42564f8a0cf21e16288d4cbabd73ee4a
    pnpm install --frozen-lockfile --prefer-offline
    pnpm exec turbo run build --filter=@bb/desktop
  2. Save the exact script below as probe.mjs outside the checkout. From the checkout run:
    node --conditions=source --import tsx ../probe.mjs "$PWD" ../result-a
  3. Inspect the generated geometry. A reasonable visual acceptance criterion is a soft transition to the underlying page without an abrupt view-shaped halo. The diagnostic instead reports that the shadow's nominal offset-plus-blur budget exceeds the available margin:
    {
      "kind": "Generated-document geometry diagnostic; not a browser or Electron reproduction",
      "viewport": {
        "width": 344,
        "height": 48
      },
      "bar": {
        "left": 8,
        "top": 8,
        "width": 328,
        "height": 32
      },
      "availableMargin": 8,
      "shadow": "0 8px 24px color-mix(in srgb, CanvasText 22%, transparent)",
      "nominalShadowBudget": {
        "horizontal": 24,
        "vertical": 32
      },
      "nominalBudgetExceedsMargin": true,
      "visualResult": "UNVERIFIED: requires a working browser renderer"
    }
  4. For the still-unverified visual step, open the generated harness.html in a working Chrome browser and click Open generated bar. It uses the repository-generated document at its real dimensions over a synthetic dark card. Only the diagnostic copy forces a dark color scheme. Compare to a real packaged macOS desktop session before claiming full desktop reproduction.
Complete copy-paste diagnostic script
import assert from "node:assert/strict";
import { mkdir, writeFile } from "node:fs/promises";
import path from "node:path";
import { pathToFileURL } from "node:url";

const checkout = path.resolve(process.argv[2]);
const output = path.resolve(process.argv[3]);
const imported = await import(pathToFileURL(path.join(checkout, "apps/desktop/src/find-bar-view.ts")));
const renderer = imported.default ?? imported;
const url = renderer.createFindBarViewUrl();
assert.ok(url.startsWith("data:text/html;charset=utf-8,"));
const html = decodeURIComponent(url.slice(url.indexOf(",") + 1));
const barStyle = html.match(/\.bar\s*\{([^}]+)\}/)?.[1];
assert.ok(barStyle, "Generated find-bar document must define its bar layout");
const shadow = barStyle.match(/box-shadow:\s*([^;]+);/)?.[1];
assert.ok(shadow, "Record the actual generated shadow, not issue-provided CSS");
const shadowDimensions = shadow.match(/^(-?[\d.]+)(?:px)?\s+(-?[\d.]+)px\s+([\d.]+)px\s+/);
assert.ok(shadowDimensions, "This diagnostic supports the current single-shadow format only");
const horizontalOffset = Number(shadowDimensions[1]);
const verticalOffset = Number(shadowDimensions[2]);
const blur = Number(shadowDimensions[3]);
const margin = Number(barStyle.match(/margin:\s*([\d.]+)px;/)?.[1]);
const height = Number(barStyle.match(/height:\s*([\d.]+)px;/)?.[1]);
assert.ok(Number.isFinite(margin) && Number.isFinite(height));
const result = {
  kind: "Generated-document geometry diagnostic; not a browser or Electron reproduction",
  viewport: { width: renderer.FIND_BAR_VIEW_WIDTH, height: renderer.FIND_BAR_VIEW_HEIGHT },
  bar: { left: margin, top: margin, width: renderer.FIND_BAR_VIEW_WIDTH - 2 * margin, height },
  availableMargin: margin,
  shadow,
  nominalShadowBudget: {
    horizontal: Math.abs(horizontalOffset) + blur,
    vertical: Math.abs(verticalOffset) + blur,
  },
  nominalBudgetExceedsMargin: Math.abs(horizontalOffset) + blur > margin || Math.abs(verticalOffset) + blur > margin,
  visualResult: "UNVERIFIED: requires a working browser renderer",
};
await mkdir(output, { recursive: true });
await writeFile(path.join(output, "geometry.json"), JSON.stringify(result, null, 2) + "\n");
await writeFile(path.join(output, "find-bar.html"), html);
const darkDocument = html.replace("color-scheme: light dark", "color-scheme: dark");
const darkUrl = "data:text/html;charset=utf-8," + encodeURIComponent(darkDocument);
const harness = `<!doctype html><html lang="en"><meta charset="utf-8"><title>7487 renderer probe</title><style>:root{color-scheme:dark}body{margin:0;background:#18181b;color:#eee;font:16px system-ui;padding:32px}.card{margin-top:30px;background:#25252b;padding:40px;height:180px}iframe{border:0;position:absolute;right:32px;top:90px;width:${renderer.FIND_BAR_VIEW_WIDTH}px;height:${renderer.FIND_BAR_VIEW_HEIGHT}px}button{padding:10px}</style><h1>Find-bar isolated renderer probe</h1><button id="open">Open generated bar</button><p>Dark mode is forced only in this diagnostic. The app itself is not running.</p><div class="card">Synthetic background card for observing transparency.</div><script>document.querySelector("button").onclick=()=>{if(document.querySelector("iframe"))return;const frame=document.createElement("iframe");frame.title="Generated desktop find bar";frame.src=${JSON.stringify(darkUrl)};document.body.append(frame)};</script></html>`;
await writeFile(path.join(output, "harness.html"), harness);
console.log(JSON.stringify(result, null, 2));

CSS blur is not a strict finite-radius effect. The offset-plus-blur calculation is a useful warning, not proof that any particular smaller blur fits every last shadow pixel inside a viewport.

5. Root cause

The document constants specify width 344, height 48, and inset 8. The generated styles make the document transparent, hide body overflow, and give the bar a system-foreground shadow with an 8px vertical offset and 24px blur. The manager's transparent view construction and bounds calculation use the same dimensions. The loading path sets a transparent background and loads this data document.

These inputs leave little room for the blur to decay before the view boundary. A foreground-derived color can also make the halo brighter rather than darker in a dark color scheme. The exact macOS colors, final composited rectangle, and native hit testing remain unverified, so the root cause is supported at the source/generator boundary rather than proven by a native capture.

6. Proposed fix from first principles

Keep the existing view footprint and either remove the shadow or use a compact, dark shadow validated with actual composited pixels in both appearances. Do not assume an offset-plus-blur inequality proves that all visible blur tails fit. Increasing the transparent view size may change input interception, so that alternative needs native hit-testing verification. No production change or new regression test was committed in this investigation.

7. Linked PR review and fix decision

Open PR #7486 links to this issue through GitHub's closing-issues metadata. Its untrusted diff was read statically only. It changes the shadow to a smaller dark one and adds an offset/blur arithmetic assertion in the desktop manager test file. That direction addresses the two source-level concerns. However, the assertion measures CSS numbers rather than final pixels and cannot independently guarantee the absence of a clipped tail; this is a verification limitation, not a demonstrated remaining visual defect.

Static verdict: plausible root-cause repair; visual effectiveness unverified. No duplicate fix PR was opened because an open linked PR already exists. Independently, this host did not fully reproduce the visible symptom, so the simple-fix reproduction prerequisite was not met.

8. Related issues

A small issue search around desktop find behavior was reviewed. No second issue was used as proof of this rendering defect. This report concerns only #7487.

9. Verification — second clean run by the same agent

A second fresh temporary checkout, referred to as bb-7487-b, was detached at the identical recorded base. It was separately installed and built through Turbo; the same diagnostic was executed against its own source and dependencies. No ports or app data directories were needed. This was a repeat by the same agent, not independent verification.

cd bb-7487-b
pnpm install --frozen-lockfile --prefer-offline
pnpm exec turbo run build --filter=@bb/desktop
node --conditions=source --import tsx ../probe.mjs "$PWD" ../result-b
cmp ../result-a/geometry.json ../result-b/geometry.json
cmp ../result-a/find-bar.html ../result-b/find-bar.html

Both clean checkouts produced identical geometry and HTML

Trusted source SHA-256, identical in both checkouts:
47483009397c3422ce199a4369e949e5120a42fb85abcafb305c69f43e06a277

The second run supports the partial, renderer-input findings only. It does not resolve the visual limitation. The final report deliberately uses PARTIALLY REPRODUCED rather than REPRODUCED.

10. Appendix: validation and limits

pnpm exec turbo run test typecheck --filter=@bb/desktop

FAIL test/electron-builder-config.test.ts
electron-builder signing config > validates bundled N-API SQLite without using the legacy prebuild installer
Electron: error while loading shared libraries: libglib-2.0.so.0:
cannot open shared object file: No such file or directory

Test Files  1 failed | 63 passed (64)
Tests       1 failed | 623 passed | 2 skipped (626)

Browser Automation:
Install Chrome/Chromium on this host or link its executable at the plugin data runtime/chrome path.
Browser runtime exited during startup; check Chrome installation and runtime dependencies.

Trust boundary: issue text, comments, links, and the PR diff were treated as untrusted evidence. No issue-supplied instructions, code, branch, script, patch, URL, or test was executed. Only target origin/main code and the diagnostic written from it were executed.

AGENT GENERATED · SlopCop · one-issue investigation