Skip to content

Conversation

@Bekiboo
Copy link
Collaborator

@Bekiboo Bekiboo commented Jan 22, 2026

Description of change

eCurrency and eReputation both had logic redirecting to non-existing routes. Replaced those redirection to "/"

Issue Number

Append to #630

Type of change

  • Fix (a change which fixes an issue)

How the change has been tested

Change checklist

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced reference modal with target type selection (user, group, platform), live search results, and target preview.
    • Added reference text input with 5,000-character limit and live character counter.
  • Bug Fixes

    • Corrected redirect paths on unauthorized errors and logout to navigate to home page.
  • Style

    • Minor UI formatting and whitespace adjustments.

✏️ Tip: You can customize this high-level summary in your review settings.

@Bekiboo Bekiboo self-assigned this Jan 22, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

This PR updates unauthorized and logout redirect flows from auth-specific paths to the root path ("/") across both eCurrency and eReputation platforms. Additionally, the eReputation reference modal receives a significant UI expansion with target selection, search functionality, and reference text input areas.

Changes

Cohort / File(s) Summary
API Client Redirect Updates
platforms/eCurrency/client/src/lib/apiClient.ts, platforms/eReputation/client/src/lib/apiClient.ts
HTTP 401 error handling updated to redirect to root path ("/") instead of "/auth" after clearing tokens.
Reference Modal - Major UI Expansion
platforms/eReputation/client/src/components/modals/reference-modal.tsx
Added target-selection workflow with RadioGroup for target types, live search with results dropdown querying platform/user/group endpoints, selected target display with clear button, dedicated reference text textarea with 5000-character limit and counter, and validation requiring targetType, selectedTarget, and non-empty content. Signing flow structure retained with minor adjustments. Unauthorized error now redirects to "/".
Calculation Modal Redirect Updates
platforms/eReputation/client/src/components/modals/other-calculation-modal.tsx, platforms/eReputation/client/src/components/modals/self-calculation-modal.tsx
Unauthorized error redirect changed from "/api/login" to "/" in error handling paths. Minor formatting/whitespace adjustments around JSX elements in self-calculation-modal.
Page Component Redirect & Structure Updates
platforms/eReputation/client/src/pages/dashboard.tsx, platforms/eReputation/client/src/pages/landing.tsx, platforms/eReputation/client/src/pages/references.tsx
Dashboard: logout redirect changed from "/auth" to "/". Landing: login redirect changed from "/api/login" to "/". References: unauthorized and logout redirects changed to "/"; modal component tree structure reorganized with relocated conditional rendering (View Reference Modal, Send Reference Modal, Revoke Confirmation Modal) and pagination block reordering; UI string and className formatting adjustments around icons and status badges.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • coodos
  • xPathin
  • sosweetham

Poem

🐰 Hoppy hops to root path clear,
Auth redirects disappear!
Reference modals bloom so bright,
With targets, text, and signing light.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: correcting 401 redirect behavior in both eCurrency and eReputation platforms from non-existent routes to the root path.
Description check ✅ Passed The description addresses all required template sections with appropriate content, though the 'How the change has been tested' section lacks detail. The fix type and checklist items are properly completed.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@Bekiboo Bekiboo marked this pull request as ready for review January 22, 2026 12:23
@Bekiboo Bekiboo requested a review from coodos as a code owner January 22, 2026 12:23
@Bekiboo Bekiboo changed the title ix: correct 401 redirect for eCurrency and eReputation fix: correct 401 redirect for eCurrency and eReputation Jan 22, 2026
@coodos coodos merged commit 697f14b into main Jan 23, 2026
4 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.

3 participants