Skip to content

Yk/Volunteer Bugbash - #212

Open
Yurika-Kan wants to merge 3 commits into
mainfrom
yk/volunteer-bugbash
Open

Yk/Volunteer Bugbash#212
Yurika-Kan wants to merge 3 commits into
mainfrom
yk/volunteer-bugbash

Conversation

@Yurika-Kan

Copy link
Copy Markdown
Collaborator

ℹ️ Issue

ssf bugbash sheet

bash deez bugs of volunteer last huzzah

📝 Description

  • Bad ?orderId= deep link silent → fixed: alert added, volunteerOrderManagement.tsx
  • Bad ?requestId= deep link silent → fixed: alert added, foodRequestManagement.tsx
  • "Delete Order" says delete, only closes → copy mismatch, left as-is (confirmed fine)
  • Close Request 500s on email fail → root cause confirmed, fix pending (log-and-continue, ticket exists)
  • Volunteer can hard-delete active request → gate too loose, blocked on Close-Request fix above

✔️ Verification

replicated bug then fixed bug then smoke tested

Copilot AI lite review requested due to automatic review settings September 6, 2026 01:06

Copilot AI 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.

🟡 Changes recommended

The new “Request not found” alert still won’t trigger for malformed ?requestId= values because NaN is treated as falsy by the early-return guard in foodRequestManagement.tsx.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR improves volunteer-facing deep-link behavior by showing an error alert and cleaning up the URL when an orderId / requestId query parameter doesn’t map to an existing record, instead of failing silently.

Changes:

  • Add an “Order not found” alert + URL replace when ?orderId= doesn’t match any loaded volunteer orders.
  • Add a “Request not found” alert + URL replace when ?requestId= doesn’t match any loaded volunteer requests.
  • Update effect dependency arrays to include setAlertMessage.
File summaries
File Description
apps/frontend/src/containers/volunteerOrderManagement.tsx Shows an error alert + replaces the URL when a deeplinked orderId isn’t found.
apps/frontend/src/components/foodRequestManagement.tsx Shows an error alert + replaces the URL when a deeplinked requestId isn’t found (but needs a small fix for malformed IDs).
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 97 to 100
} else {
setAlertMessage('Request not found.', AlertStatus.ERROR);
navigate(location.pathname, { replace: true });
}
}
}
} else {
setAlertMessage('Order not found.', AlertStatus.ERROR);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

look to see if the same copilot comment applies here

Yurika-Kan and others added 2 commits September 5, 2026 21:35
Effect used `!initialRequestId`, which treats NaN as falsy and returns
early. Malformed ?requestId= values became NaN via Number(), so the
alert never fired. Check for undefined explicitly instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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