Skip to content

fix(ui): normalize em-dash to hyphen across frontend components#38

Merged
enioxt merged 1 commit intoenioxt:mainfrom
mrncstt:fix/normalize-dashes
Mar 3, 2026
Merged

fix(ui): normalize em-dash to hyphen across frontend components#38
enioxt merged 1 commit intoenioxt:mainfrom
mrncstt:fix/normalize-dashes

Conversation

@mrncstt
Copy link
Copy Markdown

@mrncstt mrncstt commented Mar 3, 2026

Summary

Normaliza em-dash (—) para hífen (-) em 6 componentes frontend para consistência visual.

Changes

File Change
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ítulo
frontend/src/components/landing/StatsBar.tsx "\u2014""-"
frontend/src/pages/Activity.tsx "—""-"

Summary by CodeRabbit

  • Style
    • Standardized punctuation formatting across the interface by replacing em dashes with hyphens in multiple UI locations for visual consistency.
    • Updated report title with improved character formatting and diacritical marks for proper text representation.

@mrncstt mrncstt requested a review from enioxt as a code owner March 3, 2026 13:12
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 3, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Dash Formatting Standardization
frontend/src/components/analysis/TimelineView.tsx, frontend/src/components/entity/EntityDetail.tsx, frontend/src/components/journey/JourneyPanel.tsx, frontend/src/components/landing/StatsBar.tsx, frontend/src/pages/Activity.tsx
Replaced em dashes (—) with hyphens (-) in fallback displays, missing value placeholders, and UI separators.
Text Content Updates
frontend/src/components/landing/ReportsShowcase.tsx
Updated report title with hyphen replacement and added diacritics to Portuguese text (Rede Societária e Financeira).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A hyphen hops where em dashes played,
Consistent marks throughout the display,
Portuguese letters now wear their crown,
With diacritics dancing all around town! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is missing most required sections from the template, including release metadata, validation checklist, safety compliance, and risk assessment. Complete the template by adding: release notes (PT-BR and EN), highlights, release type checkbox, validation items, safety/compliance checklist, and risk/rollback description.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: normalizing em-dashes to hyphens across frontend components.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
frontend/src/components/landing/ReportsShowcase.tsx (1)

13-50: Complete dash normalization for the rest of REPORTS entries 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 the useEffect dependency warning by stabilizing fetchFeed.
The warning at Line 68 is valid: fetchFeed is 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

📥 Commits

Reviewing files that changed from the base of the PR and between 02e601b and bfc7e55.

📒 Files selected for processing (6)
  • frontend/src/components/analysis/TimelineView.tsx
  • frontend/src/components/entity/EntityDetail.tsx
  • frontend/src/components/journey/JourneyPanel.tsx
  • frontend/src/components/landing/ReportsShowcase.tsx
  • frontend/src/components/landing/StatsBar.tsx
  • frontend/src/pages/Activity.tsx

@mrncstt
Copy link
Copy Markdown
Author

mrncstt commented Mar 3, 2026

@enioxt

@enioxt enioxt merged commit 9ef0930 into enioxt:main Mar 3, 2026
11 of 19 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.

2 participants