Skip to content

Conversation

sosweetham
Copy link
Member

@sosweetham sosweetham commented Aug 13, 2025

Description of change

adds the w3ds logo back at the bottom of the intro text

Issue Number

n/a (294, dont close it has multiple)

Type of change

  • Fix (a change which fixes an issue)

How the change has been tested

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
    • Enhanced login page branding by adding an inline W3DS logo within the content area, complementing the existing decorative logo on the right.
    • Improves visual balance and reinforces brand presence without altering any login functionality or behavior.
    • Adjusted layout spacing to accommodate the additional logo for a cleaner, more polished presentation.

@sosweetham sosweetham requested a review from coodos as a code owner August 13, 2025 11:50
Copy link
Contributor

coderabbitai bot commented Aug 13, 2025

Walkthrough

Added an inline W3DS logo image to the login content area in login-main.tsx, alongside the existing rotated logo on the right. No logic, behavior, or public API changes; purely presentational.

Changes

Cohort / File(s) Summary of Changes
Login UI Components
platforms/blabsy/src/components/login/login-main.tsx
Inserted an additional inline <Image> (src /assets/w3dslogo.svg, alt “W3DS logo”, width 100, height 20). No functional changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I hop past forms where passwords flow,
A shiny badge now gleams just so—
Two W3DS stars align,
In login’s moonlit UI shine.
Thump-thump! My paws approve the show. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/blabsy-w3ds-logo

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

🔭 Outside diff range comments (2)
platforms/blabsy/src/components/login/login-main.tsx (2)

13-31: Close EventSource on unmount to prevent leaks and duplicate subscriptions.

The SSE connection created in watchEventStream is never closed, which can leak connections and double-consume events after remounts/navigation.

Minimal refactor to return the EventSource and close it in the effect cleanup:

-    function watchEventStream(id: string): void {
+    function watchEventStream(id: string): EventSource {
         const sseUrl = new URL(
             `/api/auth/sessions/${id}`,
             process.env.NEXT_PUBLIC_BASE_URL
         ).toString();
         const eventSource = new EventSource(sseUrl);

         eventSource.onopen = (): void => {
             console.log('Successfully connected.');
         };

         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);
         };
+        return eventSource;
     }
-    const getOfferData = async (): Promise<void> => {
+    const getOfferData = async (): Promise<EventSource | null> => {
         const { data } = await axios.get<{ uri: string }>(
             new URL(
                 '/api/auth/offer',
                 process.env.NEXT_PUBLIC_BASE_URL
             ).toString()
         );
         console.log('getting offer data');
         setQr(data.uri);
-        watchEventStream(
-            new URL(data.uri).searchParams.get('session') as string
-        );
+        return watchEventStream(
+            new URL(data.uri).searchParams.get('session') as string
+        );
     };

     useEffect(() => {
-        getOfferData()
-            .then((): void => {
-                console.log('QR code data fetched successfully.');
-            })
-            .catch((error): void => {
-                console.error('Error fetching QR code data:', error);
-            });
+        let es: EventSource | null = null;
+        getOfferData()
+            .then((returnedEs): void => {
+                es = returnedEs;
+                console.log('QR code data fetched successfully.');
+            })
+            .catch((error): void => {
+                console.error('Error fetching QR code data:', error);
+            });
+        return () => {
+            es?.close();
+        };
     }, []);

Also applies to: 45-53


27-29: Remove all console.log(token) calls to prevent leaking auth tokens
Logging the raw auth token is a security risk. Please remove every occurrence:

• platforms/blabsy/src/components/login/login-main.tsx (line 27)
• platforms/blabsy-w3ds-auth-api/src/controllers/AuthController.ts (line 60)

Apply these diffs:

--- a/platforms/blabsy/src/components/login/login-main.tsx
+++ b/platforms/blabsy/src/components/login/login-main.tsx
@@ -25,7 +25,6 @@
             const { token } = data;
-            console.log(token);
             await signInWithCustomToken(token);
         };
--- a/platforms/blabsy-w3ds-auth-api/src/controllers/AuthController.ts
+++ b/platforms/blabsy-w3ds-auth-api/src/controllers/AuthController.ts
@@ -58,7 +58,6 @@
         const token = await this.authService.createSession(user);
-        console.log(token);
         this.eventEmitter.emit(session, { token });
         return { session, token };
     }

After applying these changes, re-run the search below to confirm no remaining token-logging calls:

rg -n --no-ignore-vcs -S 'console\.log\(.{0,10}token' -A 2 || true
🧹 Nitpick comments (2)
platforms/blabsy/src/components/login/login-main.tsx (2)

113-118: Make the bottom logo decorative for screen readers (alt='' + aria-hidden).

If this logo is purely decorative (no additional information), avoid redundant announcements for assistive tech by making it decorative.

Apply this diff:

-                    <Image
-                        src='/assets/w3dslogo.svg'
-                        alt='W3DS logo'
-                        width={100}
-                        height={20}
-                    />
+                    <Image
+                        src='/assets/w3dslogo.svg'
+                        alt=''
+                        aria-hidden='true'
+                        width={100}
+                        height={20}
+                    />

97-103: DRY: Consider a small W3DSLogo component to keep alt/size consistent.

Since the same logo is used in two places, a tiny wrapper component reduces duplication and avoids future inconsistencies (alt text, dimensions).

Example component:

import Image from 'next/image';
import type { ComponentProps } from 'react';

type Props = Omit<ComponentProps<typeof Image>, 'src' | 'width' | 'height'> & {
  decorative?: boolean;
};

export function W3DSLogo({ decorative, alt, ...rest }: Props) {
  return (
    <Image
      src="/assets/w3dslogo.svg"
      width={100}
      height={20}
      alt={decorative ? '' : alt ?? 'W3DS logo'}
      aria-hidden={decorative ? true : undefined}
      {...rest}
    />
  );
}

Also applies to: 113-118

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b571ab and 95dd620.

📒 Files selected for processing (1)
  • platforms/blabsy/src/components/login/login-main.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
platforms/blabsy/src/components/login/login-main.tsx (1)
platforms/pictique/src/lib/types.ts (1)
  • Image (73-76)
🔇 Additional comments (1)
platforms/blabsy/src/components/login/login-main.tsx (1)

113-118: LGTM: Inline W3DS logo addition matches PR intent.

The added logo at the bottom of the intro text satisfies the PR objective and is implemented consistently with the existing usage.

@coodos coodos merged commit 0a55920 into main Aug 14, 2025
2 of 4 checks passed
@coodos coodos deleted the fix/blabsy-w3ds-logo branch August 14, 2025 07:36
@coderabbitai coderabbitai bot mentioned this pull request Sep 11, 2025
6 tasks
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.

2 participants