Skip to content

feat: extend embedded chat selection and composer controls - #5635

Closed
shemerey wants to merge 1 commit into
get-bb:mainfrom
shemerey:feat/embedded-chat-selection-controls
Closed

shemerey wants to merge 1 commit into
get-bb:mainfrom
shemerey:feat/embedded-chat-selection-controls

Conversation

@shemerey

@shemerey shemerey commented Oct 16, 2026 •

Copy link
Copy Markdown

Human comments

What was wrong

Embedded ThreadChat could add message actions but could not receive selected text or add an instance-scoped native selection action. Global message-action slots target the main timeline. It also could not omit the environment/access footer while retaining the native composer. This blocks LingQ's hidden tutor integration (companion PR).

What changed

Summary

ThreadChat.experimental_selectionActions
  -> shared timeline selection snapshot + native tooltip controls
  -> callback(selectedText, full message/thread identity, rendered block + UTF-16 offsets)
ThreadChat.experimental_showContextFooter=false
  -> FollowUpPromptBox omits only its context row
  -> native composer engine, permission snapshot and dispatch remain unchanged

Both props are per instance and default behavior is unchanged. User prose opts into native selection only when requested, preserving ordinary user-copy behavior. Repeated words retain the selected occurrence. SDK declarations, runtime forwarding, testing harness, Plugin Guide inventory and API audit entry are included. No private imports, global action registration or CSS concealment. No server/daemon wire, persisted settings or permission-policy change; existing CLI/SDK send, queue and permission inspection paths still apply.

How you verified

Evidence

  • Before: the initial three-file regression run had 6 failures / 98 passes (selection action and footer options absent). SDK harness regression also failed before its implementation. A separate clipboard regression failed before limiting user-prose opt-in.
  • Full host app run: 5,934 passed, 3 skipped across 626 files. After the final clipboard correction, the focused conversation/selection suite passed 110 tests. Additional earlier instance-forwarding/footer/permission coverage passed 157 tests; the final scoping/clipboard owner suite passed 47 cases within the 110-test run.
  • pnpm exec turbo run typecheck lint build --filter=@bb/app: passes. Lint reports 250 warnings, zero errors. pnpm exec turbo run test typecheck --filter=@get-bb/plugin-sdk: 372 passed. Plugin Guide: 72 passed. Formatting and git diff --check pass.
  • Companion LingQ npm run verify: 1,170 passed, 2 pre-existing manual skips; thresholds/excludes unchanged. Coverage 93.80% statements / 84.96% branches / 92.71% functions / 95.21% lines.
  • Live isolated source BB (frontend :12192 / server :20192 / daemon :28192), real Codex responses, real native ThreadChat: physical mouse selection of Żółw showed Add to chat + Translate, then opened LingQ's existing right panel with that word and sentence without navigating to a native thread route. Draft persisted over reload. Attach files, model, microphone and Stop run were observed. Recorded turn execution remained permissionMode: auto, matching the resolved default with the footer absent.
  • A separate ordinary conversation showed Add to chat + Reply in side chat, no Translate, and retained its environment/access footer. Hidden tutor stayed out of the default thread list; the LingQ icon restored Tutor with the same identity. Screenshots at desktop dark/light and 390px: evidence and reproduction.
  • Independent read-only review: no remaining code findings. Production BB was not replaced. Hardware microphone recording, iOS/WebKit and arbitrary multi-block phrases were not checked. Missing/mismatched selection context is explicit and the consumer rejects it visibly. The fresh store had no translation-service credentials, so translation-provider output was not verified.
  • Verification inventory preflight reported a pre-existing unmapped browser CLI family; no broad inventory rewrite was included.

Contributor gate status

The repository's contributor gate automatically closed this PR because shemerey is not allowlisted. Its bot comment requests maintainer contributor approval before reopening. The complete implementation remains on the fork branch; no allowlist changes or gate bypass are included.

Merge Danger

Door: two-way

Blast Radius: UI

Additive experimental SDK props only; no permission widening or migrations. Ordinary timelines keep their defaults and existing action path. The consumer plugin PR remains draft with an explicitly local source-SDK dependency until these APIs are published; that dependency is not release-ready.

AGENT GENERATED

@github-actions

Copy link
Copy Markdown
Contributor

Thanks @shemerey for the PR. This repo approves new contributors before it reviews their PRs, so this PR now closes on its own. That is expected. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ), post a link to this PR, and explain what it changes and why. A maintainer then adds you to the allow list and can reopen the PR.

@github-actions github-actions Bot closed this Oct 16, 2026
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