You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(renderer): remove the runtime-file-client barrel - #27975
src/renderer/src/runtime/runtime-file-client.ts only re-exported functions from eight runtime-file-* modules (read, mutation, import, search, metadata, routing, watch, types). This PR points every importer at the module that defines what it uses, and deletes the forwarding file.
What Changed
Users see no difference.
About 80 renderer files now import from runtime-file-{read,mutation,import,search,metadata,watch}-client, runtime-file-routing or runtime-file-client-types.
Tests: each mock of the barrel is split per defining module with the same values. The importOriginal mocks now mock the module they override: runtime-file-mutation-client for rename/write, runtime-file-read-client for read/download. The quick-open mocks moved to runtime-file-search-client.
CI routing: the quick-open e2e route listed the barrel. It now lists runtime-file-search-client.ts, which holds the real code.
Net: production −44 (+85/−129), tests +19 (+138/−119).
Why
Phase 3.99 / AGENTS.md rule: no barrels and no re-export shims. With direct imports, each import line names the module a file really depends on, and each test mocks the module the code under test actually calls. One barrel per PR keeps every review mechanical.
Linked Issue
N/A, internal Phase 3.99 cleanup (PR 3.5c).
Visual Proof
N/A, no UI or behaviour change.
Testing
No import, mock or import() of runtime/runtime-file-client remains in src tests mobile config .github.
All 72 changed test files pass (596 tests), and so do the e2e routing contract tests.
pnpm tc, pnpm lint and pnpm run check:code-quality:changed (0 findings) pass on the whole barrel stack.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
P0/P1 review: my own review plus an independent reviewer.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Renderer-only import changes. SSH, wire, mobile and platforms are not affected.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough
Imports and test mocks across the renderer now target dedicated runtime file client modules for operations such as reading, mutation, importing, searching, metadata, routing, and watching. The consolidated runtime-file-client.ts re-export module was deleted. The changed import paths and mock behavior do not show changes to the underlying runtime operations.
Priority: ⬇️ Low
Merge Risk:⚪ Minimal · up to fe265
This change redirects imports after removing a re-export module; no user-visible behavior change or concrete failure is established, so it is mergeable after normal checks.
Pre-merge checks | 4 | 1
❌ Failed checks (1 inconclusive)
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 50 files. (85 skipped: …
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: removing the renderer runtime-file-client barrel.
Description check
The description follows the required structure and explains the change, rationale, scope, visual impact, testing, and review status. It identifies the linked issue as an internal cleanup instead of pr…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 50 files. (85 skipped: 85 over the file limit.)
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
Commit to this branch
Create a new PR
🛠️ Fix failing CI checks 💡
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
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
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.
ELI5
src/renderer/src/runtime/runtime-file-client.tsonly re-exported functions from eightruntime-file-*modules (read, mutation, import, search, metadata, routing, watch, types). This PR points every importer at the module that defines what it uses, and deletes the forwarding file.What Changed
Users see no difference.
runtime-file-{read,mutation,import,search,metadata,watch}-client,runtime-file-routingorruntime-file-client-types.importOriginalmocks now mock the module they override:runtime-file-mutation-clientfor rename/write,runtime-file-read-clientfor read/download. The quick-open mocks moved toruntime-file-search-client.runtime-file-search-client.ts, which holds the real code.Net: production −44 (+85/−129), tests +19 (+138/−119).
Why
Phase 3.99 / AGENTS.md rule: no barrels and no re-export shims. With direct imports, each import line names the module a file really depends on, and each test mocks the module the code under test actually calls. One barrel per PR keeps every review mechanical.
Linked Issue
N/A, internal Phase 3.99 cleanup (PR 3.5c).
Visual Proof
N/A, no UI or behaviour change.
Testing
No import, mock or
import()ofruntime/runtime-file-clientremains insrc tests mobile config .github.All 72 changed test files pass (596 tests), and so do the e2e routing contract tests.
pnpm tc,pnpm lintandpnpm run check:code-quality:changed(0 findings) pass on the whole barrel stack.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
P0/P1 review: my own review plus an independent reviewer.
Agent skill upstream boundary
Notes
Renderer-only import changes. SSH, wire, mobile and platforms are not affected.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)