Skip to content

feature: PR 7/8 — React User page - #704

Open
devin-ai-integration[bot] wants to merge 2 commits into
devin/react-migration-06-item-detailsfrom
devin/react-migration-07-user
Open

feature: PR 7/8 — React User page#704
devin-ai-integration[bot] wants to merge 2 commits into
devin/react-migration-06-item-detailsfrom
devin/react-migration-07-user

Conversation

@devin-ai-integration

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

Copy link
Copy Markdown

Summary

PR 7 of the Angular→React migration: the user profile page. The PR 4 User placeholder becomes a real port of user.component.*, still lazy-loaded. Nothing under src/app/ changes.

  • Same fetch shape as Feed/ItemDetails (ignore-flag stale-response guard, errorMessage reset per fetch), error wording preserved verbatim: Could not load user <id>.
  • Angular's ngOnInit here did not scroll to top (unlike ItemDetails), and the template has no main-content wrapper — both preserved.
  • Location.back()useNavigate()(-1); as in PR 6 the back-button span gains role="button", tabIndex={0} and Enter/Space handling.
  • User.scss needed the same treatment as Comment.scss: Angular's :host >>> pre became .profile pre.

Heads-up unrelated to this PR: the upstream API has dropped the endpoint this page depends on — GET https://node-hnapi.herokuapp.com/user/pg returns Cannot GET /user/pg while /news?page=1 is 200. So the user page renders the error state for every user today, in the Angular app as much as in this port. I kept parity rather than silently switching data sources; migrating to the Firebase HN API is a separate decision.

Verification

npm run typecheck:react and npx vite build pass with the User lazy chunk (JS + CSS) still emitted.

Live: /user/pg and a nonexistent id both render the exact error copy (upstream 404, see above):

user page error state

Because the endpoint is gone, the success path was verified against a temporarily stubbed response (stub fully reverted afterwards — git diff clean). With about, rendering the HTML body and .other-details:

profile with about

Without about, .other-details correctly absent:

profile without about

Back button from a pushed profile route returned to /news/1.

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

Status Commit
⚪ Not started

Run Devin Review

Devin Review (Staging)

devin-ai-integration Bot and others added 2 commits August 26, 2026 14:02
Co-Authored-By: Paul Abboud <abboudpaul112@gmail.com>
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