From 272ebbc2baa60de07330d03a2b72cb4e070d1017 Mon Sep 17 00:00:00 2001 From: gourav Date: Thu, 15 Jan 2026 21:05:45 +0530 Subject: [PATCH 1/6] fix: follow-button-message --- .../src/lib/fragments/Profile/Profile.svelte | 47 ++++++++++++++++++- .../(protected)/profile/[id]/+page.svelte | 7 ++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/platforms/pictique/src/lib/fragments/Profile/Profile.svelte b/platforms/pictique/src/lib/fragments/Profile/Profile.svelte index 8e890c837..f681acc57 100644 --- a/platforms/pictique/src/lib/fragments/Profile/Profile.svelte +++ b/platforms/pictique/src/lib/fragments/Profile/Profile.svelte @@ -1,23 +1,40 @@
@@ -36,7 +53,33 @@
{#if variant === 'other'}
- +
+ +
{/if} diff --git a/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte b/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte index 06c2c53ae..dba5ae8a2 100644 --- a/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte +++ b/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte @@ -15,6 +15,7 @@ let error = $state(null); let loading = $state(true); let ownerId: string | null = $derived(getAuthId()); + let isFollowing = $state(false); let ownerProfile = $derived.by(async () => { if (ownerId) { const response = await apiClient.get(`/api/users/${ownerId}`); @@ -39,10 +40,13 @@ async function handleFollow() { try { + isFollowing = true; await apiClient.post(`/api/users/${profileId}/follow`); - await fetchProfile(); // Refresh profile to update follower count + // await fetchProfile(); // Refresh profile to update follower count } catch (err) { error = err instanceof Error ? err.message : 'Failed to follow user'; + } finally { + isFollowing = false; } } @@ -79,6 +83,7 @@ {:else if profile} handlePostClick(post)} From c2faa2d7cfa4c040effbae4b55e9eb2f5bf222b2 Mon Sep 17 00:00:00 2001 From: gourav Date: Fri, 16 Jan 2026 10:53:25 +0530 Subject: [PATCH 2/6] fix: dreamsync-welcome --- platforms/dreamSync/client/src/pages/wishlist-editor.tsx | 2 +- platforms/dreamSync/shared/schema.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platforms/dreamSync/client/src/pages/wishlist-editor.tsx b/platforms/dreamSync/client/src/pages/wishlist-editor.tsx index a9548bc33..a77269882 100644 --- a/platforms/dreamSync/client/src/pages/wishlist-editor.tsx +++ b/platforms/dreamSync/client/src/pages/wishlist-editor.tsx @@ -113,7 +113,7 @@ export default function WishlistEditor() {

- Welcome back, {user?.firstName || user?.email || 'User'}! + Welcome back, {user?.name|| user?.email || 'User'}!

{existingWishlist ? 'Edit your wishlist' : 'Create and share your dreams, goals, and what you can offer to the world'} diff --git a/platforms/dreamSync/shared/schema.ts b/platforms/dreamSync/shared/schema.ts index e8206fe03..d001947d3 100644 --- a/platforms/dreamSync/shared/schema.ts +++ b/platforms/dreamSync/shared/schema.ts @@ -302,6 +302,7 @@ export type GroupSuggestion = Suggestion; // Extended types for API responses export type UserWithProfile = User & { + name?:string; profile?: Profile; skills?: Skill[]; interests?: Interest[]; From d4f38c60c5cd2fd25dd6fdbead905bdf4ee006e9 Mon Sep 17 00:00:00 2001 From: gourav Date: Fri, 16 Jan 2026 11:17:10 +0530 Subject: [PATCH 3/6] fix: pictique timer --- .../src/routes/(auth)/auth/+page.svelte | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/platforms/pictique/src/routes/(auth)/auth/+page.svelte b/platforms/pictique/src/routes/(auth)/auth/+page.svelte index 0b247b8bc..453a42fd4 100644 --- a/platforms/pictique/src/routes/(auth)/auth/+page.svelte +++ b/platforms/pictique/src/routes/(auth)/auth/+page.svelte @@ -16,6 +16,8 @@ let qrData = $state(''); let isMobile = $state(false); let errorMessage = $state(null); + let countdown = $state(60); + let timerInterval: ReturnType; function checkMobile() { isMobile = window.innerWidth <= 640; // Tailwind's `sm` breakpoint @@ -69,6 +71,17 @@ } } + function startTimer() { + timerInterval = setInterval(() => { + if (countdown > 0) { + countdown -= 1; + } else { + clearInterval(timerInterval); + window.location.reload(); + } + }, 1000); + } + onMount(async () => { checkMobile(); window.addEventListener('resize', checkMobile); @@ -93,6 +106,8 @@ const { data } = await apiClient.get('/api/auth/offer'); qrData = data.uri; + startTimer(); + function watchEventStream(id: string) { const sseUrl = new URL(`/api/auth/sessions/${id}`, PUBLIC_PICTIQUE_BASE_URL).toString(); const eventSource = new EventSource(sseUrl); @@ -133,6 +148,7 @@ watchEventStream(new URL(qrData).searchParams.get('session') as string); onDestroy(() => { + if (timerInterval) clearInterval(timerInterval); window.removeEventListener('resize', checkMobile); }); }); @@ -209,7 +225,10 @@

The {isMobileDevice() ? 'button' : 'code'} is valid for 60 secondsThe {isMobileDevice() ? 'button' : 'QR code'} is valid for + + {countdown}s + Please refresh the page if it expires From 900ba622a5e78de5a84feee1bdc8f1196778d7a3 Mon Sep 17 00:00:00 2001 From: gourav Date: Fri, 16 Jan 2026 11:32:15 +0530 Subject: [PATCH 4/6] fix: code rabbit suggestion --- .../src/lib/fragments/Profile/Profile.svelte | 14 ++++++-------- .../routes/(protected)/profile/[id]/+page.svelte | 10 ++++++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/platforms/pictique/src/lib/fragments/Profile/Profile.svelte b/platforms/pictique/src/lib/fragments/Profile/Profile.svelte index f681acc57..d971623fe 100644 --- a/platforms/pictique/src/lib/fragments/Profile/Profile.svelte +++ b/platforms/pictique/src/lib/fragments/Profile/Profile.svelte @@ -12,7 +12,8 @@ handleFollow, handleSinglePost, handleMessage, - isFollowing = $bindable(false) + isFollowing = $bindable(false), + didFollowed = $bindable(false) }: { variant: 'user' | 'other'; profileData: userProfile; @@ -20,19 +21,16 @@ handleFollow: () => Promise; handleMessage: () => Promise; isFollowing: boolean; + didFollowed: boolean; } = $props(); let imgPosts = $derived(profileData.posts.filter((e) => e.imgUris && e.imgUris.length > 0)); - let requestSent = $state(false); const btnScale = new Spring(1, { stiffness: 0.2, damping: 0.4 }); async function wrappedFollow() { btnScale.target = 0.95; - await handleFollow(); - requestSent = true; - btnScale.target = 1; } @@ -58,13 +56,13 @@ variant={'primary'} size="sm" callback={wrappedFollow} - disabled={isFollowing || requestSent} - class="min-w-[110px] transition-all duration-500 {requestSent + disabled={isFollowing || didFollowed} + class="min-w-[110px] transition-all duration-500 {didFollowed ? 'opacity-80' : ''}" >

- {#if requestSent} + {#if didFollowed} Followed {:else if isFollowing} diff --git a/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte b/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte index 64ee1a797..c085b81c0 100644 --- a/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte +++ b/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte @@ -28,6 +28,7 @@ let loading = $state(true); let ownerId: string | null = $derived(getAuthId()); let isFollowing = $state(false); + let didFollowed = $state(false); let ownerProfile = $derived.by(async () => { if (ownerId) { const response = await apiClient.get(`/api/users/${ownerId}`); @@ -52,10 +53,14 @@ async function handleFollow() { try { isFollowing = true; - await apiClient.post(`/api/users/${profileId}/follow`); - // await fetchProfile(); // Refresh profile to update follower count + const response = await apiClient.post(`/api/users/${profileId}/follow`); + if (response) { + didFollowed = true; + // await fetchProfile(); + } } catch (err) { error = err instanceof Error ? err.message : 'Failed to follow user'; + didFollowed = false; } finally { isFollowing = false; } @@ -99,6 +104,7 @@ {:else if profile} handlePostClick(post)} From be54fe0291c034d7a5fe51f0b1d629b62a0bd761 Mon Sep 17 00:00:00 2001 From: gourav Date: Fri, 16 Jan 2026 11:35:18 +0530 Subject: [PATCH 5/6] fix: removed another pr changes --- .../src/routes/(auth)/auth/+page.svelte | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/platforms/pictique/src/routes/(auth)/auth/+page.svelte b/platforms/pictique/src/routes/(auth)/auth/+page.svelte index 453a42fd4..0b247b8bc 100644 --- a/platforms/pictique/src/routes/(auth)/auth/+page.svelte +++ b/platforms/pictique/src/routes/(auth)/auth/+page.svelte @@ -16,8 +16,6 @@ let qrData = $state(''); let isMobile = $state(false); let errorMessage = $state(null); - let countdown = $state(60); - let timerInterval: ReturnType; function checkMobile() { isMobile = window.innerWidth <= 640; // Tailwind's `sm` breakpoint @@ -71,17 +69,6 @@ } } - function startTimer() { - timerInterval = setInterval(() => { - if (countdown > 0) { - countdown -= 1; - } else { - clearInterval(timerInterval); - window.location.reload(); - } - }, 1000); - } - onMount(async () => { checkMobile(); window.addEventListener('resize', checkMobile); @@ -106,8 +93,6 @@ const { data } = await apiClient.get('/api/auth/offer'); qrData = data.uri; - startTimer(); - function watchEventStream(id: string) { const sseUrl = new URL(`/api/auth/sessions/${id}`, PUBLIC_PICTIQUE_BASE_URL).toString(); const eventSource = new EventSource(sseUrl); @@ -148,7 +133,6 @@ watchEventStream(new URL(qrData).searchParams.get('session') as string); onDestroy(() => { - if (timerInterval) clearInterval(timerInterval); window.removeEventListener('resize', checkMobile); }); }); @@ -225,10 +209,7 @@

The {isMobileDevice() ? 'button' : 'QR code'} is valid for - - {countdown}s - The {isMobileDevice() ? 'button' : 'code'} is valid for 60 seconds Please refresh the page if it expires From 1f0a0af973a07545d59be74af42aaf10e9922671 Mon Sep 17 00:00:00 2001 From: gourav Date: Fri, 16 Jan 2026 11:54:49 +0530 Subject: [PATCH 6/6] fix: suggestion added as we discussed on slack thread --- platforms/pictique/src/lib/fragments/Profile/Profile.svelte | 4 ++-- .../src/routes/(protected)/profile/[id]/+page.svelte | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/platforms/pictique/src/lib/fragments/Profile/Profile.svelte b/platforms/pictique/src/lib/fragments/Profile/Profile.svelte index d971623fe..6dc1cf1ef 100644 --- a/platforms/pictique/src/lib/fragments/Profile/Profile.svelte +++ b/platforms/pictique/src/lib/fragments/Profile/Profile.svelte @@ -5,6 +5,7 @@ import Post from '../Post/Post.svelte'; import { Spring } from 'svelte/motion'; import { Tick01Icon } from '@hugeicons/core-free-icons'; + import { page } from '$app/stores'; let { variant = 'user', @@ -56,7 +57,6 @@ variant={'primary'} size="sm" callback={wrappedFollow} - disabled={isFollowing || didFollowed} class="min-w-[110px] transition-all duration-500 {didFollowed ? 'opacity-80' : ''}" @@ -64,7 +64,7 @@

{#if didFollowed} - Followed + Following {:else if isFollowing} . diff --git a/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte b/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte index c085b81c0..a19ed7ef2 100644 --- a/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte +++ b/platforms/pictique/src/routes/(protected)/profile/[id]/+page.svelte @@ -56,7 +56,10 @@ const response = await apiClient.post(`/api/users/${profileId}/follow`); if (response) { didFollowed = true; - // await fetchProfile(); + setTimeout(async () => { + await fetchProfile(); + didFollowed = false; + }, 1000); } } catch (err) { error = err instanceof Error ? err.message : 'Failed to follow user';