diff --git a/README.md b/README.md index 899a381f..661f2e26 100644 --- a/README.md +++ b/README.md @@ -7,17 +7,6 @@ and expand to crowd-fund with time & money, then record and see the impact of co See [ClickUp](https://sharing.clickup.com/9014278710/l/h/8cmnyhp-174/10573fec74e2ba0) for current priorities. -## Known Issues - -### Critical Vue Reactivity Bug -A critical Vue reactivity bug was discovered during ActiveDid migration testing where component properties fail to trigger template updates correctly. - -**Impact**: The `newDirectOffersActivityNumber` element in HomeView.vue requires a watcher workaround to render correctly. - -**Status**: Workaround implemented, investigation ongoing. - -**Documentation**: See [Vue Reactivity Bug Report](doc/vue-reactivity-bug-report.md) for details. - ## Setup & Building Quick start: @@ -79,16 +68,16 @@ TimeSafari supports configurable logging levels via the `VITE_LOG_LEVEL` environ ```bash # Show only errors -VITE_LOG_LEVEL=error npm run dev +VITE_LOG_LEVEL=error npm run build:web:dev # Show warnings and errors -VITE_LOG_LEVEL=warn npm run dev +VITE_LOG_LEVEL=warn npm run build:web:dev # Show info, warnings, and errors (default) -VITE_LOG_LEVEL=info npm run dev +VITE_LOG_LEVEL=info npm run build:web:dev # Show all log levels including debug -VITE_LOG_LEVEL=debug npm run dev +VITE_LOG_LEVEL=debug npm run build:web:dev ``` ### Available Levels @@ -316,6 +305,17 @@ timesafari/ └── 📄 doc/README-BUILD-GUARD.md # Guard system documentation ``` +## Known Issues + +### Critical Vue Reactivity Bug +A critical Vue reactivity bug was discovered during ActiveDid migration testing where component properties fail to trigger template updates correctly. + +**Impact**: The `newDirectOffersActivityNumber` element in HomeView.vue requires a watcher workaround to render correctly. + +**Status**: Workaround implemented, investigation ongoing. + +**Documentation**: See [Vue Reactivity Bug Report](doc/vue-reactivity-bug-report.md) for details. + ## 🤝 Contributing 1. **Follow the Build Architecture Guard** - Update BUILDING.md when modifying build files diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index ca8a9e97..02702afc 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -16,7 +16,7 @@ * @module endorserServer */ -import { Axios, AxiosRequestConfig } from "axios"; +import { Axios, AxiosRequestConfig, AxiosResponse } from "axios"; import { Buffer } from "buffer"; import { sha256 } from "ethereum-cryptography/sha256"; import { LRUCache } from "lru-cache"; @@ -1131,7 +1131,7 @@ export async function createAndSubmitClaim( // Enhanced diagnostic logging for claim submission const requestId = `claim_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`; - logger.info("[Claim Submission] 🚀 Starting claim submission:", { + logger.debug("[Claim Submission] 🚀 Starting claim submission:", { requestId, apiServer, requesterDid: issuerDid, @@ -1157,7 +1157,7 @@ export async function createAndSubmitClaim( }, }); - logger.info("[Claim Submission] ✅ Claim submitted successfully:", { + logger.debug("[Claim Submission] ✅ Claim submitted successfully:", { requestId, status: response.status, handleId: response.data?.handleId, @@ -1754,7 +1754,7 @@ export async function fetchImageRateLimits( axios: Axios, issuerDid: string, imageServer?: string, -) { +): Promise { const server = imageServer || DEFAULT_IMAGE_API_SERVER; const url = server + "/image-limits"; const headers = await getHeaders(issuerDid); @@ -1788,7 +1788,7 @@ export async function fetchImageRateLimits( }; }; - logger.warn("[Image Server] Image rate limits check failed:", { + logger.error("[Image Server] Image rate limits check failed:", { did: issuerDid, server: server, errorCode: axiosError.response?.data?.error?.code, @@ -1796,7 +1796,6 @@ export async function fetchImageRateLimits( httpStatus: axiosError.response?.status, timestamp: new Date().toISOString(), }); - - throw error; + return null; } } diff --git a/src/services/migrationService.ts b/src/services/migrationService.ts index be963571..f23c1965 100644 --- a/src/services/migrationService.ts +++ b/src/services/migrationService.ts @@ -511,7 +511,7 @@ export async function runMigrations( try { migrationLog("📋 [Migration] Starting migration process..."); - // Step 1: Create migrations table if it doesn't exist + // Create migrations table if it doesn't exist // Note: We use IF NOT EXISTS here because this is infrastructure, not a business migration await sqlExec(` CREATE TABLE IF NOT EXISTS migrations ( @@ -520,41 +520,14 @@ export async function runMigrations( ); `); - // Step 2: Handle migration name changes (master branch compatibility) - // Map old migration names to new ones - const migrationNameMap = new Map([ - // No longer needed - migrations consolidated into single 003 - ]); - - // Update any old migration names to new ones - for (const [oldName, newName] of migrationNameMap) { - try { - await sqlExec("UPDATE migrations SET name = ? WHERE name = ?", [ - newName, - oldName, - ]); - if ( - await sqlQuery("SELECT 1 FROM migrations WHERE name = ? LIMIT 1", [ - newName, - ]) - ) { - migrationLog( - `🔄 [Migration] Renamed migration: ${oldName} → ${newName}`, - ); - } - } catch (error) { - // Ignore errors - migration might not exist - } - } - - // Step 3: Get list of already applied migrations + // Step 2: Get list of already applied migrations const appliedMigrationsResult = await sqlQuery( "SELECT name FROM migrations", ); const appliedMigrations = extractMigrationNames(appliedMigrationsResult); - // Step 4: Get all registered migrations + // Step 3: Get all registered migrations const migrations = migrationRegistry.getMigrations(); if (migrations.length === 0) { @@ -569,7 +542,7 @@ export async function runMigrations( let appliedCount = 0; let skippedCount = 0; - // Step 5: Process each migration + // Step 4: Process each migration for (const migration of migrations) { // Check 1: Is it recorded as applied in migrations table? const isRecordedAsApplied = appliedMigrations.has(migration.name); @@ -719,7 +692,7 @@ export async function runMigrations( } } - // Step 5: Final validation - verify all migrations are properly recorded + // Step 6: Final validation - verify all migrations are properly recorded const finalMigrationsResult = await sqlQuery("SELECT name FROM migrations"); const finalAppliedMigrations = extractMigrationNames(finalMigrationsResult); diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 4855020f..0ccb97ed 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -1446,12 +1446,11 @@ export default class AccountViewView extends Vue { this.DEFAULT_IMAGE_API_SERVER, ); - if (imageResp.status === 200) { + if (imageResp && imageResp.status === 200) { this.imageLimits = imageResp.data; } else { this.limitsMessage = ACCOUNT_VIEW_CONSTANTS.LIMITS.NO_IMAGE_ACCESS; this.notify.warning(ACCOUNT_VIEW_CONSTANTS.LIMITS.CANNOT_UPLOAD_IMAGES); - return; } const endorserResp = await fetchEndorserRateLimits( @@ -1465,7 +1464,6 @@ export default class AccountViewView extends Vue { } else { this.limitsMessage = ACCOUNT_VIEW_CONSTANTS.LIMITS.NO_LIMITS_FOUND; this.notify.warning(ACCOUNT_VIEW_CONSTANTS.LIMITS.BAD_SERVER_RESPONSE); - return; } } catch (error) { this.limitsMessage = @@ -1482,6 +1480,7 @@ export default class AccountViewView extends Vue { error: error instanceof Error ? error.message : String(error), did: did, apiServer: this.apiServer, + imageServer: this.DEFAULT_IMAGE_API_SERVER, partnerApiServer: this.partnerApiServer, errorCode: axiosError?.response?.data?.error?.code, errorMessage: axiosError?.response?.data?.error?.message, @@ -1996,7 +1995,7 @@ export default class AccountViewView extends Vue { error: error instanceof Error ? error.message : String(error), timestamp: new Date().toISOString(), }); - throw new Error("Failed to load profile"); + return null; } }