refactor(services): inline ProfileService logic into AccountViewView

Removes over-engineered ProfileService and ServiceInitializationManager
classes that were only used in one place. Inlines all profile logic
directly into AccountViewView.vue to reduce complexity and improve
maintainability.

- Deletes ProfileService.ts (325 lines)
- Deletes ServiceInitializationManager.ts (207 lines)
- Inlines ProfileData interface and methods into AccountViewView
- Maintains all existing functionality while reducing code footprint

perf(logging): convert excessive info logs to debug level

Reduces console noise by converting high-frequency, low-value logging
from info to debug level across navigation, API calls, and component
lifecycle operations. Improves performance and reduces log verbosity
for normal application flow.

- Router navigation guards: info → debug
- Plan loading operations: info → debug
- User registration checks: info → debug
- Image server rate limits: info → debug
- Component lifecycle events: info → debug
- Settings loading operations: info → debug

Maintains warn/error levels for actual issues while reducing noise
from expected application behavior.
This commit is contained in:
Matthew Raymer
2025-08-26 07:23:24 +00:00
parent 128ddff467
commit 9386b2e96f
10 changed files with 259 additions and 587 deletions

View File

@@ -515,7 +515,7 @@ export async function getPlanFromCache(
// Enhanced diagnostic logging for plan loading
const requestId = `plan_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
logger.info("[Plan Loading] 🔍 Loading plan from server:", {
logger.debug("[Plan Loading] 🔍 Loading plan from server:", {
requestId,
handleId,
apiServer,
@@ -527,7 +527,7 @@ export async function getPlanFromCache(
try {
const resp = await axios.get(url, { headers });
logger.info("[Plan Loading] ✅ Plan loaded successfully:", {
logger.debug("[Plan Loading] ✅ Plan loaded successfully:", {
requestId,
handleId,
status: resp.status,
@@ -1604,7 +1604,7 @@ export async function fetchEndorserRateLimits(
const headers = await getHeaders(issuerDid);
// Enhanced diagnostic logging for user registration tracking
logger.info("[User Registration] Checking user status on server:", {
logger.debug("[User Registration] Checking user status on server:", {
did: issuerDid,
server: apiServer,
endpoint: url,
@@ -1615,7 +1615,7 @@ export async function fetchEndorserRateLimits(
const response = await axios.get(url, { headers } as AxiosRequestConfig);
// Log successful registration check
logger.info("[User Registration] User registration check successful:", {
logger.debug("[User Registration] User registration check successful:", {
did: issuerDid,
server: apiServer,
status: response.status,
@@ -1674,7 +1674,7 @@ export async function fetchImageRateLimits(
const headers = await getHeaders(issuerDid);
// Enhanced diagnostic logging for image server calls
logger.info("[Image Server] Checking image rate limits:", {
logger.debug("[Image Server] Checking image rate limits:", {
did: issuerDid,
server: server,
endpoint: url,
@@ -1685,7 +1685,7 @@ export async function fetchImageRateLimits(
const response = await axios.get(url, { headers } as AxiosRequestConfig);
// Log successful image server call
logger.info("[Image Server] Image rate limits check successful:", {
logger.debug("[Image Server] Image rate limits check successful:", {
did: issuerDid,
server: server,
status: response.status,

View File

@@ -973,13 +973,16 @@ export async function importFromMnemonic(
const firstName = settings[0];
const isRegistered = settings[1];
logger.info("[importFromMnemonic] Test User #0 settings verification", {
did: newId.did,
firstName,
isRegistered,
expectedFirstName: "User Zero",
expectedIsRegistered: true,
});
logger.debug(
"[importFromMnemonic] Test User #0 settings verification",
{
did: newId.did,
firstName,
isRegistered,
expectedFirstName: "User Zero",
expectedIsRegistered: true,
},
);
// If settings weren't saved correctly, try individual updates
if (firstName !== "User Zero" || isRegistered !== 1) {
@@ -1005,7 +1008,7 @@ export async function importFromMnemonic(
if (retryResult?.values?.length) {
const retrySettings = retryResult.values[0];
logger.info(
logger.debug(
"[importFromMnemonic] Test User #0 settings after retry",
{
firstName: retrySettings[0],