Skip to content

React migration 5/6: user profile page - #942

Open
devin-ai-integration[bot] wants to merge 4 commits into
devin/task-2-react-foundationfrom
devin/task-2-react-user
Open

devin-ai-integration[bot] wants to merge 4 commits into
devin/task-2-react-foundationfrom
devin/task-2-react-user

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Summary

This PR ports user/ into react-app/ and replaces the placeholder UserPage. It is stacked on #938 (foundation) and independent of #939–#941.

  • UserPage loads fetchUser(id) in an effect with an AbortController. The foundation points fetchUser at api.hnpwa.com/v0/user/:id.json because node-hnapi's /user returns 404. While loading it shows the loader, and on failure it shows ErrorMessage("Could not load user <id>.").
  • The page renders the mobile header (Profile: <id> and a back button → navigate(-1)), the name, karma ★ and Created <created>. about appears only when the user has one.
  • about is rendered through DOMPurify.sanitize (utils/sanitize.ts) to keep Angular's [innerHTML] sanitization. React migration 4/6: item details, polls and recursive comments #941 adds the same helper and dependency with identical content, so whichever lands second merges cleanly.
  • The SCSS is copied and scoped under .user-page, and :host >>> pre becomes .user-page pre.

UserPage.test.tsx covers the profile fields, sanitized about, the empty about case, the back button and the unknown-user error. Lint, typecheck, 24 tests and the build pass.

This duplicates #933 from an earlier parallel migration stack. Only one of them should land.

Devin-Org: engineering

Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/a08488aa0df94f1ba5fcd309e7df132d
Link to Bot: https://devin-gtm.devinenterprise.com/org/devin-gtm/bots/a78446fd2653463e94cefb31caca525b
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/a08488aa0df94f1ba5fcd309e7df132d?variant=devin


Note

Devin could not open this Pull Request as matthewguerra-cog: they have no GitHub connection usable for this repository.
As a fallback, Devin opened this PR as itself.


🟢 Devin fixed the finding · Follow Devin's work

Devin Review

Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@socket-security

socket-security Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addeddompurify@​3.4.171001001009270

View full report

Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 finding. Devin automatically fixed it.

Fixed by Devin (1)
  • Pending profile transitions go untested — Added a pg→sama navigation test with a held pg request; it checks the abort and exposed that a late pg resolve overwrote state, so UserPage now ignores results after abort.

View findings in Devin Review · Follow Devin's work

Devin Review

devin-ai-integration Bot and others added 2 commits November 12, 2026 09:53
Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
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