Complete TestView.vue Enhanced Triple Migration Pattern with human validation

- Database migration: databaseUtil → PlatformServiceMixin methods
- SQL abstraction: Raw temp table queries → service methods
- Notification migration: $notify → helper system + constants
- Template streamlining: 75% reduction via computed properties
- Human testing: All 8 notification buttons + SQL interface validated
- Time: 8m 26s (3.6x faster than estimate)
- Project: 42% complete (39/92 components migrated)
This commit is contained in:
Matthew Raymer
2025-07-08 10:13:35 +00:00
parent cdc4758a3a
commit bebc32047b
6 changed files with 649 additions and 208 deletions

View File

@@ -199,6 +199,20 @@ export const NOTIFY_ONBOARDING_MEETING = {
noText: "Join Existing Meeting",
};
// TestView.vue specific constants
// Used in: TestView.vue (executeSql method - SQL error handling)
export const NOTIFY_SQL_ERROR = {
title: "SQL Error",
message: "Database operation failed.",
};
// Used in: TestView.vue (register method - complex modal for name requirement)
export const NOTIFY_PASSKEY_NAME_REQUIRED = {
title: "No Name",
text: "You should have a name to attach to this passkey. Would you like to enter your own name first?",
noText: "try again and use",
};
// IdentitySwitcherView.vue specific constants
// Used in: IdentitySwitcherView.vue (created method - error loading accounts)
export const NOTIFY_ERROR_LOADING_ACCOUNTS = {
@@ -589,11 +603,40 @@ export const NOTIFY_CONTACT_SAVED = {
message: "Contact saved successfully",
};
// Dynamic message template for contact not found (used in ContactEditView.vue)
// Used in: ContactEditView.vue (contact not found with DID)
/**
* Creates a contact not found error message with the specific DID
* Used in: [Component usage not yet documented]
*/
export const createContactNotFoundMessage = (did: string): string =>
`${NOTIFY_CONTACT_NOT_FOUND.message} ${did}`;
/**
* Creates a SQL error notification message
* Used in: TestView.vue (executeSql method)
*/
export const createSqlErrorMessage = (error: unknown): string => {
const errorMessage = error instanceof Error ? error.message : String(error);
return errorMessage;
};
/**
* Creates passkey name requirement modal configuration
* Used in: TestView.vue (register method)
*/
export const createPasskeyNameModal = (
defaultUsername: string,
onNoCallback: () => Promise<void>,
onYesCallback: () => Promise<void>,
) => ({
group: "modal",
type: "confirm",
title: NOTIFY_PASSKEY_NAME_REQUIRED.title,
text: NOTIFY_PASSKEY_NAME_REQUIRED.text,
onNo: onNoCallback,
onYes: onYesCallback,
noText: `${NOTIFY_PASSKEY_NAME_REQUIRED.noText} ${defaultUsername}`,
});
// ContactAmountsView.vue constants
// Used in: ContactAmountsView.vue (settings retrieval error)
export const NOTIFY_SETTINGS_RETRIEVAL_ERROR = {