feature: PR 5/8 — React Feed, Item, Loader and ErrorMessage - #702
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
feature: PR 5/8 — React Feed, Item, Loader and ErrorMessage#702devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Paul Abboud <abboudpaul112@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
PR 5 of the Angular→React migration: the feed feature.
Feedbecomes a real component fetching from the PR 2 API layer, plus presentationalItem,LoaderandErrorMessageports. Nothing undersrc/app/changes; Angular still builds as before.FeedComponent's two route subscriptions collapse into one effect keyed on the feed and page, with a stale-response guard replacing the implicit per-navigation subscription:Parity details worth knowing:
itemsis deliberately not cleared on route change, matching Angular — the previous page stays on screen while the next loads, soLoaderonly appears on first load.errorMessageis reset at the start of each fetch. Angular never reset it, so a single failure left the error banner set for the rest of the session.*ngIf="feedType !== 'new'"on the<ol>was unreachable (no feed is namednew), so the list renders unconditionally.hasUrlisitem.url?.indexOf('http') === 0. Some jobs items have nourlat all, where the Angular getter would have thrown; those now correctly render as internal/item/:idlinks.target/relonly whenopenLinkInNewTabis set —undefined, so the attributes are absent rather than empty, matching Angular's[attr.target]="… : null".Loaderalso replaces the temporary inline<div>Loading…</div>Suspense fallback added in PR 4.The four ported SCSS files are byte-identical to the Angular originals apart from
@importpaths.Verification
npm run typecheck:reactandnpx vite buildpass. In the dev server:/news/1renders 30 real stories withMore ›and noPrev;/news/2renders<ol start="31">with both nav links;/jobs/1shows the jobs blurb and job items without points or comment links. Console clean./news/1:/news/2(list starts at 31, both nav links):/jobs/1(jobs blurb, no points/comments):Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/e6419ebe67ff4f749fe1573a8e26cd07
Requested by: @abboudp
Devin Review