Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion canvas/src/components/ContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ interface MenuItem {
export function ContextMenu() {
const contextMenu = useCanvasStore((s) => s.contextMenu);
const closeContextMenu = useCanvasStore((s) => s.closeContextMenu);
const removeNode = useCanvasStore((s) => s.removeNode);
const updateNodeData = useCanvasStore((s) => s.updateNodeData);
const selectNode = useCanvasStore((s) => s.selectNode);
const setPanelTab = useCanvasStore((s) => s.setPanelTab);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const mockStore = {
nodeData: Record<string, unknown>;
} | null,
closeContextMenu,
removeNode: vi.fn(),
updateNodeData: vi.fn(),
selectNode: vi.fn(),
setPanelTab: vi.fn(),
Expand Down
11 changes: 9 additions & 2 deletions workspace-server/internal/handlers/workspace_preflight.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package handlers

import (
"fmt"
"log"
"strings"

"gopkg.in/yaml.v3"
)
Expand Down Expand Up @@ -39,6 +41,11 @@ func missingRequiredEnv(configFiles map[string][]byte, envVars map[string]string
}
var schema requiredEnvSchema
if err := yaml.Unmarshal(raw, &schema); err != nil {
// Safe default: the in-container preflight is the source of truth
// for config.yaml shape, so we don't block the provision here. But
// log at WARN so operators can notice a template with malformed
// YAML — otherwise a silently-skipped preflight is invisible.
log.Printf("Preflight: WARN — config.yaml unparseable, skipping required_env check: %v", err)
return nil
}
if len(schema.RuntimeConfig.RequiredEnv) == 0 {
Expand All @@ -64,7 +71,7 @@ func formatMissingEnvError(missing []string) string {
)
}
return fmt.Sprintf(
"missing required env vars %q — add them under Config → Env Vars (or as Global secrets) and retry",
missing,
"missing required env vars %s — add them under Config → Env Vars (or as Global secrets) and retry",
strings.Join(missing, ", "),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ func TestFormatMissingEnvError_Single(t *testing.T) {
}

func TestFormatMissingEnvError_Multiple(t *testing.T) {
msg := formatMissingEnvError([]string{"A", "B"})
if !strings.Contains(msg, "A") || !strings.Contains(msg, "B") {
t.Errorf("message should name both vars: %q", msg)
msg := formatMissingEnvError([]string{"FOO", "BAR"})
if !strings.Contains(msg, "FOO, BAR") {
t.Errorf("multi-var message should join with ', ' — got %q", msg)
}
}
Loading