Skip to content

Commit b4052c2

Browse files
authored
adjust workflow handle positioning (#566)
* add type safety guidance Document the preferred approach for avoiding broad casts in local agent work. The rules steer changes toward precise source types and require a short explanation when a workaround cast is truly necessary. * reuse packager info filename * adjust workflow handle positioning Move workflow diagram handles inward so the connection dots sit centered on node edges instead of slightly outside them. This keeps the visual positioning cleanup separate from the broader workflow v2 UI work.
1 parent cd9846c commit b4052c2

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
## Rules
1111
- No `any`; use `unknown` or specific types.
12+
- Avoid `as unknown as X` casts; prefer fixing the underlying type
13+
(narrow props, export a type, add missing fields). If a cast is
14+
truly necessary (e.g. testing malformed data, third-party type
15+
workarounds), add a comment explaining why.
16+
- Prefer precise types over broad ones (`unknown[]`, `Record<string, unknown>`)
17+
followed by casts at each access site. Type the data correctly at the source.
1218
- Tests live beside components (`.test.tsx`).
1319
- Prefix unused variables with `_`.
1420

packager/packager.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func createBundle() error {
7878

7979
modFilename := version.Version + ".mod"
8080
zipFilename := version.Version + ".zip"
81+
infoFilename := version.Version + ".info"
8182

8283
modFileContents, err := os.ReadFile(filepath.Join(dir, "go.mod"))
8384
if err != nil {
@@ -103,7 +104,7 @@ func createBundle() error {
103104
Time: timestamp,
104105
}
105106

106-
infoFile, err := outputRoot.Create(version.Version + ".info")
107+
infoFile, err := outputRoot.Create(infoFilename)
107108
if err != nil {
108109
return err
109110
}

src/components/workflow-diagram/WorkflowNode.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const WorkflowNode = memo(
3838
>
3939
<Handle
4040
className={clsx(
41-
"left-[-7px] size-4 border-4 border-slate-50 bg-slate-300 dark:border-slate-800 dark:bg-slate-600",
41+
"left-px size-4 border-4 border-slate-50 bg-slate-300 dark:border-slate-800 dark:bg-slate-600",
4242
hasUpstreamDeps || "opacity-0",
4343
)}
4444
isConnectable={isConnectable}
@@ -48,7 +48,7 @@ const WorkflowNode = memo(
4848
/>
4949
<Handle
5050
className={clsx(
51-
"right-[-7px] size-4 border-4 border-slate-50 bg-slate-300 dark:border-slate-800 dark:bg-slate-600",
51+
"right-px size-4 border-4 border-slate-50 bg-slate-300 dark:border-slate-800 dark:bg-slate-600",
5252
hasDownstreamDeps || "opacity-0",
5353
)}
5454
isConnectable={isConnectable}

0 commit comments

Comments
 (0)