Skip to content

Add friend 面板在中文窗口仍是英文(cut 22) #3220

Closed

Description

@Birfy

Written-by: Triage

Part of #3114(第二十二刀 / Cut 22)。

范围

把 plugins/social/client.js 的 Add friend 面板(AddFriend + 它的 inviteControls 邀请控件)里 25 行(28 个 tr() 绘制点)的裸英文改走本文件已有的 tr(),core/src/client/i18n.js 补 25 个新中文键(另有 2 条复用已有键 New link / Copy link),三条基线随之销 27 条 pin(missing-entries 94→73、template-draws 18→14、plugins 8→6;总数 132→111、27→23、16→14)。

口径(实测,别混用):27 条 pin = 21 missing + 4 template + 2 plugins;25 个新键 = 21 + 4;2 个复用键是「键已存在、插件却在画英文」。不是「27 个绘制点」(实测 28),也不是「24 个新键」。

只切 Add friend 面板:AcceptNotices / ShareRequests(cut 18 已落)、MyHandle、FriendBotRow、PausedChat、Social 设置页留到下一刀;plugins/timeline 46 条整块 off-by-default,一条不销。

规格正文(红先实测见 #3114 评论)含 A1–A14、逐文件行号与差额、生成物命令顺序、收口与 risk 分级。

验收

以规格 A1–A14 为准,摘要(均实测):

  • A1 红先(base + 只加测试)4/1/3;A2 实现后 4/4/0。
  • A3 social.test.js 单跑 500/500/0;face-rooms + social-readonly 55/55/0;三旧文件合计 555/555/0;加新文件 559/559/0。
  • A4 core i18n 五件套 39/39/0。
  • A5 25 个新 zh 键落地(ok 25 keys);A6 27 条 pin 删净(pins left 0 of 27)。
  • A7 三条基线 14 / 23 / 111,只缩不增(删除量恰为 0/21、0/4、0/2)。
  • A8 无 translator 时英文逐字保持今天的英文(1/1/0)。
  • A9/A10 生成链 (cd core && npm ci --include=dev && npm run harness) → build-client → add -A → rm --cached core/node_modules --ignore-unmatch → generate → check → canonical 全 ok;总改动路径 16 = 手写 9 + 生成 7。
  • A11 手写 +174/−55 = 229 行 / 9 文件(T2 限 250 行 / 12 文件,余 21 行 / 3 文件)。
  • A12 直接跑仓库 risk gate:T2 why [] lines 229 files 9 generated 7、T3 paths: 0。
  • A13 changelog:16 fragment(s) 全部 well formed。
  • A14 PR 只写 Fixes #3220,不写指向 [#3110] 已落地聊天壳、设置、搜索与历史命中的收口 #3114 的 Fixes 行。

不做什么

timeline 46 条(plugins/timeline/client.js:721 只有 sidebarSection === true 才注册,默认 opt-in)全部留钉;workflow 3 条不成片;tree 剩 6 条是 cut 19 有意留的 off-by-default 钉子;AcceptNotices / ShareRequests(cut 18)、ManageAccess / ShareWithFriend(cut 20)、Face 等待房间(cut 21)不重切;MyHandle、FriendBotRow、PausedChat、Social 设置页留到下一刀;#3112 不碰(它加 80 个 zh 键与本刀 25 键无一重复,本刀先合、它后合方 rebase);FlyBot Lead 线五张 issue 与四张 PR 不碰;core/src/shared/**、authz.js、core/src/host/** 鉴权面不动。

实现 PR

用 Fixes #3220,不要写指向 #3114 的 Fixes 行。T2(实测 risk gate T2 why [],limits 250 行 / 12 文件)→ 需 tip 上 PASS + CI 全绿 + 走合并队列。

Activity

  1. added
    bugSomething isn't working
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    area:uiWeb/desktop UI and copy
    on Nov 19, 2026
  2. Birfy commented on Nov 19, 2026

    @Birfy
    CollaboratorAuthor

    Claim

    Written-by: Dev
    Claim-Id: cbaeb74235e0ac8e6853cbc82bdc4c7f
    Branch: dev/3114-add-friend-zh
    Base: 5b32b96
    At: 2026-11-19T13:36:28Z

    Cut 22 (spec comment 7010175818): Add friend panel localized — plugins/social/client.js (AddFriend + shared inviteControls + the three result lines), 25 new zh keys in core/src/client/i18n.js, 27 baseline pins removed (21 missing-entries + 4 template-draws + 2 plugins), one new test file, one changelog fragment. Handwritten 9 files / +174−55 = 229 lines; T2 (250 lines / 12 files).

  3. Birfy commented on Nov 19, 2026

    @Birfy
    CollaboratorAuthor

    Blocked on one line in cut 20's own test — needs your yes before I touch it

    Written-by: Dev

    Cut 22 is implemented and verified on dev/3114-add-friend-zh (tip 331119fa84abf350a510c4cddc2fe9f3c79a0eb8, base 5b32b96a5a44). Everything in spec A1/A2/A4–A13 is green; the whole plugins/social suite is 726/727 with exactly one failure, in cut 20's test — the file the task brief says I must not edit (「上一刀的测试不在你的范围;如果它们因新键而必须同步,先停下在 #3220 说明,不要自己改」).

    $ cd plugins/social && TZ=UTC DSH_HARNESS=/opt/flybot npm test
    not ok 177 - \#3114 cut 20: the three baselines lose these draws
      location: plugins/social/test/sharing-page-i18n.test.js:140
      error: |-
        + actual - expected
          [ + 14, + 23, + 111  - 16, - 27, - 132 ]
    # tests 727 / # pass 726 / # fail 1
    

    sharing-page-i18n.test.js:148 freezes the three baselines' absolute totals:

    assert.deepEqual([entriesOf('i18n-plugins.baseline.json').length, entriesOf('i18n-template-draws.baseline.json').length, entriesOf('i18n-missing-entries.baseline.json').length], [16, 27, 132])

    Cut 22 removes 27 pins (21 missing-entries + 4 template-draws + 2 plugins), so those totals become 16 / 23 / 111 — exactly what spec A7 asks for. No pin, and no assertion about which pins remain, is weakened: cut 20's own 27 entries are still asserted one by one above that line.

    Precedent, same line, same reason: cut 21's in-flight branch (dev/3114-face-waiting-room-zh, PR #3221) already changes this line to [16, 25, 115] and its PR body calls it "the seventh handwritten file, and the reason the hand-written total is 221 lines rather than the 215 in the slice spec". Cut 22 lands on the same line from the other side.

    The ask: authorize one line, +1/−1, in plugins/social/test/sharing-page-i18n.test.js — [16, 27, 132] → [16, 23, 111]. Hand-written total becomes 10 files / 244 lines (still inside T2's 250 / 12), still with 229-line spec's 9 files otherwise unchanged. If cut 21 merges first I rebase and re-run build-client → generate → check → canonical, and the line then reads whatever both cuts leave (14 / 23 / 111 after cut 21's two template pins are also gone… whichever order, the totals are recomputed, never hand-guessed).

    No PR is open yet: a T2 tip cannot be gated while that one check is red, so opening one now would only park a red pull request. Everything else is ready to push — say go and the PR is up in one commit.

  4. Birfy commented on Nov 19, 2026

    @Birfy
    CollaboratorAuthor

    Follow-up on the block above: the work is now visible as a draft pull request, #3222 — dev/3114-add-friend-zh at 331119fa84abf350a510c4cddc2fe9f3c79a0eb8, base 5b32b96a5a44. Draft on purpose: a T2 tip cannot be gated while the one red check stands, so it is parked until the one-line authorisation above is given. Nothing is enqueued, no Verdict: is written by this cut, and no other file is touched.

    Written-by: Dev

  5. added a commit that references this issue on Nov 19, 2026
    d358dbe
  6. Birfy commented on Nov 19, 2026

    @Birfy
    CollaboratorAuthor

    Rebase note (2026-11-19T14:02:49Z): cut 21's merge (#3221, 6e08fd75) landed while this was being verified, so dev/3114-add-friend-zh now sits on that merge and the tip is d358dbe5cdc946c4421da07d1a79dc48bf647ed4 (was 331119fa on 5b32b96a). Draft PR #3222 moved with it.

    The block is the same single line, with the numbers cut 21 left behind:

    plugins/social/test/sharing-page-i18n.test.js:148
      asserts [16, 25, 115]        # cut 21's numbers
      this cut leaves [14, 21, 94]  # 21 missing-entries (115→94) + 4 template-draws (25→21) + 2 plugins (16→14)
    plugins/social suite: 732 tests / 731 pass / 1 fail — that line only
    

    So the ask is now [16, 25, 115] → [14, 21, 94], still +1/−1, still the same file. After the rebase, everything was regenerated and re-run at the new tip: build-client → generate → check → canonical all ok; red-first on a pristine 6e08fd75 still 4/1/3 (same three messages) and 4/4/0 at the tip; core i18n 39/39/0; social.test.js 500/500/0; face-rooms + social-readonly 55/55/0; core suite 3353/3353; arch-docs OK (16 files); mojibake ok; changelog ok.

    Written-by: Dev

  7. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uiWeb/desktop UI and copybugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions