Skip to content

Split runtime file client layers - #17188

Merged
nwparker merged 38 commits into
mainfrom
ra/max-lines-bottom-16-runtime-file-client
Aug 30, 2026
Merged

nwparker merged 38 commits into
mainfrom
ra/max-lines-bottom-16-runtime-file-client

Conversation

@nwparker

@nwparker nwparker commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1619 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1519 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​100

Summary

  • replace the monolithic runtime file client with a 34-line public facade
  • split public types/routing, mutation RPC fencing, reads/downloads, mutations, imports/uploads, search/listing, metadata, and shared watches into focused modules
  • preserve local, SSH, nested-SSH, environment-pairing, legacy-host fallback, and shared-watch behavior
  • remove the resolved max-lines suppression and reduce the baseline from 71 to 70

Preservation audit

  • all 49 function signatures and bodies preserved exactly
  • all 12 type declarations and 5 constants/initializers preserved exactly
  • exact 22 non-suppression comments and 175 source literals preserved
  • exact 25-name public export surface preserved through the facade
  • all RPC method names, payload literals, timeout values, and compatibility fallbacks are unchanged

Validation

  • pnpm tc
  • pnpm tc:web
  • pnpm test src/renderer/src/runtime — 150 files, 1,144 passed
  • focused runtime-file suite — 9 files, 82 passed
  • focused native code-quality plugin audit on all split modules
  • pnpm run check:code-quality:changed
  • pnpm check:max-lines-ratchet — 70 grandfathered suppressions
  • pnpm run check:runtime-electron-ratchet
  • pnpm test config/scripts/check-max-lines-ratchet.test.mjs — 15 passed
  • changed-file lint and formatting checks
  • git diff --check

The remote-wire review found no Rule 1/2/3 change: this is a verbatim module split with the RPC/content literal multiset unchanged. The documented cross-version harness does not cover file RPCs; the runtime-file suites exercise the existing old-host method-not-found and projection fallbacks directly.

Known inherited CI state from #17181:

  • static analysis is red for existing pane-manager import/no-cycle warnings
  • shard 1/8 is red because the earlier daemon split did not update the child-process boundary allowlist

Stacked on #17181.

@greptile-apps

greptile-apps Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR reorganizes the monolithic runtime file client into a small compatibility facade and focused modules while retaining the existing public entry point.

  • Separates routing and shared types from operation-specific clients.
  • Isolates reads, mutations, imports/uploads, search, metadata, and shared-watch behavior.
  • Removes the obsolete max-lines baseline suppression for the former monolithic file.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
src/renderer/src/runtime/runtime-file-client.ts Replaces the monolithic implementation with a compatibility facade that re-exports the split client API.
src/renderer/src/runtime/runtime-file-routing.ts Centralizes local, SSH, and environment-runtime routing and path ownership helpers.
src/renderer/src/runtime/runtime-file-read-client.ts Houses file reads, previews, and local or chunked remote downloads.
src/renderer/src/runtime/runtime-file-mutation-client.ts Houses directory reads and file-system mutation operations.
src/renderer/src/runtime/runtime-file-import-client.ts Houses external-path staging, import orchestration, deconfliction, and rollback behavior.
src/renderer/src/runtime/runtime-file-upload-client.ts Houses chunked upload and temporary-file commit behavior.
src/renderer/src/runtime/runtime-file-search-client.ts Houses search, listing, cancellation, and legacy Quick Open fallback behavior.
src/renderer/src/runtime/runtime-file-watch-client.ts Houses shared runtime watch lifecycle and event fan-out state.
config/max-lines-baseline.txt Removes the obsolete suppression for the now-small runtime-file-client facade.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Caller[Existing runtime-file callers] --> Facade[runtime-file-client facade]
  Facade --> Types[Shared types]
  Facade --> Reads[Reads and downloads]
  Facade --> Mutations[Mutations]
  Facade --> Imports[Imports and uploads]
  Facade --> Search[Search and listing]
  Facade --> Metadata[Metadata]
  Facade --> Watches[Shared watches]
  Reads --> Routing[Runtime routing]
  Mutations --> Routing
  Imports --> Routing
  Search --> Routing
  Metadata --> Routing
  Watches --> RPC[Runtime subscription transport]
  Mutations --> Fencing[Mutation RPC fencing]
  Imports --> Fencing
Loading

Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

@nwparker
nwparker changed the base branch from ra/max-lines-bottom-15-mobile-host-screen to main August 30, 2026 03:16
@nwparker
nwparker merged commit 9bdc146 into main Aug 30, 2026
4 of 20 checks passed
@coderabbitai

coderabbitai Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

Next included review available in 14 minutes.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d1ff8d8-9d59-4abd-a284-d1bdde0bd8d2

📥 Commits

Reviewing files that changed from the base of the PR and between 15abc3f and 40cd6d4.

📒 Files selected for processing (12)
  • config/max-lines-baseline.txt
  • src/renderer/src/runtime/runtime-file-client-types.ts
  • src/renderer/src/runtime/runtime-file-client.ts
  • src/renderer/src/runtime/runtime-file-import-client.ts
  • src/renderer/src/runtime/runtime-file-metadata-client.ts
  • src/renderer/src/runtime/runtime-file-mutation-client.ts
  • src/renderer/src/runtime/runtime-file-mutation-rpc.ts
  • src/renderer/src/runtime/runtime-file-read-client.ts
  • src/renderer/src/runtime/runtime-file-routing.ts
  • src/renderer/src/runtime/runtime-file-search-client.ts
  • src/renderer/src/runtime/runtime-file-upload-client.ts
  • src/renderer/src/runtime/runtime-file-watch-client.ts
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 89de407a-6f04-43e4-b8ef-7e277db628c7

📥 Commits

Reviewing files that changed from the base of the PR and between 15abc3f and 40cd6d4.

📒 Files selected for processing (12)
  • config/max-lines-baseline.txt
  • src/renderer/src/runtime/runtime-file-client-types.ts
  • src/renderer/src/runtime/runtime-file-client.ts
  • src/renderer/src/runtime/runtime-file-import-client.ts
  • src/renderer/src/runtime/runtime-file-metadata-client.ts
  • src/renderer/src/runtime/runtime-file-mutation-client.ts
  • src/renderer/src/runtime/runtime-file-mutation-rpc.ts
  • src/renderer/src/runtime/runtime-file-read-client.ts
  • src/renderer/src/runtime/runtime-file-routing.ts
  • src/renderer/src/runtime/runtime-file-search-client.ts
  • src/renderer/src/runtime/runtime-file-upload-client.ts
  • src/renderer/src/runtime/runtime-file-watch-client.ts

📝 Walkthrough

Walkthrough

The centralized runtime file client was split into specialized modules. Shared types and routing helpers define local and remote operation handling. New clients implement runtime-aware reads, downloads, searches, metadata queries, mutations, uploads, imports, and watches. Runtime RPC calls preserve capability, SSH, execution-host, and pairing-revision expectations. The original client now re-exports the specialized APIs, and its max-lines exemption was removed.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* Split speech session lifecycle

* Split terminal output scheduler pipeline

* Split mobile browser pane modules

* Prune resolved max-lines suppressions

* Split pane tree equalization logic

* Extract mobile troubleshoot screen styles

* Split external automation manager

* Split main window service attachments

* Split hosted review creation checks

* Split automation dispatch event handling

* Split settings navigation metadata

* Split daemon initialization lifecycle

* Split GitLab item dialog

* Split relay dispatcher layers

* Split mobile host screen

* Retarget mobile view settings source test

* Split runtime file client layers

* Fix F3-speech for stablyai#17123

* Fix F1-cycle for stablyai#17131

* Fix F4-navtest for stablyai#17157

* Fix F2-allowlist for stablyai#17161
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.

1 participant