Skip to content

Let plugins reveal their own content in the thread timeline - #4836

Closed
brsbl wants to merge 4 commits into
mainfrom
bb/plugin-scroll-into-view-api-thr_bfxsh3mzue
Closed

brsbl wants to merge 4 commits into
mainfrom
bb/plugin-scroll-into-view-api-thr_bfxsh3mzue

Conversation

@brsbl

@brsbl brsbl commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Plugins could expand a section inside a reply, but DOM scrollIntoView fought the timeline's bottom anchoring. Digests' routine-email counts opened content above the visible area, with no SDK hook to release the anchor.

What changed

  • Added experimental_useThreadScroll().scrollIntoView(element, { block, behavior }), restricted to the calling slot instance and containing timeline; requires Plugin SDK 0.6.18 or later.
  • Preserve the requested position through animated expansion; resume anchoring on new timeline events or the user's return to bottom.
  • Respect reduced motion and the sticky composer; include SDK types, Plugin Guide documentation, regression tests, and ::scroll-demo usage.

How you verified

  • Remote final-head CI passed, including app and SDK tests, Linux/Windows suites, package smoke, type checks, lint, and SDK version guards.
  • Chrome for Testing 151.0.7922.71: desktop and mobile expansion settled at the section heading after three seconds; no captured page errors.
  • Verified hard reload, client navigation, wheel return to bottom, and reduced motion (instant calls despite requesting smooth).
  • Code review of 4d15c1da0a..60288c11e2 covered SDK ownership and anchoring and identified composer overlap; fixed it and added end/nearest coverage. Tests also cover ownership, unmount, resize, animated expansion, and new-event resumption.

Before: 4d15c1da0a · After: a2798ae240 · 2× pixel density. Same synthetic thread, directive markup, route, and expanded state in the isolated branch web app. The baseline fixture uses DOM scrolling; the candidate uses the new SDK hook.

Expanded routine emails Before After
Desktop · 1440×900 Before: routine section opens above the viewport After: routine section heading stays at the top
Mobile · 390×844 Before on mobile: section heading is off-screen After on mobile: section heading stays visible

BB-Thread-ID: thr_bfxsh3mzue

AGENT GENERATED

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@brsbl
brsbl marked this pull request as draft October 4, 2026 10:06
@brsbl

brsbl commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: the user decided against new plugin APIs and core changes for this. Digests (brsbl/bb-plugins#240) fixes the scroll jump inside the plugin instead.

@brsbl brsbl closed this Oct 4, 2026
@brsbl
brsbl deleted the bb/plugin-scroll-into-view-api-thr_bfxsh3mzue branch October 6, 2026 11:21
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.

1 participant