Skip to content

Replace wait-on with internal desktop resource polling#1600

Merged
juliusmarminge merged 4 commits intomainfrom
t3code/remove-wait-on-dependency
Mar 31, 2026
Merged

Replace wait-on with internal desktop resource polling#1600
juliusmarminge merged 4 commits intomainfrom
t3code/remove-wait-on-dependency

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Mar 31, 2026

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 for commit d29079e. This will update automatically on new commits. Configure here.

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 ]

- Replace `wait-on` with a local resource poller
- Keep Electron dev startup waiting for the renderer port and build files
- Drop the `wait-on` dependency from desktop package metadata
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

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.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 31, 2026
- Replace wait-on helpers with built-in Node modules
- Keep resource polling behavior unchanged
- Fail fast when tcpPort is missing or invalid
- Guard TCP readiness resolution and cover with tests
@juliusmarminge juliusmarminge merged commit d303ac3 into main Mar 31, 2026
11 checks passed
@juliusmarminge juliusmarminge deleted the t3code/remove-wait-on-dependency branch March 31, 2026 06:17
aaditagrawal added a commit to aaditagrawal/t3code that referenced this pull request Mar 31, 2026
…lling

Integrates 3 upstream commits:
- Extract project/workspace functionality to Effect services (pingdotgg#1524)
- Replace wait-on with internal desktop resource polling (pingdotgg#1600)
- Bump Effect catalog dependencies (pingdotgg#1594)

Conflict resolution: deleted fork's workspaceEntries.ts (extracted upstream),
accepted upstream's gitCoreLayer extraction in serverLayers, preserved fork's
SessionTextGenerationLive for GitManager, moved runPromise definition earlier
for favicon route handler.
Chrono-byte pushed a commit to Chrono-byte/t3code that referenced this pull request Mar 31, 2026
gigq pushed a commit to gigq/t3code that referenced this pull request Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant