Skip to content

Phase 6: routing and app composition - #684

Open
devin-ai-integration[bot] wants to merge 1 commit into
migration/phase5-pagesfrom
migration/phase6-routing
Open

Phase 6: routing and app composition#684
devin-ai-integration[bot] wants to merge 1 commit into
migration/phase5-pagesfrom
migration/phase6-routing

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 25, 2026

Copy link
Copy Markdown

Summary

Phase 6 of the Angular → React migration (stacked on #683). App.tsx replaces the Phase 1 placeholder and takes over both app.component.html and app.routes.ts, so the app is now fully functional in React.

<SettingsProvider><BrowserRouter><Shell /></BrowserRouter></SettingsProvider>
// Shell: <div className={settings.theme}> → .body-cover + .wrapper → Header, <Routes>, Footer

Route table, with the two static prefixes declared before the feed pattern:

"/"                 <Navigate to="/news/1" replace />   // Angular: redirectTo
"/item/:id"         <ItemDetails />
"/user/:id"         <User />
"/:feedType/:page"  <FeedRoute />                        // valid feed, else redirect to /news/1
"*"                 <Navigate to="/news/1" replace />

Angular declared five near-identical feed routes that each injected data: { feedType }; here one param route covers all five and FeedRoute validates feedType against FEED_TYPES before rendering Feed, which also absorbs the old wildcard ** case. SettingsProvider sits outside the router so the theme class survives navigation, and Shell is exported so tests can mount it under MemoryRouter.

routerLink/routerLinkActive were already replaced by Link/NavLink in phases 4–5, so no template changes were left here.

Verification

npm run lint, npm test (52 passed, 5 new App tests: root redirect, chrome rendering, invalid-feed redirect, persisted theme class, item/user routing) and npm run build pass. Manually exercised at localhost:4200: root redirect, feed → item navigation with nested comments, settings panel, night theme.

news feed

item details in night theme

Remaining

Phase 7 (vite-plugin-pwa, manifest/icons, offline verification) and Phase 8 (delete the Angular sources under src/app/, README/CI updates, final end-to-end pass).

Devin-Org: engineering

Link to Devin session: https://app.devin.ai/sessions/f5e6c49cc7f344bf80df57ffee2e7939
Requested by: @abboudp


Note

Devin errored when opening this Pull Request as abboudp.
As a fallback, Devin opened this PR as itself.


Devin Review

Status Commit
⚪ Not started

Run Devin Review

Devin Review (Staging)

…rapper

Co-Authored-By: Paul Abboud <abboudpaul112@gmail.com>
@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, CI, and merge conflict monitoring

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.

0 participants