Repository navigation
DreamCode v1.4.0
·
29 commits
to stable-release
since this release
DreamCode v1.4.0
What's New
Sync Layer Refactoring
- Split 883-line
sync.tsxmonolith into 5 focused modules - Added SYNC-WIPE GUARD v2 — prevents HTTP response from overwriting SSE-populated data
- Added session merge with cost/token preservation (server vs local)
- Added hydration tracker for concurrent SSE events during sync
fullSyncedSessionsguard prevents redundant re-sync on navigation
Prompt Layer Refactoring (Fixed)
- Extracted 2496-line
prompt.tsmonolith into 10 focused modules - Fixed per-turn chain enforcement — uses
continueinstead ofreturn "continue"(which corrupted SSE stream) - Synthesis injection now uses direct Effect generator (no more
Effect.runPromisesilent failures) - Cost/token accumulation uses atomic
Ref(no race condition on concurrent subagent completion) - Metadata propagation preserves
sessionIdin completed subagent parts
Subagent Clickability
- Fixed
resultMetadatapropagation inprocessSensorGatePhaseupdatePart — preservessessionIdin metadata - Removed redundant
onMountTDZ error in Task component - Persistent subagent tabs via SDK children fallback
- Auto-close on completion with deliberate-selection exemption
Desync/Black Screen Fixes
- Root cause identified: Per-turn chain enforcement used
return "continue"from Effect generator, propagating garbage value through SSE stream → frontend sync wiped message store - Fix: Hard-block message injected into
extraMsgsinstead, LLM call proceeds normally - EMPTY-RENDER recovery loop limited to truly empty stores (not reactivity glitches)
- DEFENSIVE navigation handler prevents navigate-home when local messages exist
Platform Support
- Linux: x64, arm64, x64-baseline, musl variants
- macOS: arm64, x64, x64-baseline
- Windows: arm64, x64, x64-baseline
Other Fixes
export const→export varin extracted modules (fixes Bun TDZ:handle2error)- Self-re-export
export * as SessionPrompt from "./prompt"removed (fixes Bun scope hoisting) - MCP Linux reliability (worker bunfs path, tool retry)
- Pieces LTM graceful degradation
- WSL2 clipboard support + Ctrl+C copy binding
- PID lockfile to prevent multiple instances
- ErrorBoundary wrappers for sidebar and session view
- Stale text selection defense (Linux PRIMARY selection)
- Dynamic persona scaling via depthScore
- Prevent deep-research infinite subagent spawning
- Sensor gate hardening with try/except
Engineering Issues Documented
See ENGINEERING-ISSUES.md for detailed root cause analysis of:
- TDZ errors in Bun bundles (handle2)
- Black screen from
return "continue"in Effect generators - Subagent
sessionIdmissing from metadata - 25 behavioral differences between monolith and refactored versions