feature: PR 8/8 — Vite PWA, deploy config and Angular removal - #705
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
feature: PR 8/8 — Vite PWA, deploy config and Angular removal#705devin-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
Final PR of the Angular→React migration: React reaches parity, so Angular is deleted.
src/app/,main.ts,polyfills.ts,test.ts,environments/,angular.json,ngsw-config.json, both Angular tsconfigs,karma.conf.js,tslint.jsonande2e/are gone, along with every@angular/*,zone.js,rxjs,rxjs-compat,unfetch,node-fetch, karma/jasmine/protractor/tslint/codelyzer dependency.tsconfig.react.jsonis promoted totsconfig.jsonand thetypescript5npm alias becomes a plaintypescript^5. Also removed the staleyarn.lock(Angular-era, unused — the repo builds frompackage-lock.json).Three things a reviewer should look at closely:
Static assets moved into Vite's public dir.
angular.json'sassetsarray was the only thing copyingsrc/assets,src/favicon.icoandsrc/manifest.jsoninto the build, and it's deleted here. They'regit mv'd tosrc/public/…(Vite's default public dir, sincerootissrc), which keeps every existing relative URL inindex.html—assets/icons/…,favicon.ico,/manifest.json— resolving unchanged in both dev and build.The splash loader now keys off the React root.
src/styles.scsshid the static.app-loaderviaapp-root:empty + .app-loader; with<app-root>gone that selector never matches and the splash would sit on screen forever:PWA via
vite-plugin-pwa(pinned 1.3.0), production-only, replacingServiceWorkerModule.register('ngsw-worker.js'):manifest: falseis deliberate — the existing hand-written manifest is ported as-is rather than regenerated, so the plugin doesn't emit a competing webmanifest. Two Angular service-worker leftovers inindex.htmlare dropped: a<link rel="manifest" href="manifest.webmanifest">pointing at a file that doesn't exist, and a duplicatetheme-colormeta that contradicted the real#b92b27one. The React entry<script type="module" src="/main.tsx">is now committed directly inindex.html, so thetransformIndexHtmlshim that existed only to hide.tsxfrom the Angular CLI is gone.Deploy:
build.outDir: '../dist'puts output at repo-rootdist/, which is already whatfirebase.jsonserves and what.gitignoreignores — no change needed to either..travis.ymlgoes from Node 6.9 to 20 (Vite 6 requires modern Node) and drops the global@angular/cliinstall; the firebase deploy step is untouched.Scripts are now
dev/start→vite,build→vite build,preview→vite preview,typecheck→tsc --noEmit.Verification
Clean
npm install,npm run typecheckandnpm run buildall pass, and no@angular/zone.js/rxjsreference survives outsidepackage-lock.json. Everything below was checked againstvite previewof the production build, so the service worker was active:All five feeds + pagination (
/news/2→<ol start="31">, Prev/More correct), item comment tree (73 comments), ask body HTML, poll126809with proportional bars, all three themes plus font-size/spacing/new-tab settings persisting across reload.Service worker activated and controlling the page:
Manifest parsed with the ported name,
#b92b27theme color, standalone display and icons:Offline reload of a previously-visited route serving from cache:
Known pre-existing gap, unrelated to the migration:
/user/:idrenders its error state because upstreamnode-hnapihas dropped that endpoint (GET /user/pg→Cannot GET /user/pgwhile/news?page=1is 200). The Angular app is equally affected today; moving to another data source is a separate decision.Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/e6419ebe67ff4f749fe1573a8e26cd07
Requested by: @abboudp
Note
Devin errored when opening this Pull Request as abboudp.
As a fallback, Devin opened this PR as itself.
Devin Review