Skip to content

Latest commit

 

History

History
107 lines (75 loc) · 3.5 KB

File metadata and controls

107 lines (75 loc) · 3.5 KB

📝 Description

This PR synchronizes the local repository with the upstream chioma branch and addresses four key issues identified in issues.md, along with finalizing the referral program implementation and dashboard UI refinements.

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📚 Documentation update
  • ⚡ Performance improvement
  • 🔒 Security fix
  • 🧹 Code cleanup/refactoring

🔗 Related Issues

Closes #416, #744, #771, #772

📋 Changes Made

  • Upstream Sync: Merged upstream/main to align with the latest protocol updates.
  • User Activity Timeline (#416): Integrated ActivityTimeline into AdminUserDetailView with filtering, pagination (10/page), and chronological sorting.
  • Contract Error Reference (#744): Created ERROR-REFERENCE.md documenting core protocol error codes.
  • Profile Image Fixes (#771, #772):
    • Fixed hardcoded /avatar.png in AdminSidebar and AdminTopbar.
    • Implemented dynamic avatar loading with fallbacks in User dashboard Topbar.
    • Updated User interface in authStore.ts to include avatar property.
  • Referral Program: Completed the referral code generation, tracking, and dashboard UI logic.

🧪 Testing

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing performed
  • All tests pass locally

Test Coverage

Manual verification of:

  1. Admin and User dashboard profile image rendering with broken/missing link fallbacks.
  2. Activity timeline filtering by type (login, property_view, etc.) and pagination buttons.
  3. On-chain error reference accuracy against Rust contract source code.

📊 Checklist

Code Quality

  • Code follows project style guidelines
  • No console errors or warnings
  • TypeScript/Rust types are correct
  • No unused variables or imports
  • Comments added for complex logic

Testing

  • All tests pass (make check / cargo test)
  • New tests added for new functionality
  • Edge cases considered
  • Error scenarios tested

Documentation

  • README updated (if needed)
  • API documentation updated (if needed)
  • Code comments added (if needed)
  • CONTRIBUTING.md updated (if needed)

Database (Backend only)

  • Migrations created (if needed)
  • Migrations tested locally
  • Rollback tested
  • Seed data updated (if needed)

Security

  • No hardcoded secrets
  • Input validation added
  • Authorization checks in place
  • No SQL injection vulnerabilities
  • No XSS vulnerabilities

Performance

  • No performance regressions
  • Database queries optimized
  • Bundle size impact assessed
  • Caching considered

Breaking Changes

  • No breaking changes to APIs
  • No breaking changes to contracts
  • Backward compatibility maintained
  • Migration guide provided (if needed)

📸 Screenshots/Demo

(See walkthrough.md for visual demos of UI changes)

🚀 Deployment Notes

Ensure the new migration file 003_referral_and_metrics.sql is applied to the production database before deployment.

📖 Additional Context

The User type in authStore.ts was expanded to align with the core User entity, ensuring better type safety across the frontend dashboard modules.