Yk/Pantry Bugbash - #211
Merged
Merged
Conversation
…odal Field accepted unbounded text while sibling Feedback field and both fields in the New/Resubmit modal enforce the cap. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
getCurrentUserPantryId() rejection was unhandled, leaving pantryId unset with no alert and a silently no-op New Request button.
Line 2 and Country fields mapped blank input to undefined, which gets dropped from the PATCH body, so the field silently kept its old value despite a success toast. Use null instead, matching activitiesComments. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…uthorized page allergenClients NativeSelect was missing the required HTML attribute present on its sibling selects, so the browser let the form submit without an answer despite the red required asterisk. Also restyle the bare unauthorized page using the existing PageEmptyState component, centered on the page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The changes are localized, consistent with existing patterns in the codebase, and align with the PR’s stated bug-fix goals without introducing evident correctness or API-contract issues.
Pull request overview
This PR addresses several UX and data-submission issues in the Pantry workflows by tightening form validation/input limits, fixing “clear field” update semantics, and standardizing empty/unauthorized UI states.
Changes:
- Added a 250-word cap to the “Additional Information” textarea (consistent with other capped fields).
- Updated pantry application update DTO typing and payload construction to send
null(notundefined) when clearing optional address fields. - Improved required-field enforcement and user feedback for invalid deeplinks / missing records, and rebuilt the Unauthorized page using
PageEmptyState.
File summaries
| File | Description |
|---|---|
| apps/frontend/src/types/types.ts | Updates UpdatePantryApplicationDto to allow null for optional address fields that must be explicitly cleared. |
| apps/frontend/src/containers/unauthorized.tsx | Replaces the unstyled unauthorized markup with a centered PageEmptyState and a navigation CTA. |
| apps/frontend/src/containers/pantryOrderManagement.tsx | Adds an error alert when a deeplinked order ID is not found and fixes hook dependencies. |
| apps/frontend/src/containers/formRequests.tsx | Adds error handling for pantry lookup failures, alerts on invalid deeplinks, and shows a page-level empty state when there are no requests. |
| apps/frontend/src/components/forms/requestDetailsModal.tsx | Adds a 250-word guard to the “Additional Information” field, matching existing word-limit behavior elsewhere. |
| apps/frontend/src/components/forms/pantryApplicationForm.tsx | Adds missing required attribute to the “How many clients…” select to enforce required validation on submit. |
| apps/frontend/src/components/forms/editablePantryApplication.tsx | Sends null for cleared optional address fields so the backend can persist the cleared state instead of silently reverting. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Role-gating and the unauthorized page redesign are being handled together on yk/volunteer-bugbash; keep this branch's copy plain to avoid duplicate/conflicting styling. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ℹ️ Issue
ssf bugbash sheet
bash deez bugs of pantry last huzzah
📝 Description
✔️ Verification
replicated bug then fixed bug then smoke tested