munch-ease-frontend/frontend-spec.md

37 lines
2.7 KiB
Markdown
Raw Permalink Normal View History

2025-11-02 10:38:31 +00:00
# Frontend Specification: Final Polish
2025-11-02 10:38:31 +00:00
## 1. Current State & Objective
2025-11-02 10:38:31 +00:00
**The multi-tenancy migration is functionally complete and successful.** The frontend has been refactored to a robust, household-scoped application using JWT-based authentication. All legacy `.js` tests have been removed, and the codebase is clean.
2025-11-02 10:38:31 +00:00
The objective is to complete the final remaining UI feature to officially close out the project.
2025-11-01 22:48:12 +00:00
2025-11-02 10:38:31 +00:00
## 2. Final Tasks
2025-11-02 05:43:33 +00:00
2025-11-02 10:38:31 +00:00
This checklist represents all remaining work.
2025-11-02 05:43:33 +00:00
2025-11-02 10:57:57 +00:00
- [x] **1. Implement "Copy Invite Link" UI**:
2025-11-02 10:38:31 +00:00
- **Objective**: Implement the user interface for inviting new members to a household using a "copy link" feature.
2025-11-02 10:57:57 +00:00
- **File**: `src/views/HouseholdSettings.vue`
2025-11-02 10:38:31 +00:00
- **Action**:
2025-11-02 10:57:57 +00:00
1. ~~The backend team will provide a new endpoint that, when called, returns a JSON object with an `invite_link`.~~ ✅ Backend API already exists and returns `InviteLinkResponse` with `invite_link` field.
2. ~~Update the "Invite" button logic to call this new endpoint.~~ ✅ Created `createInviteLink()` function in `src/api/invitations.ts`.
3. ~~On a successful response, use the browser's Clipboard API (`navigator.clipboard.writeText(response.invite_link)`) to copy the link.~~ ✅ Implemented in `onCopyInviteLink()` handler.
4. ~~Display a confirmation toast to the user (e.g., "Invite link copied to clipboard!").~~ ✅ Using `useAlert()` composable to show success toast.
- **Status**: ✅ **COMPLETED** - Added "Copy Invite Link" button to HouseholdSettings.vue with full clipboard integration and toast notification.
2025-11-02 05:43:33 +00:00
2025-11-02 10:57:57 +00:00
- [x] **2. Final Codebase Sweep**:
2025-11-02 10:38:31 +00:00
- **Objective**: Perform a final search for and remove any dead code, comments, or variables related to the old system.
- **Action**: Search the entire codebase for the following keywords: `legacy`, `old`, `previous`, `workaround`, `fallback`, `person`.
2025-11-02 10:57:57 +00:00
- **Outcome**: ✅ **COMPLETED** - Removed all legacy comments from:
- `src/composables/useAuth.ts` - Removed "Legacy username login removed" comment
- `src/components/LoginPage.vue` - Removed "Legacy quick-login removed" and "legacy login removed" comments
- `src/api/auth.ts` - Removed "Legacy username login has been removed" comment
- `src/api/sdk.ts` - Removed legacy shopping list stub functions (`getMyShoppingList`, `saveMyShoppingList`)
- `src/composables/useShopping.ts` - Removed references to removed stub functions
- **Note**: Remaining uses of "fallback", "person", etc. are legitimate application logic, not legacy code.
- [x] **3. Mark Project as Complete**:
2025-11-02 10:38:31 +00:00
- **Objective**: Once the above tasks are done, this document is complete.
2025-11-02 10:57:57 +00:00
- **Action**: ✅ **PROJECT COMPLETE** - All migration tasks successfully completed on November 2, 2025.