pr-description
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWrite a PR's title and description
编写 PR 的标题和描述
Follow "pr titles and descriptions" in AGENTS.md: the title, the four answers
(Users, Protocol / backends, Performance / I/O, Tests), and the rules after
them. This says how to get the evidence here.
按照 AGENTS.md 中“pr titles and descriptions”的要求编写:标题、四个答案
(Users、Protocol / backends、Performance / I/O、Tests),以及其后的各项
规则。本节说明如何在此获取证据。
Evidence
证据
- CLI and output changes: run the commands on a real board (in a scratch directory, or the verify-board skill) and paste what printed in a
vb serveblock with the command line. Trim it; don't retype it. For a bug, the wrong output ontext, then the right one on the branch.main - UI changes (the inspector, the docs site, Slack or GitHub rendering): a
screenshot, or a short video for a flow. Add it to the PR on github.com, or
attach it to the PR's board thread () and say where it is.
vb reply <root id> --attach <file> - What can't be shown (a race, a refactor, a bump): the test that fails without the change, or the check you ran, in one line.
- What a test fakes: a platform's API (Slack, GitHub) is fine to fake, and the Tests line says so. A test that mocks board's own code tests the mock.
- SDK samples: copy the imports from the file the sample came from (the
factory's , a test), every
route.tsone, so the sample shows where each name lives.@vercel/board/*
- CLI 和输出变更: 在真实 board 上运行命令(在临时目录中运行,或使用 verify-board skill),并将打印的内容连同命令行粘贴到
vb serve代码块中。精简输出;不要手动重新输入。对于 bug,展示text上的错误输出,然后展示分支上的正确输出。main - UI 变更(inspector、文档站点、Slack 或 GitHub 渲染):提供截图;如果是操作流程,则提供短视频。将文件添加到 github.com 上的 PR,或使用 将其附加到 PR 的 board thread,并说明文件位置。
vb reply <root id> --attach <file> - 无法展示的内容(race、refactor、bump):用一行说明不做该变更时会失败的测试,或你运行过的检查。
- 测试伪造的内容: 可以伪造平台 API(Slack、GitHub),并在 Tests 行中说明这一点。伪造 board 自身代码的测试实际上只测试了 mock。
- SDK 示例: 从示例来源文件(factory 的 、某个测试)复制 imports,包括每一个
route.tsimport,使示例能够显示每个名称的来源。@vercel/board/*
Example
示例
Title:
feat(sync)!: resolve platform links and list a thread's copiesmarkdown
Go between a board message and its copies on Slack and GitHub.
- **Users:** `vb sync <id>` lists where a thread is synced; `vb read <link>` reads the thread a Slack or GitHub link names.
- **Protocol / backends:** breaking for custom backends: 2 new methods, `synced` and `linked`. The conformance kit's `sync` group checks both.
- **Performance / I/O:** `vb sync`: 3 board reads, plus 1 `chat.getPermalink` per Slack copy. `vb read <link>`: 1 lookup per sync entry of the link's platform, then the thread; no platform calls.
- **Tests:** the CLI as a subprocess against a board over HTTP, in-process boards on `local()` and `http()`, and the conformance kit. Slack's and GitHub's APIs are faked; nothing of board's is.markdown
Title: `feat(sync)!: resolve platform links and list a thread's copies`
````markdown
Go between a board message and its copies on Slack and GitHub.
- **Users:** `vb sync <id>` lists where a thread is synced; `vb read <link>` reads the thread a Slack or GitHub link names.
- **Protocol / backends:** breaking for custom backends: 2 new methods, `synced` and `linked`. The conformance kit's `sync` group checks both.
- **Performance / I/O:** `vb sync`: 3 board reads, plus 1 `chat.getPermalink` per Slack copy. `vb read <link>`: 1 lookup per sync entry of the link's platform, then the thread; no platform calls.
- **Tests:** the CLI as a subprocess against a board over HTTP, in-process boards on `local()` and `http()`, and the conformance kit. Slack's and GitHub's APIs are faked; nothing of board's is.Users
Users
text
$ vb sync 2
slack C1:1727000000.123456 https://acme.slack.com/archives/C1/p1727000000123456
$ vb read https://acme.slack.com/archives/C1/p1727000000123456
#2 U_ADA · 0s
checkout is downA link the board didn't sync and one in a channel you can't read get the same
error: Couldn't find that link's message on this board.ts
import { board } from '@vercel/board'
const team = board()
await team.sync(id) // { targets: [{ target, key, thread, message, url, undelivered }] }
await team.linked(url) // the thread, as team.thread(id) answers ittext
$ vb sync 2
slack C1:1727000000.123456 https://acme.slack.com/archives/C1/p1727000000123456
$ vb read https://acme.slack.com/archives/C1/p1727000000123456
#2 U_ADA · 0s
checkout is downA link the board didn't sync and one in a channel you can't read get the same
error: Couldn't find that link's message on this board.ts
import { board } from '@vercel/board'
const team = board()
await team.sync(id) // { targets: [{ target, key, thread, message, url, undelivered }] }
await team.linked(url) // the thread, as team.thread(id) answers itProtocol / backends
Protocol / backends
ts
synced GET /messages/:id/sync → SyncedView // from sync's records
linked GET /links?url= → ThreadView // never asks the platform
// SyncProvider, both optional, by the platform's own IDs:
locate(url): { thread, message | null } | null
url(thread, message): Promise<string | null>- Custom backends implement and
synced;linkedsubclasses rename the protectedChatSyncProvidertolocate().locationOf()
ts
synced GET /messages/:id/sync → SyncedView // from sync's records
linked GET /links?url= → ThreadView // never asks the platform
// SyncProvider, both optional, by the platform's own IDs:
locate(url): { thread, message | null } | null
url(thread, message): Promise<string | null>- Custom backends implement and
synced;linkedsubclasses rename the protectedChatSyncProvidertolocate().locationOf()
Open
Open
- A board without a provider for a platform can't read that platform's links.
undefined- A board without a provider for a platform can't read that platform's links.
undefined