Skip to content

Update path aliases, UI labels, and confidence formatting#53

Merged
Ross1116 merged 2 commits into
mainfrom
staging
Mar 31, 2026
Merged

Update path aliases, UI labels, and confidence formatting#53
Ross1116 merged 2 commits into
mainfrom
staging

Conversation

@Ross1116

@Ross1116 Ross1116 commented Mar 31, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes

    • Updated UI labels in heatmap snapshots from "rows" to "heatmap cells" for improved clarity.
    • Modified confidence field display format from percentage values to formatted text labels ("High," "Medium," "Low," or "n/a").
  • Chores

    • Refactored internal import paths for improved code organization.

@vercel

vercel Bot commented Mar 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sitespace-app Building Building Preview, Comment Mar 31, 2026 10:05am

@coderabbitai

coderabbitai Bot commented Mar 31, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

These changes update import paths to use path aliases in layout files, modify UI labels in snapshot history from "rows" to "heatmap cells", and refactor the confidence field in activity mappings from numeric to string representation with a new formatting helper.

Changes

Cohort / File(s) Summary
Module Import Aliasing
src/app/(dashboard)/layout.tsx, src/app/layout.tsx
Updated relative import paths for AuthContext to use aliased absolute paths (@/app/context/AuthContext).
Snapshot History UI Labels
src/components/lookahead/SnapshotHistoryPanel.tsx
Updated fallback and display text labels from "Row count unavailable" to "Cell count unavailable" and "{rowCount} rows" to "{rowCount} heatmap cells".
Confidence Field Refactoring
src/components/lookahead/UploadReviewDialog.tsx, src/hooks/lookahead/api.ts, src/types/index.ts
Changed confidence field type from number | null to string | null in type definitions, updated API normalization from numeric parsing to string normalization, and added formatMappingConfidence helper function to standardize UI rendering with mapped labels for confidence levels.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Paths grow straight with aliases so clear,
Confidence strings replace the numbers dear,
Heatmap cells now count the story told,
Code flows cleaner, refactored and bold!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed Title check skipped as CodeRabbit has written the PR title.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch staging

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.

@coderabbitai coderabbitai Bot changed the title @coderabbitai Update path aliases, UI labels, and confidence formatting Mar 31, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/lookahead/SnapshotHistoryPanel.tsx`:
- Line 108: The label rendering in SnapshotHistoryPanel currently always uses
"heatmap cells" even when rowCount === 1; update the JSX that references
rowCount to conditionally pluralize (e.g., when rowCount is null show "Cell
count unavailable", otherwise render `${rowCount} heatmap ${rowCount === 1 ?
'cell' : 'cells'}`) so the text reads correctly for singular vs plural; locate
the expression in SnapshotHistoryPanel where rowCount is used and replace it
with a conditional pluralization based on rowCount.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8749312c-ef39-4cbb-bc05-f57dc333ff71

📥 Commits

Reviewing files that changed from the base of the PR and between 77f508d and d7b5069.

📒 Files selected for processing (6)
  • src/app/(dashboard)/layout.tsx
  • src/app/layout.tsx
  • src/components/lookahead/SnapshotHistoryPanel.tsx
  • src/components/lookahead/UploadReviewDialog.tsx
  • src/hooks/lookahead/api.ts
  • src/types/index.ts

</div>
<span className="rounded-full bg-slate-100 px-2 py-0.5 text-[10px] font-semibold text-slate-600">
{rowCount == null ? "Row count unavailable" : `${rowCount} rows`}
{rowCount == null ? "Cell count unavailable" : `${rowCount} heatmap cells`}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Handle singular/plural label for count text (Line 108).

For rowCount === 1, the current label renders 1 heatmap cells. Please pluralize conditionally.

✏️ Proposed fix
-                      {rowCount == null ? "Cell count unavailable" : `${rowCount} heatmap cells`}
+                      {rowCount == null
+                        ? "Cell count unavailable"
+                        : `${rowCount} heatmap ${rowCount === 1 ? "cell" : "cells"}`}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{rowCount == null ? "Cell count unavailable" : `${rowCount} heatmap cells`}
{rowCount == null
? "Cell count unavailable"
: `${rowCount} heatmap ${rowCount === 1 ? "cell" : "cells"}`}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/lookahead/SnapshotHistoryPanel.tsx` at line 108, The label
rendering in SnapshotHistoryPanel currently always uses "heatmap cells" even
when rowCount === 1; update the JSX that references rowCount to conditionally
pluralize (e.g., when rowCount is null show "Cell count unavailable", otherwise
render `${rowCount} heatmap ${rowCount === 1 ? 'cell' : 'cells'}`) so the text
reads correctly for singular vs plural; locate the expression in
SnapshotHistoryPanel where rowCount is used and replace it with a conditional
pluralization based on rowCount.

@Ross1116 Ross1116 merged commit 83cffdd into main Mar 31, 2026
3 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.

1 participant