Skip to content

effectify Project service#18808

Open
kitlangton wants to merge 6 commits intodevfrom
kit/effectify-project
Open

effectify Project service#18808
kitlangton wants to merge 6 commits intodevfrom
kit/effectify-project

Conversation

@kitlangton
Copy link
Contributor

Summary

  • Migrate Project service to Effect service pattern (Service/Interface/Layer)
  • Use ChildProcessSpawner + ChildProcess.make for all git operations
  • Use FileSystem for cached ID read/write, sandbox existence, icon discovery
  • Use Path for all path resolution
  • db() helper wraps Database.use for clean Effect.sync DB access
  • fromDirectory fully effectful — git detection, ID caching, upsert, session migration
  • Replace fn() wrapper on update with UpdateInput schema
  • 25 tests passing

Test plan

  • 25 tests pass (existing 19 + 6 new)
  • fromDirectory: git repos, worktrees, commits, no-git
  • discover: favicon detection
  • update: name, icon, commands, multi-field, not-found error, GlobalBus events
  • list, get, setInitialized, addSandbox, removeSandbox
  • Typecheck clean

- Add 6 tests for list, get, setInitialized, addSandbox, removeSandbox
- Replace fn() wrapper on update with plain async function + UpdateInput schema
- Update route validator to use Project.UpdateInput
- Check off Project in migration checklist
…sync for DB

- gitRun helper for initGit (ChildProcessSpawner pattern)
- FileSystem for discover (readFile) and sandboxes (exists)
- Effect.sync wrapper for all Database.use calls
- emitUpdated helper for GlobalBus events
- fromDirectory stays as Effect.promise (complex, convert incrementally)
- defaultLayer provides Node platform implementations
- Convert all git calls to ChildProcessSpawner-based git helper
- Use FileSystem for cached ID read/write and sandbox existence checks
- Use Path for all path resolution (no more raw path module)
- Use db() for all Database operations (select, upsert, session migration)
- Parallel sandbox existence checks via Effect.forEach + concurrency
- Remove iife, existsSync dependencies
@kitlangton kitlangton marked this pull request as ready for review March 24, 2026 02:12
opencode-agent bot added a commit that referenced this pull request Mar 24, 2026
opencode-agent bot added a commit that referenced this pull request Mar 24, 2026
opencode-agent bot added a commit that referenced this pull request Mar 24, 2026
opencode-agent bot added a commit that referenced this pull request Mar 24, 2026
opencode-agent bot added a commit that referenced this pull request Mar 24, 2026
opencode-agent bot added a commit that referenced this pull request Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant