Skip to content

Replace wait-on with internal desktop resource polling - #1600

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

juliusmarminge merged 4 commits into
mainfrom
t3code/remove-wait-on-dependency

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Mar 31, 2026 •

Copy link
Copy Markdown
Member

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

coderabbitai Bot commented Mar 31, 2026 •

Copy link
Copy Markdown

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.
NeilTheFisher pushed a commit to NeilTheFisher/t3code that referenced this pull request Aug 18, 2026
donjor referenced this pull request in RSI-Software/t3code-hyprws Oct 2, 2026
… sync (#1509)

## Problem

`ghb pr merge --squash` lands a fixup PR as `fixup! <owner subject> (#N)`.
Every `fixup!` matcher compared the exact subject, so the next sync refused it before the rebase, and git autosquash could not fold it anyway.

Closes #1508

- [ ] **Sync:** a `fixup! <subject> (#N)` landing folds into `<subject>` at the sync rebase
- [ ] **Scan:** the scan reads such a landing as the commit it names
- [ ] **Refusal:** a fixup naming no fork commit, or several, still refuses

## Change

- **`fixupTarget`** (`scripts/fork-delta.ts`): strips `fixup! `, then one trailing ` (#N)` unless the full name is itself an owner subject
- **Sync** (`scripts/fork-sync.ts`): `resolveFixups` maps each fixup to its one owner sha, or refuses
- **Sequence editor** (`scripts/lib/fork-sync-todo.ts`): rewrites git's generated todo, moving each resolved fixup under its owner as `fixup`
- **Scan** (`scripts/fork-scan.ts`): replay counterparts and trailer inheritance use `fixupTarget`

Editing git's own todo keeps every other todo decision git makes, such as dropping cherry-picks upstream already carries.
`--autosquash` stays for `squash!` and `amend!`.

## Scope and approval

Bug filed as #1508; it blocks the #1493 pay-down, which lands one `fixup!` PR per owner.

## Verification

- `vp test run scripts/fork-sync.test.ts scripts/fork-scan-gates.test.ts scripts/fork-delta.test.ts` → exit 0 (118 tests)
- `vp run fork:ci` → exit 0
- `tsc --noEmit` in `scripts` and `apps/desktop` → exit 0

New tests:

- fixture: `fixup! feat(fork): owned change (#1600)` on trunk; `rebaseOnto` leaves one owner commit carrying the fix
- refusals still fire for none or several owners, suffixed or not
- an owner ending in ` (#219)` keeps its own number
- `placeFixups` on a todo mixing git-moved, suffixed, and ownerless fixups
- scan counterparts and trailers for a suffixed fixup

Claude Opus 5.5, Claude Code.

## Fork trailers

Fork-Domain: fork-meta
Fork-Tier: core
Fork-Upstreamable: no
Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor referenced this pull request in RSI-Software/t3code-hyprws Oct 2, 2026
… sync (#1509)

## Problem

`ghb pr merge --squash` lands a fixup PR as `fixup! <owner subject> (#N)`.
Every `fixup!` matcher compared the exact subject, so the next sync refused it before the rebase, and git autosquash could not fold it anyway.

Closes #1508

- [ ] **Sync:** a `fixup! <subject> (#N)` landing folds into `<subject>` at the sync rebase
- [ ] **Scan:** the scan reads such a landing as the commit it names
- [ ] **Refusal:** a fixup naming no fork commit, or several, still refuses

## Change

- **`fixupTarget`** (`scripts/fork-delta.ts`): strips `fixup! `, then one trailing ` (#N)` unless the full name is itself an owner subject
- **Sync** (`scripts/fork-sync.ts`): `resolveFixups` maps each fixup to its one owner sha, or refuses
- **Sequence editor** (`scripts/lib/fork-sync-todo.ts`): rewrites git's generated todo, moving each resolved fixup under its owner as `fixup`
- **Scan** (`scripts/fork-scan.ts`): replay counterparts and trailer inheritance use `fixupTarget`

Editing git's own todo keeps every other todo decision git makes, such as dropping cherry-picks upstream already carries.
`--autosquash` stays for `squash!` and `amend!`.

## Scope and approval

Bug filed as #1508; it blocks the #1493 pay-down, which lands one `fixup!` PR per owner.

## Verification

- `vp test run scripts/fork-sync.test.ts scripts/fork-scan-gates.test.ts scripts/fork-delta.test.ts` → exit 0 (118 tests)
- `vp run fork:ci` → exit 0
- `tsc --noEmit` in `scripts` and `apps/desktop` → exit 0

New tests:

- fixture: `fixup! feat(fork): owned change (#1600)` on trunk; `rebaseOnto` leaves one owner commit carrying the fix
- refusals still fire for none or several owners, suffixed or not
- an owner ending in ` (#219)` keeps its own number
- `placeFixups` on a todo mixing git-moved, suffixed, and ownerless fixups
- scan counterparts and trailers for a suffixed fixup

Claude Opus 5.5, Claude Code.

## Fork trailers

Fork-Domain: fork-meta
Fork-Tier: core
Fork-Upstreamable: no
Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor referenced this pull request in RSI-Software/t3code-hyprws Oct 3, 2026
… sync (#1509)

## Problem

`ghb pr merge --squash` lands a fixup PR as `fixup! <owner subject> (#N)`.
Every `fixup!` matcher compared the exact subject, so the next sync refused it before the rebase, and git autosquash could not fold it anyway.

Closes #1508

- [ ] **Sync:** a `fixup! <subject> (#N)` landing folds into `<subject>` at the sync rebase
- [ ] **Scan:** the scan reads such a landing as the commit it names
- [ ] **Refusal:** a fixup naming no fork commit, or several, still refuses

## Change

- **`fixupTarget`** (`scripts/fork-delta.ts`): strips `fixup! `, then one trailing ` (#N)` unless the full name is itself an owner subject
- **Sync** (`scripts/fork-sync.ts`): `resolveFixups` maps each fixup to its one owner sha, or refuses
- **Sequence editor** (`scripts/lib/fork-sync-todo.ts`): rewrites git's generated todo, moving each resolved fixup under its owner as `fixup`
- **Scan** (`scripts/fork-scan.ts`): replay counterparts and trailer inheritance use `fixupTarget`

Editing git's own todo keeps every other todo decision git makes, such as dropping cherry-picks upstream already carries.
`--autosquash` stays for `squash!` and `amend!`.

## Scope and approval

Bug filed as #1508; it blocks the #1493 pay-down, which lands one `fixup!` PR per owner.

## Verification

- `vp test run scripts/fork-sync.test.ts scripts/fork-scan-gates.test.ts scripts/fork-delta.test.ts` → exit 0 (118 tests)
- `vp run fork:ci` → exit 0
- `tsc --noEmit` in `scripts` and `apps/desktop` → exit 0

New tests:

- fixture: `fixup! feat(fork): owned change (#1600)` on trunk; `rebaseOnto` leaves one owner commit carrying the fix
- refusals still fire for none or several owners, suffixed or not
- an owner ending in ` (#219)` keeps its own number
- `placeFixups` on a todo mixing git-moved, suffixed, and ownerless fixups
- scan counterparts and trailers for a suffixed fixup

Claude Opus 5.5, Claude Code.

## Fork trailers

Fork-Domain: fork-meta
Fork-Tier: core
Fork-Upstreamable: no
Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
donjor referenced this pull request in RSI-Software/t3code-hyprws Oct 3, 2026
… sync (#1509)

## Problem

`ghb pr merge --squash` lands a fixup PR as `fixup! <owner subject> (#N)`.
Every `fixup!` matcher compared the exact subject, so the next sync refused it before the rebase, and git autosquash could not fold it anyway.

Closes #1508

- [ ] **Sync:** a `fixup! <subject> (#N)` landing folds into `<subject>` at the sync rebase
- [ ] **Scan:** the scan reads such a landing as the commit it names
- [ ] **Refusal:** a fixup naming no fork commit, or several, still refuses

## Change

- **`fixupTarget`** (`scripts/fork-delta.ts`): strips `fixup! `, then one trailing ` (#N)` unless the full name is itself an owner subject
- **Sync** (`scripts/fork-sync.ts`): `resolveFixups` maps each fixup to its one owner sha, or refuses
- **Sequence editor** (`scripts/lib/fork-sync-todo.ts`): rewrites git's generated todo, moving each resolved fixup under its owner as `fixup`
- **Scan** (`scripts/fork-scan.ts`): replay counterparts and trailer inheritance use `fixupTarget`

Editing git's own todo keeps every other todo decision git makes, such as dropping cherry-picks upstream already carries.
`--autosquash` stays for `squash!` and `amend!`.

## Scope and approval

Bug filed as #1508; it blocks the #1493 pay-down, which lands one `fixup!` PR per owner.

## Verification

- `vp test run scripts/fork-sync.test.ts scripts/fork-scan-gates.test.ts scripts/fork-delta.test.ts` → exit 0 (118 tests)
- `vp run fork:ci` → exit 0
- `tsc --noEmit` in `scripts` and `apps/desktop` → exit 0

New tests:

- fixture: `fixup! feat(fork): owned change (#1600)` on trunk; `rebaseOnto` leaves one owner commit carrying the fix
- refusals still fire for none or several owners, suffixed or not
- an owner ending in ` (#219)` keeps its own number
- `placeFixups` on a todo mixing git-moved, suffixed, and ownerless fixups
- scan counterparts and trailers for a suffixed fixup

Claude Opus 5.5, Claude Code.

## Fork trailers

Fork-Domain: fork-meta
Fork-Tier: core
Fork-Upstreamable: no
Co-authored-by: donjor <38745786+donjor@users.noreply.github.com>
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