fix(ui): normalize em-dash to hyphen across frontend components#38
fix(ui): normalize em-dash to hyphen across frontend components#38enioxt merged 1 commit intoenioxt:mainfrom
Conversation
📝 WalkthroughWalkthroughThis PR standardizes text formatting across multiple frontend components by replacing em dashes with hyphens in placeholder text, fallback values, and UI labels. One component also updates diacritics in a Portuguese report title. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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.
🧹 Nitpick comments (2)
frontend/src/components/landing/ReportsShowcase.tsx (1)
13-50: Complete dash normalization for the rest ofREPORTSentries in this file.
Line 16 is good, but this component still mixes styles (e.g., Lines 25, 27, 34 still use em-dash). A quick follow-up pass would keep the UI copy fully consistent.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/components/landing/ReportsShowcase.tsx` around lines 13 - 50, Normalize dashes in the REPORTS constant by replacing em-dashes (—) with regular hyphens (-) in all report title and description strings so the UI copy is consistent; specifically update entries in REPORTS for ids "superar", "manaus", and "rj-sp" (and any other remaining entries) to use hyphens instead of em-dashes in title/description/highlight text.frontend/src/pages/Activity.tsx (1)
50-68: Resolve theuseEffectdependency warning by stabilizingfetchFeed.
The warning at Line 68 is valid:fetchFeedis referenced inside the effect but not tracked as a dependency.♻️ Suggested refactor
-import { useEffect, useState } from "react"; +import { useCallback, useEffect, useState } from "react"; ... - const fetchFeed = async () => { + const fetchFeed = useCallback(async () => { try { const url = filter ? `/api/v1/activity/feed?limit=200&type=${filter}` : `/api/v1/activity/feed?limit=200`; const resp = await fetch(url); if (resp.ok) setFeed(await resp.json()); } catch (e) { console.error(e); } finally { setLoading(false); } - }; + }, [filter]); useEffect(() => { fetchFeed(); const interval = setInterval(fetchFeed, 15000); return () => clearInterval(interval); - }, [filter]); + }, [fetchFeed]);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/pages/Activity.tsx` around lines 50 - 68, The effect references the async helper fetchFeed but doesn't include it in dependencies, causing a React hook warning; fix by stabilizing fetchFeed—either wrap fetchFeed in useCallback with [filter] as its dependency or move the fetch logic directly into the useEffect and avoid creating a new function on every render; ensure the stable function still calls setFeed and setLoading and that the interval uses the same stable reference when created and cleared.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@frontend/src/components/landing/ReportsShowcase.tsx`:
- Around line 13-50: Normalize dashes in the REPORTS constant by replacing
em-dashes (—) with regular hyphens (-) in all report title and description
strings so the UI copy is consistent; specifically update entries in REPORTS for
ids "superar", "manaus", and "rj-sp" (and any other remaining entries) to use
hyphens instead of em-dashes in title/description/highlight text.
In `@frontend/src/pages/Activity.tsx`:
- Around line 50-68: The effect references the async helper fetchFeed but
doesn't include it in dependencies, causing a React hook warning; fix by
stabilizing fetchFeed—either wrap fetchFeed in useCallback with [filter] as its
dependency or move the fetch logic directly into the useEffect and avoid
creating a new function on every render; ensure the stable function still calls
setFeed and setLoading and that the interval uses the same stable reference when
created and cleared.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
frontend/src/components/analysis/TimelineView.tsxfrontend/src/components/entity/EntityDetail.tsxfrontend/src/components/journey/JourneyPanel.tsxfrontend/src/components/landing/ReportsShowcase.tsxfrontend/src/components/landing/StatsBar.tsxfrontend/src/pages/Activity.tsx
Summary
Normaliza em-dash (—) para hífen (-) em 6 componentes frontend para consistência visual.
Changes
frontend/src/components/analysis/TimelineView.tsx"—"→"-"frontend/src/components/entity/EntityDetail.tsx"—"→"-"frontend/src/components/journey/JourneyPanel.tsx" — "→" - "frontend/src/components/landing/ReportsShowcase.tsx"—"→"-"no títulofrontend/src/components/landing/StatsBar.tsx"\u2014"→"-"frontend/src/pages/Activity.tsx"—"→"-"Summary by CodeRabbit