-
+
@@ -551,7 +554,7 @@ import VueMarkdown from "vue-markdown-render";
import { Router, RouteLocationNormalizedLoaded } from "vue-router";
import { copyToClipboard } from "../services/ClipboardService";
-import { GenericVerifiableCredential } from "../interfaces";
+import { EmojiClaim, GenericVerifiableCredential } from "../interfaces";
import GiftedDialog from "../components/GiftedDialog.vue";
import QuickNav from "../components/QuickNav.vue";
import { NotificationIface } from "../constants/app";
@@ -667,6 +670,10 @@ export default class ClaimView extends Vue {
return giveClaim.description || "";
}
+ if (this.veriClaim.claimType === "Emoji") {
+ return (claim as EmojiClaim).text || "";
+ }
+
// Fallback for other claim types
return (claim as { description?: string })?.description || "";
}
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index 3e73cda4a0..718a731fa1 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -245,6 +245,7 @@ Raymer * @version 1.0.0 */
:last-viewed-claim-id="feedLastViewedClaimId"
:is-registered="isRegistered"
:active-did="activeDid"
+ :api-server="apiServer"
@load-claim="onClickLoadClaim"
@view-image="openImageViewer"
/>
@@ -705,7 +706,7 @@ export default class HomeView extends Vue {
};
logger.warn(
- "[HomeView Settings Trace] ⚠️ Registration check failed",
+ "[HomeView Settings Trace] ⚠️ Registration check failed, expected for unregistered users.",
{
error: errorMessage,
did: this.activeDid,
@@ -1264,6 +1265,7 @@ export default class HomeView extends Vue {
provider,
fulfillsPlan,
providedByPlan,
+ record.emojiCount,
);
}
@@ -1487,12 +1489,14 @@ export default class HomeView extends Vue {
provider: Provider | undefined,
fulfillsPlan?: FulfillsPlan,
providedByPlan?: ProvidedByPlan,
+ emojiCount?: Record,
): GiveRecordWithContactInfo {
return {
...record,
jwtId: record.jwtId,
fullClaim: record.fullClaim,
description: record.description || "",
+ emojiCount: emojiCount || {},
handleId: record.handleId,
issuerDid: record.issuerDid,
fulfillsPlanHandleId: record.fulfillsPlanHandleId,
diff --git a/test-playwright/testUtils.ts b/test-playwright/testUtils.ts
index 67923ba15f..321f934366 100644
--- a/test-playwright/testUtils.ts
+++ b/test-playwright/testUtils.ts
@@ -49,6 +49,10 @@ export async function importUserFromAccount(page: Page, id?: string): Promise {
await expect(
page.locator("#sectionUsageLimits").getByText("Checking")
).toBeHidden();
+
+ // PHASE 1 FIX: Wait for registration check to complete and update UI elements
+ // This ensures that components like InviteOneView have the correct isRegistered status
+ await waitForRegistrationStatusToSettle(page);
+
return did;
}
@@ -337,3 +346,78 @@ export function getElementWaitTimeout(): number {
export function getPageLoadTimeout(): number {
return getAdaptiveTimeout(30000, 1.4);
}
+
+/**
+ * PHASE 1 FIX: Wait for registration status to settle
+ *
+ * This function addresses the timing issue where:
+ * 1. User imports identity → Database shows isRegistered: false
+ * 2. HomeView loads → Starts async registration check
+ * 3. Other views load → Use cached isRegistered: false
+ * 4. Async check completes → Updates database to isRegistered: true
+ * 5. But other views don't re-check → Plus buttons don't appear
+ *
+ * This function waits for the async registration check to complete
+ * without interfering with test navigation.
+ */
+export async function waitForRegistrationStatusToSettle(page: Page): Promise {
+ try {
+ // Wait for the initial registration check to complete
+ // This is indicated by the "Checking" text disappearing from usage limits
+ await expect(
+ page.locator("#sectionUsageLimits").getByText("Checking")
+ ).toBeHidden({ timeout: 15000 });
+
+ // Before navigating back to the page, we'll trigger a registration check
+ // by navigating to home and waiting for the registration process to complete
+
+ const currentUrl = page.url();
+
+ // Navigate to home to trigger the registration check
+ await page.goto('./');
+ await page.waitForLoadState('networkidle');
+
+ // Wait for the registration check to complete by monitoring the usage limits section
+ // This ensures the async registration check has finished
+ await page.waitForFunction(() => {
+ const usageLimits = document.querySelector('#sectionUsageLimits');
+ if (!usageLimits) return true; // No usage limits section, assume ready
+
+ // Check if the "Checking..." spinner is gone
+ const checkingSpinner = usageLimits.querySelector('.fa-spin');
+ if (checkingSpinner) return false; // Still loading
+
+ // Check if we have actual content (not just the spinner)
+ const hasContent = usageLimits.querySelector('p') || usageLimits.querySelector('button');
+ return hasContent !== null; // Has actual content, not just spinner
+ }, { timeout: 10000 });
+
+ // Also navigate to account page to ensure activeDid is set and usage limits are loaded
+ await page.goto('./account');
+ await page.waitForLoadState('networkidle');
+
+ // Wait for the usage limits section to be visible and loaded
+ await page.waitForFunction(() => {
+ const usageLimits = document.querySelector('#sectionUsageLimits');
+ if (!usageLimits) return false; // Section should exist on account page
+
+ // Check if the "Checking..." spinner is gone
+ const checkingSpinner = usageLimits.querySelector('.fa-spin');
+ if (checkingSpinner) return false; // Still loading
+
+ // Check if we have actual content (not just the spinner)
+ const hasContent = usageLimits.querySelector('p') || usageLimits.querySelector('button');
+ return hasContent !== null; // Has actual content, not just spinner
+ }, { timeout: 15000 });
+
+ // Navigate back to the original page if it wasn't home
+ if (!currentUrl.includes('/')) {
+ await page.goto(currentUrl);
+ await page.waitForLoadState('networkidle');
+ }
+
+ } catch (error) {
+ // Registration status check timed out, continuing anyway
+ // This may indicate the user is not registered or there's a server issue
+ }
+}