When a user adds a folder from their computer that uses hyphens as a workspace, the user is unable to save files to the workspace

Open
#596 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
web-dev

Research direction

Start by reproducing the save failure with a hyphenated local folder through the File System Access API, recording the actual browser and OS behavior. Review nameToMountPath() in workspaceManagerHelpers.ts, resolveMount() in CompositeFileSystem.ts, and the existing hyphenated-path tests. Done means the failure is explained and fixed, a regression test covers hyphenated workspace names, and existing tests pass.

Written by the indexing model from the issue text.

Description

bug

Problem

When a user adds a local folder (via File System Access API) that contains hyphens in its name (e.g., my-project, lua-code), they are unable to save files to that workspace.

Steps to Reproduce

  1. Create a local folder with hyphens in the name (e.g., my-test-project)
  2. Open the LuaInTheWeb IDE
  3. Add the hyphenated folder as a local workspace
  4. Create a new file or edit an existing file
  5. Attempt to save the file

Expected Behavior

File saves successfully to the local folder.

Actual Behavior

[ ] To be filled in: Describe what happens - error message? Silent failure? Wrong location?

Environment

  • Browser: [ Chrome / Edge / Other ]
  • OS: [ Windows / macOS / Linux ]

Questions to Clarify

  1. What error (if any) is displayed when trying to save? Is there a console error, toast notification, or does save appear to succeed but data isn't persisted?
  2. What specific folder names reproduce the issue? For example, does test-folder fail but testfolder work?
  3. Does this affect virtual workspaces with hyphenated names, or only local (File System Access API) workspaces?

Investigation Notes

Code review found that hyphenated paths appear to be handled correctly in:

  • nameToMountPath() function (workspaceManagerHelpers.ts:50-56)
  • resolveMount() method (CompositeFileSystem.ts:124-144)
  • Path utilities (normalizePath, joinPath, etc.)
  • Existing tests use hyphenated paths (/my-files) and pass

The issue may be:

  • A specific edge case not covered by current tests
  • Related to file system permissions rather than path handling
  • A browser-specific File System Access API behavior
  • A different bug being misattributed to hyphens

Acceptance Criteria

  • Users can add local folders with hyphens in their names
  • Files can be saved successfully to hyphen-named workspaces
  • Existing tests pass
  • New test added for hyphenated workspace names
Dominant language
TypeScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jcollard/LuaInTheWeb

All issues in jcollard/LuaInTheWeb

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.