Skip to content
Source
Sign inSign up
pingdotgg/t3code

Replace wait-on with internal desktop resource polling #1600

Mergedjuliusmarmingemerged 4 commits intomain fromrefs/pull/1600/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

this shit has waaay too many deps for what we need... given recent supply chain attacks, I'm selective about what deps we use, and this is not needed...

Summary

  • Remove the wait-on dependency from the desktop app startup path.
  • Add a local waitForResources helper that polls for required files and the Electron renderer port.
  • Keep startup behavior explicit with a timeout and clearer error reporting when resources never become ready.

Testing

  • Not run (PR content only).
  • Expected project checks for this repo: bun fmt, bun lint, bun typecheck.

Note

Low Risk Limited to the desktop dev startup script and dependency graph; main risk is altered readiness detection (file/TCP polling) potentially affecting local dev startup timing or failure modes.

Overview Replaces the desktop app’s dev-time wait-on usage with a small in-repo waitForResources helper that polls for required build outputs and the renderer TCP port before launching Electron.

Removes the wait-on dependency from apps/desktop (and lockfile), and adds clearer timeout errors that list which files/port are still not ready.

Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d29079eb6a2ab24c287459b7c995948acc79626e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).

Note

Replace wait-on dependency with internal TCP and file polling in desktop dev script

  • Removes the wait-on npm package and replaces it with a new local helper wait-for-resources.mjs.
  • The new helper polls every 100ms for required files (resolved relative to desktopDir) and a TCP port across loopback hosts (127.0.0.1, localhost, ::1), throwing after a 120s timeout with a message listing unresolved resources.
  • dev-electron.mjs is updated to call waitForResources instead of waitOn.
📊 Macroscope summarized c4e3aaf. 2 files reviewed, 1 issue evaluated, 1 issue filtered, 0 comments posted

🗂️ Filtered Issues

apps/desktop/scripts/wait-for-resources.test.mjs — 0 comments posted, 1 evaluated, 1 filtered
  • line 68: Test creates files and directories outside the temporary directory that are never cleaned up. Lines 68 and 74 use Path.join(tmpDir, "../server/dist") which resolves to a sibling directory of tmpDir (e.g., /tmp/server/dist). This directory and its contents persist after the test completes, causing test pollution. Consider creating the server/dist structure inside tmpDir instead, or add cleanup logic in afterEach. [ Posting failed ]
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: 14bb9e9e-d20e-492c-8488-1dd4ae6c2345

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Commit unit tests in branch `t3code/remove-wait-on-dependency`

      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. juliusmarminge merged thisd303ac3

    4. juliusmarminge closed this

Sign in to join this conversation.