Data inconsistency reports#2083
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d4c104bfc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🎨 UI Review
Floating "Report incorrect data" button (global — renders on every DAO page, dashboard + whitelabel)Must-fix — overlaps the cookie-consent banner
Panel selector — wrong options on proposal detail routesMust-fix —
MobileNice-to-have — touch target below 44×44px
Design-system adherenceNo issues — the form composes DS Scope noteThis is a UI-only review (visual fidelity, DS adherence, UX, copy, responsive behavior) — architecture, hook structure, and other code-quality concerns are left to the code reviewer. Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e01543e3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| variant="outline" | ||
| size="sm" | ||
| onClick={() => setIsOpen(true)} | ||
| className="fixed bottom-4 right-4 z-30 shadow-lg" |
There was a problem hiding this comment.
Keep the report CTA from covering Help
On normal DAO pages the root layout still renders HelpPopover, which is fixed at right-4 bottom-4 with a lower z-index. This new CTA uses the same fixed coordinates with z-30, so on routes like /ens it sits directly on top of the existing Help button and makes that support entry point unreachable; offset one of the buttons or compose them together.
Useful? React with 👍 / 👎.
|
🚅 Deployed to the anticapture-pr-2083 environment in anticapture-infra
|
|
🔍 Vercel preview: https://anticapture-3uugi7enx-ful.vercel.app |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Rate limit before success
- Rate-limit timestamps are now recorded only after ClickUp successfully creates a task, so failed submissions no longer consume hourly quota.
- ✅ Fixed: Stale submit error persists
- resetReportForm now calls the TanStack Query mutation reset() so closing or reopening the modal clears stale submission errors.
Or push these changes by commenting:
@cursor push 6efd3f9d8e
Preview (6efd3f9d8e)
diff --git a/apps/dashboard/app/api/report/route.ts b/apps/dashboard/app/api/report/route.ts
--- a/apps/dashboard/app/api/report/route.ts
+++ b/apps/dashboard/app/api/report/route.ts
@@ -29,13 +29,13 @@
(timestamp) => now - timestamp < REPORT_WINDOW_MS,
);
- if (attempts.length >= REPORT_LIMIT) {
- reportAttempts.set(ip, attempts);
- return true;
- }
+ reportAttempts.set(ip, attempts);
+ return attempts.length >= REPORT_LIMIT;
+};
+const recordReportAttempt = (ip: string, now = Date.now()) => {
+ const attempts = reportAttempts.get(ip) ?? [];
reportAttempts.set(ip, [...attempts, now]);
- return false;
};
const formatDescription = ({
@@ -111,6 +111,7 @@
);
}
+ recordReportAttempt(clientIP);
return NextResponse.json({ message: "Report submitted successfully" });
} catch (error) {
if (error instanceof z.ZodError) {
diff --git a/apps/dashboard/shared/components/ReportDataButton.tsx b/apps/dashboard/shared/components/ReportDataButton.tsx
--- a/apps/dashboard/shared/components/ReportDataButton.tsx
+++ b/apps/dashboard/shared/components/ReportDataButton.tsx
@@ -64,7 +64,7 @@
? "https://anticapture.com"
: window.location.href;
const [isSubmitted, setIsSubmitted] = useState(false);
- const { form, mutate, isPending, error } = useReportForm({
+ const { form, mutate, isPending, error, reset } = useReportForm({
daoId,
section,
url,
@@ -77,6 +77,7 @@
const defaultPanel = isOverview ? panels[0].value : "";
const resetReportForm = useCallback(() => {
+ reset();
form.reset({
daoId,
section,
@@ -85,7 +86,7 @@
email: "",
url,
});
- }, [daoId, defaultPanel, form, section, url]);
+ }, [daoId, defaultPanel, form, reset, section, url]);
useEffect(() => {
setIsSubmitted(false);You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 96c17b7. Configure here.
| return NextResponse.json( | ||
| { error: "We couldn't submit your report. Please try again shortly." }, | ||
| { status: 502 }, | ||
| ); |
There was a problem hiding this comment.
Rate limit before success
Medium Severity
Each POST calls isRateLimited before ClickUp runs, so failed submissions (502/503 or upstream errors) still consume one of the three hourly slots. During outages or misconfiguration, users can hit 429 without any report ever being created.
Reviewed by Cursor Bugbot for commit 96c17b7. Configure here.
| onOpenChange(nextOpen); | ||
| setIsSubmitted(false); | ||
| resetReportForm(); | ||
| }; |
There was a problem hiding this comment.
Stale submit error persists
Medium Severity
Closing or resetting the report modal clears react-hook-form via resetReportForm, but the TanStack Query mutation error from useReportForm is never reset. Reopening the modal can show the previous submission failure even with a fresh form.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 96c17b7. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96c17b73b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <main className="min-h-0 min-w-0 flex-1 overflow-y-auto"> | ||
| {children} | ||
| </main> | ||
| <ReportDataButton daoId={daoId} /> |
There was a problem hiding this comment.
Keep the whitelabel report CTA off the publish bar
On whitelabel proposal creation routes such as /whitelabel/ens/proposals/new and custom-domain /proposals/new, this unconditional mount renders ReportDataButton, whose trigger is fixed at bottom-4 right-4 z-30; that same flow renders ProposalFormNavBar as a sticky bottom bar with Save Draft/Publish controls on the right. In that context the report CTA can sit on top of those controls and make publishing or saving unreachable, especially on narrow screens, so skip or offset it for create-proposal routes as the regular Help button already does.
Useful? React with 👍 / 👎.



Note
Medium Risk
Introduces a new public API that forwards user content (and optional email) to ClickUp using server secrets; in-memory IP rate limits may be weaker under multi-instance deploys.
Overview
Adds a public “report incorrect data” path so visitors can flag dashboard data issues from DAO pages, with submissions turned into ClickUp tasks for triage.
A new
POST /api/reportroute validates the payload (DAO, section, allowed panel, description, optional email, page URL), enforces 3 reports per IP per hour (viax-real-ip), and creates a task named like[Report] ENS — Token distributionwhenCLICKUP_API_TOKENandCLICKUP_REPORT_LIST_IDare set. Misconfiguration and upstream failures return 503/502 with user-facing messages.The UI is a shared modal form (
useReportForm+ zod) that derives section and panel options from the current pathname (report-panelsmaps routes including whitelabel aliases). Entry points: Help popover on standard DAO routes and a fixed floating button on whitelabel (WhitelabelShell). Unit tests cover the API and panel routing; Playwright covers submit, rate-limit messaging, and correct context after navigation.Reviewed by Cursor Bugbot for commit 96c17b7. Configure here.