[Routine - QP] refactor: replace deprecated String.substr() in VersionHistoryService#46
Draft
winterdrive wants to merge 1 commit into
Draft
[Routine - QP] refactor: replace deprecated String.substr() in VersionHistoryService#46winterdrive wants to merge 1 commit into
winterdrive wants to merge 1 commit into
Conversation
This was referenced Jul 5, 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.
Pre-flight Check
Open PRs and active branches checked before creating this PR:
chore/ignore-claude-worktrees-jestjest.config.jsroutine/qp-fix-path-traversal-prefix-260702src/core/PathUtils.ts,src/test/unit/pathUtils.test.tsfix/quick-create-workspace-uxsrc/commands.ts,src/promptProvider.ts,src/test/unit/promptProviderMultiroot.test.tsThis PR only modifies
src/services/VersionHistoryService.ts, which none of the above touch.Also checked: closed-but-unmerged routine branches (
routine/qp-fix-substr-deprecation-260625/ PR #33,routine/qp-fix-non-array-json-260627/ PR #35,routine/qp-fix-corrupted-clipboard-json-260626/ PR #34,routine/qp-fix-ai-progress-cleanup-260629/ PR #39,routine/qp-fix-unused-reply-var-260630/ PR #40,routine/qp-fix-version-history-corrupt-json-260701/ PR #41). Their code changes are already present onmaster(this repo squash-merges, so PRs can showCLOSED/mergedAt: nulleven though the diff landed — verified by grepping master for each fix, per prior guidance on this repo).The one exception: PR #33 explicitly excluded
src/services/VersionHistoryService.ts:395(now line 431) from its.substr()→.substring()cleanup, because at the time it conflicted with the then-open PR #32 (chore/issue-25-skill-install-scope). PR #32 has since merged (2026-06-26), so that conflict no longer exists, and this call is the only remaining.substr()usage insrc/andmcp-server/src/(verified via grep). This PR completes that deferred cleanup.Changes
src/services/VersionHistoryService.ts:431—Math.random().toString(36).substr(2, 9)→Math.random().toString(36).substring(2, 11)(behaviorally identical:substr(start, length)≡substring(start, start + length)for non-negative indices).Confirmed this PR does not modify any MCP tool schema (
mcp-server/src/tools/untouched), does not add/remove/update dependencies, and does not touchpackage.json,package-lock.json, orCHANGELOG.md.Safety Verification
Commands run locally, in order:
✅ No output, no errors.
✅
Test Suites: 7 passed, 7 total,Tests: 107 passed, 107 total.No
lintorformat:checkscript is defined inpackage.jsonfor this project (consistent with prior routine PRs), so those steps were skipped.CI / Release Gate Note
This is a daily routine Draft PR. Package version bump and
CHANGELOG.mdupdates are intentionally deferred to the weekend release/integration PR. If GitHub Actions fails only because of the repository's version-bump gate, that is expected release-readiness behavior for a routine PR, not a code validation failure.🤖 Generated with Claude Code