Skip to content

chore(angular-react): Migrate CommentPipe to utility function#254

Open
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1778795828-migrate-comment-pipe
Open

chore(angular-react): Migrate CommentPipe to utility function#254
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1778795828-migrate-comment-pipe

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented May 14, 2026

Summary

Migrates the Angular CommentPipe (src/app/shared/pipes/comment.pipe.ts) to a plain exported utility function formatComment in src/utils/comment.ts.

What changed:

  • Created src/utils/comment.ts with a standalone formatComment(comment: number): string function
  • No Angular imports or decorators — this is a pure leaf-node utility
  • Logic is a 1:1 port: returns 'discuss' for 0, '1 comment' for 1, 'N comments' for N > 1
  • The original Angular pipe is not removed (per playbook rules)

Review & Testing Checklist for Human

  • Verify formatComment(0) returns 'discuss'
  • Verify formatComment(1) returns '1 comment'
  • Verify formatComment(5) returns '5 comments'

Notes

  • This is a leaf-node migration with no dependencies on other app files.
  • The original Angular CommentPipe is intentionally left in place per migration playbook guidelines.

Link to Devin session: https://app.devin.ai/sessions/5e9799229da64dc9a9b2e9b41cfe1551
Requested by: @charityquinn-cognition


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

Co-Authored-By: Charity Quinn <charity.quinn@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 and CI monitoring

Copy link
Copy Markdown
Author

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

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

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