feat(reports): complaint form as in-place dialog; drop contact email - #51
Conversation
…t email Convert the L8 report-an-error form from a section hard-rendered at the bottom of every event page into a dialog opened in place from any complaint entry point (the AI-disclosure "Raportează" link) via a ReportDialogProvider + useReportDialog context. Adds a shadcn-style Dialog primitive. Remove business-mail references we can't back with a real mailbox: the crawler `From: contact@biviant.com` header/UA and the contact-page email text now point users to the report form instead. Keeps the transactional sender and the biviant.com website domain intact. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe PR replaces the event report section with a provider-backed dialog, removes footer contact placeholders, adds validation against TODO tokens, and removes crawler contact email headers. ChangesEvent reporting dialog
Footer contact and crawler identity
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant EventPage
participant ReportDialog
participant ReportForm
participant ReportsAPI
EventPage->>ReportDialog: provide eventId
ReportDialog->>ReportForm: open report form
ReportForm->>ReportsAPI: submitContentReport
ReportsAPI-->>ReportForm: return submission result
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/components/feed/report-error-form.tsx`:
- Around line 69-71: Update the status message in report-error-form.tsx at lines
69-71 to use role="status" and aria-live="polite"; update the error message at
lines 130-132 to use role="alert" and aria-live="assertive" so screen readers
announce both submission outcomes.
In `@apps/web/src/routes/footer-pages.test.tsx`:
- Around line 67-74: Replace the loop in the “no {{TODO}} placeholder remains in
any footer page” test with test.each(FOOTER_PAGES), passing each path and Page
into an isolated test case. Preserve the existing renderPageText, TODO_PATTERN
matching, failure message, and zero-match assertion for each footer page.
In `@packages/backend/convex/domainPermissionsNode.ts`:
- Line 23: Update RESOLVER_USER_AGENT to reuse the shared BOT_USER_AGENT or
BOT_INFO_URL exported by botIdentity.ts instead of hardcoding the bot identity
URL, preserving the existing user-agent format and eliminating the duplicated
value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 83e148bd-7917-45c1-8a1a-c7fff2c0007d
📒 Files selected for processing (11)
FOOTER_TODO.mdapps/web/src/components/feed/ai-disclosure-label.tsxapps/web/src/components/feed/report-error-form.tsxapps/web/src/components/ui/dialog.tsxapps/web/src/routes/contact.tsxapps/web/src/routes/event.$slug.tsxapps/web/src/routes/footer-pages.test.tsxapps/web/src/routes/politica-confidentialitate.tsxpackages/backend/convex/domainPermissionsNode.tspackages/backend/convex/lib/botIdentity.tspackages/backend/convex/politeFetch.test.ts
- report-error-form: add role/aria-live to success and error messages - domainPermissionsNode: reuse shared BOT_USER_AGENT - footer-pages.test: convert TODO-placeholder loop to test.each Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What & why
1. Complaint form is now a dialog, not a section hard-rendered on every event page.
The L8 report-an-error form (DSA notice-and-action entry point) used to render inline at the bottom of each event page and was reached via a
#raporteazaanchor jump. It now opens as a centered dialog in place on the current screen from any complaint entry point.apps/web/src/components/ui/dialog.tsx— shadcn-style Dialog on the existing Radix primitive (matchessheet.tsxconventions).report-error-form.tsxrefactored into the form fields + aReportDialogProvider(one in-place dialog per screen) + auseReportDialog()hook.event.$slug.tsxwraps content inReportDialogProvider; the inline form is removed.AiDisclosureLabel(the "Raportează →" link beside every AI summary — the only complaint entry point in the app) opens the dialog when a provider is present, and falls back to the plain#raporteazaanchor for SSR/embeds/tests.2. Removed business-mail references we can't back with a real mailbox.
From: contact@biviant.comfrom the bot header/UA (botIdentity.ts,domainPermissionsNode.ts). The crawler stays identifiable via itshttps://biviant.com/botinfo URL.{{TODO: adresă de e-mail de contact}}placeholders;footer-pages.test.tsxnow guards that no{{TODO}}placeholder is reintroduced.Intentionally kept
hello@biviant.com— the transactional Resend sender (signup/verification/password-reset). Removing it would break email delivery.biviant.comas the website domain (SITE_URL, sitemap, OG image, share cards).Testing
vitest run— 69 passing.vitest run— 269 passing (politeFetch/compliancecrawler-identity tests updated).tsc --noEmitclean for both apps.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Content Updates
Bug Fixes