feat(frontend): add user activity timeline with chronological history and user isolation - #177
Merged
Abd-Standard merged 1 commit intoAug 30, 2026
Conversation
…y and user isolation
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.
closes #168
Detailed PR Description
Summary
This pull request implements the User Activity Timeline feature in the frontend application. It provides users with a central, chronological activity stream tracking their actions
across the platform—such as saving grants, submitting applications, updating profiles, and submitting bounty deliverables.
All activity data is strictly isolated per user (ensuring users only see events tied to their wallet/account), formatted with relative timestamps, categorized with tailored icon
styling, and integrated directly into the User Overview dashboard.
Key Features & Architecture
1. Activity Domain Types (
frontend/src/types/activity.ts)ActivityTypeunion supporting key platform events:grant_saved/grant_unsavedapplication_submitted/application_status_updatedaccount_updated/profile_updatedbounty_created/submission_created/submission_reviewedcomment_postedActivityRecordstructure including typed metadata fields (e.g.grantId,grantName,taskId,status,updatedFields).CreateActivityInput,ListActivitiesQuery).2. In-Memory Activity Store (
frontend/src/lib/activity-store.ts)userId, preventing cross-user data leakage.timestampnewest first).typeas well aslimitandoffsetpagination.3. Activity API Endpoints (
frontend/src/app/api/activities/route.ts)GET /api/activities?userId=<address>&type=<type>&limit=<n>&offset=<n>:userIdpresence (returns400if missing).checkRateLimit) and appliesCache-Control: no-storeheaders.{ ok: true, activities: [...], total: n }.POST /api/activities:userId,type,title), and records the activity.201 Createdwith the newly createdActivityRecord.4. Custom Hook & UI Component
useActivityTimelineHook (frontend/src/hooks/useActivityTimeline.ts):addActivity().UserActivityTimelineComponent (frontend/src/components/UserActivityTimeline.tsx):Just now,Xm ago,Xh ago,Xd ago).lucide-reactand Tailwind CSS).framer-motion.frontend/src/app/(dashboard)/user/overview/page.tsx):getPublicKey()fromstellar-wallets-kitto automatically populate the timeline for the active user.Acceptance Criteria Verification
userId.frontend/**, ensuringfrontend-ci.ymlruns properly without triggering unmodified smart contractworkflows.
Test Plan & Coverage
Unit Tests
frontend/src/lib/activity-store.test.ts:frontend/src/lib/activities-api.test.ts:GETerror handling whenuserIdis missing.GETresponse structure and status codes.POSTpayload validation and successful activity creation.frontend/src/test/regression.test.ts: