Repository navigation
docs: 示例与测试改用中性的场景名和接口路径 - #46
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's Guide本 PR 仅调整文档、注释和测试中的示例文本:统一使用 File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
CodeSeer 审查
结论:批准
摘要
本次改动将测试、注释和文档中的验证码场景名、接口路径及宿主相关表述替换为中性示例。Kotlin 与 TypeScript 测试的断言和对应测试输入保持一致,未见由这些文本替换引入的行为变化或接口不一致。
整个 PR 至 48c3e20 · gpt-5.6-terra
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="compose/src/commonTest/kotlin/app/tinyui/PageHostTest.kt" line_range="64" />
<code_context>
+ if (event === "onTagged") { __host_call("http.request", 21, JSON.stringify({ channel: "app", method: "POST", url: "/code", body: {}, tags: { captchaScene: "signup" } })); __host_call("http.request", 22, JSON.stringify({ channel: "app", method: "GET", url: "/code", tags: { n: 1 } })); }
</code_context>
<issue_to_address>
**Kotlin example keeps an unversioned route**
When the tagged-request fixture runs, `onTagged` still calls `/code`, and the fake channel only recognizes that route, so the Kotlin test continues to demonstrate a path outside the stated `/api/v1/...` convention.
Change the fixture URL and its fake-channel matcher to a path such as `/api/v1/code`.
</issue_to_address>Sourcery assessment
Approved.
| if (event === "onZone") patches.push(["p",1,"text", [__host_query("i18n.timeZone", "{}"), __host_query("i18n.zoneOffset", JSON.stringify({ ms: 1767225600000 })), __host_query("i18n.zoneOffset", JSON.stringify({ ms: 1782864000000 }))].join("|")]); | ||
| if (event === "onI18nSubscribe") { __host_send("i18n.subscribe", "{}"); patches.push(["p",1,"text","subscribed"]); } | ||
| if (event === "onTagged") { __host_call("http.request", 21, JSON.stringify({ channel: "app", method: "POST", url: "/code", body: {}, tags: { captchaScene: "USER_REGISTER" } })); __host_call("http.request", 22, JSON.stringify({ channel: "app", method: "GET", url: "/code", tags: { n: 1 } })); } | ||
| if (event === "onTagged") { __host_call("http.request", 21, JSON.stringify({ channel: "app", method: "POST", url: "/code", body: {}, tags: { captchaScene: "signup" } })); __host_call("http.request", 22, JSON.stringify({ channel: "app", method: "GET", url: "/code", tags: { n: 1 } })); } |
There was a problem hiding this comment.
⚪ Low · Kotlin example keeps an unversioned route
When the tagged-request fixture runs, onTagged still calls /code, and the fake channel only recognizes that route, so the Kotlin test continues to demonstrate a path outside the stated /api/v1/... convention.
Change the fixture URL and its fake-channel matcher to a path such as /api/v1/code.
Prompt for AI agents
In `compose/src/commonTest/kotlin/app/tinyui/PageHostTest.kt` at line 64:
**Kotlin example keeps an unversioned route**
When the tagged-request fixture runs, `onTagged` still calls `/code`, and the fake channel only recognizes that route, so the Kotlin test continues to demonstrate a path outside the stated `/api/v1/...` convention.
Change the fixture URL and its fake-channel matcher to a path such as `/api/v1/code`.
文档、代码注释与测试里的示例改成中性写法:验证码场景名用
signup、接口路径用/api/v1/...、「人机验证」作通称,去掉具体宿主的名字与指标。只改示例文本,不改行为。pnpm --filter tinyui-native test通过;Kotlin 测试只改了断言里的字符串🤖 Generated with Claude Code
Summary by Sourcery
将文档、注释和测试中的示例改为中性命名与通用接口路径,同时保持运行行为不变。
Enhancements:
Documentation:
Tests: