π Bug Report
Area: Dashboard β User greeting and Stats section
Type: Bug β Hardcoded Static Data
Priority: High β every user sees wrong name
π Description
The Dashboard page displays hardcoded data for
both the user greeting and the stats section.
Every user who logs in sees "Welcome back, Anshi π"
and the same fake statistics, regardless of who
is actually logged in or what their real data is.
π Proof β Hardcoded Data in Source Code
In frontend/app/dashboard/page.tsx:
const user = {
name: "Anshi", // β hardcoded name
role: "admin", // β hardcoded role
};
And the stats section:
const stats = [
{ title: "Velocity", value: "+18%", icon: TrendingUp },
{ title: "Deploys", value: "24", icon: Rocket },
{ title: "Incidents", value: "2", icon: AlertTriangle },
];
These are completely static β no connection to
any real user session or actual project data.
β Current Behaviour
- Every user sees "Welcome back, Anshi π"
regardless of their actual name
- Stats show the same fake numbers for everyone
- No connection to real Supabase auth session
- Logged-in user's actual name is ignored
β
Expected Behaviour
- Greeting should show the actual logged-in
user's name from Supabase session:
"Welcome back, [Real Name] π"
- Role should reflect real user role from
the profiles table
- Stats should either show real computed
values OR show a clear placeholder state
indicating data is not yet available
π‘ Proposed Fix
In frontend/app/dashboard/page.tsx:
- Replace hardcoded
user object with real
session data fetched from Supabase:
const [user, setUser] = useState({
name: "User", role: "member"
});
useEffect(() => {
const getUser = async () => {
const { data: { session } } =
await supabase.auth.getSession();
if (session?.user) {
const name =
session.user.user_metadata?.full_name
|| session.user.email
|| "User";
setUser({ name, role: "member" });
}
};
getUser();
}, []);
- Replace hardcoded stats values with
placeholder state that clearly shows
data is not yet integrated:
const stats = [
{ title: "Velocity", value: "β", icon: TrendingUp },
{ title: "Deploys", value: "β", icon: Rocket },
{ title: "Incidents", value: "β", icon: AlertTriangle },
];
π File to Change
frontend/app/dashboard/page.tsx β only this file
π₯οΈ Steps to Reproduce
- Sign up with any name (e.g. "Test User")
- Log in at
http://localhost:3000/login
- Navigate to
http://localhost:3000/dashboard
- Observe greeting says "Welcome back, Anshi π"
instead of your actual name
- Observe same fake stats for every user
@Shriii19
I'd like to work on this issue.
Could you please assign it to me?
nsoc26
π Bug Report
Area: Dashboard β User greeting and Stats section
Type: Bug β Hardcoded Static Data
Priority: High β every user sees wrong name
π Description
The Dashboard page displays hardcoded data for
both the user greeting and the stats section.
Every user who logs in sees "Welcome back, Anshi π"
and the same fake statistics, regardless of who
is actually logged in or what their real data is.
π Proof β Hardcoded Data in Source Code
In
frontend/app/dashboard/page.tsx:And the stats section:
These are completely static β no connection to
any real user session or actual project data.
β Current Behaviour
regardless of their actual name
β Expected Behaviour
user's name from Supabase session:
"Welcome back, [Real Name] π"
the profiles table
values OR show a clear placeholder state
indicating data is not yet available
π‘ Proposed Fix
In
frontend/app/dashboard/page.tsx:userobject with realsession data fetched from Supabase:
placeholder state that clearly shows
data is not yet integrated:
π File to Change
frontend/app/dashboard/page.tsxβ only this fileπ₯οΈ Steps to Reproduce
http://localhost:3000/loginhttp://localhost:3000/dashboardinstead of your actual name
@Shriii19
I'd like to work on this issue.
Could you please assign it to me?
nsoc26