You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@answer.apache.org by "robinv8 (via GitHub)" <gi...@apache.org> on 2026/09/01 03:01:36 UTC
Re: [PR] fix: make answers past the first 999 reachable [answer]
robinv8 commented on PR #1593:
URL: https://github.com/apache/answer/pull/1593#issuecomment-5488255233
Thanks for putting the UI and SSR sides together, and for writing up the 13k-answer case so clearly. Making answers past the first 999 reachable is the right fix.
One thing this change will surface: permalinks of the form `/questions/:qid/:aid` (notifications, shares, comments). After this lands, `requestAnswers` only loads 15 answers. If the target `aid` is not on page 1, it never enters `res.list`, so the page has nothing to scroll to. With `page_size: 999` that mostly stayed hidden; at 15 it shows up from answer 16 onward.
A small follow-up in this PR would be enough: when `aid` is set and missing from `res.list`, fetch that answer (e.g. `GET /answer/api/v1/answer/info?id=`) and insert it into the list so the link still lands.
A few smaller notes, none of them blocking:
- `requestAnswers` can race if the user clicks pages quickly.
- `writeAnswerCallback` appends the new answer onto the current page, which may not be where it belongs.
- After filtering deleted answers out of `list`, `count` can drift from what the pager shows.
Happy to look again once the permalink path works.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org