Desktop typecheck (and the pre-commit hook) hangs while `electrobun dev` runs (after upgrading Electrobun to 2.0.1)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, typescript
- Domain
- build-system, desktop, developer-experience
Research direction
Start with apps/desktop/package.json, the typecheck command, and apps/desktop/.hutch/devkit/.complete; compare the marker’s pinned Electrobun version and target with the desktop dependency. Then inspect the existing Electrobun scripts and run bun run typecheck while electrobun dev is active. Done means typecheck completes without waiting on the dev host, while fresh projections and version changes still prepare successfully.
Written by the indexing model from the issue text.
Description
Description
bun run typecheck never finishes while electrobun dev is running in the same worktree, so the
husky pre-commit hook hangs and no commit can be made without stopping the desktop dev host first.
@thinkrail/desktop's typecheck is electrobun prepare && tsc --noEmit. electrobun prepare takes
Hutch's exclusive project build lock (apps/desktop/.hutch/locks/electrobun-build.lock) before
deciding it has nothing to do, and electrobun dev holds that lock for its entire run. Since the
projection under .hutch/devkit is already valid in that situation, the wait buys nothing.
Hutch offers no bypass: HUTCH_ELECTROBUN_BUILD_LOCK is its recursion guard, not an escape hatch —
setting it makes prepare exit with RecursiveElectrobunBuild.
Steps to reproduce
cd apps/desktop && bun run dev(leave the Electrobun dev host running)- In another shell, from the repo root:
bun run typecheck - Or equivalently, make any change and
git commit— the pre-commit hook reaches
@thinkrail/desktop:typecheck: $ electrobun prepare && tsc --noEmitand stops there.
Expected behavior
Typechecking the desktop package succeeds while the dev host runs. Preparing an already-valid devkit
projection should not need the exclusive build lock.
Actual behavior
turbo run typecheck blocks indefinitely at @thinkrail/desktop. ps shows the parked child:
node .../apps/desktop/node_modules/.bin/electrobun prepare
.../hutch-engine electrobun prepare
It resumes the moment electrobun dev is stopped.
Potential fix
Only call electrobun prepare when the projection is not already prepared for the pinned Electrobun
version. .hutch/devkit/.complete records exactly that:
schema=1
electrobun=2.0.1
target=macos-arm64
source-manifest-sha256=e7978b03...
So a small apps/desktop/scripts/prepare-devkit.ts that compares that marker against
devDependencies.electrobun and shells out to electrobun prepare only on a miss, with
"typecheck": "bun scripts/prepare-devkit.ts && tsc --noEmit", keeps fresh machines and version
bumps working while making the common case a no-op. Measured here: desktop typecheck goes from
never finishing to 2.6s with the dev host up.
The other half belongs upstream in Electrobun/Hutch: prepare could validate the projection before
taking the lock, take a reader lock on the no-op path, or grow an explicit "skip if current" flag.
Happy to file that separately.
Environment
- OS: macOS 26.6.2 (arm64)
- Bun version (
bun --version): 1.4.0 - Node version (
node --version): v26.8.1 - ThinkRail version / commit: a2cd8c5c
- Electrobun: 2.0.1 (the hang appeared with the 2.0.1 / Hutch migration; it did not happen before)
🤖 Filed by Claude (via Claude Code) on behalf of @CommanderTvis
- Dominant language
- TypeScript
- Stars
- 481
- Forks
- 37
- Avg merge
- 21h 6m
- Merged PRs (30d)
- 130
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JetBrains/thinkrail
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
All issues in JetBrains/thinkrail
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100