Extract project/workspace related functionality to Effect services#1524
Merged
juliusmarminge merged 7 commits intomainfrom Mar 31, 2026
Merged
Extract project/workspace related functionality to Effect services#1524juliusmarminge merged 7 commits intomainfrom
juliusmarminge merged 7 commits intomainfrom
Conversation
- Move workspace entry logic under `project/` and wire it into server layers - Add git workspace listing and ignore filtering support for large repos - Update checkpoint invalidation to use the new workspace service
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
- move check-ignore chunking coverage into GitCore tests - modernize WorkspaceEntries tests around Effect-based temp dirs
- Add Effect services for workspace writes and favicon resolution - Invalidate workspace search after file writes - Update favicon route to use the shared resolver
- Move workspace path validation and file writes into shared workspace services - Reuse root normalization for project creation and metadata updates - Preserve favicon and workspace entry behavior after the module split
- Add module and API docs for cached workspace entry search - Clarify search and cache invalidation responsibilities
- Split workspace path failures into typed errors with message getters - Surface clearer workspace-root and file-path errors through WS routes - Update tests for the new error messages and timeout handling
aaditagrawal
added a commit
to aaditagrawal/t3code
that referenced
this pull request
Mar 31, 2026
…lling Integrates 3 upstream commits: - Extract project/workspace functionality to Effect services (pingdotgg#1524) - Replace wait-on with internal desktop resource polling (pingdotgg#1600) - Bump Effect catalog dependencies (pingdotgg#1594) Conflict resolution: deleted fork's workspaceEntries.ts (extracted upstream), accepted upstream's gitCoreLayer extraction in serverLayers, preserved fork's SessionTextGenerationLive for GitManager, moved runPromise definition earlier for favicon route handler.
2 tasks
Chrono-byte
pushed a commit
to Chrono-byte/t3code
that referenced
this pull request
Mar 31, 2026
xddinside
referenced
this pull request
in xddinside/t3code
Apr 4, 2026
gigq
pushed a commit
to gigq/t3code
that referenced
this pull request
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
bun fmtbun lintbun typecheckbun run testNote
Medium Risk
Refactors core workspace indexing, file writes, and favicon handling into new Effect services and changes
GitCore.executeoutput/truncation semantics (plus stdin support), which could affect multiple call sites and runtime wiring if any consumer assumptions were missed.Overview
Extracts workspace/project helpers into Effect services and rewires server consumers. Introduces
WorkspaceEntries(TTL-cached workspace index + ranked search with git-aware ignore filtering),WorkspacePaths(workspace root normalization + safe relative path resolution), andWorkspaceFileSystem(workspace-root-relative writes that invalidate the entry cache), and updates WebSocket handlers to use these services instead of ad-hoc helpers.Moves favicon discovery into a dedicated resolver. Adds
ProjectFaviconResolverand convertstryHandleProjectFaviconRequestto an Effect-based handler backed by the resolver andFileSystem.Extends
GitCoreto support workspace indexing workflows. Adds stdin support toexecute, returns explicitstdoutTruncated/stderrTruncatedflags (instead of embedding a marker), and addsisInsideWorkTree,listWorkspaceFiles, and chunkedfilterIgnoredPathsto safely handle large path lists.Wiring + tests updated.
CheckpointReactornow invalidates viaWorkspaceEntries.invalidate; server/runtime layers and integration tests are updated accordingly; new test suites cover the new services and git ignore chunking, and legacyworkspaceEntriesmodules/tests are removed.Written by Cursor Bugbot for commit c6d0fb7. This will update automatically on new commits. Configure here.
Note
Extract workspace entry indexing into dedicated service layer
WorkspaceEntries,WorkspaceFileSystem, andWorkspacePathsas injected Effect services, replacing module-level functions and inline logic inwsServer.ts.WorkspaceEntriesbuilds a cached (TTL 15s, capacity 4) index of up to 25,000 entries using git when available or a bounded filesystem walk (32 concurrent reads), with fuzzy ranking and truncation tracking.WorkspaceFileSystem.writeFileresolves and validates paths within the workspace root, creates parent directories, and invalidates theWorkspaceEntriescache after writing.WorkspacePathshandles workspace root normalization (including~expansion) and safe in-root path resolution, rejecting escape attempts.GitCoregainsisInsideWorkTree,listWorkspaceFiles, andfilterIgnoredPaths(chunked via NUL-separated stdin) and now reports stdout/stderr truncation via flags onExecuteGitResult.CheckpointReactornow callsworkspaceEntries.invalidate(cwd)via the injected service instead of a direct module-level function.projects.writeFileand workspace root validation inproject.create/project.meta.updatechange to domain-specific strings from the new services.Macroscope summarized c6d0fb7.