Skip to content

Add plugin-contributed sidebar sections - #1565

Open
kazemek21 wants to merge 1 commit into
mainfrom
kylez_NEXUS-3690_plugin-sidebar-sections
Open

kazemek21 wants to merge 1 commit into
mainfrom
kylez_NEXUS-3690_plugin-sidebar-sections

Conversation

@kazemek21

@kazemek21 kazemek21 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR

Plugins can add a versioned section to the existing Team conversation sidebar. Buzz keeps ownership of the sidebar frame and navigation interactions instead of letting a plugin replace them.

Why

The plugin author API has no sidebar section contribution, so plugins cannot add their own rows beside the built-in sections.

What

The author API exposes an optional v1 capability for a section, observable rows, row selection to an OpenTarget, and optional header actions. The host renders each contribution through its existing sidebar and navigation components, isolates contribution failures, and disposes registrations with their plugin scope.

How

Contributed sections share the host's collapse, drag-reorder, resize, persisted preference, and theme behavior. They reorder within their own group; the built-in channel-group order stays unchanged. Older hosts that omit the optional capability remain unaffected.

Testing

The browser case verifies coexistence with Solo and Team at 1440px and 390px, light and dark themes, enlarged text, keyboard and pointer collapse, and plugin disable/enable. The full file passed on macOS Blox in Chromium and WebKit with bin/pnpm test:browser tests/browser/sidebar-contributions.spec.mjs --project chromium --project webkit --no-deps --workers=1.

The new drag-preview case protects the PointerSensor and portaled DragOverlay interaction, which lower-level tests cannot exercise. It failed before the overlay fix (one visible Workspace label instead of the section plus preview) and passed after it. No browser cases were removed.

Before and after at desktop width (1440px):

sidebar-contribution-before-1440-light-16px-chromium
sidebar-contribution-after-1440-light-16px-chromium

Before and after at narrow width (390px):

sidebar-contribution-before-390-light-20px-chromium
sidebar-contribution-after-390-light-20px-chromium

Risk

This adds an optional host capability. It does not change page routing or replace Solo, Team, or Settings navigation. Failures stay local to the contribution.

FOUNDATION files

  • src/plugins/author.ts exports the public author types.
  • src/app/services.ts constructs the host registration service.
  • src/app/App.tsx passes the service into the host shell.

Related change

#1532 changes the sidebar filter menu and channel activity handling. This PR keeps its section contribution wiring in separate hunks.

Open question

Should a future contract let plugins interleave their sections with built-in channel groups, or keep contributed sections together as this version does?

— Posted by Codex (gpt-6-luna) on behalf of kazemek21

@kazemek21
kazemek21 force-pushed the kylez_NEXUS-3690_plugin-sidebar-sections branch 3 times, most recently from 8fb5d12 to db4fac3 Compare October 23, 2026 04:25
@kazemek21
kazemek21 marked this pull request as ready for review October 23, 2026 05:19
@kazemek21
kazemek21 requested a review from a team as a code owner October 23, 2026 05:19

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Star Lord’s automated source review via Wes’s account, integrating independent Rocket (systems/lifecycle), Mantis (correctness/security/concurrency), and Groot (product/accessibility) reviews.

Reviewed head 37e7d62413a5dfbcd6dcd86e3a10c0af32846488 against base c2210b45bb6f539f1d236d18b284c16566e70602.

One P2: asynchronously arriving contributed rows do not trigger the host’s pending selected-row reveal; see the inline finding. Source assessment: 8/10 until that integration is repaired. The optional capability otherwise reuses the existing contribution registry, SidebarSection/DnD framing, NavigationItem/IconButton controls, navigation controller and scoped preference owner. Disable/replacement guards, contribution failure isolation and separate reorder domains are preserved.

Optional: SidebarContributionSection.tsx:83–86 puts the render-failure notice inside the collapsible content. A collapsed failed section exposes the explanation only when expanded. Consider a styled headerNotice if failure visibility while collapsed is desired; this is a discoverability improvement, not a separate required fix.

Validation: immutable source/diff inspection and whitespace checks only. The public description, both commit messages and all four attached fixture screenshots were inspected with no evident sensitive disclosure. Three browser cases were added and none removed: responsive/theme/enlarged-text integration, PointerSensor/portaled drag preview, and failed-icon isolation during drag. Those browser-specific boundaries justify real-browser coverage; row/action semantics and order persistence also have lower-layer tests. The author’s fail-before/pass-after claim was not independently reproduced. Browser row navigation, keyboard reorder/reload persistence and rendered error/retry focus remain unverified by this review.

One hosted-check snapshot around 05:30 UTC showed all executed checks successful, with Windows native validation skipped. No tests, builds, apps, installs, live operations or PR code were executed. Native behavior, measured performance, assistive-technology output and human acceptance remain unverified. This non-blocking COMMENT review is not approval or merge authorization.

Comment thread src/features/channel-navigation/SidebarContributionSection.tsx
Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Kyle Zemek <kylez@squareup.com>
@kazemek21
kazemek21 force-pushed the kylez_NEXUS-3690_plugin-sidebar-sections branch from e0f0a5f to 873c798 Compare October 23, 2026 15:40
@kazemek21
kazemek21 requested a review from wesbillman October 23, 2026 15:59
@kazemek21

Copy link
Copy Markdown
Contributor Author

Addressed the review body's P2 about asynchronously arriving contributed rows on this head: 873c798899e8a9ad58323d57cba265c3e3a79870 notifies the existing selected-row reveal owner after contributed-row commits, with browser coverage for delayed arrival and user-scroll cancellation. The associated inline finding is resolved.

Review body: #1565 (review)

— Posted by Codex (gpt-6-luna) on behalf of kylez

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.

2 participants