feat(friends): add searchable friend lists#75
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05cbdd455f
ℹ️ 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".
| items.value = [] | ||
| skip.value = 0 | ||
| noMore.value = false | ||
| hasInformed.value = false | ||
| void handleLoad() |
There was a problem hiding this comment.
Queue a reload when query changes mid-request
If the user updates the search text while a previous /Users/GetRelations request is still in flight, this watcher clears items and immediately calls handleLoad(), but handleLoad() exits early because loading.value is still true. When the old request finally resolves, it appends results for the stale query, and no request for the new query is guaranteed to run, so the list can show incorrect search results until another scroll/load event happens.
Useful? React with 👍 / 👎.
|
Got it.Will fix it soon
在 2026-05-17 23:18:15,"chatgpt-codex-connector[bot]" ***@***.***> 写道:
@chatgpt-codex-connector[bot] commented on this pull request.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:05cbdd455f
ℹ️ 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 ***@***.*** review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting ***@***.*** address that feedback".
In src/components/friends/list.vue:
+ items.value = []
+ skip.value = 0
+ noMore.value = false
+ hasInformed.value = false
+ void handleLoad()
Queue a reload when query changes mid-request
If the user updates the search text while a previous /Users/GetRelations request is still in flight, this watcher clears items and immediately calls handleLoad(), but handleLoad() exits early because loading.value is still true. When the old request finally resolves, it appends results for the stale query, and no request for the new query is guaranteed to run, so the list can show incorrect search results until another scroll/load event happens.
Useful? React with 👍 / 👎.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Summary
Testing
|
|
@codex
At 2026-05-20 18:22:17, "chatgpt-codex-connector[bot]" ***@***.***> wrote:
chatgpt-codex-connector[bot] left a comment (NetLogo-Mobile/plweb2#75)
Summary
Fixed the friends list reload race by adding a queued-reload path when handleLoad() is called during an in-flight request (loading.value === true). This ensures a follow-up load is triggered instead of being silently dropped. src/components/friends/list.vueL43-L48src/components/friends/list.vueL107-L110
Added a queryVersion/requestVersion guard so stale /Users/GetRelations responses are ignored when the search query changes mid-request, preventing old-query data from being appended to the new list. src/components/friends/list.vueL40-L41src/components/friends/list.vueL50-L51src/components/friends/list.vueL90-L97
Updated the query watcher to bump query version, reset paging state, and mark pending reload when needed so the new query is guaranteed to fetch even if a prior request is active. src/components/friends/list.vueL120-L130
Fixed the noMore early-return path to release the loading lock (loading.value = false). src/components/friends/list.vueL52-L56
Committed changes and created a follow-up PR entry via make_pr as requested.
Testing
✅ npx eslint src/components/friends/list.vue (passes; existing complexity/line-count warnings only, no errors).
View task →
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05cbdd455f
ℹ️ 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".
| items.value = [] | ||
| skip.value = 0 | ||
| noMore.value = false | ||
| hasInformed.value = false | ||
| void handleLoad() |
There was a problem hiding this comment.
Queue reload when query changes mid-request
When the search query changes while a /Users/GetRelations request is still in flight, this watcher clears items and immediately calls handleLoad(), but handleLoad() exits early because loading.value is still true. That means the new query is never fetched at that moment, and when the old request returns it can repopulate the list with stale results from the previous query. This is reproducible by typing quickly during loading and leaves the visible list inconsistent until another load is triggered.
Useful? React with 👍 / 👎.
|
will fix soon
在 2026-05-20 18:27:51,"chatgpt-codex-connector[bot]" ***@***.***> 写道:
@chatgpt-codex-connector[bot] commented on this pull request.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:05cbdd455f
ℹ️ 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 ***@***.*** review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting ***@***.*** address that feedback".
In src/components/friends/list.vue:
+ items.value = []
+ skip.value = 0
+ noMore.value = false
+ hasInformed.value = false
+ void handleLoad()
Queue reload when query changes mid-request
When the search query changes while a /Users/GetRelations request is still in flight, this watcher clears items and immediately calls handleLoad(), but handleLoad() exits early because loading.value is still true. That means the new query is never fetched at that moment, and when the old request returns it can repopulate the list with stale results from the previous query. This is reproducible by typing quickly during loading and leaves the visible list inconsistent until another load is triggered.
Useful? React with 👍 / 👎.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Motivation
/Users/GetRelationsAPI to keep list behavior consistent and paginated.Description
src/views/Friends.vue(n-inputbound tosearchText) and a small.friends__searchstyle block.UserListvia a new:queryprop (:query="searchText.trim()").src/components/friends/list.vueto acceptquery?: string, sendQuery: query || ''togetData('/Users/GetRelations', ...), andwatchthequeryprop to reset pagination (items,skip,noMore,hasInformed) and reload results.friends.searchPlaceholdertranslations tosrc/i18n/zh.ts,src/i18n/en.ts,src/i18n/de.ts,src/i18n/ja.ts, andsrc/i18n/fr.ts.Testing
npm run lint:i18nwhich passed (i18n check passed).npm run eslintwhich completed with warnings (existing repository complexity/line-count warnings) and no new errors were introduced.Codex Task