Skip to content

Fix: Recent Activity section on Dashboard shows hardcoded fake data instead of real eventsΒ #100

@Ananya-CM

Description

@Ananya-CM

πŸ› Bug Report

Area: Dashboard β€” Recent Activity Section
Type: Bug β€” Hardcoded Static Data
Priority: Medium


πŸ“Œ Description

The Recent Activity section on the Dashboard
page displays completely hardcoded fake events
that never change, regardless of what the user
actually does in the app.


πŸ” Proof β€” Hardcoded Data in Source Code

In frontend/app/dashboard/page.tsx:

<ul className="text-sm text-slate-600 space-y-2">
  <li>βœ” New sprint created</li>
  <li>βœ” Task updated in Project Alpha</li>
  <li>βœ” Team member joined workspace</li>
</ul>

These 3 items are hardcoded strings β€” they
never update based on real user activity.


❌ Current Behaviour

  • Every user sees identical fake activity:
    "New sprint created", "Task updated in
    Project Alpha", "Team member joined workspace"
  • Activity never changes regardless of
    what the user actually does
  • Completely disconnected from real data

βœ… Expected Behaviour

  • Show real recent activity from the user's
    workspace (project creation, updates etc.)
  • If no activity exists yet, show a clean
    empty state: "No recent activity yet"
  • Activity list should reflect actual
    user actions

πŸ’‘ Proposed Fix

In frontend/app/dashboard/page.tsx:

  1. Replace hardcoded <ul> with dynamic state:
const [activity, setActivity] = useState
  { text: string; time: string }[]
>([]);
  1. Fetch recent activity from Supabase
    projects table (recently created/updated):
useEffect(() => {
  const fetchActivity = async () => {
    if (!supabase) return;
    const { data: { session } } = 
      await supabase.auth.getSession();
    if (!session) return;
    const { data } = await supabase
      .from("projects")
      .select("name, created_at")
      .order("created_at", { ascending: false })
      .limit(5);
    if (data) {
      setActivity(data.map(p => ({
        text: `Project "${p.name}" created`,
        time: new Date(p.created_at)
          .toLocaleDateString()
      })));
    }
  };
  fetchActivity();
}, []);
  1. Show empty state if no activity found

πŸ“‚ File to Change

frontend/app/dashboard/page.tsx β€” only this file


πŸ–₯️ Steps to Reproduce

  1. Log in to the app
  2. Navigate to /dashboard
  3. Scroll to "Recent Activity" section
  4. Observe the same 3 fake hardcoded items
  5. Create a new project β€” activity
    section still shows same fake items

@Shriii19
I'd like to work on this issue.
Could you please assign it to me?

nsoc26

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions