Repository navigation
React migration 3/6: feeds (story list, item rows, paging) - #940
Open
devin-ai-integration[bot] wants to merge 5 commits into
Open
devin-ai-integration[bot] wants to merge 5 commits into
devin-ai-integration[bot] wants to merge 5 commits into
Conversation
Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…minimal Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
…v paging Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
Author
There was a problem hiding this comment.
Devin Review found 3 findings. Devin automatically fixed all 3 findings.
Fixed by Devin (3)
- Overlapping feed requests go untested — Added a held page-1 request test; it exposed that a late resolve after navigation clobbered state and left the page on the loader. FeedPage now ignores results once its request is aborted.
- Backward paging never runs in test — Paging test now follows ‹ Prev back to page 1 and checks stories, numbering and the hidden Prev link.
- Job metadata test misses mobile leaks — Jobs test now also asserts no comment-count text and no mobile ★ points row.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR ports
feeds/feedandfeeds/itemintoreact-app/and replaces the placeholderFeedPage. It is stacked on #938 (foundation) and is independent of #939 (shell).FeedPagecallsfetchFeed(feedType, page)in an effect with anAbortController, so a stale page response can't overwrite a newer page. State is keyed byfeedType/page, which means a new page shows the loader again, the same as Angular. On failure it showsErrorMessage("Could not load <feed> stories."). After a page loads it callswindow.scrollTo(0, 0). The liststartis(page-1)*30+1.‹ Prevshows when the page isn't the first, andMore ›shows only when the page has 30 items. The jobs feed gets the YC/Triplebyte header.FeedItem(fromitem.component):urlstarts withhttplinks out and shows its domain. Anything else (ask/show text posts) links to/item/:id.useSettings().subtext-palm) and a desktop (subtext-laptop) subtext..feed/.item-blockto keep the old barea/ol/pselectors from leaking.FeedPage.test.tsxcovers numbering, metadata, comment-count wording, paging both ways, internal vs external links, new-tab links, the jobs layout and the error state.routes.test.tsxnow stubsfetch. Lint, typecheck, 25 tests and the build pass.This duplicates #936 from an earlier parallel migration stack. Only one of them should land.
Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/a08488aa0df94f1ba5fcd309e7df132d
Link to Bot: https://devin-gtm.devinenterprise.com/org/devin-gtm/bots/a78446fd2653463e94cefb31caca525b
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/a08488aa0df94f1ba5fcd309e7df132d?variant=devin
Note
Devin could not open this Pull Request as matthewguerra-cog: they have no GitHub connection usable for this repository.
As a fallback, Devin opened this PR as itself.
🟢 Devin fixed all 3 findings · Follow Devin's work