Skip to content

Phase 3: integrate React features, Playwright e2e, docs; remove Angular - #718

Open
vibhaseshadri-cognition wants to merge 12 commits into
devin/1788305850-react-corefrom
devin/1788306894-react-integration
Open

vibhaseshadri-cognition wants to merge 12 commits into
devin/1788305850-react-corefrom
devin/1788306894-react-integration

Conversation

@vibhaseshadri-cognition

Copy link
Copy Markdown

Summary

Final migration phase. Merges the four Phase 2 feature branches (#714 #715 #716 #717) and wires them into the shell, replaces Protractor with API-mocked Playwright e2e, points hosting/CI/docs at react/, then removes the Angular source and dependencies.

Route wiring (react/src/App.tsx), mirroring Angular's lazy item/user modules:

const ItemDetails = lazy(() => import('./features/item').then((m) => ({ default: m.ItemDetails })));
const UserProfile = lazy(() => import('./features/user').then((m) => ({ default: m.UserProfile })));
<SettingsProvider><Layout><Suspense fallback={<Loader/>}>
    <AppRoutes Feed={Feed} ItemDetails={ItemDetails} User={UserProfile} />
</Suspense></Layout></SettingsProvider>

react/src/app/placeholders.tsx (Phase 2 route contract) is deleted.

Playwright e2e (react/e2e/) intercept **/node-hnapi.herokuapp.com/** via installApiMocks(page) + fixtures so runs are deterministic: feeds (all 5 types + jobs header), pagination (More only at 30 items, Prev/<ol start=31> on page 2), item (open item, collapse/expand [-]/[+], deleted comment, mobile back button), user, settings (3 themes → wrapper class + localStorage, open-in-new-tab → target=_blank, font size / list spacing CSS, close). CI workflow now runs on every push/PR (no react/** path filter) and gained an e2e job.

Hosting/CI/docs: firebase.jsonpublic: react/dist; .travis.yml → Node 20, cd react && npm ci && npm run build; README/CONTRIBUTING rewritten for the Vite/Vitest/Playwright commands.

Angular removal (last two commits): src/, e2e/ (Protractor), angular.json, karma.conf.js, tslint.json, tsconfig*.json, browserslist, ngsw-config.json, yarn.lock; root package.json keeps only delegating scripts (npm --prefix react run …) and no dependencies.

Angular → React mapping (cumulative)

Angular React
src/app/app.component.*, app.module.ts react/src/App.tsx, react/src/core/Layout.tsx, useGoogleAnalytics.ts
src/app/app.routes.ts react/src/app/routes.tsx
src/app/core/{header,footer,settings} react/src/core/{Header,Footer,Settings}.tsx
src/app/feeds/{feed,item} react/src/features/feed/{Feed,StoryItem}.tsx
src/app/item-details/** react/src/features/item/{ItemDetails,Comment}.tsx
src/app/user react/src/features/user/User.tsx (UserProfile)
src/app/shared/components/{loader,error-message} react/src/shared/components/{Loader,ErrorMessage}.tsx
src/app/shared/services/*, pipes/comment.pipe.ts, models/* react/src/shared/{services,utils,settings,models}
src/app/shared/scss/*, src/styles.scss react/src/styles/*
e2e/ (Protractor) react/e2e/*.spec.ts (Playwright)
ngsw-config.json / src/manifest.json vite-plugin-pwa in react/vite.config.ts

Tests

react/: lint, format:check, build, Vitest 19 files / 105 tests, Playwright 11 tests — all passing locally (Node 20). Root npm run build delegates correctly.

Rendered against the live API (/news/1, then Night theme via the settings cog):

news feed
night theme settings

Devin-Org: engineering

Link to Devin session: https://app.devin.ai/sessions/4b8f787ce33648ab865a05a3aa4d6cad
Open in Devin Desktop: https://app.devin.ai/desktop/session/4b8f787ce33648ab865a05a3aa4d6cad?variant=devin
Requested by: @vibhaseshadri-cognition

devin-ai-integration Bot and others added 11 commits September 1, 2026 23:48
Co-Authored-By: Vibha  Seshadri <vibha.seshadri@cognition.ai>
Co-Authored-By: Vibha  Seshadri <vibha.seshadri@cognition.ai>
Co-Authored-By: Vibha  Seshadri <vibha.seshadri@cognition.ai>
Co-Authored-By: Vibha  Seshadri <vibha.seshadri@cognition.ai>
…ils' into devin/1788306894-react-integration
…e2e job

Co-Authored-By: Vibha  Seshadri <vibha.seshadri@cognition.ai>
Co-Authored-By: Vibha  Seshadri <vibha.seshadri@cognition.ai>
Co-Authored-By: Vibha  Seshadri <vibha.seshadri@cognition.ai>
Co-Authored-By: Vibha  Seshadri <vibha.seshadri@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown

🤖 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, CI, and merge conflict monitoring

Co-Authored-By: Vibha  Seshadri <vibha.seshadri@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