feat: add configurable reply entry and regression smoke coverage#12
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3a087be28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return applyAuthorFilterToViewModel({ | ||
| posts, | ||
| mode: "targeted", | ||
| canAutoLoadMore: false, | ||
| hasHiddenPosts: moreAvailable |
There was a problem hiding this comment.
Preserve the targeted post when filtering to topic owner
In the targeted-preview branch, this now runs applyAuthorFilterToViewModel(...) before rendering. If a user clicks a search/user-stream result that points at /t/.../<post_number> and that post was written by someone other than the topic owner, applyAuthorFilterToViewModel() removes the only post they asked to inspect, so the drawer opens with an empty body instead of the referenced reply. The targeted path should bypass the owner filter or always retain the resolved target post.
Useful? React with 👍 / 👎.
| posts: filteredPosts, | ||
| authorFilter: "topicOwner", | ||
| filterHiddenCount: Math.max(0, sourcePosts.length - filteredPosts.length), | ||
| filterUnavailable: false, | ||
| hasHiddenPosts: Boolean(viewModel.hasHiddenPosts) || filteredPosts.length !== sourcePosts.length |
There was a problem hiding this comment.
Avoid eager full-topic loading in owner-only mode
Replacing viewModel.posts with only owner posts here changes the drawer height without changing the load-more heuristic in maybeLoadMorePosts(), which still triggers whenever the rendered content is shorter than the viewport. On long topics where the owner rarely replies, opening the drawer in authorFilter=topicOwner will keep auto-fetching /posts.json batches back-to-back until the drawer is tall enough or the stream is exhausted, effectively downloading the whole thread without any user scroll.
Useful? React with 👍 / 👎.
Summary
回复主题entry and make the floating reply FAB optional, defaulting to offTesting
bash scripts/check.shbash -n scripts/agent-smoke.shbash scripts/agent-smoke.sh --cdp-port 9222 --cases AGENT-CHROME-013,AGENT-CHROME-014,AGENT-CHROME-015