Skip to content

chore: fix typos in code comments and a Java SDK example - #7059

Merged
wenshao merged 1 commit into
QwenLM:mainfrom
chinesepowered:fix/typos-comments-and-example
Jul 17, 2026
Merged

chore: fix typos in code comments and a Java SDK example#7059
wenshao merged 1 commit into
QwenLM:mainfrom
chinesepowered:fix/typos-comments-and-example

Conversation

@chinesepowered

Copy link
Copy Markdown
Contributor

What this PR does

Fixes four spelling typos in code comments and one Java SDK example prompt. No behavior changes.

Typo Fix Location
intentially intentionally packages/cli/src/gemini.tsx (comment)
Attemtping Attempting packages/cli/src/ui/types.ts (comment)
overrided overridden packages/core/src/test-utils/mock-tool.ts (comment)
devlop ×2 develop packages/sdk-java/.../SessionExample.java (example prompt string)

Why it's needed

Minor readability cleanup. These are grouped into one PR rather than four micro-PRs to keep review overhead low.

Reviewer Test Plan

How to verify

  • grep -rn -e intentially -e Attemtping -e overrided -e devlop packages --include='*.ts' --include='*.tsx' --include='*.java' returns nothing (remaining hits, if any, are only in generated dist/ / coverage/ artifacts that regenerate on build).
  • Changes are limited to comments and one test-example string; no logic is touched.

Evidence (Before & After)

  • gemini.tsx: // We intentially omit the list of extensions …// We intentionally omit the list of extensions …
  • types.ts: // Attemtping to authenticate or re-authenticate// Attempting to authenticate or re-authenticate
  • mock-tool.ts: // Should be overrided in test file. …// Should be overridden in test file. …
  • SessionExample.java: session.sendPrompt("devlop Fibonacci function by python", …)session.sendPrompt("develop Fibonacci function by python", …) (both call sites)

Tested on

OS Status
🍏 macOS
🪟 Windows N/A
🐧 Linux N/A

macOS: prettier --check + eslint clean on the three TypeScript files; confirmed git tracks only the four intended source files (generated dist//coverage/ copies are git-ignored). The Java change is a string literal in a test example. Windows/Linux: N/A — comment/string edits with no platform-dependent behavior.

Environment (optional)

Node v24; @qwen-code/qwen-code monorepo.

Risk & Scope

  • Main risk or tradeoff: none. Comment and example-string spelling only; no runtime code paths affected.
  • Not validated / out of scope: no functional or test-logic changes.
  • Breaking changes / migration notes: none.

Linked Issues

None.

中文说明

本 PR 的作用

修复代码注释中的四处拼写错误,以及一个 Java SDK 示例提示语。无行为改动。

拼写错误 修正 位置
intentially intentionally packages/cli/src/gemini.tsx(注释)
Attemtping Attempting packages/cli/src/ui/types.ts(注释)
overrided overridden packages/core/src/test-utils/mock-tool.ts(注释)
devlop ×2 develop packages/sdk-java/.../SessionExample.java(示例提示字符串)

为什么需要

轻量的可读性清理。将这些合并到一个 PR 而非四个微型 PR,以降低复核开销。

复核测试计划

如何验证

  • grep -rn -e intentially -e Attemtping -e overrided -e devlop packages --include='*.ts' --include='*.tsx' --include='*.java' 无任何结果(若仍有命中,仅存在于会在构建时重新生成的 dist/ / coverage/ 产物中)。
  • 改动仅限注释与一个测试示例字符串,未触及任何逻辑。

证据(修复前后对比)

  • gemini.tsx// We intentially omit the list of extensions …// We intentionally omit the list of extensions …
  • types.ts// Attemtping to authenticate or re-authenticate// Attempting to authenticate or re-authenticate
  • mock-tool.ts// Should be overrided in test file. …// Should be overridden in test file. …
  • SessionExample.javasession.sendPrompt("devlop Fibonacci function by python", …)session.sendPrompt("develop Fibonacci function by python", …)(两处调用)

测试环境

系统 状态
🍏 macOS
🪟 Windows N/A
🐧 Linux N/A

macOS:三个 TypeScript 文件的 prettier --checkeslint 均无问题;确认 git 仅跟踪四个目标源文件(生成的 dist//coverage/ 副本已被 git 忽略)。Java 改动为测试示例中的字符串字面量。Windows/Linux:N/A——注释/字符串编辑,无平台相关行为。

运行环境(可选)

Node v24;@qwen-code/qwen-code monorepo。

风险与影响范围

  • 主要风险或权衡:无。仅为注释与示例字符串的拼写修正,不影响任何运行时代码路径。
  • 未验证 / 范围之外:无功能或测试逻辑改动。
  • 破坏性变更 / 迁移说明:无。

关联 Issue

无。

- intentially -> intentionally (cli/src/gemini.tsx comment)
- Attemtping -> Attempting (cli/src/ui/types.ts comment)
- overrided -> overridden (core/src/test-utils/mock-tool.ts comment)
- devlop -> develop (sdk-java SessionExample.java example prompt, x2)
@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Thanks for the PR!

Template looks good ✓

Problem: Real typos confirmed in source — intentially, Attemtping, overrided, devlop ×2 all present at the stated locations. Straightforward readability cleanup.

Direction: Aligned. Comment and example-string spelling fixes carry zero runtime risk. No direction concerns.

Size: 5 additions + 5 deletions across 4 files, all in comments or a test-example string literal. No production logic lines changed. Not applicable for core module thresholds.

Approach: Scope is minimal and focused — exactly the four stated typos, nothing else. Grouping them into one PR is the right call.

Moving on to code review. 🔍

中文说明

感谢贡献!

模板完整 ✓

问题:源码中确认存在真实拼写错误——intentiallyAttemtpingoverrideddevlop ×2 均在声明位置。属于可读性清理。

方向:对齐。注释和示例字符串拼写修正零运行风险,无方向顾虑。

规模:4 个文件,5 行增加 + 5 行删除,全部为注释或测试示例字符串字面量。未改动任何生产逻辑行。不适用核心模块阈值。

方案:范围最小且聚焦——恰好四处拼写错误,无多余改动。合并为一个 PR 是正确选择。

进入代码审查 🔍

Qwen Code · qwen3.7-max

Reviewed at 5f183b09f93a1a682a62705e9f35d56b773153d8 · re-run with @qwen-code /triage

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Code Review

Independent proposal: grep for the stated typos, fix each one in place — single-character corrections in comments and a string literal. Nothing more needed.

Diff comparison: matches exactly. Every change is a correct spelling fix at the right location. No logic touched, no scope creep, no drive-by refactors. Clean.

No critical blockers. No AGENTS.md violations.

Verification (Before / After)

This PR fixes comments and a test-example string — no user-visible behavior to test in tmux. Instead, I ran the author's own verification grep as a before/after check:

Before (main branch — typos present)

$ grep -rn -e intentially -e Attemtping -e overrided -e devlop packages --include='*.ts' --include='*.tsx' --include='*.java'
packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/SessionExample.java:166:            session.sendPrompt("devlop Fibonacci function by python", ...
packages/sdk-java/qwencode/src/test/java/com/alibaba/qwen/code/cli/example/SessionExample.java:215:            session.sendPrompt("devlop Fibonacci function by python", ...
packages/cli/src/gemini.tsx:388:    // We intentially omit the list of extensions here because extensions
packages/cli/src/ui/types.ts:24:  // Attemtping to authenticate or re-authenticate
packages/core/src/test-utils/mock-tool.ts:229:  // Should be overrided in test file. Functionality will be updated in follow

5 hits across 4 files — matches the PR's claim exactly.

After (PR applied — typos gone)

$ git apply <(gh pr diff 7059 --repo QwenLM/qwen-code) && grep -rn -e intentially -e Attemtping -e overrided -e devlop packages --include='*.ts' --include='*.tsx' --include='*.java'
Exit: 0
=== Verification complete: no typos remain ===

Zero hits. All four typos corrected, no collateral damage.

中文说明

代码审查

独立方案: grep 声明的拼写错误,逐个原地修正——注释和字符串字面量的单字符更正,无需更多。

Diff 对比: 完全吻合。每处改动都是正确位置的拼写修正。未触及逻辑,无范围蔓延,无顺手重构。干净。

无关键阻塞项,无 AGENTS.md 违规。

验证(修复前/后)

本 PR 修正注释和测试示例字符串——无用户可见行为可用 tmux 测试。改为运行作者自身的验证 grep 作为 before/after 检查:

修复前:4 个文件中 5 处命中,与 PR 声明完全一致。

修复后:0 处命中,四处拼写全部修正,无附带损伤。

Qwen Code · qwen3.7-max

Reviewed at 5f183b09f93a1a682a62705e9f35d56b773153d8 · re-run with @qwen-code /triage

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Confidence: 5/5 — clean across every stage, no reservations.

Four spelling typos, four correct fixes, zero risk. The diff is exactly what the PR says — comment and string-literal corrections with no logic changes. Before/after grep confirms all typos are gone and nothing else was touched. Well-scoped, well-documented, easy to review and revert. Ships it.

中文说明

置信度:5/5 — 各阶段均通过,无保留意见。

四处拼写错误,四处正确修正,零风险。Diff 与 PR 描述完全一致——注释和字符串字面量修正,无逻辑改动。修复前后 grep 确认所有拼写错误已消除且无附带影响。范围清晰,文档完善,易于审查和回滚。可以合并。

Qwen Code · qwen3.7-max

Reviewed at 5f183b09f93a1a682a62705e9f35d56b773153d8 · re-run with @qwen-code /triage

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looks ready to ship. ✅

@qwen-code-ci-bot qwen-code-ci-bot added the skip-changelog Exclude from release notes label Jul 16, 2026

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Downgraded from Approve to Comment: CI still running. Reviewed.

— qwen3.7-max via Qwen Code /review

@wenshao

wenshao commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Local build & real verification report (for merge reference)

Independently verified at head 5f183b09f in an isolated worktree (macOS, Node v24). Verdict: LGTM — safe to merge. The diff is exactly what the description claims (4 files / 5 substitutions, all in comments and one example string literal), and after the fix there are zero residual occurrences of any of the four typo stems anywhere in the repo's tracked sources.

Checks performed

# Check Result
1 Diff audit vs origin/main (merge-base f8e6e8931) ✅ Exactly the 4 claimed files / 5 substitutions; no hidden changes; single commit on top of a current main
2 Before/after grep oracle origin/main shows exactly the 5 claimed hits; PR head shows 0
3 Whole-repo residual sweep (git grep -i over all tracked files, all 4 stems) ✅ The only remaining devlop matches are the npm package literally named devlop in package-lock.json / packages/desktop/bun.lock (a real micromark/mdast dependency, not a typo). No missed occurrences
4 prettier --check + eslint on the 3 changed TS files ✅ Clean (exit 0, no findings)
5 Full build at PR head (npm run generate && npm run build) ✅ Exit 0
6 Targeted vitest, core: all 5 specs that import MockTool/MockModifiableTool from the touched test-utils/mock-tool.ts (coreToolScheduler, nonInteractiveToolExecutor, uiTelemetry, tool-registry, tool-search) ✅ 5 files, 420/420 passed
7 Targeted vitest, cli: direct spec of gemini.tsx + AuthState consumers (gemini.test.tsx, useAuth, useQwenAuth, AuthDialog) 106/107; the single failure is proven pre-existing (see note below)
8 Java SDK example (SessionExample.java) ✅ Textual verification: both sendPrompt("devlop …") call sites fixed to develop, changes confined to string literals, quoting intact. (No JDK/maven on the verify machine, so no compile run — zero-risk string-literal edit)

Note on the single local cli test failure

AuthDialog > drives API key provider steps from endpoint options metadata (vi.waitFor timeout at AuthDialog.test.tsx:141) fails identically at the PR's parent commit f8e6e8931 on origin/main (A/B control run in a second clean worktree). It is a pre-existing, local-environment-only artifact of this zh-CN-locale machine and is not introduced by this PR — this PR's own CI Test (ubuntu-latest, Node 22.x) full suite is green.

Evidence

1. Typo grep oracle — before (main, 5 hits) / after (PR head, 0 hits) + whole-repo residual sweep:

grep before/after oracle

2. Format / lint / full build / targeted tests + A/B control for the pre-existing failure:

build and tests

Conclusion

Comment/string-literal-only change with zero behavioral surface, fully consistent with its description, no residual typos repo-wide, build and blast-radius tests green locally, CI green. Ready to merge.

中文版本

本地构建与真实验证报告(供合并参考)

在隔离 worktree 中于 head 5f183b09f 独立验证(macOS,Node v24)。结论:LGTM,可安全合并。 diff 与描述完全一致(4 个文件 / 5 处替换,全部为注释及一个示例字符串字面量),修复后整个仓库受跟踪源码中四个拼写错误词干均零残留。

已执行的检查

# 检查项 结果
1 相对 origin/main 的 diff 审计(merge-base f8e6e8931) ✅ 恰为所声称的 4 文件 / 5 处替换;无隐藏改动;基于最新 main 的单一 commit
2 修复前后 grep 对照 origin/main 上恰好命中所声称的 5 处;PR head 上命中 0
3 全仓残留扫描(对所有受跟踪文件、全部 4 个词干做 git grep -i) ✅ 仅存的 devlop 命中是 package-lock.json / packages/desktop/bun.lock 中确实名为 devlop 的 npm 包(micromark/mdast 生态真实依赖,并非拼写错误)。无漏改
4 对 3 个改动 TS 文件执行 prettier --check + eslint ✅ 干净(exit 0,无告警)
5 PR head 全量构建(npm run generate && npm run build) ✅ Exit 0
6 core 定向 vitest:全部 5 个从被改动的 test-utils/mock-tool.ts 导入 MockTool/MockModifiableTool 的 spec(coreToolSchedulernonInteractiveToolExecutoruiTelemetrytool-registrytool-search) ✅ 5 个文件,420/420 通过
7 cli 定向 vitest:gemini.tsx 直接 spec + AuthState 消费方(gemini.test.tsxuseAuthuseQwenAuthAuthDialog) 106/107;唯一失败已证明为预先存在(见下方说明)
8 Java SDK 示例(SessionExample.java) ✅ 文本级验证:两处 sendPrompt("devlop …") 调用点均已改为 develop,改动仅限字符串字面量,引号配对完整。(验证机无 JDK/maven,未做编译;属零风险字符串编辑)

关于本地唯一一个 cli 测试失败的说明

AuthDialog > drives API key provider steps from endpoint options metadata(AuthDialog.test.tsx:141vi.waitFor 超时)在 PR 父 commit f8e6e8931(即 origin/main)上以完全相同的方式失败(已在第二个干净 worktree 中做 A/B 对照)。这是本 zh-CN locale 机器上预先存在的、仅限本地环境的伪失败,并非本 PR 引入 —— 本 PR 自身 CI 的 Test (ubuntu-latest, Node 22.x) 全量测试为绿色。

证据

见上方两张截图:① 拼写错误 grep 前后对照(main 5 处命中 / PR head 0 命中)+ 全仓残留扫描;② 格式化 / lint / 全量构建 / 定向测试 + 预存失败的 A/B 对照。

结论

纯注释/字符串字面量改动,无任何行为面,与描述完全一致,全仓无拼写残留,本地构建与影响面测试全绿,CI 绿色。可以合并。

@wenshao
wenshao added this pull request to the merge queue Jul 17, 2026
Merged via the queue into QwenLM:main with commit b1b2a99 Jul 17, 2026
51 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Exclude from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants