Repository navigation
fix(plugin-sdk): restore shipped createSessionHeaderLink as deprecated compat export - #169746
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR restores createSessionHeaderLink as a deprecated SDK export, updates the stable-surface inventory, and protects compatibility through January 12, 2027. Example: A browser plugin registers createSessionHeaderLink as a session-header accessory for agent:main:main.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: it repairs a verified shipped SDK compatibility break, resolves the earlier mount-type finding, and preserves the intentional feature retirement. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe browser SDK supplies accessory mount functions to Control UI; the host passes session identity and lifecycle context, and the accessory manages DOM in its container. flowchart TD
A[Browser plugin] --> B[Control UI SDK]
B --> C[Deprecated accessory mount]
D[Accessory host] --> C
C --> E[DOM container]
F[Stable SDK inventory] --> G[Compatibility checker]
Technical reviewBest possible solution: Retain the deprecated export with current accessory typing and dated removal protection while preserving the retired return-button behavior. Do we have a high-confidence way to reproduce the issue? Stable source contains a concrete importing browser plugin, while current main omits its named export; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch repairs the existing SDK boundary, preserves the intentional retirement, and uses the established compatibility registry rather than introducing another owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 35481ee222f5. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +92, Tests +35, Docs +9, Config +1, Other -956. Total -819 across 8 files. Added test files: 1. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)
Reviewed October 12, 2026, 5:33 AM ET / 09:33 UTC (Revision 3). |
…d compat export Stable 2026.10.1 and 2026.10.2 ship createSessionHeaderLink from openclaw/plugin-sdk/control-ui; #165334 removed it on main without a compat window. Restore the shipped helper verbatim as a deprecated export, record plugin-sdk-session-header-link (removeAfter 2027-01-12), and refresh the shipped-surface inventory to v2026.10.2.
49119f1 to
a2864c4
Compare
…d compat export (#169746) * fix(plugin-sdk): restore shipped createSessionHeaderLink as deprecated compat export Stable 2026.10.1 and 2026.10.2 ship createSessionHeaderLink from openclaw/plugin-sdk/control-ui; #165334 removed it on main without a compat window. Restore the shipped helper verbatim as a deprecated export, record plugin-sdk-session-header-link (removeAfter 2027-01-12), and refresh the shipped-surface inventory to v2026.10.2. * fix(plugin-sdk): type restored session header link against current accessory props * test(plugin-sdk): name the lane that type-checks the shipped accessory shape (cherry picked from commit 4d17409)
…d compat export (openclaw#169746) * fix(plugin-sdk): restore shipped createSessionHeaderLink as deprecated compat export Stable 2026.10.1 and 2026.10.2 ship createSessionHeaderLink from openclaw/plugin-sdk/control-ui; openclaw#165334 removed it on main without a compat window. Restore the shipped helper verbatim as a deprecated export, record plugin-sdk-session-header-link (removeAfter 2027-01-12), and refresh the shipped-surface inventory to v2026.10.2. * fix(plugin-sdk): type restored session header link against current accessory props * test(plugin-sdk): name the lane that type-checks the shipped accessory shape
Related: #158742, #165334
What Problem This Solves
Fixes: browser plugins built against stable OpenClaw 2026.10.1 or 2026.10.2 that import
createSessionHeaderLinkfromopenclaw/plugin-sdk/control-uifail on currentmain, because #165334 removed this shipped Plugin SDK export with no compatibility window.User Impact
User impact: published plugins that import
createSessionHeaderLinkkeep compiling and loading. The helper is now@deprecatedand renders nothing, because hosts no longer passprops.sessiontosession-headeraccessories (the conversation-link feature stays reverted). It can be removed after 2027-01-12.Why This Change Was Made
Per the Plugin SDK compat policy (deprecate shipped public contracts, add a named removal plan), this restores only the public SDK export. It does not bring back the Slack/Discord return-button UI.
src/plugin-sdk/control-ui-session-link.tsis restored byte-for-byte fromv2026.10.1, plus a@deprecatedJSDoc. It stays self-contained, with local types and no host imports.src/plugin-sdk/control-ui.tsre-exports it again.tsconfig.core.jsonexcludes the DOM-only file from the core (non-DOM) graph again, as it did atv2026.10.1.tsconfig.ui.jsonstill type-checks it throughsrc/plugin-sdk/control-ui*.ts.plugin-sdk-session-header-link: statusdeprecated, ownersdk, deprecated/warningStarts 2026-10-12,removeAfter2027-01-12. UnderevaluatePluginSdkShippedSurface, this record authorizes removal only after that date.control-uideprecated exports), with a reason comment on each.scripts/lib/plugin-sdk-shipped-surface.jsonis regenerated canonically. It now usesv2026.10.2, the newest stable tag, so the checker's stale-inventory warning is gone. I also generated it forv2026.10.1; the name sets are identical and onlyreleaseandcommitdiffer.No new tests: no test covered this helper at
v2026.10.1. The shipped-surface check is what protects the export, andregistry.test.tsvalidates the new record's shape.Evidence
pnpm plugin-sdk:surface:checkfails withUnauthorized removals from shipped Plugin SDK v2026.10.1: openclaw/plugin-sdk/control-ui: 1 unauthorized missing names (createSessionHeaderLink). I reproduced this by dropping the re-export locally.pnpm plugin-sdk:surface:checkprintsshipped Plugin SDK v2026.10.2: no unauthorized removalsand passes all budgets. It also passes against thev2026.10.1inventory.pnpm plugin-sdk:check-exports: passed.pnpm test src/plugins/compat/registry.test.ts: 12/12 passed.pnpm test test/scripts/plugin-sdk-surface-report.test.ts test/scripts/plugin-sdk-shipped-surface.test.ts: passed.pnpm check:changed: formatting, the Plugin SDK export/surface gates, plugin boundaries, and every tsgo lane (core, core tests including ui-*, extensions) passed. The only failure is the dead-export scan on two files this PR does not touch (src/auto-reply/reply/memory-flush.ts: resolveEffectivePromptTokens,ui/src/pages/chat/components/chat-pane-versions-menu.tsx: ChatPaneVersionsMenu). That failure already exists onmain.