Skip to content

Capture anonymous plugin usage through shared boundaries - #5439

Closed
brsbl wants to merge 1 commit into
bb/windows-acp-shard-thr_swe8w7rxcmfrom
bb/plugin-usage-main-thr_a4mhd93zji
Closed

brsbl wants to merge 1 commit into
bb/windows-acp-shard-thr_swe8w7rxcmfrom
bb/plugin-usage-main-thr_a4mhd93zji

Conversation

@brsbl

@brsbl brsbl commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Plugin actions lacked shared capture boundaries, so usage could be counted inconsistently. Actor and source classifications also differed between events.

What changed

  • Plugin actions are counted once across CLI, tool, RPC, and panel boundaries.
  • Plugin use reports a source category instead of a plugin name.
  • Plugin Guide documents the shared capability-use API.

Stack order: #5947 → #5437 → #5477 → #5469 → #5470 → #5471 → #5472 → #5473 → #5439.

How you verified

  • Remote CI: plugin-boundary and source-classification checks passed. Run
  • End-to-end: plugin use reached PostHog with exactly the planned properties.

Existing Plugin Guide comparison: before 41e9b51b0fa4545dbfd8eb5a1a8d6d0b027f79ea; after 40972c5893b7dfdbbf427ea7b5673df9bd345c34. Captured at 2× density with the same fixture and light theme. These retain their original capture revisions.

Plugin Guide state Before After
Backend capabilities, 1440×900 Before: existing backend capabilities After: anonymous capability usage card
New capability details, 1440×900 No corresponding detail existed on the parent revision; preceding surface shown above. After: anonymous capability usage details

BB-Thread-ID: thr_a4mhd93zji

BB-Thread-ID: thr_nq42ntdw95

BB-Thread-ID: thr_k4ic49de34

AGENT GENERATED

@brsbl
brsbl added this pull request to stack #5440 October 13, 2026 17:43
@brsbl
brsbl marked this pull request as ready for review October 13, 2026 19:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T19:20:38.251228Z 207404a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 207404a8b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const result = await withPluginUse(
deps,
id,
currentTelemetryTrigger(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the app surface for plugin UI RPCs

When an action RPC is called from a plugin UI through useRpc, callPluginRpc in apps/app/src/lib/plugin-sdk-hooks.ts uses raw fetch and sends no app-surface header. The request is consequently classified as the API surface, so currentTelemetryTrigger() records the primary human interaction as trigger: "unknown" and telemetry also reports app_surface: "api" instead of person/web (or desktop/mobile). Route these calls through the app-surface-aware fetch boundary before deriving the trigger.

Useful? React with 👍 / 👎.

pages: { input: ownedSchema, output: outputSchema },
screenshot: { input: screenshotSchema, output: outputSchema },
screenshot: {
experimental_usage: "action",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Classify all browser action RPCs

The selective classification here marks screenshot and stop, but the same public contract leaves the mutating open, run, and close methods unclassified. Direct client/SDK calls to those methods therefore produce no browser feature_used event, leaving the new shared RPC boundary with incomplete coverage of Browser Automation's main actions.

Useful? React with 👍 / 👎.

Comment on lines +2230 to +2232
const result = await withPluginUse(deps, id, "unknown", () =>
registration.run(argv, ctx),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid counting every CLI dispatch as feature use

Wrapping the entire generated CLI runner records an invocation before it is known whether any action ran. Requests such as bb <plugin> --help, malformed arguments that only render an error, and read-only subcommands all increment feature_used, so routine discovery and mistakes inflate plugin usage. Capture after command parsing/execution with action-aware command metadata rather than at the registration-wide dispatch boundary.

Useful? React with 👍 / 👎.

@brsbl
brsbl removed this pull request from stack #5440 October 14, 2026 03:16
@brsbl
brsbl changed the base branch from bb/thread-turn-lifecycle-main-thr_a4mhd93zji to bb/windows-acp-shard-thr_swe8w7rxcm October 14, 2026 03:16
@brsbl
brsbl added this pull request to stack #5474 October 14, 2026 03:16
@brsbl
brsbl removed this pull request from stack #5474 October 14, 2026 04:57
@brsbl
brsbl added this pull request to stack #5478 October 14, 2026 04:58
@brsbl
brsbl force-pushed the bb/plugin-usage-main-thr_a4mhd93zji branch from 4ce79da to 9a92061 Compare October 21, 2026 04:38
@brsbl
brsbl removed this pull request from stack #5478 October 21, 2026 04:40
@brsbl
brsbl added this pull request to stack #5984 October 21, 2026 04:40
@brsbl
brsbl force-pushed the bb/plugin-usage-main-thr_a4mhd93zji branch from 9a92061 to 4bf84c4 Compare October 21, 2026 04:49
@brsbl
brsbl force-pushed the bb/plugin-usage-main-thr_a4mhd93zji branch from 4bf84c4 to b910246 Compare October 21, 2026 04:55
@github-actions

Copy link
Copy Markdown
Contributor

This is an automated message. We have closed this pull request because it has been open for more than two weeks.

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