Skip to content

Commit ccff2e9

Browse files
authored
Merge branch 'main' into edburns/80-java-monorepo-phase-06-iterating-seeking-review
2 parents d570b48 + 7780b50 commit ccff2e9

35 files changed

Lines changed: 377 additions & 308 deletions

dotnet/src/Canvas.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ internal partial class CanvasJsonContext : JsonSerializerContext;
130130
/// <remarks>
131131
/// A session installs a single <see cref="ICanvasHandler"/> via
132132
/// <c>SessionConfigBase.CanvasHandler</c>. The handler receives every
133-
/// inbound <c>canvas.open</c> / <c>canvas.close</c> / <c>canvas.invokeAction</c>
133+
/// inbound <c>canvas.open</c> / <c>canvas.close</c> / <c>canvas.action.invoke</c>
134134
/// JSON-RPC request the runtime issues for this session and decides — typically
135135
/// by inspecting <see cref="CanvasProviderOpenRequest.CanvasId"/> — which
136136
/// application-side canvas should handle the call.

dotnet/src/Generated/Rpc.cs

Lines changed: 28 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dotnet/src/Session.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ public async Task CloseAsync(CanvasProviderCloseRequest request, CancellationTok
939939
}
940940
}
941941

942-
public async Task<object> InvokeActionAsync(CanvasProviderInvokeActionRequest request, CancellationToken cancellationToken = default)
942+
public async Task<object> InvokeAsync(CanvasProviderInvokeActionRequest request, CancellationToken cancellationToken = default)
943943
{
944944
try
945945
{

dotnet/src/Types.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2630,7 +2630,7 @@ protected SessionConfigBase(SessionConfigBase? other)
26302630

26312631
/// <summary>
26322632
/// Provider-side canvas lifecycle handler. The SDK routes inbound
2633-
/// <c>canvas.open</c> / <c>canvas.close</c> / <c>canvas.invokeAction</c>
2633+
/// <c>canvas.open</c> / <c>canvas.close</c> / <c>canvas.action.invoke</c>
26342634
/// requests to this handler.
26352635
/// </summary>
26362636
[Experimental(Diagnostics.Experimental)]

dotnet/test/E2E/CanvasE2ETests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ await session.Rpc.Canvas.OpenAsync(
7777
extensionId: canvas.ExtensionId,
7878
input: new Dictionary<string, object> { ["start"] = 41 });
7979

80-
var result = await session.Rpc.Canvas.InvokeActionAsync(
80+
var result = await session.Rpc.Canvas.Action.InvokeAsync(
8181
instanceId: "counter-1",
8282
actionName: "increment",
8383
input: new Dictionary<string, object> { ["delta"] = 1 });

go/canvas.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func CanvasErrorNoHandler() *CanvasError {
7070
//
7171
// A session installs a single CanvasHandler (via SessionConfig.CanvasHandler).
7272
// The handler receives every inbound `canvas.open` / `canvas.close` /
73-
// `canvas.invokeAction` JSON-RPC request the runtime issues for this session
73+
// `canvas.action.invoke` JSON-RPC request the runtime issues for this session
7474
// and decides — typically by inspecting CanvasProviderOpenRequest.CanvasID — which
7575
// application-side canvas should handle the call.
7676
//

go/canvas_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func TestCanvasAdapter_DispatchesToHandler(t *testing.T) {
156156
t.Fatalf("response URL not propagated: %+v", openResp)
157157
}
158158

159-
actionResp, err := session.clientSessionApis.Canvas.InvokeAction(&rpc.CanvasProviderInvokeActionRequest{
159+
actionResp, err := session.clientSessionApis.Canvas.Invoke(&rpc.CanvasProviderInvokeActionRequest{
160160
SessionID: "s1",
161161
ExtensionID: "project:echo",
162162
CanvasID: "echo",
@@ -284,7 +284,7 @@ func TestCanvasRegisterClientSessionApiHandlers_RawJSONRoundTrip(t *testing.T) {
284284
t.Fatalf("expected status=ready, got %v", decoded["status"])
285285
}
286286

287-
actionRaw, err := requester.Request("canvas.invokeAction", map[string]any{
287+
actionRaw, err := requester.Request("canvas.action.invoke", map[string]any{
288288
"sessionId": "s1",
289289
"extensionId": "ext",
290290
"canvasId": "echo",

go/internal/e2e/canvas_e2e_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ func TestCanvasE2E(t *testing.T) {
7878
t.Fatalf("unexpected open calls: %+v", calls)
7979
}
8080

81-
actionResult, err := session.RPC.Canvas.InvokeAction(t.Context(), &rpc.CanvasInvokeActionRequest{
81+
actionResult, err := session.RPC.Canvas.Action().Invoke(t.Context(), &rpc.CanvasActionInvokeRequest{
8282
InstanceID: "counter-1",
8383
ActionName: "increment",
8484
Input: map[string]any{
8585
"amount": float64(2),
8686
},
8787
})
8888
if err != nil {
89-
t.Fatalf("Canvas.InvokeAction failed: %v", err)
89+
t.Fatalf("Canvas.Action.Invoke failed: %v", err)
9090
}
9191
actionPayload, ok := actionResult.Result.(map[string]any)
9292
if !ok || actionPayload["count"] != float64(5) {

go/rpc/zrpc.go

Lines changed: 60 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func (a *canvasClientSessionAdapter) Close(request *rpc.CanvasProviderCloseReque
152152
return nil, nil
153153
}
154154

155-
func (a *canvasClientSessionAdapter) InvokeAction(request *rpc.CanvasProviderInvokeActionRequest) (any, error) {
155+
func (a *canvasClientSessionAdapter) Invoke(request *rpc.CanvasProviderInvokeActionRequest) (any, error) {
156156
if request == nil {
157157
return nil, canvasJSONRPCError(NewCanvasError("canvas_handler_unset", "missing canvas action request"))
158158
}

0 commit comments

Comments
 (0)