fix: improve error logging in worker and update defaultLayer evaluation closes #20413#20413
Conversation
…dering for prompt loop exit and message rendering
…sing @npmcli/arborist
…createServer in OAuth handlers
…no node adapters
…rve dependencies
…MessageV2 functions
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: PR #12809: fix(opencode): expand Error properties in logs for better diagnostics
All other searches either returned only the current PR (#20413) or no results, suggesting there are no other open PRs addressing the same issues (worker error logging with ErrorEvent, defaultLayer deferred evaluation for --conditions=browser, or the blank screen problem). |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
this pr closes #20413 i dont know why the label is not removed I have tried to edit multiple times |
Type of change
What does this PR do?
Running opencode with
--conditions=browsershows a blank screen, freezes completely, Ctrl+C doesn't work, terminal must be killed. The error log only shows[object ErrorEvent].worker.onerrorpassed rawErrorEventto logger. Used existingerrorMessageutility instead.defaultLayereagerly accessedProvider.defaultLayerat module load time, which isundefinedunder--conditions=browser. Wrapped withEffect.sync+Layer.unwrapfollowing the pattern insrc/session/compaction.ts:382-394.How did you verify your code works?
Before: blank screen, Ctrl+C unresponsive. After: launches cleanly. Ran
bun run typecheckandbun run dev.Screenshots / recordings
Not applied
Checklist
Issue for this PR
Closes #20413