Team Settings Refactor & Logo System#107
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the Team Settings/Management UI and introduces a team logo system, along with additional dashboard/view restructures and new collaboration features (Git helpers, Meet, Calendar, Chat) across the frontend and backend.
Changes:
- Added team logo library + deterministic logo assignment, and integrated logos into settings/activity surfaces.
- Refactored settings/team management UX (team selector grid) and added backend + UI support for ownership transfer.
- Reorganized “views” directory structure and introduced several new feature views/components (Dashboard, Meet, Calendar, Chat, Git helpers), plus reduced console noise in background sync hooks.
Reviewed changes
Copilot reviewed 24 out of 40 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/ProjectDetails.tsx | Updates ActivityGraph import to new activity subfolder. |
| src/pages/Dashboard.tsx | Updates Desktop/Mobile view imports to new layout subfolder. |
| src/lib/team-logos.ts | Adds team logo registry + lookup/random/deterministic helpers. |
| src/lib/firebase.ts | Exposes Firestore instance (db). |
| src/hooks/useTeamPersistence.ts | Adds Firestore persistence for team metadata + membership updates. |
| src/hooks/useTaskPersistence.ts | Adds Firestore persistence for task analytics stats + “task opened” tracking. |
| src/hooks/useSyncData.ts | Removes background sync console logs. |
| src/hooks/useNotePresence.ts | Gates debug logging to DEV and reduces noise. |
| src/hooks/use-user-sync.ts | Adds sync-in-progress guard to avoid concurrent user sync. |
| src/hooks/use-activity-tracker.ts | Prevents duplicate session starts by checking sessionIdRef. |
| src/components/views/tasks/TasksView.tsx | Tweaks Select item keys for projects/users. |
| src/components/views/tasks/TaskGitSync.tsx | Adds UI to copy commit tags for auto-completing tasks via commits. |
| src/components/views/tasks/TaskDetailDrawer.tsx | Calls task persistence hook on drawer open to track opens. |
| src/components/views/tasks/GitCommandsDrawer.tsx | Adds Git command assistant drawer for task/repo workflow. |
| src/components/views/settings/SettingsView.tsx | Refactors Team settings UI (grid selector + focused details) and adds ownership transfer UI + logo integration. |
| src/components/views/projects/MyProjectsView.tsx | Adds GitHub projects/repo browser view with connect flow, filtering, pagination. |
| src/components/views/people/TeamOnboarding.tsx | Adds onboarding UI to create/join teams with invite list. |
| src/components/views/people/TeamGateway.tsx | Adds “gateway” CTA component for team-required areas. |
| src/components/views/people/PeopleView.tsx | Updates MessagesPage import to new chat subfolder. |
| src/components/views/people/JoinTeamDialog.tsx | Adds Firestore team membership sync on join. |
| src/components/views/people/CreateTeamDialog.tsx | Adds logo picker UI and Firestore team creation sync. |
| src/components/views/meet/MeetView.tsx | Adds Meet UI for instant + scheduled meetings and meeting management. |
| src/components/views/layout/MobileView.tsx | Updates view imports to new folder structure. |
| src/components/views/layout/DesktopView.tsx | Updates view imports, refactors analytics fetching cadence, and passes team data into ActivityLogView. |
| src/components/views/design/DesignView.tsx | Adds inspiration/design browsing view with infinite scroll. |
| src/components/views/dashboard/DashboardView.tsx | Adds a GitHub-centric dashboard view (contributions/events/stats). |
| src/components/views/dashboard/DashboardHome.tsx | Adds a dashboard landing/home screen. |
| src/components/views/chat/MessagesPage.tsx | Adds new messages page UI (contacts, requests, external users). |
| src/components/views/chat/ChatView.tsx | Adds new chat UI (uploads, emoji, project invites, close friends). |
| src/components/views/chat/ChatLayout.tsx | Adds chat layout with “My Teams” + “Close Friends” sections and management dialog. |
| src/components/views/calendar/CalendarView.tsx | Adds calendar view with holidays + project events. |
| src/components/views/calendar/CalendarView.css | Adds styling overrides for react-big-calendar to match app theme. |
| src/components/views/activity/ActivityLogView.tsx | Extends activity log with team/user filtering, persisted stats, and team logo display in feed. |
| src/components/views/activity/ActivityGraph.tsx | Adds activity graph visualization for time/tasks by assignee. |
| backend/services/googleMeet.js | Trims refresh token when setting Google OAuth credentials. |
| backend/routes/teamRoutes.js | Adds PATCH endpoint to transfer team ownership. |
| backend/routes/supportRoutes.js | Switches support email sending to mailer helper and updates default recipient. |
| backend/index.js | Mounts /api/support route. |
| backend/.env.example | Removes backend env example file. |
| .gitignore | Adds ignores for backend/ and docs/. |
Comments suppressed due to low confidence (3)
src/components/views/activity/ActivityLogView.tsx:192
isLeaderis currently derived from(ownedTeams && ownedTeams.length > 0), butownedTeamsis just an arbitrary list of teams passed from the parent (and can be non-empty for regular members). This will enable leader-only views/filters for non-owners. Consider computing leadership from actual team data (e.g., any team whereteam.ownerId === currentUserId), or pass a dedicatedisLeader/ownedTeamsprop that is guaranteed to only contain owned teams.
src/components/views/tasks/TaskDetailDrawer.tsx:50useTaskPersistenceis being initialized withtask?.assignedTo, so opening a task will write analytics to the assignee’s Firestore doc (or a different user) rather than the current viewer. This is both incorrect behavior and potentially a security/privacy issue. Initialize persistence with the authenticated user id (viewer) and includemarkTaskOpenedin the effect deps (or wrap it inuseCallback) to satisfy hooks rules.
src/components/views/layout/DesktopView.tsx:741ActivityLogView’sownedTeamsprop is now being passedmyTeams(teams the user is a member of), not theownedTeamsstate fetched from/api/teams/owned.ActivityLogViewuses this prop to infer leadership (ownedTeams.length > 0) and to build team filters, so this will incorrectly treat any team member as a leader and may break filtering. Pass the actual owned teams list (or rename/rework the prop + leader detection to useownerId === currentUser.uid).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+71
to
76
| } finally { | ||
| syncInProgress.current = false; | ||
| } | ||
| } else if (!user) { | ||
| syncInProgress.current = false; | ||
| } |
Comment on lines
+68
to
+81
| const joinTeamSync = async (inviteCode: string, userId: string) => { | ||
| try { | ||
| // Find team by invite code | ||
| const q = query(collection(db, "teams"), where("inviteCode", "==", inviteCode)); | ||
| const unsubscribe = onSnapshot(q, (snapshot) => { | ||
| snapshot.forEach(async (teamDoc) => { | ||
| await updateDoc(doc(db, "teams", teamDoc.id), { | ||
| members: arrayUnion(userId) | ||
| }); | ||
| }); | ||
| }); | ||
| // Note: In a real production app, we'd use a server-side function or a one-time get | ||
| // but for this sync logic, we'll keep it simple for now. | ||
| } catch (error) { |
Comment on lines
+51
to
+62
| const markTaskOpened = async (taskId: string) => { | ||
| if (!userId) return; | ||
| // In Firestore, we should ideally track individual task statuses in a subcollection | ||
| // but to satisfy "Overdue = user just opened the task" simply, we can increment a counter or track in a map | ||
| try { | ||
| const docRef = doc(db, "tasks", userId); | ||
| const snap = await getDoc(docRef); | ||
| let currentStats = snap.exists() ? snap.data() as TaskStats : { total: 0, inProgress: 0, completed: 0, overdue: 0 }; | ||
|
|
||
| // For now, let's just increment overdue if this is a "new" opening (simulated) | ||
| // A better way would be tracking specific task IDs in a sub-collection | ||
| await setDoc(docRef, { ...currentStats, overdue: (currentStats.overdue || 0) + 1 }, { merge: true }); |
Comment on lines
+28
to
+32
| export interface TeamLogo { | ||
| id: TeamLogoId; | ||
| icon: any; | ||
| label: string; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements several key enhancements to the Team Management and Settings interface:
1. Team Logo Customization
2. Team Settings UI Refactor
3. Ownership Transfer
4. Code & Console Hygiene