Unify contribution transport and add panel/FAB slots - #84
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 385b663e51
ℹ️ 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".
|
Reviewed against the PR 2 contract from #82, with independent verification on Contract conformance — all the load-bearing pieces are right:
Three fixes requested (small, none architectural):
One decision to make explicit in the PR description: legacy snapshot fields ( Non-blocking notes: Verdict: the transport consolidation is exactly what #82 specified, and the duplication payoff is visible — six slots now ride one snapshot field, one event, one endpoint, one grammar. Fix 1–3 and this is ready to merge. |
|
Addressed all requested fixes in
Added regression coverage for key confusion, field-map limits, whitespace preservation, inherited icon names, and combined Markdown/effect behavior. Validation:
Policy-owned budgets remain tracked for PR 3 as noted in review. |
|
Re-verified on All three requested fixes confirmed, each with a pinning test. Beyond that, this commit caught two real bugs I missed in both my prototype and my review — credit where due:
The stale-session guard on header-action responses and the markdown+effect combination are both good hardening. One nano-nit on the latter, non-blocking: when markdown re-shows the popover after With the wire-replacement decision now documented in the PR description, everything from the review is closed. Ready to merge. PR 3 (public |
Summary
Implements PR 2 from #82 on top of the contribution kernel landed in #83.
Unified transport
webContributionsdescriptor arrayweb_contributions_changedeventPOST /api/web-contributions/invokeaction,payload,fields, and slot-providedcontextdata-web-action/data-web-payloadgrammar while retaining legacy attribute aliasesNew slots
panelslot hosted in the shared right panelfablauncher slotopensopen-paneleffectScope
The recovered notepad prototype was used as implementation evidence, but the 631-line exemplar is deliberately not included. It belongs with public
contribute()and invalidation work rather than obscuring this transport/host review.Assets, invalidation, public
contribute(), and webviews remain out of scope.Compatibility
The extension-facing
setFooter,setHeaderAction,setArtifactAction, andsetGitTabAPIs remain available. This addssetPanelandsetFabAction. Legacy invoke routes and legacy interactive HTML attributes remain accepted.Tests
Added or updated coverage for:
webContributionsValidation:
npm run typecheck✅npm run build✅npm run test:unit✅ — 325 testsnpm test✅ — build, auth, unit, desktop, tablet, and mobile suitesPart of #82.
Snapshot migration decision
Legacy snapshot fields (
webFooters,webHeaderActions, etc.) and their per-slot delta events are intentionally replaced rather than dual-emitted. The browser and server ship as one application, websocket hello performs a fresh snapshot, and the service worker/reload path keeps the stale-open-tab window short. HTTP invoke endpoints and interactivedata-*attributes remain aliased because those are independently exercised compatibility boundaries; carrying two parallel state protocols would undermine the consolidation and double reducer complexity.