Skip to content

Conversation

@grv-saini-20
Copy link
Collaborator

@grv-saini-20 grv-saini-20 commented Jan 5, 2026

Description of change

Login drawers in eid wallet are converted into simple components.

Issue Number

close #427

Type of change

  • Update (a change which updates existing functionality)
  • 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

Release Notes

  • Bug Fixes

    • Fixed scan cancellation cleanup to ensure proper resource cleanup on navigation.
  • Refactor

    • Improved modal layouts and accessibility across authentication, signing, and voting flows with enhanced dialog semantics.
    • Reorganized information presentation in modals with clearer visual hierarchy and better structured content display.
    • Enhanced styling consistency for modal overlays and error states.

✏️ Tip: You can customize this high-level summary in your review settings.

@grv-saini-20 grv-saini-20 self-assigned this Jan 5, 2026
@grv-saini-20 grv-saini-20 requested a review from coodos as a code owner January 5, 2026 09:15
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Warning

Rate limit exceeded

@grv-saini-20 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ff1db0e and 8ef230d.

📒 Files selected for processing (1)
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
📝 Walkthrough

Walkthrough

Converts multiple Drawer-based modals in the scan-QR page to inline full-screen fixed panels with improved styling and accessibility. Updates scan lifecycle management with proper cleanup functions. Adds global body background styling and removes redundant teardown logic. Minor configuration cleanup across the codebase.

Changes

Cohort / File(s) Change Summary
Scan-QR Modal Refactoring
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/AuthDrawer.svelte, LoggedInDrawer.svelte, RevealDrawer.svelte, SigningDrawer.svelte
Systematically replaced Drawer wrappers with manual, conditionally rendered fixed panels driven by internalOpen. Reorganized UI structures with improved semantic markup (dialog roles, aria-modal attributes), enhanced visual hierarchy (headers, tables, cards), and refined action button states. Updated button logic to reflect modal-based progression (Decline/Confirm, Cancel/Reveal/Okay patterns).
Scan Page Lifecycle & Styling
infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte, package.json
Consolidated scan lifecycle management by moving cancelScan() into onMount's cleanup function and removing redundant onDestroy block. Added global style override setting body background to white when logged-in drawer is present. Updated package dependencies (+7/-4).
Configuration & Maintenance
platforms/group-charter-manager/next-env.d.ts, platforms/pictique/src/routes/(protected)/group/[id]/+page.svelte
Removed ambient TypeScript reference directives and editorial comments from Next.js config file. Adjusted whitespace in conditional expressions within chat message grouping logic in Pictique platform.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

Suggested labels

evault-refactor

Suggested reviewers

  • coodos
  • sosweetham

Poem

🐰 Drawers become pages, bright and new,
Fixed panels dance where modals flew,
Dialogs speak with aria-grace,
Cleanup functions find their place,
White backgrounds embrace the scan,
Full-screen dreams per the master plan!

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR contains a minor out-of-scope change: removal of TypeScript reference directives from next-env.d.ts is unrelated to the drawer-to-component migration objective and appears to be a tangential cleanup. Either remove the next-env.d.ts changes from this PR or document why the TypeScript reference removal is necessary as part of the drawer refactoring.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix/drawers-replaced-with-component' directly reflects the main change: drawer-based UI components were replaced with inline component implementations, which is the core objective of this PR.
Description check ✅ Passed The description follows the template structure with all required sections completed: issue number (#427), type of change (Update, Fix), testing method (Manual), and all checklist items marked complete.
Linked Issues check ✅ Passed The changes fully meet the objective from issue #427: replace drawer popups with full blocking pages. AuthDrawer, LoggedInDrawer, RevealDrawer, and SigningDrawer were converted from Drawer-based overlays to fixed full-screen modal panels, achieving the desired blocking page UX.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

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

Fix all issues with AI Agents 🤖
In @infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte:
- Around line 90-92: Remove the async onDestroy block and instead invoke
cancelScan() from the existing onMount cleanup function (the function returned
in the onMount block around the current lines 84–87); locate the onDestroy call
and delete it, then add a call to cancelScan() inside the onMount return cleanup
so cleanup is centralized (call cancelScan() directly from the cleanup function
and do not rely on an awaited async onDestroy callback).
🧹 Nitpick comments (3)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/AuthDrawer.svelte (1)

6-13: Consider migrating to Svelte 5 $props() rune for consistency.

The parent page (+page.svelte) uses Svelte 5 runes like $effect(), but this component still uses legacy export let syntax. While backward compatible, using $props() would be more consistent with the codebase direction.

🔎 Proposed refactor using Svelte 5 $props()
-    export let platform: string | null | undefined;
-    export let hostname: string | null | undefined;
-    export let scannedContent: string | undefined;
-    export let isSigningRequest: boolean;
-    export let authError: string | null | undefined;
-    export let authLoading: boolean | undefined;
-    export let onConfirm: () => void;
-    export let onDecline: () => void;
+    let {
+        platform,
+        hostname,
+        scannedContent,
+        isSigningRequest,
+        authError,
+        authLoading = false,
+        onConfirm,
+        onDecline,
+    }: {
+        platform: string | null | undefined;
+        hostname: string | null | undefined;
+        scannedContent: string | undefined;
+        isSigningRequest: boolean;
+        authError: string | null | undefined;
+        authLoading: boolean;
+        onConfirm: () => void;
+        onDecline: () => void;
+    } = $props();
infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte (2)

94-99: Consider removing or guarding debug logging.

This $effect logs every change to selectedBlindVoteOption. Debug logging should typically be removed before release or wrapped in a development-mode check.

🔎 Suggested guard
     $effect(() => {
+        if (import.meta.env.DEV) {
             console.log(
                 "🔍 DEBUG: selectedBlindVoteOption changed to:",
                 $selectedBlindVoteOption,
             );
+        }
     });

113-115: handleAuthDrawerOpenChange appears unused.

This function is defined but never passed to AuthDrawer in the template (lines 192-201). The refactored AuthDrawer component no longer accepts onOpenChange as noted in the AI summary. Consider removing this dead code.

🔎 Proposed removal
-    function handleAuthDrawerOpenChange(value: boolean) {
-        setCodeScannedDrawerOpen(value);
-    }
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db6ea53 and 2b9497f.

📒 Files selected for processing (2)
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/AuthDrawer.svelte
⏰ 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). (2)
  • GitHub Check: build
  • GitHub Check: lint
🔇 Additional comments (7)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/AuthDrawer.svelte (3)

16-38: LGTM!

The container structure, icon integration, and header text are well-organized. The decorative diagonal lines create a nice visual effect for the QR code icon.


40-76: LGTM!

Good use of fallback values for platform name and URL display. The break-all class on the URL ensures long URLs don't break the layout. Error display is well-structured with appropriate visual hierarchy.


78-114: LGTM!

Button logic correctly handles both error and normal states. The loading state properly disables interaction and provides clear feedback. The conditional helper text for non-signing requests is a good UX touch.

infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte (4)

2-66: LGTM!

Imports are well-organized, context retrieval follows standard patterns, and the destructuring of stores and actions provides clean access to the scan logic API.


117-158: LGTM!

Handler implementations are consistent:

  • handleLoggedInDrawerConfirm properly sequences navigation before restarting scan.
  • handleSigningDrawerDecline mirrors the auth decline pattern with error branching.
  • handleSigningDrawerOpenChange appropriately restarts scanning when the drawer closes without success.

161-186: LGTM!

The viewfinder SVG and instruction text provide clear visual guidance for the QR scanning interaction.


188-203: Approve with accessibility consideration.

The fixed overlay approach works, but unlike the other drawers that use onOpenChange, this overlay has no escape key handler or backdrop click-to-dismiss functionality. Users must interact with the buttons to close it. If this is intentional for this flow, it's fine, but consider adding keyboard accessibility (e.g., Escape key to trigger decline) for users who expect standard modal behavior.

Verify if the escape key behavior should be added for consistency with standard modal/drawer UX patterns.

@grv-saini-20 grv-saini-20 marked this pull request as draft January 5, 2026 09:52
@grv-saini-20 grv-saini-20 marked this pull request as ready for review January 8, 2026 05:39
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

🤖 Fix all issues with AI agents
In
@infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte:
- Around line 51-52: The LoggedInDrawer.svelte view renders the platform prop
directly but platform is typed as string | null | undefined; update the
rendering logic around the <p> that uses platform (the "You're now connected to
{platform}" text) to provide a safe fallback when platform is null/undefined
(e.g., use a default label like "an unknown platform" or "your platform") or
conditionally render the whole sentence only when platform is truthy; adjust the
expression that references platform accordingly so the UI never shows a trailing
empty phrase.
🧹 Nitpick comments (3)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte (1)

226-235: Consider using Button.Action for consistency.

The blind vote submit button uses a native <button> element with custom Tailwind classes, while other actions in this component use Button.Action. This creates visual and behavioral inconsistency.

Suggested consistency fix
-                    <button
-                        onclick={onSubmitBlindVote}
-                        disabled={selectedBlindVoteOption === null ||
-                            isSubmittingBlindVote}
-                        class="w-full bg-blue-600 text-white py-3 rounded-xl font-bold disabled:bg-gray-300 transition-colors"
-                    >
-                        {isSubmittingBlindVote
-                            ? "Submitting..."
-                            : "Submit Blind Vote"}
-                    </button>
+                    <Button.Action
+                        variant="solid"
+                        class="w-full"
+                        callback={onSubmitBlindVote}
+                        disabled={selectedBlindVoteOption === null ||
+                            isSubmittingBlindVote}
+                    >
+                        {isSubmittingBlindVote
+                            ? "Submitting..."
+                            : "Submit Blind Vote"}
+                    </Button.Action>
infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte (2)

5-5: Remove unused onDestroy import.

The onDestroy lifecycle hook is imported but no longer used in this file, as the cleanup logic has been moved into the onMount teardown function.

Suggested fix
-import { getContext, onDestroy, onMount } from "svelte";
+import { getContext, onMount } from "svelte";

91-96: Remove debug logging before merging.

This $effect block appears to be debug logging that should be removed before production.

Suggested fix
-$effect(() => {
-    console.log(
-        "🔍 DEBUG: selectedBlindVoteOption changed to:",
-        $selectedBlindVoteOption,
-    );
-});
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b9497f and f381c72.

📒 Files selected for processing (5)
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/AuthDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/RevealDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-05T11:46:43.214Z
Learnt from: Bekiboo
Repo: MetaState-Prototype-Project/prototype PR: 653
File: platforms/pictique/src/routes/(auth)/auth/+page.svelte:173-173
Timestamp: 2026-01-05T11:46:43.214Z
Learning: In Tailwind CSS v4, gradient utilities were renamed from bg-gradient-to-{direction} to bg-linear-to-{direction}. For all Svelte components (e.g., any .svelte files in the project), replace usages like bg-gradient-to-r, bg-gradient-to-l, etc. with bg-linear-to-r, bg-linear-to-l, etc. Ensure consistency across the codebase, update any documentation or design tokens, and run visual/test checks to confirm gradients render as intended.

Applied to files:

  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/RevealDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/AuthDrawer.svelte
🔇 Additional comments (6)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte (1)

25-76: Clean implementation of the full-page modal pattern.

The component correctly replaces the Drawer wrapper with a fixed, full-screen overlay. The internal state synchronization pattern is consistent with other components in this PR, and the structure aligns well with the PR objectives of preventing the camera from remaining visible.

infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/AuthDrawer.svelte (1)

30-174: Well-structured modal with proper state handling.

The component correctly implements the full-page modal pattern with:

  • Proper fallbacks for platform and hostname
  • Clear error state display with styled error panel
  • Conditional button rendering based on authError state
  • Appropriate disabled states tied to authLoading

The explicit isSigningRequest === false check on line 162 correctly distinguishes between false and undefined/null.

infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte (1)

40-268: Complex but well-organized modal with multiple states.

The component handles multiple scenarios (signing success, blind voting, regular signing) with clear conditional rendering. The state synchronization pattern is consistent with other drawer components in this PR.

infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte (2)

84-88: Good addition of cancelScan() to cleanup.

Adding cancelScan() to the teardown function ensures the media stream is properly stopped when navigating away, addressing the issue where the camera remained visible/frozen in the background.


224-228: Verify :has() selector browser support for your target audience.

The :has() CSS pseudo-class is used here to apply a global body background when the logged-in drawer is present. Browser support is now comprehensive: Chrome/Edge (M105+), Safari (15.4+), and Firefox (121+) all support it. If your target audience uses older browsers, consider a fallback approach.

infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/RevealDrawer.svelte (1)

30-176: Clean implementation matching the unified modal pattern.

The component follows the same structure as other drawer components in this PR:

  • Consistent state synchronization pattern
  • Proper conditional rendering for success vs. request states
  • Good fallback handling for revealPollId
  • Action buttons correctly reflect the current state

The success state properly guards against null revealedVoteData before accessing its properties.

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)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte (1)

12-22: Consider simplifying the reactive statement pattern.

The current approach with lastReportedOpen tracking works correctly, but could be simplified. The pattern is functional and safe, so this is an optional improvement.

♻️ Alternative approach using a single reactive statement
-    let internalOpen = isOpen;
-    let lastReportedOpen = internalOpen;
+    let internalOpen = isOpen;

-    $: if (isOpen !== internalOpen) {
-        internalOpen = isOpen;
-    }
-
-    $: if (internalOpen !== lastReportedOpen) {
-        lastReportedOpen = internalOpen;
-        onOpenChange?.(internalOpen);
-    }
+    $: {
+        if (isOpen !== internalOpen) {
+            internalOpen = isOpen;
+        }
+    }
+    
+    $: onOpenChange?.(internalOpen);

Note: This assumes onOpenChange is idempotent. If not, the current pattern is safer.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f381c72 and b0cfe7b.

📒 Files selected for processing (1)
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-05T11:46:43.214Z
Learnt from: Bekiboo
Repo: MetaState-Prototype-Project/prototype PR: 653
File: platforms/pictique/src/routes/(auth)/auth/+page.svelte:173-173
Timestamp: 2026-01-05T11:46:43.214Z
Learning: In Tailwind CSS v4, gradient utilities were renamed from bg-gradient-to-{direction} to bg-linear-to-{direction}. For all Svelte components (e.g., any .svelte files in the project), replace usages like bg-gradient-to-r, bg-gradient-to-l, etc. with bg-linear-to-r, bg-linear-to-l, etc. Ensure consistency across the codebase, update any documentation or design tokens, and run visual/test checks to confirm gradients render as intended.

Applied to files:

  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
⏰ 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). (2)
  • GitHub Check: build
  • GitHub Check: lint
🔇 Additional comments (2)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte (2)

2-10: LGTM! Props and imports are well-structured.

The component props are properly typed and the imports are appropriate for the new full-page modal approach.


25-28: Body scroll lock is properly implemented. The scroll prevention is applied via the custom-global-style class on the <body> element in the app layout (+layout.svelte), which applies overflow-y: hidden whenever the page is on the scan-qr route. This approach prevents background scrolling for all modal drawers on this page, including LoggedInDrawer.

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: 3

Caution

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

⚠️ Outside diff range comments (1)
platforms/pictique/src/routes/(protected)/messages/+page.svelte (1)

189-199: Bug: Group name only includes first member, not all selected members.

The filter condition m.id === selectedMembers[0] only matches the first selected member. For a group chat with multiple members, groupMembers will contain at most one element, resulting in an incorrect group name.

🐛 Proposed fix
			} else {
				// Create group chat
-				const groupMembers = allMembers.filter((m) => m.id === selectedMembers[0]);
+				const groupMembers = allMembers.filter((m) => selectedMembers.includes(m.id));
				const groupName = groupMembers.map((m) => m.name ?? m.handle ?? m.ename).join(', ');

				// Create group chat via API
				await apiClient.post('/api/chats', {
					name: groupName,
					participantIds: selectedMembers,
					isGroup: true
				});
			}
🤖 Fix all issues with AI agents
In @platforms/pictique/src/routes/(protected)/messages/+page.svelte:
- Around line 569-587: The button variants are reversed: in the group creation
footer the Cancel Button uses variant="primary" and the Create Group Button uses
variant="secondary"; update the Button props so Cancel uses the secondary
variant and Create Group uses the primary variant (the Create Group button is
the one invoking createGroup(), disabled when selectedMembers.length === 0 ||
!groupName.trim(), and the Cancel button closes the modal by setting
openNewGroupModal = false) to match the New Chat Modal and standard UX.
- Line 276: The unread prop is being passed inverted (unread={!message.unread})
so the component receives the opposite of the message state; change the prop to
unread={message.unread} wherever it is passed (the prop named unread and the
message object with field message.unread) so the component shows the unread
indicator when message.unread is true.
🧹 Nitpick comments (7)
platforms/pictique/src/routes/(protected)/messages/+page.svelte (6)

7-7: Unused import: clickOutside.

The clickOutside utility is imported but not used anywhere in this component. Consider removing it to keep the imports clean, or apply it to the modals for better UX (closing on outside click).


45-45: Remove debug console.log statement.

Debug logging should be removed before merging to production.

🧹 Proposed fix
-			console.log('Raw chat data from API:', data.chats);

42-43: Duplicate API call to /api/users.

This endpoint is called here and again in onMount (line 111). Consider fetching user data once and passing it as a parameter, or caching the result to avoid redundant network requests.


238-241: Consider removing redundant navigation.

Since this component is already at /messages, calling goto('/messages') before loadMessages may be unnecessary. If the intent is to refresh the list, just calling loadMessages(1, false) should suffice. If the page needs a full reload, consider using invalidateAll() instead.

♻️ Proposed simplification
			// Navigate to messages and refresh the feed
-			goto('/messages');
			// Refresh the messages to show the newly created group
			await loadMessages(1, false);

365-368: Unnecessary return; statement.

The return; after toggleMemberSelection(member.id) serves no purpose. This pattern also appears at lines 506-509.

🧹 Proposed cleanup
								onchange={(e: Event) => {
									toggleMemberSelection(member.id);
-									return;
								}}

312-318: Consider improving modal accessibility.

The modals lack keyboard handling (Escape to close) and focus trapping. For better accessibility:

  1. Add onkeydown handler to close on Escape key
  2. Consider using the imported clickOutside action to close on backdrop click
  3. Trap focus within the modal while open
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte (1)

33-49: Consider a more maintainable icon decoration approach.

The rotated white bars create a nice visual effect, but the implementation relies on hardcoded dimensions (w-[200px], h-[16px]) and magic numbers that could break if the container size changes. For better maintainability, consider using an SVG mask or a custom icon component.

Alternative approach using CSS clip-path
                 <div
-                    class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
+                    class="flex justify-center mb-4 relative items-center bg-gray rounded-xl p-4 h-[72px] w-[72px] [clip-path:polygon(0_20%,100%_0,100%_80%,0_100%)]"
                 >
-                    <div
-                        class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"
-                    ></div>
-                    <div
-                        class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
-                    ></div>
                     <HugeiconsIcon
                         size={40}
-                        className="z-10"
                         icon={QrCodeIcon}
                         strokeWidth={1.5}
                         color="var(--color-primary)"
                     />
                 </div>
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b0cfe7b and 99498f7.

📒 Files selected for processing (3)
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • platforms/pictique/src/routes/(protected)/group/[id]/+page.svelte
  • platforms/pictique/src/routes/(protected)/messages/+page.svelte
✅ Files skipped from review due to trivial changes (1)
  • platforms/pictique/src/routes/(protected)/group/[id]/+page.svelte
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-05T11:46:43.214Z
Learnt from: Bekiboo
Repo: MetaState-Prototype-Project/prototype PR: 653
File: platforms/pictique/src/routes/(auth)/auth/+page.svelte:173-173
Timestamp: 2026-01-05T11:46:43.214Z
Learning: In Tailwind CSS v4, gradient utilities were renamed from bg-gradient-to-{direction} to bg-linear-to-{direction}. For all Svelte components (e.g., any .svelte files in the project), replace usages like bg-gradient-to-r, bg-gradient-to-l, etc. with bg-linear-to-r, bg-linear-to-l, etc. Ensure consistency across the codebase, update any documentation or design tokens, and run visual/test checks to confirm gradients render as intended.

Applied to files:

  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • platforms/pictique/src/routes/(protected)/messages/+page.svelte
⏰ 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). (2)
  • GitHub Check: lint
  • GitHub Check: build
🔇 Additional comments (5)
platforms/pictique/src/routes/(protected)/messages/+page.svelte (2)

95-104: LGTM!

The pagination guard logic correctly prevents duplicate requests and handles the loading state properly.


165-177: LGTM!

The debounced search implementation correctly clears results when input is empty and waits 300ms before triggering the search.

infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte (3)

12-22: LGTM: Reactive state management pattern is sound.

The two-way binding pattern with internalOpen and lastReportedOpen correctly prevents infinite reactive loops while synchronizing external and internal state. The optional chaining on onOpenChange?.(internalOpen) is good defensive programming.


51-64: Content and messaging are clear.

The heading, connection confirmation, and conditional redirect message effectively communicate the login status. The fallback text "the platform" (line 53) is acceptable, though you might consider a slightly more specific fallback like "this service" if platform is ever unexpectedly null.


67-75: LGTM: Action button is properly implemented.

The button is correctly positioned, uses the appropriate variant, and properly wires the onConfirm callback. The simple "Ok" label is clear and appropriate for this confirmation dialog.

@grv-saini-20 grv-saini-20 force-pushed the fix/drawers-replaced-with-component branch from 99498f7 to ed19c8e Compare January 8, 2026 06:07
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: 4

🤖 Fix all issues with AI agents
In
@infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte:
- Line 52: Replace the invalid Tailwind class on the paragraph in the
LoggedInDrawer.svelte component: change the <p> with class "text-black-700" to
use a valid utility such as "text-black" or a gray shade like "text-gray-700"
depending on the intended color; update the class on the <p> element in
LoggedInDrawer.svelte accordingly.

In
@infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte:
- Line 93: Replace the invalid Tailwind utility `text-black-700` in the
SigningDrawer.svelte component with a valid class such as `text-gray-700` (or
`text-gray-900` if you need darker text); update every occurrence of
`text-black-700` in SigningDrawer.svelte to the chosen valid Tailwind class so
the styles compile correctly.
- Around line 48-50: In SigningDrawer.svelte, update the conditional class
string that uses showSigningSuccess to replace the invalid Tailwind utility
'bg-gray' with a valid shade like 'bg-gray-100' so the ternary becomes
'bg-green-100' when showSigningSuccess is true and 'bg-gray-100' when false;
locate the class attribute on the element containing "flex justify-center mb-4
relative items-center overflow-hidden {showSigningSuccess ? 'bg-green-100' :
'bg-gray'} rounded-xl p-4 h-[72px] w-[72px]" and change the fallback value to
'bg-gray-100'.

In @platforms/group-charter-manager/next-env.d.ts:
- Line 3: This auto-generated Next.js file is tracked but should be ignored;
remove it from version control using git rm --cached <file> (e.g., git rm
--cached platforms/group-charter-manager/next-env.d.ts), commit the change, and
ensure the file (and the .next/ directory) remain listed in .gitignore so it
stays untracked going forward.
🧹 Nitpick comments (2)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte (1)

25-78: Consider adding accessibility features for the modal overlay.

The blocking modal overlay successfully replaces the drawer per PR objectives, but lacks standard accessibility features:

  1. ARIA attributes: Add role="dialog" and aria-modal="true" to the outer div, plus aria-labelledby referencing the heading
  2. Focus management: Trap focus within the modal and set initial focus to a logical element (e.g., the "Ok" button or close control)
  3. Keyboard navigation: Handle the Escape key to close the modal (via onOpenChange(false))
  4. Screen reader announcements: Ensure the title is properly associated with the dialog

These improvements would align with WCAG 2.1 guidelines for modal dialogs.

Example accessibility enhancements
 {#if internalOpen}
     <div
-        class="loggedin-drawer fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
+        class="loggedin-drawer fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
+        role="dialog"
+        aria-modal="true"
+        aria-labelledby="dialog-title"
+        onkeydown={(e) => { if (e.key === 'Escape') onOpenChange(false); }}
     >
         <div
             class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
         >
             <div class="flex flex-col items-start pt-2">
                 <!-- QR icon section -->
                 
-                <h4 class="text-xl font-bold">You're logged in!</h4>
+                <h4 id="dialog-title" class="text-xl font-bold">You're logged in!</h4>

Consider using a Svelte action or library like svelte-focus-trap for proper focus management.

infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte (1)

41-269: Consider adding accessibility features for this complex modal.

This modal contains form controls and multiple interactive states, making accessibility even more critical than in LoggedInDrawer. Consider adding:

  1. ARIA attributes: role="dialog", aria-modal="true", aria-labelledby referencing the heading, and aria-describedby for the description text
  2. Focus management: Trap focus within the modal, set initial focus appropriately (to first interactive element or to error messages when present)
  3. Keyboard navigation: Handle Escape key to decline/close
  4. Radio button group: Add aria-label or <legend> to the fieldset for screen reader context
  5. Loading states: Consider aria-live announcements for async operations ("Submitting...", "Signing...")
  6. Error announcements: Use aria-live="polite" on error containers to announce errors to screen readers
Example accessibility enhancements
 {#if internalOpen}
-    <div class="fixed inset-0 z-50 bg-white p-4 overflow-y-auto">
+    <div 
+        class="fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
+        role="dialog"
+        aria-modal="true"
+        aria-labelledby="signing-dialog-title"
+        aria-describedby="signing-dialog-description"
+        onkeydown={(e) => { if (e.key === 'Escape' && !showSigningSuccess) onDecline(); }}
+    >
         <!-- content -->
-                <h4
+                <h4
+                    id="signing-dialog-title"
                     class="text-xl font-bold {showSigningSuccess
                         ? 'text-green-800'
                         : ''}"
                 >
-                <p class="text-black-700 mt-1">
+                <p id="signing-dialog-description" class="text-gray-700 mt-1">

-                        <fieldset class="space-y-2">
+                        <fieldset class="space-y-2" aria-label="Select your vote option">

Consider using a focus trap library or Svelte action for comprehensive focus management.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 99498f7 and 8424270.

📒 Files selected for processing (3)
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
  • platforms/group-charter-manager/next-env.d.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-05T11:46:43.214Z
Learnt from: Bekiboo
Repo: MetaState-Prototype-Project/prototype PR: 653
File: platforms/pictique/src/routes/(auth)/auth/+page.svelte:173-173
Timestamp: 2026-01-05T11:46:43.214Z
Learning: In Tailwind CSS v4, gradient utilities were renamed from bg-gradient-to-{direction} to bg-linear-to-{direction}. For all Svelte components (e.g., any .svelte files in the project), replace usages like bg-gradient-to-r, bg-gradient-to-l, etc. with bg-linear-to-r, bg-linear-to-l, etc. Ensure consistency across the codebase, update any documentation or design tokens, and run visual/test checks to confirm gradients render as intended.

Applied to files:

  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
⏰ 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). (2)
  • GitHub Check: lint
  • GitHub Check: build
🔇 Additional comments (7)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte (2)

2-10: LGTM! Clean component API.

The imports are well-organized, and the exported props provide a clear, type-safe interface for the component.


12-22: LGTM! State synchronization logic is sound.

The bidirectional sync pattern correctly handles external prop changes and notifies parent components via onOpenChange. The lastReportedOpen guard prevents redundant callbacks.

infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte (5)

2-21: LGTM! Well-structured component interface.

The imports are clean, and the extensive prop API provides fine-grained control over the signing flow with proper TypeScript types.


23-38: LGTM! State management is correctly implemented.

The synchronization pattern matches LoggedInDrawer and properly handles bidirectional state updates. The hasPollDetails computed property provides a clean way to check for poll-related data.


73-172: LGTM! Complex conditional rendering is well-structured.

The title logic correctly handles all combinations of success/request states and voting types. The table structure with conditional rows properly displays relevant signing data based on the request type, with appropriate optional chaining to prevent errors.


174-208: LGTM! Radio button form controls are correctly implemented.

The blind voting UI properly implements controlled radio buttons with Svelte 5 syntax, includes error messaging, and maintains accessible form structure with semantic fieldset grouping.


219-266: LGTM! Button state management handles all signing flow states correctly.

The conditional button rendering properly handles success, blind voting, and signing states with appropriate loading indicators and disabled states. The logic correctly prevents submission when no option is selected or when already processing.

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: 4

🤖 Fix all issues with AI agents
In @infrastructure/control-panel/src/lib/ui/Table/Table.svelte:
- Line 377: The snippet parameter lost its explicit typing—change the BodyCell
snippet signature back to use a properly parameterized Record so type safety is
preserved (e.g., BodyCell(data: Record<string, TableCell>, field: string, i:
number)); update the snippet declaration that currently uses BodyCell(data:
Record, ...) to the explicit Record<string, TableCell> (or the exact generic
types used by your TableCell definition) so TypeScript enforces the expected
cell shape.

In
@infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte:
- Around line 25-78: The modal lacks accessibility: when internalOpen is true,
add role="dialog" and aria-modal="true" to the overlay container, give the
heading element (h4 "You're logged in!") a unique id and set aria-labelledby on
the dialog to that id, implement an Escape key handler (e.g., svelte:window
on:keydown or container on:keydown) that calls the existing onConfirm or close
handler to dismiss the drawer, and add a focus trap so Tab cycles within the
modal and set initial focus to the Ok Button.Action (callback={onConfirm}) when
opened and restore focus when closed (use svelte-focus-trap or manual focus
management).

In
@infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte:
- Around line 173-207: The fieldset in SigningDrawer.svelte wrapping the radio
group lacks a semantic legend; move or duplicate the visible "Select Option"
text into a <legend> inside the fieldset (keeping the same visual styling or
using a visually-hidden class if you want the existing heading to remain
visible) so screen readers get the programmatic group label, and ensure the
legend sits immediately inside the fieldset that contains the loop over
signingData?.pollDetails?.options and the inputs tied to selectedBlindVoteOption
and onBlindVoteOptionChange; no other structural changes to blindVoteError
handling are needed.
🧹 Nitpick comments (2)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte (1)

25-28: Consider preventing body scroll when overlay is open.

While the overlay covers the background, users can still scroll the underlying page content. Locking body scroll provides better modal UX and prevents confusion.

🔒 Suggested body scroll lock

Add an effect to toggle body overflow:

 let internalOpen = isOpen;
 let lastReportedOpen = internalOpen;
 
+$effect(() => {
+    if (internalOpen) {
+        document.body.style.overflow = 'hidden';
+        return () => {
+            document.body.style.overflow = '';
+        };
+    }
+});
+
 $: if (isOpen !== internalOpen) {
     internalOpen = isOpen;
 }
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte (1)

72-90: Consider extracting title logic to improve readability.

The nested ternaries determining the title text work correctly but require careful parsing. Extracting to a derived value would improve maintainability.

♻️ Suggested refactor

Add a derived title value in the script block:

 let hasPollDetails = false;
 $: hasPollDetails =
     signingData?.pollId !== undefined && signingData?.pollDetails !== undefined;
+
+$: title = (() => {
+    if (showSigningSuccess) {
+        if (isBlindVotingRequest) return "Blind Vote Submitted!";
+        if (signingData?.pollId) return "Vote Signed!";
+        return "Message Signed!";
+    }
+    if (isBlindVotingRequest) return "Blind Vote Request";
+    if (signingData?.pollId) return "Sign Vote Request";
+    return "Sign Message Request";
+})();

Then simplify the template:

                 <h4
                     class="text-xl font-bold {showSigningSuccess
                         ? 'text-green-800'
                         : ''}"
                 >
-                    {#if showSigningSuccess}
-                        {isBlindVotingRequest
-                            ? "Blind Vote Submitted!"
-                            : signingData?.pollId
-                              ? "Vote Signed!"
-                              : "Message Signed!"}
-                    {:else}
-                        {isBlindVotingRequest
-                            ? "Blind Vote Request"
-                            : signingData?.pollId
-                              ? "Sign Vote Request"
-                              : "Sign Message Request"}
-                    {/if}
+                    {title}
                 </h4>
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8424270 and b0b50f4.

📒 Files selected for processing (3)
  • infrastructure/control-panel/src/lib/ui/Table/Table.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-01-05T11:46:43.214Z
Learnt from: Bekiboo
Repo: MetaState-Prototype-Project/prototype PR: 653
File: platforms/pictique/src/routes/(auth)/auth/+page.svelte:173-173
Timestamp: 2026-01-05T11:46:43.214Z
Learning: In Tailwind CSS v4, gradient utilities were renamed from bg-gradient-to-{direction} to bg-linear-to-{direction}. For all Svelte components (e.g., any .svelte files in the project), replace usages like bg-gradient-to-r, bg-gradient-to-l, etc. with bg-linear-to-r, bg-linear-to-l, etc. Ensure consistency across the codebase, update any documentation or design tokens, and run visual/test checks to confirm gradients render as intended.

Applied to files:

  • infrastructure/control-panel/src/lib/ui/Table/Table.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
📚 Learning: 2025-08-08T04:15:35.098Z
Learnt from: sosweetham
Repo: MetaState-Prototype-Project/prototype PR: 279
File: infrastructure/control-panel/src/app.css:0-0
Timestamp: 2025-08-08T04:15:35.098Z
Learning: The MetaState-Prototype-Project uses Tailwind CSS v3, where the theme directive is valid and supported. The theme block should not be changed to :root or layer base in this project.

Applied to files:

  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
⏰ 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 (1)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte (1)

218-265: Button state logic looks good.

The conditional action button rendering correctly handles all flow states:

  • Success confirmation
  • Blind vote submission with proper disabled state
  • Error acknowledgment
  • Sign/Decline options with loading indicators

The implementation properly coordinates button variants, labels, and callbacks across the different signing scenarios.

sosweetham and others added 3 commits January 8, 2026 11:58
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: 2

🤖 Fix all issues with AI agents
In
@infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte:
- Around line 179-218: Remove the redundant visual label by deleting the
standalone <p> element that renders "Select Option" inside the block gated by
showSigningSuccess/isBlindVotingRequest/hasPollDetails; keep the semantic
<legend> inside the fieldset so the radio group (rendered from
signingData?.pollDetails?.options) remains properly labeled for accessibility,
ensuring the rest of the behavior (selectedBlindVoteOption, onchange calling
onBlindVoteOptionChange, and blindVoteError display) is unchanged.
🧹 Nitpick comments (2)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte (1)

106-177: Consider using description list for semantic HTML.

The current table structure works functionally, but since you're displaying key-value pairs (Poll ID → value, Message → value) rather than true tabular data, a description list (<dl>, <dt>, <dd>) would be more semantically appropriate. This would better convey the content structure to assistive technologies.

Example structure:

<dl class="w-full mt-6 border border-gray-100 rounded-2xl overflow-hidden bg-gray-50 divide-y divide-gray-200">
    {#if signingData?.pollId}
        <div class="py-3 px-4">
            <dt class="text-xs font-semibold text-gray-500 uppercase tracking-wider">
                Poll ID
            </dt>
            <dd class="text-sm text-gray-700 font-medium break-all mt-1">
                {signingData.pollId}
            </dd>
        </div>
    {/if}
    <!-- ... other fields ... -->
</dl>
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte (1)

58-68: Consider consistent null handling for platform.

Line 58 uses a fallback when platform is null/undefined ({platform ?? "the platform"}), but lines 61-68 only show redirect messaging when platform is truthy. This creates inconsistent behavior:

  • If platform is null but redirect exists: description shows "the platform" but no redirect instructions appear
  • The user experience could be confusing

Consider either:

  1. Also showing redirect instructions with a fallback platform name, or
  2. Using the fallback only when redirect is not present
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b0b50f4 and ff1db0e.

📒 Files selected for processing (3)
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
  • platforms/group-charter-manager/next-env.d.ts
💤 Files with no reviewable changes (1)
  • platforms/group-charter-manager/next-env.d.ts
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-08T04:15:35.098Z
Learnt from: sosweetham
Repo: MetaState-Prototype-Project/prototype PR: 279
File: infrastructure/control-panel/src/app.css:0-0
Timestamp: 2025-08-08T04:15:35.098Z
Learning: The MetaState-Prototype-Project uses Tailwind CSS v3, where the theme directive is valid and supported. The theme block should not be changed to :root or layer base in this project.

Applied to files:

  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
📚 Learning: 2026-01-05T11:46:43.214Z
Learnt from: Bekiboo
Repo: MetaState-Prototype-Project/prototype PR: 653
File: platforms/pictique/src/routes/(auth)/auth/+page.svelte:173-173
Timestamp: 2026-01-05T11:46:43.214Z
Learning: In Tailwind CSS v4, gradient utilities were renamed from bg-gradient-to-{direction} to bg-linear-to-{direction}. For all Svelte components (e.g., any .svelte files in the project), replace usages like bg-gradient-to-r, bg-gradient-to-l, etc. with bg-linear-to-r, bg-linear-to-l, etc. Ensure consistency across the codebase, update any documentation or design tokens, and run visual/test checks to confirm gradients render as intended.

Applied to files:

  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte
  • infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte
⏰ 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). (2)
  • GitHub Check: build
  • GitHub Check: lint
🔇 Additional comments (5)
infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/SigningDrawer.svelte (2)

40-46: LGTM! Excellent accessibility improvements.

The conversion from Drawer to a fixed overlay with proper dialog semantics (role="dialog", aria-modal="true", aria-labelledby) aligns well with the PR objective to create blocking pages instead of drawer overlays. The ARIA attributes ensure screen reader compatibility.


229-277: LGTM! Button logic and states are well-structured.

The conditional button rendering correctly handles all three flows:

  • Success: single dismissal action
  • Blind voting: proper disabled state when no option selected
  • Normal signing: appropriate Decline/Sign actions with loading states

The disabled conditions and dynamic button text ensure good UX throughout the signing workflow.

infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte (3)

1-23: LGTM: Clean state management.

The internal state synchronization pattern correctly handles both external prop updates and internal state changes, ensuring onOpenChange is called appropriately.


27-30: LGTM: Proper dialog accessibility semantics.

The dialog correctly implements ARIA attributes with role="dialog", aria-modal="true", and aria-labelledby linkage to the title.


37-37: Remove this comment — bg-gray is a valid custom color.

The project uses Tailwind CSS v4 with a custom theme defined in app.css. The --color-gray: #f5f5f5 token in the @theme block automatically generates the bg-gray utility class. This is intentional and renders correctly. The proposed fix to bg-gray-100 would actually break this since bg-gray-100 is not defined in the theme.

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] EID-W: Change scan page drawers to full pages

3 participants