Skip to content

Preserve native append behavior in the DOM insertion guard - #8238

Merged
ymichael merged 2 commits into
mainfrom
slopcop/issue-8234
Nov 30, 2026
Merged

ymichael merged 2 commits into
mainfrom
slopcop/issue-8234

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

The app's DOM insertion wrapper dereferenced an explicit undefined reference before the native method could convert it to an append operation. A focused regression reproduced the TypeError on trusted main in two clean source checkouts. Verified report.

What changed

  • Exclude both nullish reference values before reading the reference's parent.
  • Keep plugin reparent refusal and the native insertion call unchanged.
  • Add null/undefined cases comparing native and guarded append results, child order, and absence of suppressions or warnings.
  • Two files in the existing DOM guard subsystem; 34 additions and 1 deletion, 35 changed text lines. No dependencies, generated files, protocols, schemas, permission boundaries, or packaging changes.

How you verified

  • Before the production fix, pnpm exec turbo run test --filter=@bb/app -- src/lib/foreign-dom-mutation-guard.test.tsx fails with the undefined-reference TypeError at line 261: 1 failed, 12 passed. Repeated by the same investigator in a second clean checkout at b0ddaad731565d7e4de68d824120d802fc78f7d5, with the same failure.
  • After the fix, pnpm exec turbo run test --filter=@bb/app -- src/lib/foreign-dom-mutation-guard.test.tsx src/lib/plugin-frontend-reload.test.ts: 66 passed, including existing guard and plugin reload coverage. Repeated after formatting.
  • pnpm exec turbo run lint typecheck --filter=@bb/app: passed.
  • pnpm exec turbo run build --filter=@bb/app: passed after building the SDK runtime prerequisite.
  • pnpm exec oxfmt --check apps/app/src/lib/foreign-dom-mutation-guard.ts apps/app/src/lib/foreign-dom-mutation-guard.test.tsx and git diff --check: passed. No binary changes.
  • Coverage is source-level jsdom; the released desktop build and a full Solid plugin were not separately exercised.

Fixes #8234

AGENT GENERATED

alexburlis added a commit to alexburlis/omnyo that referenced this pull request Nov 26, 2026
Record the upstream PRs, revisions, contributors, and Omnyo integration
commits for merge d2a24ac in docs/upstream-credits.md.

Original-PR: get-bb/bb#7663
Original-Commit: get-bb/bb@1737a03
Original-Author: rufi
Original-PR: get-bb/bb#8055
Original-Commit: get-bb/bb@651ae20
Original-Author: Jake Lancaster
Original-PR: get-bb/bb#8075
Original-Commit: get-bb/bb@511e1ed
Original-Author: Jake Lancaster
Original-Co-Author: Michael Yong
Original-Co-Author: Claude Opus 5.5
Original-PR: get-bb/bb#8096
Original-Commit: get-bb/bb@775090b
Original-Author: Michael Yong
Original-Co-Author: Claude Opus 5.5
Original-PR: get-bb/bb#8145
Original-Commit: get-bb/bb@8de6711
Original-Commit: get-bb/bb@0d3db49
Original-Commit: get-bb/bb@92d3a76
Original-Commit: get-bb/bb@6705422
Original-Author: Michael Yong
Original-Co-Author: Claude Opus 5.5
Original-PR: get-bb/bb#8171
Original-Commit: get-bb/bb@b56ed04
Original-Author: Jake Lancaster
Original-PR: get-bb/bb#8238
Original-Commit: get-bb/bb@2a9a142
Original-Author: SawyerHood
Original-PR: get-bb/bb#8247
Original-Commit: get-bb/bb@ba4ae22
Original-Author: Salem
Original-Co-Author: Claude Opus 5.5
Original-PR: get-bb/bb#8259
Original-Commit: get-bb/bb@96f40a9
Original-Author: SawyerHood
Original-PR: get-bb/bb#8263
Original-Commit: get-bb/bb@141e40a
Original-Author: mk
Original-PR: get-bb/bb#8266
Original-Commit: get-bb/bb@84e20e9
Original-Author: ILIA GOLUBEV
@ymichael
ymichael merged commit 6066aec into main Nov 30, 2026
32 checks passed
@ymichael
ymichael deleted the slopcop/issue-8234 branch November 30, 2026 21:19
scowalt pushed a commit to scowalt/bb that referenced this pull request Dec 1, 2026
🚨 **SLOP COP** 🚨 · `new-issue-autopilot`

## Human comments

## What was wrong

The app's DOM insertion wrapper dereferenced an explicit undefined
reference before the native method could convert it to an append
operation. A focused regression reproduced the TypeError on trusted main
in two clean source checkouts. [Verified
report](https://get-bb.github.io/reports/issues/8234.html).

## What changed

- Exclude both nullish reference values before reading the reference's
parent.
- Keep plugin reparent refusal and the native insertion call unchanged.
- Add null/undefined cases comparing native and guarded append results,
child order, and absence of suppressions or warnings.
- Two files in the existing DOM guard subsystem; 34 additions and 1
deletion, **35 changed text lines**. No dependencies, generated files,
protocols, schemas, permission boundaries, or packaging changes.

## How you verified

- Before the production fix, `pnpm exec turbo run test --filter=@bb/app
-- src/lib/foreign-dom-mutation-guard.test.tsx` fails with the
undefined-reference TypeError at line 261: 1 failed, 12 passed. Repeated
by the same investigator in a second clean checkout at
`a8c32288cf24894fbe85cb3a9ca0469c7a997ed6`, with the same failure.
- After the fix, `pnpm exec turbo run test --filter=@bb/app --
src/lib/foreign-dom-mutation-guard.test.tsx
src/lib/plugin-frontend-reload.test.ts`: **66 passed**, including
existing guard and plugin reload coverage. Repeated after formatting.
- `pnpm exec turbo run lint typecheck --filter=@bb/app`: passed.
- `pnpm exec turbo run build --filter=@bb/app`: passed after building
the SDK runtime prerequisite.
- `pnpm exec oxfmt --check
apps/app/src/lib/foreign-dom-mutation-guard.ts
apps/app/src/lib/foreign-dom-mutation-guard.test.tsx` and `git diff
--check`: passed. No binary changes.
- Coverage is source-level jsdom; the released desktop build and a full
Solid plugin were not separately exercised.

Fixes get-bb#8234

> AGENT GENERATED
<!-- slopcop:rule=new-issue-autopilot run=run_sfagv6fxmwxep9q3
sha=issue-8234 kind=summary -->

Co-authored-by: SawyerHood <[email protected]>
Co-authored-by: Michael Yong <[email protected]>
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.

DOM guard throws on insertBefore(node, undefined), which the DOM treats as append

2 participants