Repository navigation
refactor(cli): clean up spinners, branch lookup, file command and large conditionals - #1158
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1158 +/- ##
==========================================
+ Coverage 93.71% 94.14% +0.44%
==========================================
Files 159 161 +2
Lines 13104 13079 -25
==========================================
+ Hits 12279 12312 +33
+ Misses 825 767 -58 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…t to lib/utils/array as sameItems
bhdnb
marked this pull request as ready for review
October 29, 2026 15:49
andrii-bodnar
approved these changes
Oct 30, 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.
Refactoring pass over
src-next, plus the fixes it surfaced.Changes
withSpinner. A failure prints one spinner line with the full error instead of a generic line followed by the error.status,auto-translateandfileresolve--branchthroughBranchService, and the privatenormalizeBranchcopies are removed.download sources --reviewedpath is extracted into its own methods.--file/--directorylookups are extracted into methods.findProjectFileupdateExistingFileBun.filearoundFileService.updateProjectFileandTranslationService.importProjectTranslation(StringsBased)take their optional request fields as an object (ProjectFileUpdate,ImportTranslationOptions) instead of long runs of positionalundefineds. The import progress callback stays a separate parameter, as inimportXliffTranslation.changedFileSettingsdecides which context/excluded languages a file update sends, shared byfile uploadandupload sourcesisStringsBasedProjectandFILE_MANAGEMENT_UNAVAILABLEreplace 12 copies of the project-type check and 5 copies of the messagesameLanguageSetmoves tolib/utils/array.tsassameItemsgetCommonPathmoves tolib/utils/path.tsresolveContextPathis removed, since it only forwarded toreplaceFileDependentPlaceholderstoProjectPathStringService.isStringsBasedProjectis removed;stringloads the project throughProjectServicelike the other commands.tscerrors from nullable API client fieldsAwaited<ReturnType<GetXService>>/ReturnType<GetOutput>in signatures are replaced with the service classes andOutputUser-visible fixes
--branch feature/xnow works instatus,auto-translateandfile. Crowdin stores the branch asfeature.x, which the old lookups didn't match. Infile:listshowed branch-prefixed pathsuploadtried to create a duplicate instead of updatingdownload,deleteand translation upload/download reported the file as missing--engine-idand--ai-promptreject non-integer values such asabcor1.5as usage errors (exit 2). Before, they were silently dropped or sent to the API.file upload --parser-versionrejects non-numeric values such as2xinstead ofparseIntsilently reading them as2.statusandauto-translatenow reports the shared `Project doesn't contain the ''string list,addandedit --verboseshow the "Fetching project info" spinner in text output, like the other commands.Testing
stringsnapshots are updated for the project spinner.