Skip to content

feat(ui): add markdown editing#128

Open
salmonumbrella wants to merge 2 commits intorunkids:mainfrom
salmonumbrella:pr/skill-bundle-markdown-editor-upstream
Open

feat(ui): add markdown editing#128
salmonumbrella wants to merge 2 commits intorunkids:mainfrom
salmonumbrella:pr/skill-bundle-markdown-editor-upstream

Conversation

@salmonumbrella
Copy link
Copy Markdown
Contributor

@salmonumbrella salmonumbrella commented Apr 11, 2026

Summary

  • add markdown editing in skillshare ui
  • add ui for $ARGUMENTS in SKILL.md
  • add frontmatter ui
  • add server-backed skill file read, save, and open-local-editor flows
editing-markdown-runkids.mp4

Test Plan

  • go test ./internal/server
  • cd ui && npm run test
  • cd ui && npm run build

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds functionality to edit and open skill files through the web interface. Key changes include new backend handlers for saving and opening files with security validations, and a comprehensive frontend update featuring a rich markdown editor, frontmatter reference guide, and detailed content statistics. Review feedback identified a compilation error on Windows due to a non-existent function call and recommended removing a global mutex lock during disk I/O to prevent performance bottlenecks.

Comment thread internal/server/replace_windows.go Outdated
Comment on lines +5 to +8
import "golang.org/x/sys/windows"

func replaceFile(tempPath, fullPath string) error {
return windows.Rename(tempPath, fullPath)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The function windows.Rename does not exist in the golang.org/x/sys/windows package, which will cause a compilation error on Windows. Additionally, Go's standard os.Rename already implements atomic replacement on Windows using the MoveFileEx syscall with the MOVEFILE_REPLACE_EXISTING flag. Unless you need specific flags not provided by the standard library, you should use os.Rename here as well.

Suggested change
import "golang.org/x/sys/windows"
func replaceFile(tempPath, fullPath string) error {
return windows.Rename(tempPath, fullPath)
import "os"
func replaceFile(tempPath, fullPath string) error {
return os.Rename(tempPath, fullPath)

Comment thread internal/server/handler_skills.go Outdated
Comment on lines +304 to +306
s.mu.Lock()
filename, err := writeSkillFile(d.SourcePath, fp, []byte(*req.Content))
s.mu.Unlock()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Holding the global server mutex s.mu during disk I/O in writeSkillFile can lead to performance issues, as it blocks all other server operations (including read-only API requests) until the write completes. Since writeSkillFile operates on a specific file path and does not access or modify any shared fields of the Server struct, this lock is unnecessary. The operating system's file system operations are sufficient to handle concurrent access at this level.

Suggested change
s.mu.Lock()
filename, err := writeSkillFile(d.SourcePath, fp, []byte(*req.Content))
s.mu.Unlock()
filename, err := writeSkillFile(d.SourcePath, fp, []byte(*req.Content))

@salmonumbrella salmonumbrella marked this pull request as ready for review April 11, 2026 07:49
@salmonumbrella salmonumbrella changed the title feat(ui): add inline skill bundle markdown editing feat(ui): add markdown editing Apr 11, 2026
@salmonumbrella salmonumbrella force-pushed the pr/skill-bundle-markdown-editor-upstream branch from 6abb359 to 6b74430 Compare April 12, 2026 03:48
@salmonumbrella
Copy link
Copy Markdown
Contributor Author

@runkids finished this today!

@runkids
Copy link
Copy Markdown
Owner

runkids commented Apr 13, 2026

Hey @salmonumbrella — watched your walkthrough. Inline markdown editing is something I've been thinking about, so the direction is interesting and I appreciate you exploring it.

A few notes: at 14K lines across 54 files, this is more than I can review in one pass. I also noticed some files that were renamed in v0.19 (SkillsPageResourcesPage, SkillDetailPageResourceDetailPage) got brought back under the old names — probably a rebase thing, easy to miss with a change this size.

I won't be merging this directly, but I'll definitely use it as a reference when I pick up this feature. Thanks for the time you put into this!

@runkids runkids force-pushed the main branch 2 times, most recently from 39e5275 to e0f946a Compare April 13, 2026 10:23
@salmonumbrella
Copy link
Copy Markdown
Contributor Author

Glad you like it! I hope this makes it into v0.20.0, I'd love to be able to edit skills this way.

@runkids runkids self-assigned this Apr 15, 2026
@runkids runkids added the v0.19 label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants