Skip to content

Add React 18 + Vite port of the Angular RealWorld app (migration demo)#33

Open
devin-ai-integration[bot] wants to merge 6 commits into
mainfrom
devin/1781038352-react-migration
Open

Add React 18 + Vite port of the Angular RealWorld app (migration demo)#33
devin-ai-integration[bot] wants to merge 6 commits into
mainfrom
devin/1781038352-react-migration

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Adds a complete React 18 + Vite + TypeScript port of the Angular Conduit app under react/, for an Angular → React migration demo. The Angular app is untouched; both apps share the realworld submodule's theme CSS/media assets and hit the same API (https://api.realworld.show/api).

Migration mapping:

  • UserService (RxJS) → UserContext React context with authState (loading/authenticated/unauthenticated)
  • api/token/error HTTP interceptors → single fetch wrapper in react/src/api/client.ts (ApiError carries RealWorld errors shape)
  • Router guards (requireAuth, guest-only) → RequireAuth / RequireGuest route wrappers
  • markdown pipe (marked + DomSanitizer) → marked + dompurify in the Article page
  • All pages ported: Home (global/your feed, tags), Auth, Settings, Profile (+favorites), Editor, Article (comments, favorite/follow/delete)

Also exposes the same window.__conduit_debug__ interface the Playwright e2e suite relies on.

Run: cd react && bun install && bun run start (port 4300). bun run build passes (tsc strict + vite).

Verified locally against the live API — home feed, tags, and article navigation render correctly:

React app home page

Link to Devin session: https://app.devin.ai/sessions/b9422a8ea48949f49bcac46354698f57
Requested by: @patrickbradley-cog


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

…react/

Co-Authored-By: patrick.bradley <patrick.bradley@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, CI, and merge conflict monitoring

Co-Authored-By: patrick.bradley <patrick.bradley@cognition.ai>
devin-ai-integration[bot]

This comment was marked as resolved.

… routes

Co-Authored-By: patrick.bradley <patrick.bradley@cognition.ai>
devin-ai-integration[bot]

This comment was marked as resolved.

…th retry

Co-Authored-By: patrick.bradley <patrick.bradley@cognition.ai>
devin-ai-integration[bot]

This comment was marked as resolved.

…t token in setUser

Co-Authored-By: patrick.bradley <patrick.bradley@cognition.ai>
devin-ai-integration[bot]

This comment was marked as resolved.

Co-Authored-By: patrick.bradley <patrick.bradley@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Author

End-to-end test results — React port

Ran the React app locally (cd react && bun run start, port 4300) against the live RealWorld API and exercised the full golden path in the browser with a fresh account. 9/9 assertions passed.

Test results
  • ✅ Register a new user and authenticate
  • ✅ Create article via editor (markdown rendering + tag)
  • ✅ Add and delete a comment
  • ✅ Edit article (editor pre-filled, slug updated)
  • ✅ Favorite article; appears on profile "Favorited Articles" tab
  • ✅ Update settings bio; reflected on profile
  • ✅ Delete article; removed from Global Feed
  • ✅ Logout restores guest nav
  • ✅ Re-login with same credentials
Notes
  • The live API's PUT /user 422 flake (cause of the preexisting settings.spec.ts CI failures) did not occur in this run — the bio update succeeded.
  • Comment delete required a second click on the trash icon (first click missed the hit area); deletion itself works correctly.
Evidence
🟢 Article with rendered markdown + tag 🟢 Bio reflected on profile
article bio
🟢 Favorited Articles tab 🟢 Guest nav after logout
favtab logout

Tested by Devin

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