• Ryan Groch's avatar
    Feat: allow user to choose which directory to save Dyad apps in (#2875) · 583334f2
    Ryan Groch 提交于
    Closes #399. Adds a setting (under "General Settings") to select a
    custom directory to store new apps in, replacing the default `dyad-apps`
    folder.
    
    In order to make sure that users don't lose access to older apps, I
    opted for creating symlinks inside the new folder to the old app
    locations. I went with symlinking because moving every single app could
    be an expensive operation depending on how many apps there are, and the
    user might not want that. However, this is inconsistent with the import
    apps and move folder features (i.e. #2000), which copy the apps instead
    of symlinking.
    
    I'm happy to change the approach on request. Some options I've been
    thinking about:
    - Add a button in the settings which moves all the apps (replacing the
    symlinks) after the user chooses a new custom directory. This way, the
    user would get to choose.
    - Convert all of previously-created apps to absolute paths, which avoids
    all of the symlinking. The only potential issue with this is that if the
    user wants to move the apps to their new directory after all, they'd
    have to use the "move app" feature for every single app, otherwise the
    database wouldn't get updated. As is, they at least could just delete
    all the symlinks and mass-move all of their apps into the new directory
    (though they'd currently have to do this outside of Dyad).
    
    Also, since I'm tentatively adding in the use of symlinks, I modified
    the move/copy/delete app features so that they always target the true
    location of the app, not the symlink.
    
    I can also write tests if desired.
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2875"
    target="_blank">
      <picture>
    <source media="(prefers-color-scheme: dark)"
    srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img
    src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
    alt="Open with Devin">
      </picture>
    </a>
    <!-- devin-review-badge-end -->
    583334f2
名称
最后提交
最后更新
.agents 正在载入提交数据...
.claude 正在载入提交数据...
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
.storybook 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
makers 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
plans 正在载入提交数据...
rules 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.npmrc 正在载入提交数据...
.oxfmtrc.json 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
AGENTS.md 正在载入提交数据...
CLA.md 正在载入提交数据...
CLAUDE.md 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
lint-staged.config.js 正在载入提交数据...
merge.config.ts 正在载入提交数据...
package-lock.json 正在载入提交数据...
package.json 正在载入提交数据...
playwright.config.ts 正在载入提交数据...
tsconfig.app.json 正在载入提交数据...
tsconfig.json 正在载入提交数据...
tsconfig.node.json 正在载入提交数据...
vite.main.config.mts 正在载入提交数据...
vite.preload.config.mts 正在载入提交数据...
vite.renderer.config.mts 正在载入提交数据...
vite.worker.config.mts 正在载入提交数据...
vitest.config.ts 正在载入提交数据...
windowsSign.ts 正在载入提交数据...