Skip to content

[Bug] Editor: folder creation is unreachable (dead onCreateFolder/onRename props); gutter desyncs on wrapped lines #1043

@chronoai-shining

Description

@chronoai-shining

Summary

Found during fine-grained code-quality review (second pass) at commit 14fbf3e (develop). Severity: medium — bug. Editor component defects:

  1. Folder creation unreachableFileTree.tsx:315-326,385: handleStartCreate and the empty-state button only ever set isCreating with type: "file", so the type === "folder" branch in handleConfirmCreate (line 333) and the onCreateFolder prop can never execute. SkillDetailPage.tsx:276 passes onCreateFolder={handleCreateFolder} which is therefore dead — owners have no way to create a folder despite the fully wired handler. The onRename prop is also accepted but silently dropped (_onRename).
  2. Line-number gutter desyncs on wrapped linesCodeEditor.tsx:193-226: the gutter renders one h-6 row per logical line but the textarea soft-wraps, so any long line shifts all subsequent line numbers out of alignment. Fix: disable wrapping (whiteSpace: "pre" + horizontal scroll) or compute wrapped heights.

Suggested fix

Add a "new folder" affordance (or remove the dead props); fix gutter alignment per above.

Metadata

Metadata

Labels

size:SSmall: < ~1h, single file/concern. Size is informational.type:bugDefect: behavior diverges from intent/spec.webornn-web frontend SPA

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions