Skip to content

Add content warning gates for posts#153

Merged
malkoG merged 3 commits into
hackers-pub:mainfrom
malkoG:content-warning-spoiler-prevention
May 31, 2026
Merged

Add content warning gates for posts#153
malkoG merged 3 commits into
hackers-pub:mainfrom
malkoG:content-warning-spoiler-prevention

Conversation

@malkoG
Copy link
Copy Markdown
Collaborator

@malkoG malkoG commented May 31, 2026

Summary

  • fetch post sensitive metadata and map it into the domain model
  • hide warned/sensitive post titles, bodies, media, links, and quoted previews until the user taps Show
  • apply the reveal gate to timeline cards, article cards, quoted previews, and post detail
  • add a PostCard regression test for reveal behavior

Notes

  • Compose-side content warning authoring is not included because the current CreateNoteInput schema does not expose a summary/content-warning field.

Tests

  • ./gradlew :app:testDebugUnitTest --tests pub.hackers.android.ui.components.PostCardTest :app:lintDebug

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Warning

Review limit reached

@malkoG, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 9 minutes and 46 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 281fe4a1-7482-4962-a963-eecc38f4e4f8

📥 Commits

Reviewing files that changed from the base of the PR and between cdd52a6 and 40cd84e.

📒 Files selected for processing (9)
  • app/src/main/graphql/pub/hackers/android/operations.graphql
  • app/src/main/java/pub/hackers/android/data/repository/HackersPubRepository.kt
  • app/src/main/java/pub/hackers/android/domain/model/Models.kt
  • app/src/main/java/pub/hackers/android/ui/components/ArticleCard.kt
  • app/src/main/java/pub/hackers/android/ui/components/ContentWarning.kt
  • app/src/main/java/pub/hackers/android/ui/components/PostCard.kt
  • app/src/main/java/pub/hackers/android/ui/screens/postdetail/PostDetailScreen.kt
  • app/src/main/res/values/strings.xml
  • app/src/test/java/pub/hackers/android/ui/components/PostCardTest.kt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@malkoG malkoG merged commit 47a83ed into hackers-pub:main May 31, 2026
2 checks passed
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