Skip to content

fix(capture): exempt floating chrome above bottom tabs - #4405

Merged
thymikee merged 5 commits into
mainfrom
fix/4365-floating-bar-occlusion
Nov 11, 2026
Merged

thymikee merged 5 commits into
mainfrom
fix/4365-floating-bar-occlusion

Conversation

@thymikee

@thymikee thymikee commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Recognize a floating UIKit container above a complete tiled bottom tab row, so its projected content stays actionable. The exemption requires the _UIFloatingBarContainerView role and viewport and bottom-row geometry. Ordinary toolbars, a single CTA, hosted controls, and sheets remain covering. Three files changed, including the captured projection fixture; no scope expansion.

Fixes #4365

Validation

  • On iPhone 18 Pro, iOS 27.0, base 45e1372fa6d8fabe26ff35ab2ec207ccc58e53bd marked three Home nodes covered by the 402×791 toolbar. Head runtime from 96a677586108cce34e9644ae15dbfab20db2b7ee plus the source edits committed in db450150326d79b5b7c97eeeb9d4297f2329ef83 showed zero covered on Home and Actions, and the action press succeeded. Captures and build details.
  • 14 capture-kit occlusion and scroll test files passed (184 tests).
  • pnpm check:affected --run --head db45015032: passed, receipt run-ytMA4s, exactCommit: true. The new JSON fixture caused fail-open selection of the full runnable set.
  • The iOS 27.2 runtime was unavailable. Independent reviewer unavailable; the diff received a self-review.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.21 MB 6.21 MB +711 B
Package (unpacked) 6.20 MB 6.21 MB +711 B
Package (download) 1.88 MB 1.88 MB +234 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.1 ms 35.7 ms +8.6 ms
CLI --help 49.8 ms 72.4 ms +22.5 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@apex-sentinel-staging

apex-sentinel-staging Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Apex Sentinel

Verdict: approve

Since the last review: 0 new · 0 still open · 1 no longer raised (1 marked fixed)

No findings.

Reviewed with this repository's own Sentinel configuration (972451e2a7b0).

Feedback goes in the review comment threads, as a reply under the inline comment of a finding:

Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.

Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.

Comment @apex-sentinel-staging review on this conversation to run a full review.

Earlier reviews

Review of 96a67758 · 11.11.2026 08:04 UTC

Apex Sentinel

Verdict: approve

Since the last review: 0 new · 1 still open · 2 no longer raised (2 marked fixed)

1 finding(s): 1 minor.

🟡 Minor (1)

Where Finding
packages/capture-kit/src/snapshot-occlusion.ts:536 Bottom-bar exemption keys on any button-like siblings, so covering chrome is excused

2 findings below minor not shown (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (45e1372fa6d8).

Review of 0f4f2ad1 · 11.11.2026 07:49 UTC

Apex Sentinel

Verdict: approve

3 finding(s): 3 minor.

🟡 Minor (3)

Where Finding
packages/capture-kit/src/snapshot-occlusion.ts:539 isViewportAboveBottomBar reads a magic -1 parent key instead of no siblings
packages/capture-kit/src/snapshot-occlusion.ts:540 Bottom-bar exemption keys on any two equal-width Buttons, exempting covering chrome
packages/capture-kit/src/snapshot-occlusion.ts:529 Bottom-bar exemption comment and docs never record the new covered-state rule

1 finding below minor not shown (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (45e1372fa6d8).

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 3 new findings on 0f4f2ad. The verdict and the full list are in the summary comment.

@thymikee

Copy link
Copy Markdown
Member Author

The fix at 96a6775 changes occlusion classification on the live capture and press route, but it is proven only by a hand-built tree, and the iOS 27.2 live check was not run. All 17 checks pass at this commit. No conflicts. Before merge, the fix needs live iOS evidence from the Bottom Tabs screen.

snapshot-occlusion.ts:530 runs on the production route: snapshot-state.ts:106 calls annotateCoveredSnapshotNodes on the projected nodes, and press refuses with target_covered from that state. The test tree is rebuilt from the issue's summary table, and the root cause sits in projection. So the fix holds only if the live projected shape matches the fixture: the container has the role, it shares a parent with the tab buttons, the buttons tile edge to edge, and each button top equals the container bottom within 0.5pt. The issue gives 791.33 on one side only. If the live bottom differs by more than 0.5pt, or the buttons are not direct siblings, the exemption does not fire. #4365 then stays open while the PR says Fixes #4365. Please run an iOS 27.x simulator that reproduces the bug (27.2 per the issue; if it is unavailable, first confirm that 27.0 or 27.1 reproduces on base). Use tester-army/e2e apps/mobile-benchmark Release, Bottom Tabs. The run needs three outputs: base snapshot -i --json on Home with nodes marked covered by the 402x791 Toolbar; head snapshot -i --json on Home and Actions showing that Toolbar with role _UIFloatingBarContainerView beside the three tab buttons and zero covered nodes; and head press 'id="complete-action-button"' --platform ios --json returning success. Please commit the captured projected tree as the regression fixture in place of the hand-built one.

Not blocking, take or leave: the 'a real toolbar over content' test (:945) also fails the bottom-10% filter, so deleting the bottom <= viewport.y + viewport.height / 2 guard keeps it green; give that case a complete tiled row inside the bottom 10%, or drop the guard if the row filter already implies it. The 'control hosted by the projected floating container' test passes on base too; assert coveredBy.label === 'Action'. projectedTabsTree (:925) gives the 402x874 Toolbar an empty role and integer rects, while real captures use _UIFloatingBarContainerView and fractional edges such as 791.33. The PR deletes the 15-line file header (:5) that records the ADR-0019 constraint and the #2996 shape, unrelated to #4365; please restore it or keep a one-line note. The exact class literal at snapshot-occlusion.ts:536 could be a module constant next to VIEWPORT_CHROME_KIND_FRAGMENTS, as geometry-policy.ts:33 does for ALERT_ROOT_CLASS_PREFIX.

I judged the regression tests by tracing the base and head code paths and did not run them. I do not know whether iOS 27.0 or 27.1 simulators reproduce the 27.2 shape.

Three earlier threads are fixed at this head and can be resolved: the single bottom Button case (#4405 (comment)), the tabitem filter (#4405 (comment)), and the tiling loop (#4405 (comment)). Two more can be resolved as well: the earlier-head concern (#4405 (comment)) is addressed by the current guards, and the 'any button-like siblings' concern (#4405 (comment)) now applies only to a role-bearing pass-through host above a complete row, with role-less toolbars still covering. No other review threads still apply.

@thymikee

Copy link
Copy Markdown
Member Author

Live iOS evidence

Device: iPhone 18 Pro simulator, iOS 27.0. Base: 45e1372fa6d8fabe26ff35ab2ec207ccc58e53bd. Head runtime: 96a677586108cce34e9644ae15dbfab20db2b7ee plus the review-note source edits committed in db45015032; the tested runtime source matches that commit. The tester-army/e2e app is Release at e53401488a57c901dff72a8bd2a322990f157328. Its generated native project needed a temporary scene delegate and scene manifest: the installed iOS 27.1 SDK otherwise crashed it at launch because the scene lifecycle is required.

Outputs below are trimmed to projected node identity, geometry and coverage. The toolbar and three tab buttons share parent 0; their edges differ by 0.333333343 points.

Base Home (3 covered)

[
  {
    "index": 0,
    "type": "Application",
    "role": "UIApplication",
    "label": "e2e Benchmark",
    "rect": {
      "x": 0,
      "y": 0,
      "width": 402,
      "height": 874
    }
  },
  {
    "index": 1,
    "parentIndex": 0,
    "type": "StaticText",
    "role": "RCTParagraphComponentView",
    "label": "Home",
    "rect": {
      "x": 177.3333282470703,
      "y": 71,
      "width": 47.333343505859375,
      "height": 20.333335876464844
    },
    "interactionBlocked": "covered",
    "coveredBy": {
      "kind": "toolbar",
      "label": "Toolbar",
      "rect": {
        "x": 0,
        "y": 0,
        "width": 402,
        "height": 791
      }
    }
  },
  {
    "index": 2,
    "parentIndex": 0,
    "type": "StaticText",
    "role": "RCTParagraphComponentView",
    "label": "Home",
    "identifier": "home-tab-content",
    "rect": {
      "x": 173.3333282470703,
      "y": 422.00000762939453,
      "width": 55,
      "height": 24
    },
    "interactionBlocked": "covered",
    "coveredBy": {
      "kind": "toolbar",
      "label": "Toolbar",
      "rect": {
        "x": 0,
        "y": 0,
        "width": 402,
        "height": 791
      }
    }
  },
  {
    "index": 3,
    "parentIndex": 0,
    "type": "StaticText",
    "role": "RCTParagraphComponentView",
    "label": "Go to the Actions tab and press the button there.",
    "rect": {
      "x": 52.66666793823242,
      "y": 454.00000762939453,
      "width": 296.66668701171875,
      "height": 15.666656494140625
    },
    "interactionBlocked": "covered",
    "coveredBy": {
      "kind": "toolbar",
      "label": "Toolbar",
      "rect": {
        "x": 0,
        "y": 0,
        "width": 402,
        "height": 791
      }
    }
  },
  {
    "index": 4,
    "parentIndex": 0,
    "type": "Toolbar",
    "role": "_UIFloatingBarContainerView",
    "label": "Toolbar",
    "identifier": "Toolbar",
    "rect": {
      "x": 0,
      "y": 0,
      "width": 402,
      "height": 791
    }
  },
  {
    "index": 5,
    "parentIndex": 0,
    "type": "Button",
    "role": "RCTViewComponentView",
    "label": "Home, tab, 1 of 3",
    "identifier": "tab-home",
    "rect": {
      "x": 0,
      "y": 791.3333333432674,
      "width": 134,
      "height": 48.66668701171875
    }
  },
  {
    "index": 6,
    "parentIndex": 0,
    "type": "Button",
    "role": "RCTViewComponentView",
    "label": "Feed, tab, 2 of 3",
    "identifier": "tab-feed",
    "rect": {
      "x": 134,
      "y": 791.3333333432674,
      "width": 134,
      "height": 48.66668701171875
    }
  },
  {
    "index": 7,
    "parentIndex": 0,
    "type": "Button",
    "role": "RCTViewComponentView",
    "label": "Actions, tab, 3 of 3",
    "identifier": "tab-actions",
    "rect": {
      "x": 268,
      "y": 791.3333333432674,
      "width": 134,
      "height": 48.66668701171875
    }
  },
  {
    "index": 8,
    "parentIndex": 0,
    "type": "Toolbar",
    "role": "_UIFloatingBarContainerView",
    "label": "Toolbar",
    "identifier": "Toolbar",
    "rect": {
      "x": 0,
      "y": 0,
      "width": 402,
      "height": 874
    }
  }
]

Head Home (0 covered)

[
  {
    "index": 0,
    "type": "Application",
    "role": "UIApplication",
    "label": "e2e Benchmark",
    "rect": {
      "x": 0,
      "y": 0,
      "width": 402,
      "height": 874
    }
  },
  {
    "index": 1,
    "parentIndex": 0,
    "type": "StaticText",
    "role": "RCTParagraphComponentView",
    "label": "Home",
    "rect": {
      "x": 177.3333282470703,
      "y": 71,
      "width": 47.333343505859375,
      "height": 20.333335876464844
    }
  },
  {
    "index": 2,
    "parentIndex": 0,
    "type": "StaticText",
    "role": "RCTParagraphComponentView",
    "label": "Home",
    "identifier": "home-tab-content",
    "rect": {
      "x": 173.3333282470703,
      "y": 422.00000762939453,
      "width": 55,
      "height": 24
    }
  },
  {
    "index": 3,
    "parentIndex": 0,
    "type": "StaticText",
    "role": "RCTParagraphComponentView",
    "label": "Go to the Actions tab and press the button there.",
    "rect": {
      "x": 52.66666793823242,
      "y": 454.00000762939453,
      "width": 296.66668701171875,
      "height": 15.666656494140625
    }
  },
  {
    "index": 4,
    "parentIndex": 0,
    "type": "Toolbar",
    "role": "_UIFloatingBarContainerView",
    "label": "Toolbar",
    "identifier": "Toolbar",
    "rect": {
      "x": 0,
      "y": 0,
      "width": 402,
      "height": 791
    }
  },
  {
    "index": 5,
    "parentIndex": 0,
    "type": "Button",
    "role": "RCTViewComponentView",
    "label": "Home, tab, 1 of 3",
    "identifier": "tab-home",
    "rect": {
      "x": 0,
      "y": 791.3333333432674,
      "width": 134,
      "height": 48.66668701171875
    }
  },
  {
    "index": 6,
    "parentIndex": 0,
    "type": "Button",
    "role": "RCTViewComponentView",
    "label": "Feed, tab, 2 of 3",
    "identifier": "tab-feed",
    "rect": {
      "x": 134,
      "y": 791.3333333432674,
      "width": 134,
      "height": 48.66668701171875
    }
  },
  {
    "index": 7,
    "parentIndex": 0,
    "type": "Button",
    "role": "RCTViewComponentView",
    "label": "Actions, tab, 3 of 3",
    "identifier": "tab-actions",
    "rect": {
      "x": 268,
      "y": 791.3333333432674,
      "width": 134,
      "height": 48.66668701171875
    }
  },
  {
    "index": 8,
    "parentIndex": 0,
    "type": "Toolbar",
    "role": "_UIFloatingBarContainerView",
    "label": "Toolbar",
    "identifier": "Toolbar",
    "rect": {
      "x": 0,
      "y": 0,
      "width": 402,
      "height": 874
    }
  }
]

Head Actions (0 covered)

[
  {
    "index": 0,
    "type": "Application",
    "role": "UIApplication",
    "label": "e2e Benchmark",
    "rect": {
      "x": 0,
      "y": 0,
      "width": 402,
      "height": 874
    }
  },
  {
    "index": 1,
    "parentIndex": 0,
    "type": "StaticText",
    "role": "RCTParagraphComponentView",
    "label": "Actions",
    "rect": {
      "x": 171,
      "y": 71,
      "width": 60,
      "height": 20.333335876464844
    }
  },
  {
    "index": 2,
    "parentIndex": 0,
    "type": "Other",
    "role": "RCTViewComponentView",
    "label": "Complete action",
    "identifier": "complete-action-button",
    "rect": {
      "x": 115,
      "y": 424.3333206176758,
      "width": 172.33334350585938,
      "height": 43.33331298828125
    }
  },
  {
    "index": 3,
    "parentIndex": 0,
    "type": "Toolbar",
    "role": "_UIFloatingBarContainerView",
    "label": "Toolbar",
    "identifier": "Toolbar",
    "rect": {
      "x": 0,
      "y": 0,
      "width": 402,
      "height": 791
    }
  },
  {
    "index": 4,
    "parentIndex": 0,
    "type": "Button",
    "role": "RCTViewComponentView",
    "label": "Home, tab, 1 of 3",
    "identifier": "tab-home",
    "rect": {
      "x": 0,
      "y": 791.3333333432674,
      "width": 134,
      "height": 48.66668701171875
    }
  },
  {
    "index": 5,
    "parentIndex": 0,
    "type": "Button",
    "role": "RCTViewComponentView",
    "label": "Feed, tab, 2 of 3",
    "identifier": "tab-feed",
    "rect": {
      "x": 134,
      "y": 791.3333333432674,
      "width": 134,
      "height": 48.66668701171875
    }
  },
  {
    "index": 6,
    "parentIndex": 0,
    "type": "Button",
    "role": "RCTViewComponentView",
    "label": "Actions, tab, 3 of 3",
    "identifier": "tab-actions",
    "rect": {
      "x": 268,
      "y": 791.3333333432674,
      "width": 134,
      "height": 48.66668701171875
    }
  },
  {
    "index": 7,
    "parentIndex": 0,
    "type": "Toolbar",
    "role": "_UIFloatingBarContainerView",
    "label": "Toolbar",
    "identifier": "Toolbar",
    "rect": {
      "x": 0,
      "y": 0,
      "width": 402,
      "height": 874
    }
  }
]

Head press id="complete-action-button"

{
  "success": true,
  "data": {
    "x": 201,
    "y": 446,
    "runnerMainThreadBusy": false,
    "message": "Tapped id=\"complete-action-button\" (201, 446)",
    "referenceWidth": 402,
    "referenceHeight": 874,
    "targetKind": "selector",
    "selector": "id=\"complete-action-button\"",
    "selectorChain": [
      "id=\"complete-action-button\"",
      "role=\"other\" label=\"Complete action\"",
      "label=\"Complete action\""
    ],
    "refLabel": "Complete action",
    "resolution": {
      "source": "runtime",
      "phase": "pre-action",
      "kind": "unique"
    }
  }
}

The screenshot after the press showed “Action completed”. The head Home projection, without volatile process and ref fields, is committed as the regression fixture.

@thymikee

Copy link
Copy Markdown
Member Author

The code at db45015 looks right to me, and it fixes the two problems from my earlier review at 96a6775: live evidence is now posted, and the fixture is the captured tree. I found no new problems.

CI is green at db45015: 17 checks, none failing. There are no conflicts.

The five earlier inline threads are fixed at this head, so you can resolve them: #4405 (comment) (complete bottom row), #4405 (comment) (Button and TabItem rows), #4405 (comment) (non-numeric parent index), #4405 (comment) (container role gate), #4405 (comment) (classifier comment).

I did not run the tests. I traced the head and base code paths by hand, and I relied on the live base output for the shape the fixture uses. The live run used iOS 27.0, not the 27.2 named in the issue. Base reproduces on 27.0, so the fixture shape is real, but I did not check a 27.2 capture for different edge offsets. The 0.333pt gap between the container and the row sits inside the 0.5pt tolerance. I did not check other device scales or bar heights where the projected edges could differ by more.

Nothing else is needed from you before a maintainer merges.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 11, 2026
@thymikee
thymikee merged commit a8774f3 into main Nov 11, 2026
17 checks passed
@thymikee
thymikee deleted the fix/4365-floating-bar-occlusion branch November 11, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS 27: a floating-bar container that ends at a JS tab bar marks the whole tab covered

1 participant