Skip to content

DreamCode v1.4.0

Choose a tag to compare

@weebcoder101 weebcoder101 released this 08 Jul 21:19
· 29 commits to stable-release since this release

DreamCode v1.4.0

What's New

Sync Layer Refactoring

  • Split 883-line sync.tsx monolith 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
  • fullSyncedSessions guard prevents redundant re-sync on navigation

Prompt Layer Refactoring (Fixed)

  • Extracted 2496-line prompt.ts monolith into 10 focused modules
  • Fixed per-turn chain enforcement — uses continue instead of return "continue" (which corrupted SSE stream)
  • Synthesis injection now uses direct Effect generator (no more Effect.runPromise silent failures)
  • Cost/token accumulation uses atomic Ref (no race condition on concurrent subagent completion)
  • Metadata propagation preserves sessionId in completed subagent parts

Subagent Clickability

  • Fixed resultMetadata propagation in processSensorGatePhase updatePart — preserves sessionId in metadata
  • Removed redundant onMount TDZ 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 extraMsgs instead, 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 var in extracted modules (fixes Bun TDZ: handle2 error)
  • 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 sessionId missing from metadata
  • 25 behavioral differences between monolith and refactored versions