Skip to content

Conversation

@grv-saini-20
Copy link
Collaborator

@grv-saini-20 grv-saini-20 commented Sep 10, 2025

Description of change

Fixed metastate platforms requested changes

Issue Number

closes #347

Type of change

  • Update (a change which updates existing functionality)
  • Fix (a change which fixes an issue)

How the change has been tested

CI and Manual

Change checklist

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

Summary by CodeRabbit

  • Style
    • Refined authentication screen typography with centered, lighter-text styling across login interfaces for improved visual hierarchy
    • Updated mobile UI with optimized font sizes and enhanced alignment
    • Enhanced error messaging with clearer "Authentication Error" heading display
    • Improved layout alignment on large screens for better visual presentation
    • Repositioned branding elements and updated informational block styling
    • Added mobile-specific guidance on authentication code validity period

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 10, 2025

Walkthrough

Login screen UI standardization across three platforms addresses visual inconsistencies by reducing disclaimer prominence through smaller fonts and lighter text colors, center-aligning text blocks, adjusting typography, and repositioning the W3DS logo in Blabsy. Changes are presentation-only with minor formatting cleanups in utility files.

Changes

Cohort / File(s) Summary
Login UI Styling & Layout
platforms/group-charter-manager/src/components/auth/login-screen.tsx, platforms/pictique/src/routes/(auth)/auth/+page.svelte, platforms/blabsy/src/components/login/login-main.tsx
Informational banners and disclaimers now use smaller font sizes (text-xs), lighter text colors (text-gray-500, text-black/40), and center alignment (text-center). Login button font size reduced from text-lg to text-base. W3DS logo relocated from left rotated element to centered bottom block. Headings and text blocks centered. Content wording refined for clarity.
Utility Formatting
platforms/blabsy/src/components/input/image-preview.tsx, platforms/blabsy/src/lib/utils/image-utils.ts
Whitespace and formatting adjustments around console.log blocks and conditional statements; no logic or behavioral changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • W3DS logo repositioning in Blabsy: Verify the logo displays correctly in the new centered bottom location and previous rotated element is fully removed
  • Center-alignment changes: Confirm responsive design is maintained across mobile and desktop viewports
  • Content wording updates: Validate text changes align with issue requirements and tone is appropriate

Possibly related PRs

  • PR #292: Modifies the same platforms/pictique/src/routes/(auth)/auth/+page.svelte file with broader mobile-responsive UI adjustments and conditional mobile flows.
  • PR #297: Adjusts W3DS logo placement/inclusion within platforms/blabsy/src/components/login/login-main.tsx login content.
  • PR #298: Updates UI presentation and layout changes to platforms/group-charter-manager/src/components/auth/login-screen.tsx login banner area.

Suggested reviewers

  • coodos
  • sosweetham

Poem

🐰 Hop, hop, hooray! The logins align,
No more loud disclaimers stealing the shine!
Centered and gentle, with text refined,
Our W3DS logo finds peace of mind—
Consistency blooms across every screen! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change—UI adjustments to W3DS messaging across platforms' login screens.
Description check ✅ Passed The PR description follows the template with all required sections completed: issue number, type of change, testing method, and completed checklist.
Linked Issues check ✅ Passed All code changes directly address issue #347 requirements: center-aligned disclaimers with reduced prominence, smaller font sizes for eID text, W3DS logo repositioning on Blabsy, and consistent styling across platforms.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing login UI inconsistencies per issue #347; minimal formatting adjustments in image utilities and preview components are directly related to the UI fixes.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/metastate-requested-changes

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d48a74 and 98c60e6.

📒 Files selected for processing (2)
  • platforms/blabsy/src/components/input/image-preview.tsx (2 hunks)
  • platforms/blabsy/src/lib/utils/image-utils.ts (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • platforms/blabsy/src/components/input/image-preview.tsx
  • platforms/blabsy/src/lib/utils/image-utils.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@grv-saini-20 grv-saini-20 self-assigned this Sep 10, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
platforms/group-charter-manager/src/components/auth/login-screen.tsx (1)

171-179: Verify Group Charter–specific login screen tasks

  • ✅ Single W3DS logo present and centered
  • ✅ “60 seconds” validity text uses bold, block styling
  • ✅ Disclaimer block is centered with text-xs and gray styling
  • ⚠️ eID instruction <p> is only text-gray-600—add text-sm and text-center for higher prominence
🧹 Nitpick comments (3)
platforms/group-charter-manager/src/components/auth/login-screen.tsx (3)

122-125: Reduce eID instruction font on small screens to avoid line breaks.

Make the copy responsive so it shrinks on narrow viewports, per the issue requirements.

-          <p className="text-gray-600">
+          <p className="text-sm md:text-base text-gray-600">
             Scan the QR code using your <a href={getAppStoreLink()}><b><u>eID App</u></b></a> to login
           </p>

157-158: Fix split closing tag.

Minor JSX formatting nit to keep tags well-formed on one line.

-			<span className="block font-light text-gray-600">Please refresh the page if it expires</span
-			>
+			<span className="block font-light text-gray-600">Please refresh the page if it expires</span>

167-167: US English spelling (optional): “centralized” vs “centralised”.

If the product copy targets US English, prefer “centralized”.

-          is stored in your own sovereign eVault, not on centralised
+          is stored in your own sovereign eVault, not on centralized
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f33bba3 and 80fe82b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • platforms/group-charter-manager/src/components/auth/login-screen.tsx (1 hunks)
🔇 Additional comments (1)
platforms/group-charter-manager/src/components/auth/login-screen.tsx (1)

162-169: Disclaimer styling aligns with Issue #347 (centered, smaller, lower-contrast).

The update to text-center, text-xs, and text-gray-500 de-emphasizes the disclaimer appropriately while keeping it readable.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
platforms/pictique/src/routes/(auth)/auth/+page.svelte (3)

84-84: Copy nit: use “log in” (verb) instead of “login” (noun).

Also optional: prefer semantic <strong>/CSS underline over <b>/<u> for consistency with Tailwind utilities.

-				Scan the QR code using your <b><u class="text-sm">eID App</u></b> to login
+				Scan the QR code using your <b><u class="text-sm">eID App</u></b> to log in

137-142: Lower-contrast disclaimer may miss WCAG AA at small sizes; consider slight bump.

Keeps de-emphasis but improves readability on variable backgrounds.

-		<p class="w-full rounded-md bg-white/60 p-4 text-center text-xs leading-4 text-black/40">
+		<p class="w-full rounded-md bg-white/80 p-4 text-center text-xs leading-4 text-black/60">

144-146: Add rel="noopener noreferrer" to external link opened in a new tab.

Prevents window.opener access.

-	<a href="https://metastate.foundation" target="_blank">
+	<a href="https://metastate.foundation" target="_blank" rel="noopener noreferrer">
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80fe82b and 65bb666.

📒 Files selected for processing (1)
  • platforms/pictique/src/routes/(auth)/auth/+page.svelte (2 hunks)
🔇 Additional comments (1)
platforms/pictique/src/routes/(auth)/auth/+page.svelte (1)

90-95: Verify mobile tap target after font-size reduction.

text-base lowers label size; with py-4 the height should still be ~48px. Please confirm the button meets the 44×44px minimum on iOS/Android.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
platforms/blabsy/src/components/login/login-main.tsx (1)

20-30: Close SSE and add cleanup to prevent leaks/duplicate sign-ins

EventSource stays open indefinitely; close it after successful sign-in and on error.

Apply within this block:

-        eventSource.onmessage = async (e): Promise<void> => {
-            const data = JSON.parse(e.data as string) as { token: string };
-            const { token } = data;
-            console.log(token);
-            await signInWithCustomToken(token);
-        };
+        eventSource.onmessage = async (e): Promise<void> => {
+            try {
+                const data = JSON.parse(e.data as string) as { token: string };
+                const { token } = data;
+                await signInWithCustomToken(token);
+            } finally {
+                eventSource.close();
+            }
+        };
+        eventSource.onerror = (): void => {
+            eventSource.close();
+        };

Outside this range, keep it robust across unmounts:

// add to imports
import { useEffect, useState, useRef } from 'react';

// inside component
const esRef = useRef<EventSource | null>(null);

// in watchEventStream, after creating the EventSource
esRef.current = eventSource;

// in useEffect, add cleanup
useEffect(() => {
  getOfferData().catch(console.error);
  return () => esRef.current?.close();
}, []);
🧹 Nitpick comments (7)
platforms/blabsy/src/components/login/login-main.tsx (7)

14-17: Prefer relative SSE URL to avoid brittle env deps

Avoid hard reliance on NEXT_PUBLIC_BASE_URL on the client; relative paths work across dev/prod.

-        const sseUrl = new URL(
-            `/api/auth/sessions/${id}`,
-            process.env.NEXT_PUBLIC_BASE_URL
-        ).toString();
+        const sseUrl = `/api/auth/sessions/${id}`;

31-37: Same here: fetch offer via relative path

Simplifies config and prevents runtime errors if the env var is unset.

-        const { data } = await axios.get<{ uri: string }>(
-            new URL(
-                '/api/auth/offer',
-                process.env.NEXT_PUBLIC_BASE_URL
-            ).toString()
-        );
+        const { data } = await axios.get<{ uri: string }>('/api/auth/offer');

93-99: Disable the deep-link CTA until qr is ready

Prevents navigating to # and improves a11y.

-                                <a
-                                    href={qr ? getDeepLinkUrl(qr) : '#'}
-                                    className='px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-center'
-                                >
+                                <a
+                                  href={qr ? getDeepLinkUrl(qr) : undefined}
+                                  aria-disabled={!qr}
+                                  tabIndex={qr ? 0 : -1}
+                                  onClick={(e) => { if (!qr) e.preventDefault(); }}
+                                  className={`px-6 py-3 bg-blue-600 text-white rounded-lg transition-colors text-center ${qr ? 'hover:bg-blue-700' : 'opacity-50 pointer-events-none'}`}
+                                >

100-105: Fix split closing tag

Minor JSX formatting glitch; keep the closing </span> on one line.

-                                    <span className="block font-light text-gray-600">Please refresh the page if it expires</span
-                                    >
+                                    <span className="block font-light text-gray-600">Please refresh the page if it expires</span>

Also applies to: 116-121


79-83: Arbitrary content: string quoting nit

To avoid parser/minifier quirks with smart quotes, prefer single-quoted Tailwind arbitrary values.

-                    <h1 className='text-center text-3xl before:content-["See_what’s_happening_in_the_world_right_now."] lg:text-6xl lg:before:content-["Happening_now"]'>
+                    <h1 className='text-center text-3xl before:content-[\'See_what’s_happening_in_the_world_right_now.\'] lg:text-6xl lg:before:content-[\'Happening_now\']'>

Optional: render the visible copy as real text instead of ::before for better i18n/theming.


125-132: Delete commented-out W3DS logo block

Since the second logo is intentionally removed, drop dead code instead of commenting it out.

-                    {/* <div className='absolute right-0 rotate-90 top-1/2'>
-                        <Image
-                            src='/assets/w3dslogo.svg'
-                            alt='W3DS logo'
-                            width={100}
-                            height={20}
-                        />
-                    </div> */}

135-141: Disclaimer still looks emphasized; tone it down per Issue #347

Remove bold and reduce size/contrast to truly de-emphasize.

-                    <div className='grid gap-3 text-center font-bold text-white/70'>
+                    <div className='grid gap-3 text-center font-normal text-white/60 text-xs md:text-sm'>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 65bb666 and 05097c0.

📒 Files selected for processing (1)
  • platforms/blabsy/src/components/login/login-main.tsx (2 hunks)
🔇 Additional comments (4)
platforms/blabsy/src/components/login/login-main.tsx (4)

101-104: Confirm the “60 seconds” validity matches backend TTL

Make sure the offer/session actually expires in 60s across platforms to avoid misleading copy.

Also applies to: 117-120


77-77: Alignment update LGTM

Centering the right pane on large screens matches the issue’s alignment requirement.


84-86: Centered subheader LGTM

This aligns with the “center-align” requirement.


44-53: Guard browser-only APIs for SSR safety

navigator/window can be undefined during SSR — guard and return a safe default in non-browser environments. If this component is used in the Next.js App Router, add "use client" at the top of the file.

-    const getAppStoreLink = () => {
-			const userAgent = navigator.userAgent || navigator.vendor || window.opera;
+    const getAppStoreLink = (): string => {
+      if (typeof window === 'undefined' || typeof navigator === 'undefined') {
+        return "https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet";
+      }
+			const userAgent = navigator.userAgent || navigator.vendor || (window as any).opera;

Verification note: root package.json showed no "next" (jq returned null) and a search found no "use client" in this file — confirm whether this package uses Next.js/App Router before adding the directive.

@coodos coodos changed the title fix: metastate-requested-changes fix: w3ds messaging related UI Changes Nov 16, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
platforms/blabsy/src/components/login/login-main.tsx (1)

195-200: Consider minor text polish for clarity.

The disclaimer text effectively communicates the W3DS architecture. For slightly improved readability, consider:

-                        You are entering Blabsy - a social network built on the
-                        Web 3.0 Data Space (W3DS) architecture. This system is
-                        designed around data-platform separation, where all your
-                        personal content is stored in your own sovereign eVault,
-                        not on centralized servers.
+                        You are entering Blabsy—a social network built on the
+                        Web 3.0 Data Space (W3DS) architecture. This system uses
+                        data-platform separation, where your personal content is
+                        stored in your own sovereign eVault, not on centralized
+                        servers.

This tightens the phrasing slightly (em dash instead of hyphen, "uses" instead of "is designed around", removes "all" for conciseness), but the current version is already clear and acceptable.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b676ac4 and 2d48a74.

📒 Files selected for processing (2)
  • infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte (1 hunks)
  • platforms/blabsy/src/components/login/login-main.tsx (6 hunks)
✅ Files skipped from review due to trivial changes (1)
  • infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte
🧰 Additional context used
🧬 Code graph analysis (1)
platforms/blabsy/src/components/login/login-main.tsx (3)
platforms/dreamSync/client/src/lib/utils/mobile-detection.ts (1)
  • getAppStoreLink (29-45)
platforms/blabsy/src/lib/utils/mobile-detection.ts (1)
  • getDeepLinkUrl (11-13)
platforms/pictique/src/declaration.d.ts (1)
  • QRCode (3-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (5)
platforms/blabsy/src/components/login/login-main.tsx (5)

54-65: LGTM! Clean data fetching logic.

The simplified getOfferData function correctly fetches the offer URI and initializes the SSE watcher without unnecessary logging.


86-90: LGTM! Simplified error handling.

The useEffect now uses a cleaner .catch() pattern for error handling without the noise of success logs.


94-117: LGTM! Proper centering aligns with PR objectives.

The layout changes correctly center-align the headings and content wrapper on large screens, matching the requirement to make text blocks centered including "Happening now" and "Join Blabsy today".


129-189: LGTM! Login flows meet UI consistency objectives.

The mobile and desktop login flows now properly:

  • Use smaller, centered text for instructions
  • Add prominent "60 seconds" validity notices as requested
  • Include app store links for user guidance

The changes align well with the PR objectives to increase prominence of eID and time-related information.


192-214: Text contrast meets WCAG AA accessibility standards.

Verification confirms the disclaimer text at text-white/70 achieves a contrast ratio of 5.99:1 against the bg-white/20 background, exceeding WCAG AA requirements (4.5:1 for normal text, 3:1 for large text). The original concern about potential WCAG compliance failure was unfounded.

However, verify visually in the rendered application to account for the underlying background image, which may affect the final perceived contrast. Since the theoretical calculation meets accessibility standards, the code changes are acceptable pending visual confirmation.

@coodos coodos merged commit edd8023 into main Nov 20, 2025
4 checks passed
@coodos coodos deleted the fix/metastate-requested-changes branch November 20, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Login UI Inconsistencies

4 participants