1. 03 4月, 2026 2 次提交
    • Ryan Groch's avatar
      perf: reduce number of native git calls when extracting a codebase (#3105) · 0beeb501
      Ryan Groch 提交于
      Currently, `collectFiles` is calling `isGitIgnored` on each
      (non-excluded) recursion. Although there is caching, we're frequently
      executing Git just to check whether an individual file or directory is
      gitignored, meaning that the number of Git invocations scales with the
      number of files in the user's app.
      
      This amounts to a substantial number of Git invocations. For smaller
      projects it could be dozens; for larger projects it could be thousands.
      It's particularly a problem for native Git, because each `exec` call
      comes with a lot of overhead even though Git itself is quite fast.
      
      Although I'm not 100% sure, I suspect that this was the underlying cause
      of both #2795 and #1642, because:
      1. Both mention Dyad freezing when dealing with larger projects, and
      this issue is far more noticeable for large projects.
      2. Both specifically mention that the freeze happens upon opening their
      project, which is when `collectFiles` runs.
      3. I was able to replicate the crash consistently on Windows 10 and
      inconsistently on Linux Mint by importing a large project into Dyad. I
      don't yet have a good automated test for this, though.
      
      The solution that I wrote for this PR puts the responsibility of
      traversing the app's files onto native Git instead of doing it manually.
      This means that we'll only have one Git invocation per call to the
      function (formerly named) `collectFiles`.
      
      I've also done my best to keep the output of `collectFilesNativeGit` as
      close as possible to the original `collectFiles`. The ordering of the
      files will be different, but I don't think that should make a difference
      given that we later sort them anyway.
      
      Some alternatives I've thought of if we decide we want to keep the
      current traversal logic:
      - Run `git check-ignore` on batches of files (e.g. each result of
      `fsAsync.readdir`) rather than one at a time. This would still result in
      multiple Git calls, though.
      - Run `git check-ignore` on all of the files at once at the end of
      `collectFiles`. We wouldn't be able to prune gitignored directories in
      our traversal, but at least we'd still avoid the directories in
      `EXCLUDED_DIRS`, such as `node_modules` and `.next`.
      
      I've left the logic of `collectFiles` untouched for isomorphic-git for
      now. There might be a good way to optimize that as well, but it will
      likely be a bit different because isomorphic-git has different
      capabilities than native Git.
      <!-- devin-review-badge-begin -->
      
      ---
      
      <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/3105"
      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 -->
      
      ---------
      Co-authored-by: 's avatarClaude <noreply@anthropic.com>
      0beeb501
    • keppo-bot[bot]'s avatar
      refactor: remove NewBadge from ChatModeSelector (#3113) · 7b8fcd81
      keppo-bot[bot] 提交于
      ## Summary
      - Removed the unused `NewBadge` component from `ChatModeSelector.tsx`
      - Removed "New" badge displays from Agent v2 and Plan mode options, as
      these features are no longer new
      
      ## Test plan
      - Verify the chat mode selector dropdown still renders correctly without
      the "New" badges
      - Confirm Agent v2 and Plan mode options are still selectable and
      functional
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code)
      <!-- devin-review-badge-begin -->
      
      ---
      
      <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/3113"
      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 -->
      Co-authored-by: 's avatarWill Chen <7344640+wwwillchen@users.noreply.github.com>
      Co-authored-by: 's avatarClaude <noreply@anthropic.com>
      7b8fcd81
  2. 02 4月, 2026 3 次提交
  3. 01 4月, 2026 6 次提交
  4. 31 3月, 2026 7 次提交
  5. 28 3月, 2026 3 次提交
  6. 27 3月, 2026 1 次提交
  7. 26 3月, 2026 2 次提交
    • Mohamed Aziz Mejri's avatar
      Updating neon integration plan (#3068) · aae16155
      Mohamed Aziz Mejri 提交于
      I've updated neon integration plan to include using neon auth and neon
      data api for react/vite apps .
      The data api will make it possible to integrate neon with react/vite
      apps without requiring the users to add a backend on their own .
      aae16155
    • 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
  8. 24 3月, 2026 7 次提交
  9. 21 3月, 2026 2 次提交
  10. 19 3月, 2026 1 次提交
  11. 18 3月, 2026 1 次提交
  12. 17 3月, 2026 4 次提交
  13. 14 3月, 2026 1 次提交