Repository navigation
Conversation
Move the remote chunked-download helpers into runtime-remote-file-download.ts so runtime-file-read-client.ts is back under the 300-line lint cap. No behaviour change.
7 of 9 tasks
Contributor
Author
|
folded into #34929 |
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.
ELI5
The lint check fails on
mainbecause one file grew past the 300-line limit. This PR moves one self-contained group of functions into its own file. Nothing the app does changes.What Changed
remoteChunkedDownloadAvailable,readRemoteDownloadChunk,downloadRemoteFileViaPreview), along with their constants and the privateisUnsupportedRemotePreviewDownloadcheck, moved fromruntime-file-read-client.tsto a new sibling file,runtime-remote-file-download.ts. The code was moved, not changed.runtime-file-read-client.tsnow imports these helpers and is down to 241 lines. Its exports haven't changed, so no importer needs an update.Why
mainstarted failing the max-lines lint rule (runtime-file-read-client.ts: File has too many lines (304)) after two changes to this file landed one after the other. Every PR's static-analysis job fails as a result. The remote-download helpers are the most self-contained piece of the file: onlydownloadRuntimeFileuses them, and they don't depend on the read and preview paths. That makes them the cleanest split, and it avoids amax-linesdisable, which the repo rules forbid.Linked Issue
N/A. This fixes a lint failure on
main.Visual Proof
N/A. No UI change.
Testing
pnpm tcandpnpm run typecheck:cipass.pnpm exec oxlint src/renderer/src/runtimepasses, and so do the anti-slop lint, the ast-grep gates,check:process-host-importsandcheck:code-quality:changed.runtime-file-client.test.ts,runtime-file-client-download.test.ts,runtime-paged-file-read.test.ts,remote-host-file-open-repro.test.tsandruntime-terminal-artifact-read.test.tspass (49 tests).AI Disclosure
Review
Agent skill upstream boundary
Notes
The moved code is the same, so security, cross-platform, SSH/remote, mobile, compatibility and performance behave exactly as before.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)