← reports

#7588 · Wide coarse-pointer rail retains desktop sizing

BugPriority: MediumEffort: Lowuimobile GitHub issue

2026-11-15 · trusted main commit da3e60b81d560e114a2bec724bb59c997aaaae7f

Verdict: PARTIALLY REPRODUCED · Root-cause confidence: high for the source-level sizing gate, not device behavior.

1. TL;DR

The navigation rail has larger touch controls, but its stylesheet enables them only on narrow, coarse-pointer viewports. Trusted main contains an AND condition combining a width below 48rem with a coarse primary pointer. At a 16px initial font size, the width limit is 768px, so a 951px viewport cannot activate that rule. Two fresh checkouts produced identical parsed stylesheet evidence. A real browser and physical-device check were unavailable, so this is a partial reproduction rather than a claimed visual confirmation.

No screenshot is presented: the Browser Automation plugin could not start headless Chrome because this host has no Chrome/Chromium executable. No browser, dependency, or external issue attachment was installed or fetched. The artifacts are real parser output, not computed styles or simulated screenshots.

2. Claims vs findings

ClaimFindingEvidence
Wide touch viewports miss the enlarged navigation-rail controls.Verified at the stylesheet-condition boundary; device result unverified.Lightning CSS parsed a logical AND of width < 48rem and pointer: coarse in both clean checkouts.
The enlarged controls are 36px with 20px icons; desktop defaults are 24px and 16px.Verified in source; not measured in a browser.app.css declarations, frame geometry assignment, and desktop-contract constants.
The rail width follows its control size.Verified in source, not validated for overlap after a fix.navRailWidth.ts calculates control size plus two rail-padding values.
The physical device and tablet show this exact behavior.Unverified.No physical iOS device, iOS simulator, or usable local browser was available.
A separate title-bar toggle may have similar sizing.Not investigated as a separate defect.The frame code independently assigns a 28px title-bar control size.

3. Environment

4. Minimal reproduction

This is a repeatable source-level probe, not a browser regression test. It parses the actual production stylesheet with Lightning CSS and prints the sidebar media condition and declarations without copying the issue's patch or test.

  1. Clone the trusted repository and check out the recorded commit.
  2. Install the frozen repository dependencies.
  3. Save the linked probe outside the checkout and run it with the checkout path.
git clone https://github.com/get-bb/bb.git bb-7588
cd bb-7588
git checkout --detach da3e60b81d560e114a2bec724bb59c997aaaae7f
pnpm install --frozen-lockfile --prefer-offline
node /path/to/inspect-rail-css.mjs "$PWD"

Expected contract: a coarse primary pointer should receive the touch-sized rail independent of viewport width. Actual parsed rule: the touch declarations require both a coarse primary pointer and a width below 48rem.

Viewport / pointerRule result inferred from parsed condition at 16px initial font
390px / coarseTouch rule eligible: 36px control, 20px icon.
768px / coarseTouch rule ineligible: strict width comparison fails at the boundary.
951px or 1024px / coarseTouch rule ineligible: width comparison fails; defaults remain.
951px / fineTouch rule ineligible: desktop behavior remains.

The table is logical interpretation of the source, not measured browser output. Hybrid input devices and non-default initial font sizes need browser coverage.

Artifact: inspect-rail-css.mjs

import { readFileSync } from "node:fs";
import { createRequire } from "node:module";
import { resolve } from "node:path";

const checkout = resolve(process.argv[2] ?? ".");
const require = createRequire(resolve(checkout, "apps/app/package.json"));
const { transform } = require("lightningcss");
const filename = "apps/app/src/app.css";
const findings = [];

transform({
  filename,
  code: readFileSync(resolve(checkout, filename)),
  visitor: {
    Rule(rule) {
      if (rule.type !== "media") return;
      const declarations = rule.value.rules
        .filter((child) => child.type === "style")
        .flatMap((child) => child.value.declarations.declarations)
        .filter(
          (declaration) =>
            declaration.property === "custom" &&
            declaration.value.name.startsWith("--bb-sidebar-"),
        );
      if (declarations.length === 0) return;
      findings.push({
        file: filename,
        line: rule.value.loc.line + 1,
        queries: rule.value.query.mediaQueries,
        declarations: declarations.map((declaration) => declaration.value),
      });
    },
  },
});

if (findings.length === 0) throw new Error("No sidebar media rules found");
console.log(JSON.stringify(findings, null, 2));
Verbatim first-run parser output
[
  {
    "file": "apps/app/src/app.css",
    "line": 44,
    "queries": [
      {
        "qualifier": null,
        "mediaType": "all",
        "condition": {
          "type": "operation",
          "operator": "and",
          "conditions": [
            {
              "type": "feature",
              "value": {
                "type": "range",
                "name": "width",
                "operator": "less-than",
                "value": {
                  "type": "length",
                  "value": {
                    "type": "value",
                    "value": {
                      "unit": "rem",
                      "value": 48
                    }
                  }
                }
              }
            },
            {
              "type": "feature",
              "value": {
                "type": "plain",
                "name": "pointer",
                "value": {
                  "type": "ident",
                  "value": "coarse"
                }
              }
            }
          ]
        }
      }
    ],
    "declarations": [
      {
        "name": "--bb-sidebar-rail-padding",
        "value": [
          {
            "type": "length",
            "value": {
              "unit": "px",
              "value": 12
            }
          }
        ]
      },
      {
        "name": "--bb-sidebar-control-size",
        "value": [
          {
            "type": "length",
            "value": {
              "unit": "px",
              "value": 36
            }
          }
        ]
      },
      {
        "name": "--bb-sidebar-control-icon-size",
        "value": [
          {
            "type": "length",
            "value": {
              "unit": "px",
              "value": 20
            }
          }
        ]
      }
    ]
  }
]

5. Root cause

apps/app/src/app.css makes pointer suitability dependent on a compact-layout breakpoint:

--bb-sidebar-control-size: var(--bb-frame-rail-control-size);
--bb-sidebar-control-icon-size: 16px;

@media (width < 48rem) and (pointer: coarse) {
  :root {
    --bb-sidebar-rail-padding: 12px;
    --bb-sidebar-control-size: 36px;
    --bb-sidebar-control-icon-size: 20px;
  }
}

packages/desktop-contract/src/macos-window-chrome.ts sets the rail default to 24px. apps/app/src/lib/bb-desktop.ts assigns it to the frame variable. packages/shared-ui/src/components/ui/sidebar-row-classes.ts consumes the sidebar control and icon variables in the real rail button classes.

apps/app/src/components/sidebar/navRailWidth.ts derives rail width from those same variables. This supports a small stylesheet fix, but does not prove that every docked layout remains collision-free. History attributes the width-plus-pointer gate to commit a28207d1c6d; it remains present at the recorded main commit.

6. Proposed fix and safety gate

Make rail touch geometry depend on primary pointer capability rather than compact viewport width. Keep fine-pointer desktop geometry and the separate title-bar controls unchanged. Verify actual button bounds, icon bounds, rail width, and sidebar overlap across 390px, 768px, 951px, and 1024px coarse-pointer viewports, plus fine-pointer controls and a resize transition.

No fix branch or pull request: the visual behavior was not fully reproduced, and no focused browser regression test could be demonstrated failing before and passing after a production change. A source-string or AST-shape assertion alone would not satisfy that safety gate. The unchanged-main build failure is an additional verification limitation, not attributed to this issue. No open linked PR was found through issue timeline metadata or the open-PR issue-number search.

7. Verification

The same agent repeated the parser probe in a second clean detached checkout at da3e60b81d560e114a2bec724bb59c997aaaae7f, after a separate frozen install. The verification checkout had no tracked changes. No live process was needed, so no ports or data directories were reused. This is repeated verification by the same agent, not an independent review.

git worktree add --detach "$VERIFY" da3e60b81d560e114a2bec724bb59c997aaaae7f
cd "$VERIFY"
pnpm install --frozen-lockfile --prefer-offline
node /path/to/inspect-rail-css.mjs . > second-run.json
cmp first-run.json second-run.json

PASS: both clean-base CSS inspections are byte-identical
SHA-256, both outputs:
210cb3ac9c9ba474735c5390957b7f67126e7182ee106c29d2e491e9d4131f36

First run · Second run. The repeated result supports the final partial verdict. It does not upgrade source evidence into a device reproduction; that qualification is the report correction from the issue's broad visual claim.

8. Related issues

No related-issue equivalence is asserted. Existing mobile issues were sampled only to calibrate area-label usage. No linked fork code, external attachment, or issue-supplied command was fetched or executed.

9. Appendix

Trusted investigation commands: git fetch of target main; detached worktree creation; frozen pnpm install in each checkout; Turbo build; Turbo build:types filtered to @get-bb/plugin-sdk; repeated Turbo build; direct execution of the source probe; cmp and sha256sum; git blame of app.css; code-line inspection; GitHub read-only repository, issue/property, label, and linked-PR metadata queries.

Browser command (current enrolled host selected explicitly):

bb browser-automation open --backend local --headless --machine <current-host-id> --json

Install Chrome/Chromium on this host or link its executable at the plugin data runtime/chrome path.

Relevant unchanged-main build error, with temporary checkout paths omitted:

Could not resolve "@get-bb/plugin-sdk"
The module "./dist/index.js" was not found on the file system:
node_modules/@get-bb/plugin-sdk/package.json:26:16
Failed: bb-plugin-github#build

Trust boundary: issue text and links were treated only as untrusted claims. All code inspected or executed came from the trusted main commit, its locked dependencies, the supplied skills, or the probe authored during this investigation. No issue instructions were followed.

> AGENT GENERATED