Skip to content

Tiffany/279 partner distributions status update#288

Open
tifpham021 wants to merge 7 commits intomainfrom
tiffany/279-partner-distributions-status-update
Open

Tiffany/279 partner distributions status update#288
tifpham021 wants to merge 7 commits intomainfrom
tiffany/279-partner-distributions-status-update

Conversation

@tifpham021
Copy link
Contributor

@tifpham021 tifpham021 commented Feb 22, 2026

Description

Resolves ticket number: #279

Explain what your code changes:

  • basically the issue was that the partner side wasn't automatically refreshing the page when there were changes made to the shipment status on the admin side --> the statuses not being updated before manually refreshing
  • added realtime-triggered refresh for partner data

List the steps you took to test your code:

  • would change the status on the admin side and see whether it would change on the partner side
  • noticed that only the changes would be seen on partner side if refreshed the page manually
  • after the fix, changed the shipment status again and verified that the partner view updated automatically without refreshing (both in the in-progress and completed tabs)

Checklist

  • The ticket is mentioned above
  • The changes fulfill the success criteria of the ticket
  • The changes were self-reviewed
  • A review was requested

@netlify
Copy link

netlify bot commented Feb 22, 2026

Deploy Preview for hope-for-haiti ready!

Name Link
🔨 Latest commit 53374c3
🔍 Latest deploy log https://app.netlify.com/projects/hope-for-haiti/deploys/699be8a74070bb0008e167e1
😎 Deploy Preview https://deploy-preview-288--hope-for-haiti.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 22, 2026

Greptile Summary

Implemented real-time refresh mechanism for partner distribution views when shipment status changes on the admin side.

  • Added refreshTick counter and bumpRefreshTick() callback to NotificationContext
  • Trigger refresh when notifications contain "shipment" in title or have distribution/items-related actions
  • PartnerDistributionTable now automatically reloads data via useEffect hook that watches refreshTick
  • Partner views update automatically without manual page refresh when admin changes shipment statuses

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation is clean, follows React best practices with proper use of useCallback, useMemo, and useEffect hooks. The refresh mechanism is well-scoped to only trigger on shipment-related notifications, and the PartnerDistributionTable correctly uses optional chaining when calling reload(). Previous syntax issues mentioned in review threads have been resolved.
  • No files require special attention

Important Files Changed

Filename Overview
src/components/NotificationHandler.tsx Added refreshTick state and bumpRefreshTick callback to trigger real-time data refreshes in partner views when shipment notifications arrive
src/components/dashboard/PartnerDistributionTable.tsx Subscribed to refreshTick from notification context to automatically reload table data when shipment status changes occur

Last reviewed commit: feb598c

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@tifpham021
Copy link
Contributor Author

@greptile review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@tifpham021
Copy link
Contributor Author

@greptile review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@tifpham021
Copy link
Contributor Author

@greptile review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@tifpham021
Copy link
Contributor Author

@greptile review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@ND68 ND68 linked an issue Feb 23, 2026 that may be closed by this pull request
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.

Partner Distributions Status Update

1 participant