Skip to content

Conversation

Sahil2004
Copy link
Contributor

@Sahil2004 Sahil2004 commented Aug 6, 2025

Description of change

Added disclaimers.
image
image
image
image

Issue Number

Closes #278

Type of change

  • New (a change which implements a new feature)

How the change has been tested

Manually.

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

  • New Features

    • Added a disclaimer modal requiring user acknowledgment before accessing protected areas in both Blabsy and Pictique platforms.
    • Introduced a new W3DS logo component and enhanced branding on login and authentication pages.
    • Improved login and authentication pages with additional descriptive text and updated QR code visuals.
    • Added a store to manage the disclaimer modal state in Pictique.
  • Bug Fixes

    • Minor style and layout adjustments for better visual consistency.
  • Chores

    • Added a new dependency for QR code generation in Pictique.

Copy link
Contributor

coderabbitai bot commented Aug 6, 2025

Walkthrough

This update introduces disclaimer modals to both the Blabsy and Pictique platforms, requiring users to acknowledge prototype warnings before accessing protected content. UI enhancements are made to login and authentication pages, including new logos, descriptive text, and improved QR code rendering. Supporting components, icons, stores, and dependencies are added or updated.

Changes

Cohort / File(s) Change Summary
Blabsy Protected Layout Enhancement
platforms/blabsy/src/components/layout/common-layout.tsx
Adds a disclaimer modal requiring user acceptance before accessing protected content; integrates authentication hooks and sign-out logic.
Blabsy Login UI Improvement
platforms/blabsy/src/components/login/login-main.tsx
Adds W3DS logo, descriptive text, and enhances the visual layout of the login page.
Blabsy Auth Context Minor Cleanup
platforms/blabsy/src/lib/context/auth-context.tsx
Removes an extraneous blank line; no functional changes.
Pictique Disclaimer Modal Implementation
platforms/pictique/src/routes/(protected)/+layout.svelte,
platforms/pictique/src/lib/stores/disclaimer.ts
Adds a disclaimer modal with acceptance logic and a store to control its visibility; enforces modal acknowledgment before granting access.
Pictique Login & Auth Page UI Overhaul
platforms/pictique/src/routes/(auth)/auth/+page.svelte
Adds logo, tagline, descriptive text, and replaces QR code rendering with svelte-qrcode-action; updates layout and styles.
Pictique Icon Additions & Refactor
platforms/pictique/src/lib/icons/W3dslogo.svelte,
platforms/pictique/src/lib/icons/index.ts
Adds new W3DS logo SVG component and updates icon exports to include it; switches to double quotes in import/export statements.
Pictique QR Code Dependency & Type Declaration
platforms/pictique/package.json,
platforms/pictique/src/declaration.d.ts
Adds svelte-qrcode-action dependency and refactors the QR code module declaration for clarity and style consistency.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ProtectedLayout (Blabsy)
    participant AuthContext
    participant Modal

    User->>ProtectedLayout (Blabsy): Access protected route
    ProtectedLayout (Blabsy)->>AuthContext: Check authentication
    AuthContext-->>ProtectedLayout (Blabsy): Authenticated/Not Authenticated
    alt Not Authenticated
        ProtectedLayout (Blabsy)-->>User: Show placeholder
    else Authenticated
        ProtectedLayout (Blabsy)->>Modal: Show disclaimer modal
        User->>Modal: Accept disclaimer
        Modal-->>ProtectedLayout (Blabsy): Set disclaimerAccepted = true
        ProtectedLayout (Blabsy)-->>User: Render children (app content)
        User->>Modal: Close without accepting
        Modal-->>ProtectedLayout (Blabsy): Trigger signOut
    end
Loading
sequenceDiagram
    participant User
    participant Pictique Layout
    participant Disclaimer Store
    participant Auth Store

    User->>Pictique Layout: Access protected content
    Pictique Layout->>Disclaimer Store: Check isDisclaimerModalOpen
    alt Modal open
        Pictique Layout-->>User: Show disclaimer modal
        User->>Pictique Layout: Click "I Understand"
        Pictique Layout->>Disclaimer Store: closeDisclaimerModal()
        Disclaimer Store-->>Pictique Layout: Modal closed
        Pictique Layout-->>User: Show app content
        User->>Pictique Layout: Close modal without accepting
        Pictique Layout->>Auth Store: Remove tokens, redirect to /auth
    else Modal closed
        Pictique Layout-->>User: Show app content
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • coodos
  • sosweetham

Poem

A rabbit hopped in, with a modal to show,
“Before you proceed, there’s something to know!”
With logos and QR codes, the login’s a delight,
Accept the disclaimer, then all is in sight.
New icons and stores, dependencies too—
This bunny’s been busy, just for you!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/disclaimer

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
  • 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 src/utils.ts and explain its main purpose.
    • @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 comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

@Sahil2004 Sahil2004 self-assigned this Aug 6, 2025
@Sahil2004 Sahil2004 marked this pull request as ready for review August 7, 2025 10:17
@Sahil2004 Sahil2004 requested a review from coodos as a code owner August 7, 2025 10:17
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 (3)
platforms/pictique/src/lib/stores/disclaimer.ts (1)

3-3: Consider user experience with modal persistence.

The modal opens on every page load since isDisclaimerModalOpen defaults to true without persistence. Consider if users should see this disclaimer repeatedly or if acknowledgment should be remembered.

If you want to remember user acknowledgment, consider using localStorage:

-export const isDisclaimerModalOpen = writable(true);
+export const isDisclaimerModalOpen = writable(
+  typeof window !== 'undefined' 
+    ? !localStorage.getItem('disclaimer-acknowledged') 
+    : true
+);

And update the close function:

-export const closeDisclaimerModal = () => isDisclaimerModalOpen.set(false);
+export const closeDisclaimerModal = () => {
+  if (typeof window !== 'undefined') {
+    localStorage.setItem('disclaimer-acknowledged', 'true');
+  }
+  isDisclaimerModalOpen.set(false);
+};
platforms/pictique/src/routes/(protected)/+layout.svelte (1)

182-225: Well-implemented disclaimer modal with proper security handling.

The modal implementation correctly:

  • Forces user acknowledgment before access
  • Removes authentication tokens and redirects if closed without confirmation
  • Provides clear disclaimer content about prototype nature
  • Includes contact information for feedback

Consider adding a loading state or animation when the user clicks "I Understand" to provide visual feedback:

<Button
    variant="secondary"
    size="sm"
    class="mt-2"
+   disabled={isProcessing}
    callback={() => {
+       isProcessing = true;
        closeDisclaimerModal();
        confirmedDisclaimer = true;
+       isProcessing = false;
    }}>I Understand</Button>
platforms/pictique/src/routes/(auth)/auth/+page.svelte (1)

80-85: Consider simplifying technical language for better user experience.

The explanation about W3DS architecture is quite technical. Consider making it more user-friendly or adding a "Learn More" link to detailed documentation.

-You are entering Pictique - a social network built on the Web 3.0 Data Space (W3DS)
-architecture. This system is designed around the principle of data-platform separation,
-where all your personal content is stored in your own sovereign eVault, not on
-centralised servers.
+You are entering Pictique - a social network where you own and control your data.
+Your content is stored in your personal eVault, giving you full sovereignty over your information.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f03f10d and ff18b6b.

⛔ Files ignored due to path filters (2)
  • platforms/blabsy/public/assets/w3dslogo.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • platforms/blabsy/src/components/layout/common-layout.tsx (1 hunks)
  • platforms/blabsy/src/components/login/login-main.tsx (2 hunks)
  • platforms/blabsy/src/lib/context/auth-context.tsx (0 hunks)
  • platforms/pictique/package.json (1 hunks)
  • platforms/pictique/src/declaration.d.ts (1 hunks)
  • platforms/pictique/src/lib/icons/W3dslogo.svelte (1 hunks)
  • platforms/pictique/src/lib/icons/index.ts (1 hunks)
  • platforms/pictique/src/lib/stores/disclaimer.ts (1 hunks)
  • platforms/pictique/src/routes/(auth)/auth/+page.svelte (2 hunks)
  • platforms/pictique/src/routes/(protected)/+layout.svelte (5 hunks)
💤 Files with no reviewable changes (1)
  • platforms/blabsy/src/lib/context/auth-context.tsx
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: the project uses svelte 5, which uses the new "runes" api including $props() for handling component ...
Learnt from: pixel-punk-20
PR: MetaState-Prototype-Project/prototype#121
File: platforms/metagram/src/stories/Button.svelte:0-0
Timestamp: 2025-05-08T09:02:43.311Z
Learning: The project uses Svelte 5, which uses the new "runes" API including $props() for handling component props instead of the export let syntax from Svelte 3/4.

Applied to files:

  • platforms/pictique/package.json
  • platforms/pictique/src/lib/icons/index.ts
  • platforms/pictique/src/declaration.d.ts
📚 Learning: the project uses svelte 5, which introduces the new "runes" api including $props() for handling comp...
Learnt from: pixel-punk-20
PR: MetaState-Prototype-Project/prototype#121
File: platforms/metagram/src/stories/Button.svelte:0-0
Timestamp: 2025-05-08T09:02:43.311Z
Learning: The project uses Svelte 5, which introduces the new "runes" API including $props() for handling component props instead of the export let syntax from Svelte 3/4.

Applied to files:

  • platforms/pictique/package.json
  • platforms/pictique/src/lib/icons/index.ts
🔇 Additional comments (16)
platforms/pictique/package.json (1)

59-59: Security and necessity verification required for svelte-qrcode-action

Before approving, please ensure:

  • Distinct functionality: confirm you need both packages—svelte-qrcode is a component, while svelte-qrcode-action is an “action” API for direct DOM use.
  • No known vulnerabilities: run locally
    npm i --package-lock-only  
    npm audit --json | jq '.vulnerabilities'
    to verify no advisories are reported for svelte-qrcode-action@^1.0.2.
  • Actual usage: search your codebase for imports or directives referencing svelte-qrcode-action; remove the dependency if it isn’t being consumed.
platforms/pictique/src/lib/icons/index.ts (1)

1-13: LGTM! Consistent quote style and new logo export.

The standardization to double quotes improves consistency, and the new W3dslogo export aligns with the branding enhancements mentioned in the PR objectives.

platforms/pictique/src/lib/stores/disclaimer.ts (1)

5-5: LGTM! Clean store implementation.

The function correctly updates the store state to close the modal.

platforms/pictique/src/declaration.d.ts (1)

1-7: LGTM! Improved readability through formatting.

The multi-line format and consistent quote style improve code readability while maintaining the same type declarations.

platforms/blabsy/src/components/login/login-main.tsx (2)

6-6: LGTM! Proper Next.js Image import.

Using Next.js Image component is the recommended approach for optimized image loading.


89-97: LGTM! Informative content enhances user understanding.

The descriptive text effectively explains the W3DS architecture and data sovereignty principles to users, improving transparency about the platform's design.

platforms/pictique/src/lib/icons/W3dslogo.svelte (1)

1-21: Clean SVG logo implementation.

The W3DS logo component is well-structured with proper SVG syntax, appropriate clipping paths, and consistent styling. The static approach is suitable for a branding element.

platforms/pictique/src/routes/(protected)/+layout.svelte (2)

8-8: Good store-based state management for disclaimer modal.

The import of disclaimer store functions provides clean separation of concerns for modal state management.


28-28: Proper reactive state tracking for user confirmation.

The confirmedDisclaimer state variable correctly tracks whether the user has acknowledged the disclaimer, preventing repeated modal displays.

platforms/blabsy/src/components/layout/common-layout.tsx (3)

15-16: Proper authentication integration.

Good use of authentication hooks to ensure user is authenticated and provide access to signOut functionality.


18-18: Appropriate React state management for disclaimer acceptance.

Using useState for tracking disclaimer acceptance is the right approach for this React component.


21-77: Excellent cross-platform consistency in disclaimer implementation.

The modal implementation mirrors the Svelte version perfectly, providing:

  • Consistent user experience across Blabsy and Pictique platforms
  • Same disclaimer content and structure
  • Identical security behavior (signOut on close without acceptance)
  • Clear visual styling and messaging

This consistency helps maintain a unified user experience across the MetaState ecosystem.

platforms/pictique/src/routes/(auth)/auth/+page.svelte (4)

4-4: Good integration of new UI components.

The imports for the W3DS logo and QR code action properly integrate the new branding and functionality enhancements.

Also applies to: 8-8


42-45: Improved visual hierarchy with header section.

The addition of the logo and tagline creates better visual branding and user orientation on the login page.


87-87: Good branding consistency with W3DS logo placement.

The logo placement at the bottom reinforces the W3DS branding and creates visual consistency across the platform.


50-74: Verify QR code readability with gradient background

We’ve confirmed you’re using svelte-qrcode-action v1.0.2 (a small Svelte wrapper around styled-qr-code, last published a year ago). Gradient fills can reduce scan reliability under certain conditions.

• Test the generated QR code on multiple devices and lighting scenarios to ensure it remains easily detectable.
• If you notice scan failures:
– Provide a solid-color fallback (e.g. plain white or dark background).
– Or expose a prop to switch off gradients for environments with low contrast.
• Verify that the package’s dependency (styled-qr-code) supports these options or consider adding a post-render canvas overlay to boost contrast.

Comment on lines +80 to +87
<div className='absolute right-0 rotate-90 top-1/2'>
<Image
src='/assets/w3dslogo.svg'
alt='W3DS logo'
width={100}
height={20}
/>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify absolute positioning context and asset availability.

The absolute positioning may not work as expected without a positioned parent container. Also ensure the logo asset exists at the specified path.


🏁 Script executed:

#!/bin/bash
# Description: Check if the W3DS logo asset exists and verify positioning context

# Check if the logo file exists in the public assets directory
fd -t f "w3dslogo.svg" platforms/blabsy/public

# Look for any positioned parent containers in the component
rg -A 10 -B 5 "position.*relative|position.*absolute" platforms/blabsy/src/components/login/login-main.tsx

Length of output: 199


Ensure correct positioning context and verify asset path

  • Asset Verification: Confirmed that platforms/blabsy/public/assets/w3dslogo.svg exists, so using src="/assets/w3dslogo.svg" is valid.
  • Positioning Context: There’s no ancestor in login-main.tsx with a positioning context (e.g., relative). Without it, the .absolute wrapper will be positioned against the viewport.
    • Add className="relative" (or equivalent CSS) to the nearest container around lines 80–87 to scope the absolute positioning.
🤖 Prompt for AI Agents
In platforms/blabsy/src/components/login/login-main.tsx around lines 80 to 87,
the div with class 'absolute' lacks a positioned ancestor, causing it to be
positioned relative to the viewport. To fix this, add className="relative" to
the nearest container element wrapping this div to establish a positioning
context, ensuring the absolute positioning is scoped correctly. The asset path
is correct and requires no change.

@coodos coodos merged commit 04da1d3 into main Aug 7, 2025
1 of 3 checks passed
@coodos coodos deleted the feat/disclaimer branch August 7, 2025 18:17
@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.

[feature] Disclaimers in metastate.
2 participants