Start
@@ -132,7 +155,9 @@ export function SprintWidgetComponent({
{sprint.tasks_total && sprint.tasks_total > 0 && (
-
Task Progress
+
+ Task Progress
+
{progress}%
@@ -142,7 +167,8 @@ export function SprintWidgetComponent({
/>
- {sprint.tasks_completed || 0} of {sprint.tasks_total} tasks completed
+ {sprint.tasks_completed || 0} of {sprint.tasks_total} tasks
+ completed
)}
@@ -150,7 +176,9 @@ export function SprintWidgetComponent({
{/* Scope */}
{sprint.scope && (
-
Scope
+
+ Scope
+
{sprint.scope}
)}
@@ -159,8 +187,12 @@ export function SprintWidgetComponent({
{sprint.team_size && (
-
Team Size
-
{sprint.team_size} members
+
+ Team Size
+
+
+ {sprint.team_size} members
+
diff --git a/client/components/TeamWidget.tsx b/client/components/TeamWidget.tsx
index 55979832..50e27ca9 100644
--- a/client/components/TeamWidget.tsx
+++ b/client/components/TeamWidget.tsx
@@ -1,4 +1,10 @@
-import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Users, MessageCircle, ExternalLink } from "lucide-react";
@@ -108,7 +114,9 @@ export function TeamWidget({
-
{member.name}
+
+ {member.name}
+
{member.role}
{member.title && (
{member.title}
@@ -118,7 +126,9 @@ export function TeamWidget({
{/* Bio */}
{member.bio && (
-
{member.bio}
+
+ {member.bio}
+
)}
{/* Links */}
diff --git a/client/lib/arm-affiliation-service.ts b/client/lib/arm-affiliation-service.ts
index c662534a..dc2dd5ba 100644
--- a/client/lib/arm-affiliation-service.ts
+++ b/client/lib/arm-affiliation-service.ts
@@ -14,7 +14,9 @@ export const armAffiliationService = {
/**
* Check if user has enrolled in any Foundation courses
*/
- async hasFoundationActivity(userId: string): Promise<{ detected: boolean; count: number }> {
+ async hasFoundationActivity(
+ userId: string,
+ ): Promise<{ detected: boolean; count: number }> {
try {
const { data: enrollments, error } = await supabase
.from("course_enrollments")
@@ -23,7 +25,10 @@ export const armAffiliationService = {
.limit(1);
if (error) throw error;
- return { detected: (enrollments?.length ?? 0) > 0, count: enrollments?.length ?? 0 };
+ return {
+ detected: (enrollments?.length ?? 0) > 0,
+ count: enrollments?.length ?? 0,
+ };
} catch (error) {
console.error("Error checking Foundation activity:", error);
return { detected: false, count: 0 };
@@ -33,7 +38,9 @@ export const armAffiliationService = {
/**
* Check if user has GameForge projects/teams
*/
- async hasGameForgeActivity(userId: string): Promise<{ detected: boolean; count: number }> {
+ async hasGameForgeActivity(
+ userId: string,
+ ): Promise<{ detected: boolean; count: number }> {
try {
const { data: projects, error: projectError } = await supabase
.from("gameforge_projects")
@@ -62,7 +69,9 @@ export const armAffiliationService = {
/**
* Check if user has Labs research activities
*/
- async hasLabsActivity(userId: string): Promise<{ detected: boolean; count: number }> {
+ async hasLabsActivity(
+ userId: string,
+ ): Promise<{ detected: boolean; count: number }> {
try {
const { data: research, error } = await supabase
.from("labs_research_tracks")
@@ -71,7 +80,10 @@ export const armAffiliationService = {
.limit(1);
if (error) throw error;
- return { detected: (research?.length ?? 0) > 0, count: research?.length ?? 0 };
+ return {
+ detected: (research?.length ?? 0) > 0,
+ count: research?.length ?? 0,
+ };
} catch (error) {
console.error("Error checking Labs activity:", error);
return { detected: false, count: 0 };
@@ -81,7 +93,9 @@ export const armAffiliationService = {
/**
* Check if user has Corp-related activities
*/
- async hasCorpActivity(userId: string): Promise<{ detected: boolean; count: number }> {
+ async hasCorpActivity(
+ userId: string,
+ ): Promise<{ detected: boolean; count: number }> {
try {
// Corp activities could include partnerships, investments, or business accounts
const { data: accounts, error } = await supabase
@@ -91,7 +105,10 @@ export const armAffiliationService = {
.limit(1);
if (error) throw error;
- return { detected: (accounts?.length ?? 0) > 0, count: accounts?.length ?? 0 };
+ return {
+ detected: (accounts?.length ?? 0) > 0,
+ count: accounts?.length ?? 0,
+ };
} catch (error) {
// Corp table may not exist yet, return false
return { detected: false, count: 0 };
@@ -101,7 +118,9 @@ export const armAffiliationService = {
/**
* Check if user has DevLink/Roblox development activity
*/
- async hasDevLinkActivity(userId: string): Promise<{ detected: boolean; count: number }> {
+ async hasDevLinkActivity(
+ userId: string,
+ ): Promise<{ detected: boolean; count: number }> {
try {
const { data: devLinkProfiles, error } = await supabase
.from("devlink_profiles")
@@ -110,7 +129,10 @@ export const armAffiliationService = {
.limit(1);
if (error && error.code !== "42P01") throw error; // Ignore table not found errors
- return { detected: (devLinkProfiles?.length ?? 0) > 0, count: devLinkProfiles?.length ?? 0 };
+ return {
+ detected: (devLinkProfiles?.length ?? 0) > 0,
+ count: devLinkProfiles?.length ?? 0,
+ };
} catch (error) {
// Table may not exist yet
return { detected: false, count: 0 };
@@ -133,31 +155,41 @@ export const armAffiliationService = {
{
arm: "foundation",
detected: foundation.detected,
- reason: foundation.detected ? `${foundation.count} course(s) enrolled` : "No courses enrolled",
+ reason: foundation.detected
+ ? `${foundation.count} course(s) enrolled`
+ : "No courses enrolled",
activityCount: foundation.count,
},
{
arm: "gameforge",
detected: gameforge.detected,
- reason: gameforge.detected ? `${gameforge.count} project(s) and team(s)` : "No projects or teams",
+ reason: gameforge.detected
+ ? `${gameforge.count} project(s) and team(s)`
+ : "No projects or teams",
activityCount: gameforge.count,
},
{
arm: "labs",
detected: labs.detected,
- reason: labs.detected ? `${labs.count} research track(s)` : "No research tracks",
+ reason: labs.detected
+ ? `${labs.count} research track(s)`
+ : "No research tracks",
activityCount: labs.count,
},
{
arm: "corp",
detected: corp.detected,
- reason: corp.detected ? `${corp.count} corp account(s)` : "No corp accounts",
+ reason: corp.detected
+ ? `${corp.count} corp account(s)`
+ : "No corp accounts",
activityCount: corp.count,
},
{
arm: "devlink",
detected: devlink.detected,
- reason: devlink.detected ? "DevLink profile created" : "No DevLink profile",
+ reason: devlink.detected
+ ? "DevLink profile created"
+ : "No DevLink profile",
activityCount: devlink.count,
},
];
@@ -172,22 +204,25 @@ export const armAffiliationService = {
for (const affiliation of detectedArms) {
if (affiliation.detected) {
- await fetch(`${import.meta.env.VITE_API_BASE}/api/user/arm-affiliations`, {
- method: "POST",
- headers: {
- Authorization: `Bearer ${token}`,
- "Content-Type": "application/json",
- },
- body: JSON.stringify({
- arm: affiliation.arm,
- affiliation_type: "courses", // Generic type for auto-detected
- affiliation_data: {
- detected: true,
- reason: affiliation.reason,
+ await fetch(
+ `${import.meta.env.VITE_API_BASE}/api/user/arm-affiliations`,
+ {
+ method: "POST",
+ headers: {
+ Authorization: `Bearer ${token}`,
+ "Content-Type": "application/json",
},
- confirmed: false,
- }),
- });
+ body: JSON.stringify({
+ arm: affiliation.arm,
+ affiliation_type: "courses", // Generic type for auto-detected
+ affiliation_data: {
+ detected: true,
+ reason: affiliation.reason,
+ },
+ confirmed: false,
+ }),
+ },
+ );
}
}
} catch (error) {
diff --git a/client/pages/Dashboard.tsx b/client/pages/Dashboard.tsx
index dc089e34..b3bfce65 100644
--- a/client/pages/Dashboard.tsx
+++ b/client/pages/Dashboard.tsx
@@ -115,9 +115,20 @@ const ARMS = [
export default function Dashboard() {
const navigate = useNavigate();
- const { user, profile, loading: authLoading, signOut, profileComplete, linkedProviders, linkProvider, unlinkProvider } = useAuth();
+ const {
+ user,
+ profile,
+ loading: authLoading,
+ signOut,
+ profileComplete,
+ linkedProviders,
+ linkProvider,
+ unlinkProvider,
+ } = useAuth();
const [searchParams] = useSearchParams();
- const [activeTab, setActiveTab] = useState(() => searchParams.get("tab") ?? "realms");
+ const [activeTab, setActiveTab] = useState(
+ () => searchParams.get("tab") ?? "realms",
+ );
const [displayName, setDisplayName] = useState("");
const [bio, setBio] = useState("");
const [website, setWebsite] = useState("");
@@ -218,7 +229,10 @@ export default function Dashboard() {
Dashboard
- Welcome back, {profile?.full_name || user.email?.split("@")[0]}
+ Welcome back,{" "}
+
+ {profile?.full_name || user.email?.split("@")[0]}
+