Skip to content

Route application filesystem I/O through FileOperations - #13630

Open
franknoirot wants to merge 5 commits into
codex/effect-filesystem-operationsfrom
codex/file-operations-cutover
Open

Route application filesystem I/O through FileOperations#13630
franknoirot wants to merge 5 commits into
codex/effect-filesystem-operationsfrom
codex/file-operations-cutover

Conversation

@franknoirot

@franknoirot franknoirot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closes #12350 by routing application-facing filesystem reads and mutations through the FileOperations coordination service introduced in #13628. This is the one-step production cutover: production application code no longer calls its filesystem-operation methods directly, which is why the PR's so many files (sorry!). In the next PR in the stack we introduce a pair of ESLint rules so that no new calls can ever be reintroduced.

  1. Resolves FileOperations at registry-aware composition roots and passes it explicitly into registry-agnostic modules such as desktop.ts; those modules do not reach into the registry themselves.
  2. Cuts desktop helpers, auth/settings persistence, project libraries, route loading, exports, keymaps, screenshots, telemetry, Zookeeper history, and other application consumers over to coordinated reads and writes.
  3. Routes publication and cloud duplicate-manifest scans through coordinated reads. The cloud-sync engine keeps its private backing proxy because that proxy is the subsystem adapter that observes local mutations.
  4. Preserves existing permission checks, file metadata, and case-only rename behavior using the access and stat capabilities established in Introduce Effect filesystem capabilities #13597 and coordinated in Add file operation coordinator to the registry #13628.
  5. Applies the direct-fsZds I/O lint rule across production src and keeps the lower-level FileSystem adapter inaccessible to application consumers.

This does not delete systemIOActor: it still owns workflow concerns such as navigation and editor/project state. It does make FileOperations the single application-facing filesystem boundary, so removing those remaining workflow responsibilities can happen independently.

How to test

This is an important one to test! This is where the rubber hits the road. Exercise project and file workflows on both desktop and web: create, rename, move, duplicate, publish, and delete projects; create/edit/move/delete nested files and directories; export a project or screenshot; restart and confirm settings/keybindings persist. Behavior should remain unchanged while overlapping operations are coordinated by the shared service.

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modeling-app Ready Ready Preview Sep 5, 2026 12:08am UTC

Request Review

@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from a5b665f to 2ccd56b Compare September 3, 2026 21:01
@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from 2ccd56b to c7af7ab Compare September 3, 2026 21:17
@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from c7af7ab to e24de5d Compare September 4, 2026 13:00
@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from e24de5d to f8ffdc1 Compare September 4, 2026 13:29
@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from f8ffdc1 to 075ee10 Compare September 4, 2026 13:53
@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from 075ee10 to 4b95c1b Compare September 4, 2026 14:08
@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from 4b95c1b to 5ee81b1 Compare September 4, 2026 14:28
@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from 5ee81b1 to fb78232 Compare September 4, 2026 14:30
@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from fb78232 to d893ebe Compare September 4, 2026 14:32
@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from d893ebe to cf9131a Compare September 4, 2026 15:01
@franknoirot franknoirot changed the title Route systemIO mutations through file operations Route application filesystem I/O through FileOperations Sep 4, 2026
@franknoirot
franknoirot force-pushed the codex/file-operations-cutover branch from 925e66d to 8b7a65d Compare September 4, 2026 17:25
await expect(
page.getByTestId('file-tree-item').getByText(sampleOne.folderName)
).toBeVisible()
await scene.settled()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by deflake cop-out. The race is with navigation which I'll be addressing very soon.

@franknoirot franknoirot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do some more self-review on Tuesday.

Comment thread src/lib/app.ts
Comment on lines +184 to +186
public get fileOperations(): FileOperationsRegistryService {
return this.registry.get(fileOperationsService)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think eventually I'd like the whole app to not use helpers like this, but rather just drop functionality if the fileOperations extension is not available. But we have to get basically everything into the registry system for that to work.

@franknoirot
franknoirot marked this pull request as ready for review September 5, 2026 00:59
@franknoirot
franknoirot requested a review from a team as a code owner September 5, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate SystemIO to a queued registry service

1 participant