Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
40 lines
1.3 KiB
Go
40 lines
1.3 KiB
Go
package sessionreplay
|
|
|
|
import (
|
|
"encoding/json"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestReplayWorkbenchSnapshotSuppressesOnboardingWithoutRestoringNodes(t *testing.T) {
|
|
openedAt := time.Date(2026, 7, 29, 10, 11, 12, 0, time.UTC)
|
|
snapshot := replayWorkbenchSnapshot("workspace-1", openedAt)
|
|
var document struct {
|
|
ActiveNodeID any `json:"activeNodeId"`
|
|
NodeStack []any `json:"nodeStack"`
|
|
Nodes []any `json:"nodes"`
|
|
Metadata struct {
|
|
WorkspaceOnboarding struct {
|
|
AutoOpened bool `json:"autoOpened"`
|
|
AutoOpenedAt string `json:"autoOpenedAt"`
|
|
SchemaVersion int `json:"schemaVersion"`
|
|
} `json:"workspaceOnboarding"`
|
|
} `json:"metadata"`
|
|
}
|
|
if err := json.Unmarshal(snapshot.JSON, &document); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if snapshot.WorkspaceID != "workspace-1" || snapshot.SchemaVersion != 1 {
|
|
t.Fatalf("snapshot identity = %#v", snapshot)
|
|
}
|
|
if len(document.Nodes) != 0 || len(document.NodeStack) != 0 || document.ActiveNodeID != nil {
|
|
t.Fatalf("snapshot restored Workbench nodes: %#v", document)
|
|
}
|
|
onboarding := document.Metadata.WorkspaceOnboarding
|
|
if !onboarding.AutoOpened ||
|
|
onboarding.AutoOpenedAt != "2026-07-29T10:11:12Z" ||
|
|
onboarding.SchemaVersion != 1 {
|
|
t.Fatalf("onboarding metadata = %#v", onboarding)
|
|
}
|
|
}
|