Repository navigation
feature: migrate to React + TypeScript (Vite), remove Angular, GitHub Actions CI, Firebase serves react-app/dist - #928
Open
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…ular, GitHub Actions CI, Firebase serves react-app/dist Co-Authored-By: Ishita Gupta <ishita.gupta@cognition.ai>
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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
Completes the Angular 9 → React 19 + TypeScript (Vite) migration of the HN PWA and cuts over: Angular is removed, CI moves from Travis to GitHub Actions, and Firebase Hosting now serves
react-app/dist.Starts from the integrated
react-app/in #927 (which ports all features but stops before cut-over). This PR overlaps/supersedes #922–#927; only one should land.On top of #927's
react-app/:src/api→src/services,src/features→src/pages(imports updated, no behaviour change).react-router-dom6.30 → 7.18 (clears the v6 Snyk advisory); removed the v6futureflags (ROUTER_FUTURE_FLAGS), which are the v7 defaults.react-app/e2e/, replaces the Protractor spec): app shell + no console errors, all 8 routes, header/footer nav, item/user/error pages, theme persistence + settings popup, PWA precache / Angularngswretirement, offline deep links. Runs againstvite build+vite previewwith the HN APIs mocked. 29/29 pass locally..travis.yml(Node 6, Angular CLI) →.github/workflows/react-app-ci.yml(lint, prettier,tsc -b, Vitest, build, Playwright) andreact-app-deploy.yml(Firebase deploy onmaster, skipped when noFIREBASE_SERVICE_ACCOUNT/FIREBASE_TOKENsecret).firebase.json:hosting.public: "react-app/dist", SPA rewrite limited to route-like URLs (missing static files still 404), immutable caching for hashed assets,no-cacheforindex.html,sw.js,ngsw-worker.js, manifest.src/,e2e/,angular.json,tsconfig*.json,karma.conf.js,tslint.json,ngsw-config.json,browserslist,yarn.lock; rootpackage.jsonnow has no deps and just forwardsdev/build/test/lint/typecheck/e2etoreact-app/.react-app/README.mdrewritten for the React stack.Things to know before merging
https://api.hnpwa.com/v0/user/{id}.json, carried over from React port: integrated react-app/ (foundation + feeds, item/comments, user, shell) #927, because node-hnapi's/user/:idreturns 404. On master,/user/pgcurrently shows "Could not load user pg." (see the side-by-side below). Feed and item endpoints are unchanged.UA-66348622-3) is ported as-is from Angular. UA has been shut down, so it's a no-op, same as on master.productionenvironment. Until one is added the deploy job just logs a notice.Verification
react-app:npm run lint,format:check,typecheckclean; Vitest 127/127;vite buildOK (13 precache entries); Playwright 29/29;npm audit0 vulnerabilities.ng serveon :4300) against the live API at 1280px and 390px: feeds in all 3 themes, item + comments, settings popup, mobile item header. The only difference was the user page (see above).React app (
/news/1):Angular (left) vs React (right):
Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/f9c8ac375ddf4a1c9fc6ace52b5c5c21
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/f9c8ac375ddf4a1c9fc6ace52b5c5c21?variant=devin
Requested by: @ishita-cog
Note
Devin errored when opening this Pull Request as ishita-cog.
As a fallback, Devin opened this PR as itself.
Devin Review