Skip to content

feat(reports): complaint form as in-place dialog; drop contact email - #51

Merged
flvvius merged 2 commits into
mainfrom
feat/complaint-form-dialog
Jul 11, 2026
Merged

feat(reports): complaint form as in-place dialog; drop contact email#51
flvvius merged 2 commits into
mainfrom
feat/complaint-form-dialog

Conversation

@flvvius

@flvvius flvvius commented Jul 11, 2026

Copy link
Copy Markdown
Owner

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 #raporteaza anchor jump. It now opens as a centered dialog in place on the current screen from any complaint entry point.

  • New apps/web/src/components/ui/dialog.tsx — shadcn-style Dialog on the existing Radix primitive (matches sheet.tsx conventions).
  • report-error-form.tsx refactored into the form fields + a ReportDialogProvider (one in-place dialog per screen) + a useReportDialog() hook.
  • event.$slug.tsx wraps content in ReportDialogProvider; 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 #raporteaza anchor for SSR/embeds/tests.

2. Removed business-mail references we can't back with a real mailbox.

  • Contact page no longer claims an email/domain; it points to the report form.
  • Crawler identity: dropped From: contact@biviant.com from the bot header/UA (botIdentity.ts, domainPermissionsNode.ts). The crawler stays identifiable via its https://biviant.com/bot info URL.
  • Removed the earlier {{TODO: adresă de e-mail de contact}} placeholders; footer-pages.test.tsx now 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.com as the website domain (SITE_URL, sitemap, OG image, share cards).

Testing

  • Web: vitest run — 69 passing.
  • Backend: vitest run — 269 passing (politeFetch/compliance crawler-identity tests updated).
  • tsc --noEmit clean for both apps.
  • Not done: live browser click-through of the dialog (needs Convex dev + Vite running).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added an in-context “Raportează o eroare” dialog on event pages, allowing users to select an issue type, provide details, and optionally share contact information.
    • AI disclosure labels can now open the reporting dialog directly.
  • Content Updates

    • Updated contact and privacy pages with real guidance and removed placeholder email addresses.
    • Footer pages no longer display unfinished placeholder content.
  • Bug Fixes

    • Improved error-report submission feedback, including success and failure messages.

…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>
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
news Error Error Jul 11, 2026 4:24pm
news-web Ready Ready Preview, Comment Jul 11, 2026 4:24pm

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@flvvius, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7f1c5896-2c89-4baa-bc24-c82dad0daf7e

📥 Commits

Reviewing files that changed from the base of the PR and between 66017ac and c73be0b.

📒 Files selected for processing (3)
  • apps/web/src/components/feed/report-error-form.tsx
  • apps/web/src/routes/footer-pages.test.tsx
  • packages/backend/convex/domainPermissionsNode.ts

Walkthrough

The 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.

Changes

Event reporting dialog

Layer / File(s) Summary
Dialog primitives
apps/web/src/components/ui/dialog.tsx
Adds styled, typed Radix dialog wrappers with accessibility support and configurable close controls.
Report form and provider
apps/web/src/components/feed/report-error-form.tsx
Moves report submission into dialog fields and exposes ReportDialogProvider and useReportDialog.
Event-page report entry points
apps/web/src/components/feed/ai-disclosure-label.tsx, apps/web/src/routes/event.$slug.tsx
Event pages provide dialog context, while disclosure labels open the dialog or fall back to links.

Footer contact and crawler identity

Layer / File(s) Summary
Footer contact content and validation
FOOTER_TODO.md, apps/web/src/routes/contact.tsx, apps/web/src/routes/politica-confidentialitate.tsx, apps/web/src/routes/footer-pages.test.tsx
Removes contact placeholders, updates contact routing, and verifies rendered footer pages contain no TODO tokens.
Crawler request headers
packages/backend/convex/lib/botIdentity.ts, packages/backend/convex/domainPermissionsNode.ts, packages/backend/convex/politeFetch.test.ts
Removes contact email identity from crawler User-Agent and From headers and updates tests.

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
Loading

Possibly related PRs

  • flvvius/news#39: Directly overlaps with footer placeholder tracking and footer-page test behavior.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.05% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: moving the complaint form into an in-place dialog and removing contact email references.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/complaint-form-dialog

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 509603b and 66017ac.

📒 Files selected for processing (11)
  • FOOTER_TODO.md
  • apps/web/src/components/feed/ai-disclosure-label.tsx
  • apps/web/src/components/feed/report-error-form.tsx
  • apps/web/src/components/ui/dialog.tsx
  • apps/web/src/routes/contact.tsx
  • apps/web/src/routes/event.$slug.tsx
  • apps/web/src/routes/footer-pages.test.tsx
  • apps/web/src/routes/politica-confidentialitate.tsx
  • packages/backend/convex/domainPermissionsNode.ts
  • packages/backend/convex/lib/botIdentity.ts
  • packages/backend/convex/politeFetch.test.ts

Comment thread apps/web/src/components/feed/report-error-form.tsx
Comment thread apps/web/src/routes/footer-pages.test.tsx Outdated
Comment thread packages/backend/convex/domainPermissionsNode.ts Outdated
- 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>
@flvvius
flvvius merged commit b4d615b into main Jul 11, 2026
4 of 5 checks passed
@flvvius
flvvius deleted the feat/complaint-form-dialog branch July 11, 2026 16:25
@coderabbitai coderabbitai Bot mentioned this pull request Jul 12, 2026
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