From d5cbb31c60b9efda7146222b0ff8fdfb9fafc868 Mon Sep 17 00:00:00 2001 From: Eeshitha Gone <22311A6712@ds.sreenidhi.edu.in> Date: Thu, 30 Jul 2026 23:47:26 +0530 Subject: [PATCH 01/11] designed landing page in mobile view --- .../.gradle/8.9/checksums/checksums.lock | Bin 0 -> 17 bytes .../8.9/dependencies-accessors/gc.properties | 0 .../executionHistory/executionHistory.lock | Bin 0 -> 17 bytes .../.gradle/8.9/fileChanges/last-build.bin | Bin 0 -> 1 bytes .../.gradle/8.9/fileHashes/fileHashes.lock | Bin 0 -> 17 bytes .../.gradle/8.9/gc 2.properties | 0 .../android-kotlin/.gradle/8.9/gc.properties | 0 .../.gradle/9.2.0/checksums/checksums.lock | Bin 0 -> 17 bytes .../.gradle/9.2.0/fileChanges/last-build.bin | Bin 0 -> 1 bytes .../.gradle/9.2.0/fileHashes/fileHashes.bin | Bin 0 -> 18597 bytes .../.gradle/9.2.0/fileHashes/fileHashes.lock | Bin 0 -> 17 bytes .../.gradle/9.2.0/gc.properties | 0 .../buildOutputCleanup.lock | Bin 0 -> 17 bytes .../buildOutputCleanup/cache.properties | 2 + .../.gradle/vcs-1/gc.properties | 0 bugs.md | 86 + src/components/kibo-ui/contribution-graph.tsx | 97 +- src/components/landing/CTASection.tsx | 4 +- src/components/landing/FeaturesSection.tsx | 102 +- src/components/landing/Footer.tsx | 24 +- src/components/landing/HeroSection.tsx | 256 +-- src/components/landing/MobileAppSection.tsx | 2 +- src/components/layout/MobileLayout.tsx | 177 +- src/components/views/ActivityLogView.tsx | 1817 +---------------- src/components/views/DesktopView.tsx | 14 +- src/components/views/MobileView.tsx | 34 +- src/components/views/SettingsView.tsx | 53 +- .../views/activity/ActivityCharts.tsx | 237 +++ .../views/activity/ActivityFeed.tsx | 143 ++ .../views/activity/ActivityStatCards.tsx | 72 + .../views/activity/ActivitySummaryCard.tsx | 341 ++++ .../views/activity/activityTypes.ts | 79 + .../views/activity/activityUtils.ts | 104 + .../views/activity/useActivityLogData.ts | 872 ++++++++ .../install-wall/hooks/useAppInstallStatus.ts | 11 +- src/hooks/usePresence.ts | 2 +- src/lib/utils.ts | 13 +- src/pages/ProjectDetails.tsx | 50 +- src/services/chatSocketService.ts | 2 +- src/services/taskSocketService.ts | 2 +- 40 files changed, 2356 insertions(+), 2240 deletions(-) create mode 100644 app-clients/android-kotlin/.gradle/8.9/checksums/checksums.lock create mode 100644 app-clients/android-kotlin/.gradle/8.9/dependencies-accessors/gc.properties create mode 100644 app-clients/android-kotlin/.gradle/8.9/executionHistory/executionHistory.lock create mode 100644 app-clients/android-kotlin/.gradle/8.9/fileChanges/last-build.bin create mode 100644 app-clients/android-kotlin/.gradle/8.9/fileHashes/fileHashes.lock create mode 100644 app-clients/android-kotlin/.gradle/8.9/gc 2.properties create mode 100644 app-clients/android-kotlin/.gradle/8.9/gc.properties create mode 100644 app-clients/android-kotlin/.gradle/9.2.0/checksums/checksums.lock create mode 100644 app-clients/android-kotlin/.gradle/9.2.0/fileChanges/last-build.bin create mode 100644 app-clients/android-kotlin/.gradle/9.2.0/fileHashes/fileHashes.bin create mode 100644 app-clients/android-kotlin/.gradle/9.2.0/fileHashes/fileHashes.lock create mode 100644 app-clients/android-kotlin/.gradle/9.2.0/gc.properties create mode 100644 app-clients/android-kotlin/.gradle/buildOutputCleanup/buildOutputCleanup.lock create mode 100644 app-clients/android-kotlin/.gradle/buildOutputCleanup/cache.properties create mode 100644 app-clients/android-kotlin/.gradle/vcs-1/gc.properties create mode 100644 bugs.md create mode 100644 src/components/views/activity/ActivityCharts.tsx create mode 100644 src/components/views/activity/ActivityFeed.tsx create mode 100644 src/components/views/activity/ActivityStatCards.tsx create mode 100644 src/components/views/activity/ActivitySummaryCard.tsx create mode 100644 src/components/views/activity/activityTypes.ts create mode 100644 src/components/views/activity/activityUtils.ts create mode 100644 src/components/views/activity/useActivityLogData.ts diff --git a/app-clients/android-kotlin/.gradle/8.9/checksums/checksums.lock b/app-clients/android-kotlin/.gradle/8.9/checksums/checksums.lock new file mode 100644 index 0000000000000000000000000000000000000000..14d5fc7cc147422b681f88883ef860b672071a46 GIT binary patch literal 17 TcmZR+eDB9D$>aaeGe7|VOl}4h literal 0 HcmV?d00001 diff --git a/app-clients/android-kotlin/.gradle/8.9/dependencies-accessors/gc.properties b/app-clients/android-kotlin/.gradle/8.9/dependencies-accessors/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/app-clients/android-kotlin/.gradle/8.9/executionHistory/executionHistory.lock b/app-clients/android-kotlin/.gradle/8.9/executionHistory/executionHistory.lock new file mode 100644 index 0000000000000000000000000000000000000000..13fd3c515cdd4b01bc65f870acce5294ca1c45f3 GIT binary patch literal 17 TcmZSnx+e2oi!R?3AFOjR=8Qnnp#zMnnWb5b+DFg_Jg;h_xVo zg2BSZPAqIwSO~i3^>deW#y&4{Qtqu`0UBc zTJyf2Z{+#>8S{;-W+gy?009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1pZQ>9$z*Y=U6&RpXZxfmmBk|wd?x(!{O*h2ubI*d-0ro(Mr0p k`n%(7`gOP6KH6VjeA~WxoQTDwvs|9({d6S7^yWeJ8-8Cyr2qf` literal 0 HcmV?d00001 diff --git a/app-clients/android-kotlin/.gradle/9.2.0/fileHashes/fileHashes.lock b/app-clients/android-kotlin/.gradle/9.2.0/fileHashes/fileHashes.lock new file mode 100644 index 0000000000000000000000000000000000000000..a99a6a9c2abb4f1c74da4863b00603f596887357 GIT binary patch literal 17 UcmZQ(T(Rj5^AA>01_%%U04uKpZ~y=R literal 0 HcmV?d00001 diff --git a/app-clients/android-kotlin/.gradle/9.2.0/gc.properties b/app-clients/android-kotlin/.gradle/9.2.0/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/app-clients/android-kotlin/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/app-clients/android-kotlin/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000000000000000000000000000000000000..f46508e6f06d858d27d93633b6da1ff91b6493df GIT binary patch literal 17 TcmZQBa literal 0 HcmV?d00001 diff --git a/app-clients/android-kotlin/.gradle/buildOutputCleanup/cache.properties b/app-clients/android-kotlin/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 00000000..53367dc4 --- /dev/null +++ b/app-clients/android-kotlin/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Thu Jul 30 21:50:31 IST 2026 +gradle.version=8.9 diff --git a/app-clients/android-kotlin/.gradle/vcs-1/gc.properties b/app-clients/android-kotlin/.gradle/vcs-1/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/bugs.md b/bugs.md new file mode 100644 index 00000000..c27db78c --- /dev/null +++ b/bugs.md @@ -0,0 +1,86 @@ +analyze the notes section the share feature is not working. +do not edit any chnages just analyze the code and tell why the feature is not working + +1. The Email Invitation is Stubbed Out (Incomplete) +In + +ShareDialog.tsx +, the handleInvite function (which triggers when clicking the "Invite" button) only displays an informational toast stating that the email invitation feature is coming soon: + +const handleInvite = async () => { + if (!email) {return;} + setLoading(true); + try { + toast.info("Invite by email coming soon! Please share the link."); + } catch (e: any) { + toast.error("Failed to invite user"); + } finally { + setLoading(false); + } +}; +No actual backend call or DB write occurs when inviting someone by email. + +2. Missing User Identity Lookup / Mapping +The permissions store maps user IDs (uid) to roles (viewer, editor, owner). The dialog asks for the colleague's email but does not resolve that email to a corresponding uid in order to update the permissions dictionary correctly. + +Based on the analysis of + +PeopleView.tsx +, the activity status bug is caused by the following logic in lines 930–950: + +let statusText = status; +if (lastSeenDate && !isNaN(lastSeenDate.getTime())) { + try { + const duration = formatDistanceToNow(lastSeenDate, { addSuffix: false }) + .replace('less than a minute', '1m') + .replace(' minutes', 'm') + .replace(' minute', 'm') + .replace(' hours', 'h') + .replace(' hour', 'h') + .replace(' days', 'd') + .replace(' day', 'd'); + + if (status === 'online') { + statusText = `Online (${duration})`; + } else { + statusText = `Offline ${duration}`; + } + } catch (e) { + } +} +Why the Activity Status is Showing Wrong: +Away status is shown as Offline: The status property can be 'online' | 'offline' | 'away'. If a user is away, the code falls into the else block because status !== 'online'. Consequently, an active but idle user who should show as Away is incorrectly labeled as Offline. +Confusing Online durations: When a user is actively online, showing a duration since their last heartbeat (e.g., Online (2h)) is confusing because it makes the active status seem stale or contradictory. +Dirty duration strings: The string replacement on the output of formatDistanceToNow only replaces specific strings (like ' hours') but leaves prefixes like 'about ', 'over ', or 'almost ' intact (e.g., showing as Offline about 2h or Online (almost 15m)). +How to Solve It: +You can fix the conditional blocks to handle the three states properly (online, away, and offline), and optionally clean up the duration prefix. + +Update the logic in + +PeopleView.tsx + to: + +typescript +let statusText = status; +if (lastSeenDate && !isNaN(lastSeenDate.getTime())) { + try { + const duration = formatDistanceToNow(lastSeenDate, { addSuffix: false }) + .replace(/^(about|over|almost)\s+/, '') // Strip prefixes like "about", "over", etc. + .replace('less than a minute', '1m') + .replace(' minutes', 'm') + .replace(' minute', 'm') + .replace(' hours', 'h') + .replace(' hour', 'h') + .replace(' days', 'd') + .replace(' day', 'd'); + if (status === 'online') { + statusText = 'Online'; // Keep it clean for currently active users + } else if (status === 'away') { + statusText = `Away (${duration})`; // Correctly handle the away state + } else { + statusText = `Offline ${duration}`; // Only display Offline when they are actually offline + } + } catch (e) { + // Fallback if parsing fails + } +} \ No newline at end of file diff --git a/src/components/kibo-ui/contribution-graph.tsx b/src/components/kibo-ui/contribution-graph.tsx index 8ed1dc3d..70a02bb0 100644 --- a/src/components/kibo-ui/contribution-graph.tsx +++ b/src/components/kibo-ui/contribution-graph.tsx @@ -143,9 +143,10 @@ const ContributionGraph = ({ interface ContributionGraphCalendarProps { children: (props: { activity: Activity; dayIndex: number; weekIndex: number }) => ReactNode; + maxWeeks?: number; } -const ContributionGraphCalendar = ({ children }: ContributionGraphCalendarProps) => { +const ContributionGraphCalendar = ({ children, maxWeeks }: ContributionGraphCalendarProps) => { const { data, blockSize, blockMargin } = useContributionGraph(); if (data.length === 0) { @@ -184,23 +185,25 @@ const ContributionGraphCalendar = ({ children }: ContributionGraphCalendarProps) weeks.push(week); } + // 150 days is ~21 weeks. Default mobile view to 21 weeks if maxWeeks is unspecified. + const isMobileViewport = typeof window !== 'undefined' && window.innerWidth < 768; + const effectiveMaxWeeks = maxWeeks ?? (isMobileViewport ? 21 : undefined); + + const displayWeeks = + effectiveMaxWeeks && weeks.length > effectiveMaxWeeks + ? weeks.slice(-effectiveMaxWeeks) + : weeks; + const height = 7 * (blockSize + blockMargin); - const width = weeks.length * (blockSize + blockMargin); - const marginLeft = 30; + const width = displayWeeks.length * (blockSize + blockMargin); + const marginLeft = 26; const months: { name: string; weekIndex: number }[] = []; let lastMonth = -1; - weeks.forEach((week, weekIndex) => { + displayWeeks.forEach((week, weekIndex) => { const firstDayOfWeek = parseLocalDate(week[0].date); const month = firstDayOfWeek.getMonth(); if (month !== lastMonth) { - - - - if (firstDayOfWeek < startDate) { - lastMonth = month; - return; - } months.push({ name: firstDayOfWeek.toLocaleString('en-US', { month: 'short' }), weekIndex, @@ -210,45 +213,47 @@ const ContributionGraphCalendar = ({ children }: ContributionGraphCalendarProps) }); return ( -
- {} -
- {months.map((month, idx) => ( - - {month.name} - - ))} -
- -
- {} +
+
+ {/* Month Labels */}
- Sum - Mon - Tue - Wed - Thu - Fri - Sat + {months.map((month, idx) => ( + + {month.name} + + ))}
- - {weeks.map((week, weekIndex) => - week.map((activity, dayIndex) => children({ activity, dayIndex, weekIndex })) - )} - +
+ {/* Day Labels */} +
+ Sum + Mon + Tue + Wed + Thu + Fri + Sat +
+ + + {displayWeeks.map((week, weekIndex) => + week.map((activity, dayIndex) => children({ activity, dayIndex, weekIndex })) + )} + +
); diff --git a/src/components/landing/CTASection.tsx b/src/components/landing/CTASection.tsx index 1df1ea11..d17d7d42 100644 --- a/src/components/landing/CTASection.tsx +++ b/src/components/landing/CTASection.tsx @@ -105,12 +105,12 @@ const CTASection = () => { return (
{/* Isometric Architectural Matrix */} -
+
{/* Massive Typography */}

diff --git a/src/components/landing/FeaturesSection.tsx b/src/components/landing/FeaturesSection.tsx index 129fb8ce..842cc286 100644 --- a/src/components/landing/FeaturesSection.tsx +++ b/src/components/landing/FeaturesSection.tsx @@ -131,64 +131,66 @@ const FeaturesSection = () => { ]; return ( -
+
{} -
-

- Everything to ship faster -

-

- From AI-powered planning to GitHub integration—the tools your team needs, - without the bloat. -

-
- - {/* Bento Box Grid */} -
- - {/* AI Project Setup - Interactive Walkthrough */} -
-
- -
-
- -
-

- AI Project Setup -

-

- Describe your idea and get a complete project structure, workflows, and task breakdown in seconds. Watch it happen live. -

-
- -
- -
+ {/* Everything to ship faster Header & Bento Box Grid (Hidden on mobile) */} +
+
+

+ Everything to ship faster +

+

+ From AI-powered planning to GitHub integration—the tools your team needs, + without the bloat. +

- {/* GitHub Sync - Interactive Walkthrough */} -
-
-
- + {/* Bento Box Grid */} +
+ {/* AI Project Setup - Interactive Walkthrough */} +
+
+ +
+
+ +
+

+ AI Project Setup +

+

+ Describe your idea and get a complete project structure, workflows, and task breakdown in seconds. Watch it happen live. +

-

- GitHub Sync -

-

- Connect repositories and auto-complete tasks when commits are pushed. Your code drives your workflow. -

-
- +
+
+
+ + {/* GitHub Sync - Interactive Walkthrough */} +
+
+
+ +
+

+ GitHub Sync +

+

+ Connect repositories and auto-complete tasks when commits are pushed. Your code drives your workflow. +

+ +
+ +
+
{/* Real-Time Notes */} -
+
@@ -215,7 +217,7 @@ const FeaturesSection = () => {
{/* Smart Calendar */} -
+

Smart Calendar @@ -240,7 +242,7 @@ const FeaturesSection = () => {

{/* Built-in Chat */} -
+
@@ -267,7 +269,7 @@ const FeaturesSection = () => {
{/* Focused Notifications */} -
+

Focused Notifications diff --git a/src/components/landing/Footer.tsx b/src/components/landing/Footer.tsx index 26010320..5cb7c99f 100644 --- a/src/components/landing/Footer.tsx +++ b/src/components/landing/Footer.tsx @@ -105,16 +105,16 @@ const Footer = () => { }; return ( -

); diff --git a/src/components/landing/MobileAppSection.tsx b/src/components/landing/MobileAppSection.tsx index 647b93d0..cd84addf 100644 --- a/src/components/landing/MobileAppSection.tsx +++ b/src/components/landing/MobileAppSection.tsx @@ -108,7 +108,7 @@ const MobileAppSection = () => { }; return ( -
+
diff --git a/src/components/layout/MobileLayout.tsx b/src/components/layout/MobileLayout.tsx index 24c63387..92852bd4 100644 --- a/src/components/layout/MobileLayout.tsx +++ b/src/components/layout/MobileLayout.tsx @@ -2,80 +2,12 @@ * @fileoverview MobileLayout.tsx * @module MobileLayout * - * ============================================================================ - * ZYNC ENTERPRISE ARCHITECTURE DOCUMENTATION - * ============================================================================ - * - * 1. ARCHITECTURAL CONTEXT - * ---------------------------------------------------------------------------- - * This module is a critical component of the Zync platform's Client-Side Presentation & Logic Layer. - * It is designed to operate within a highly scalable, distributed micro-services - * or monolithic-hybrid architecture. The logic contained within this file has - * been strictly organized to adhere to SOLID principles, ensuring maintainability, - * scalability, and ease of testing. - * - * 2. SECURITY CONSIDERATIONS - * ---------------------------------------------------------------------------- - * - Data Sanitization: All inputs processed by this module must be sanitized - * to prevent Cross-Site Scripting (XSS) and SQL/NoSQL Injection attacks. - * - Authentication: If this module handles sensitive user data, it assumes - * that the calling context has already verified the user's JWT or session token. - * - Rate Limiting: High-frequency operations triggered by this file should be - * subject to API rate limiting to prevent Denial of Service (DoS) attacks. - * - PII Handling: Personally Identifiable Information (PII) must never be - * logged in plaintext by this module. - * - * 3. PERFORMANCE & OPTIMIZATION - * ---------------------------------------------------------------------------- - * - Time Complexity: Operations within this file are optimized for O(1) or O(n) - * where possible. Nested iterations should be strictly reviewed. - * - Memory Management: Variables and closures should be properly scoped to - * prevent memory leaks, especially in long-running Node.js processes or - * React component lifecycles. - * - Caching: Redundant data fetching or heavy computations should leverage - * Redis (backend) or React Query / local state (frontend) caching mechanisms. - * - * 4. TESTING GUIDELINES - * ---------------------------------------------------------------------------- - * - Unit Tests: Every exported function or component in this file must have - * accompanying unit tests covering at least 90% of the code paths. - * - Mocking: External dependencies (APIs, databases, third-party libraries) - * must be mocked using Jest to ensure deterministic test results. - * - Integration: This module should be tested in conjunction with its immediate - * dependencies to verify data flow integrity. - * - * 5. ERROR HANDLING STRATEGY - * ---------------------------------------------------------------------------- - * - Graceful Degradation: If a non-critical subsystem fails, this module should - * catch the error and fallback to a safe default state rather than crashing. - * - Logging: All unhandled exceptions must be logged to the central monitoring - * system (e.g., Sentry, Datadog) with full stack traces and context. - * - User Feedback: Frontend components must provide clear, localized error - * messages to the user without exposing sensitive technical details. - * - * 6. STATE MANAGEMENT (FRONTEND SPECIFIC) - * ---------------------------------------------------------------------------- - * - If this is a React component, avoid prop drilling by leveraging Context API - * or global state stores (Zustand/Redux) for deeply nested state. - * - Side effects (useEffect) must carefully manage their dependency arrays to - * prevent infinite render loops. - * - * 7. DATABASE INTERACTIONS (BACKEND SPECIFIC) - * ---------------------------------------------------------------------------- - * - Queries must be indexed and optimized. Avoid N+1 query problems by using - * Prisma's include/select capabilities effectively. - * - Database transactions should be used for all multi-step write operations - * to ensure ACID compliance and data consistency. - * - * ============================================================================ - * @author Chitkul Lakshya - * @copyright Copyright (c) 2026 Zync Meet. All rights reserved. - * @license Proprietary and Confidential - * ============================================================================ + * Premium Mobile Layout component for Zync. + * Features a 5-item bottom navigation bar: Home, People, + (center), Tasks, Meet. + * Includes glassmorphism, fluid micro-interactions, and a sleek user side drawer. */ import React from 'react'; -import { Plus, Home, CheckSquare, FileText, Folder, Users, Calendar, Video } from 'lucide-react'; -import { Button } from '@/components/ui/button'; +import { Plus, Home, Users, CheckSquare, Video } from 'lucide-react'; import { Sheet, SheetContent, SheetTrigger, SheetHeader, SheetTitle, SheetDescription } from '@/components/ui/sheet'; import { cn } from '@/lib/utils'; import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; @@ -106,7 +38,6 @@ export const MobileLayout = ({ user, onFabClick, rightHeaderAction, - hideActivityLog }: MobileLayoutProps) => { const [isDrawerOpen, setIsDrawerOpen] = React.useState(false); const { hasCheckedStatus, requiresInstallWall, isIOS, isAndroid } = useAppInstallStatus(); @@ -115,38 +46,48 @@ export const MobileLayout = ({ return ; } + // Bottom Navigation Items strictly matching user specification: Home, People, +, Tasks, Meet const leftNavItems = [ { id: 'Home', icon: Home, label: 'Home' }, { id: 'People', icon: Users, label: 'People' }, - { id: 'Calendar', icon: Calendar, label: 'Cal' }, ]; const rightNavItems = [ - { id: 'Notes', icon: FileText, label: 'Notes' }, { id: 'Tasks', icon: CheckSquare, label: 'Tasks' }, { id: 'Meet', icon: Video, label: 'Meet' }, ]; - - const isMainTab = [...leftNavItems, ...rightNavItems].some(item => item.id === activeTab); - return ( -
-
-
+
+ {/* Top Header Bar */} +
+
+
+ + {headerTitle} + +
+
+ +
{rightHeaderAction} + + {/* User Profile Avatar / Drawer Trigger */} - - + Navigation Menu @@ -155,14 +96,20 @@ export const MobileLayout = ({
{user && ( -
- +
+ - {user.displayName?.substring(0, 1) || 'U'} + + {user.displayName?.substring(0, 1) || 'U'} + -
- {user.displayName} - {user.email} +
+ + {user.displayName || 'User'} + + + {user.email} +
)} @@ -183,14 +130,15 @@ export const MobileLayout = ({
- {} + {/* Main View Area */}
{children}
- {/* Bottom Navigation */} -