Skip to content

Migrate Angular 9 app to React 19 with Vite and TypeScript#241

Open
devin-ai-integration[bot] wants to merge 4 commits into
masterfrom
devin/1778507399-migrate-angular-to-react
Open

Migrate Angular 9 app to React 19 with Vite and TypeScript#241
devin-ai-integration[bot] wants to merge 4 commits into
masterfrom
devin/1778507399-migrate-angular-to-react

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented May 11, 2026

Summary

Complete migration of the Hacker News PWA from Angular 9 to React 19 with Vite and TypeScript. All routes, components, theming, settings, and API integration were rewritten as React functional components with hooks.

Tech stack: React 19, Vite 8, TypeScript (strict), React Router v7, React Context, SCSS theming

What changed:

  • Angular components/services/modules → React functional components with hooks
  • RxJS Observables → plain async/await fetch
  • Angular Router → React Router v7 with key-based remounting
  • Angular Services → React Context (SettingsProvider + useSettings)
  • All 3 themes preserved (default, night, AMOLED black)
  • Bug fixes from Devin Review: AMOLED border shorthand, poll bar div-by-zero guard

Testing: 7/8 tests passed. User profile untested due to upstream API (node-hnapi.herokuapp.com/user/) being broken for all users — not a code bug. Screen recording available in session.

News feed
Night theme

Review & Testing Checklist for Human

  • Run cd react-app && npm install && npm run dev — verify app loads at localhost:5173
  • Navigate all feed tabs (news, newest, show, ask, jobs) — verify stories load
  • Click a story with comments — verify nested comment threading renders
  • Open Settings (gear icon) → switch between Default/Night/AMOLED Black themes — verify colors change and persist across navigation
  • Verify build passes: npm run build and npx tsc --noEmit

Notes

  • The original Angular app lives in src/ and remains untouched
  • The new React app is entirely in react-app/
  • The /user/ endpoint on the upstream HN API is currently broken for all users — error page renders correctly

Link to Devin session: https://app.devin.ai/sessions/8638a6ebbc2444ab88ea23bcf8b609a9
Requested by: @eashansinha


Devin Review

Status Commit
⚪ Not started

Run Devin Review

💡 Connect your GitHub account to enable automatic code reviews.

Open in Devin Review (Staging)
Open in Devin Review

- Replace Angular framework with React 19, React Router, Vite, and TypeScript
- Migrate all components: Header, Footer, Feed, Item, ItemDetails, Comment, User, Settings, Loader, ErrorMessage
- Convert Angular services to React Context (SettingsProvider) and plain async fetch functions
- Preserve full SCSS theme system (default, night, amoledblack) with media queries
- Maintain all routes: /news, /newest, /show, /ask, /jobs, /item/:id, /user/:id
- Preserve localStorage persistence for settings
- All lint checks, typecheck, and build pass cleanly

Co-Authored-By: Eashan Sinha <eashan.sinha@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration[bot]

This comment was marked as resolved.

Co-Authored-By: Eashan Sinha <eashan.sinha@cognition.ai>
devin-ai-integration[bot]

This comment was marked as resolved.

Co-Authored-By: Eashan Sinha <eashan.sinha@cognition.ai>
devin-ai-integration[bot]

This comment was marked as resolved.

Co-Authored-By: Eashan Sinha <eashan.sinha@cognition.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant