feat(ui): add inherited custom step editor hints#1994
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughBackend editor hint generation now skips nil registry entries and inlines schema serialization instead of delegating to a helper function, with improved error messages. UI Monaco editor configuration enables code suggestions on Ctrl/Cmd+Space for non-read-only editors. Several import statement reorderings and formatting adjustments across TypeScript components and tests. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
ui/src/features/dags/components/dag-editor/DAGSpec.tsx (1)
1-5:⚠️ Potential issue | 🟠 MajorAdd the required GPL header to this modified TSX file.
This source file is touched by the PR but is missing the repository-required GPL header.
Proposed fix
+// Copyright (C) 2026 Yota Hamada +// SPDX-License-Identifier: GPL-3.0-or-later + /** * DAGSpec component displays and allows editing of a DAG specification.As per coding guidelines, "
**/*.{go,ts,tsx,js}: Apply GPL v3 license headers on source files, managed viamake addlicense."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ui/src/features/dags/components/dag-editor/DAGSpec.tsx` around lines 1 - 5, This file (DAGSpec.tsx / DAGSpec component) is missing the repository-required GPL v3 license header; add the standard GPL v3 header used across the repo at the very top of the file (matching the header added by the project's make addlicense tooling), ensuring it includes the correct SPDX/license lines and copyright notice format used elsewhere, then run or simulate make addlicense to verify consistency.ui/src/features/dags/components/dag-editor/DAGEditor.tsx (1)
1-5:⚠️ Potential issue | 🟠 MajorAdd the required GPL header to this modified TSX file.
This file is changed in the PR but does not include the GPL license header block required by the repository policy.
Proposed fix
+// Copyright (C) 2026 Yota Hamada +// SPDX-License-Identifier: GPL-3.0-or-later + /** * DAGEditor component provides a Monaco editor for editing DAG YAML definitions.As per coding guidelines, "
**/*.{go,ts,tsx,js}: Apply GPL v3 license headers on source files, managed viamake addlicense."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ui/src/features/dags/components/dag-editor/DAGEditor.tsx` around lines 1 - 5, This file (DAGEditor.tsx / DAGEditor component) is missing the required GPL v3 license header; add the repository's standard GPL v3 header block at the very top of the file (matching other .ts/.tsx files in the repo) so the header covers the whole source file, and then run the automated tool (make addlicense) or otherwise ensure the exact header format used across the codebase is applied consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@internal/core/spec/editor_hints.go`:
- Around line 56-75: The current loop drops custom step entries when
entry.InputSchema or entry.InputSchema.Schema() is nil; instead, preserve the
entry and emit a CustomStepTypeEditorHint with an empty InputSchema. Change the
guard to only skip nil entry, and when entry.InputSchema or
entry.InputSchema.Schema() is nil set schemaMap = map[string]any{}; otherwise
marshal/unmarshal as before. Ensure you still return formatted errors from
json.Marshal/unmarshal for the non-nil-schema path and append the hint with
Name, TargetType, Description, and InputSchema (the empty map or the parsed map)
so downstream code receives the hint even without a schema.
---
Outside diff comments:
In `@ui/src/features/dags/components/dag-editor/DAGEditor.tsx`:
- Around line 1-5: This file (DAGEditor.tsx / DAGEditor component) is missing
the required GPL v3 license header; add the repository's standard GPL v3 header
block at the very top of the file (matching other .ts/.tsx files in the repo) so
the header covers the whole source file, and then run the automated tool (make
addlicense) or otherwise ensure the exact header format used across the codebase
is applied consistently.
In `@ui/src/features/dags/components/dag-editor/DAGSpec.tsx`:
- Around line 1-5: This file (DAGSpec.tsx / DAGSpec component) is missing the
repository-required GPL v3 license header; add the standard GPL v3 header used
across the repo at the very top of the file (matching the header added by the
project's make addlicense tooling), ensuring it includes the correct
SPDX/license lines and copyright notice format used elsewhere, then run or
simulate make addlicense to verify consistency.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ab42e7eb-f9be-48ea-97c3-227c8d0ad7cd
📒 Files selected for processing (5)
internal/core/spec/editor_hints.goui/src/features/dags/components/dag-editor/DAGEditor.tsxui/src/features/dags/components/dag-editor/DAGSpec.tsxui/src/features/dags/components/dag-editor/__tests__/customStepSchema.test.tsui/src/features/dags/components/dag-editor/customStepSchema.ts
Summary
typeandconfiginference working when the editor schema is dereferenced inlineCtrl/Cmd+SpaceMonaco action to focused writable editors with completion providersWhy
The DAG editor still needed inherited custom step metadata from base config so autocomplete and schema docs could resolve custom step types beyond the local
step_typesblock. The Monaco shortcut follow-up fixes a regression from the custom suggest action being registered without the built-in focus and provider guards, which madeCtrl/Cmd+Spacebroader than the default suggest command.Testing
go test ./internal/core/spec -count=1go test ./internal/service/frontend/api/v1 -count=1cd ui && pnpm typecheckcd ui && pnpm test -- src/features/dags/components/dag-editor/__tests__/customStepSchema.test.ts(the target test passed, but Vitest exited non-zero because of an unrelated existing unhandled error insrc/features/dags/components/dag-details/__tests__/DAGDetailsSidePanel.test.tsx)Summary by CodeRabbit
New Features
Improvements
Chores