Skip to content

feat: refine card activity feed controls by separating notes/comments#527

Open
NDCallahan wants to merge 1 commit into
kanbn:mainfrom
NDCallahan:feat/card-activity-feed-ui
Open

feat: refine card activity feed controls by separating notes/comments#527
NDCallahan wants to merge 1 commit into
kanbn:mainfrom
NDCallahan:feat/card-activity-feed-ui

Conversation

@NDCallahan

@NDCallahan NDCallahan commented Jun 26, 2026

Copy link
Copy Markdown

Description

Separates activity from comments/notes for better organization and sorting. This improves the card view by giving users a dedicated activity feed that's distinct from user comments and notes, making it easier to track changes and updates. Additionally the activies can be sorted.

Type of change

  • Bug fix
  • Feature (requires an approved issue — see below)
  • Refactor / chore
  • Documentation

Checklist

  • I have linked the related issue below
  • My code follows the existing style and conventions
  • I have tested my changes locally
  • I have included screenshots for any UI changes

Linked issue

Closes #525

Screenshots

Short Video of functionality

Feature PRs without a linked, approved issue will be closed without review.
Open or comment on a feature request first and wait for maintainer approval before building.

@hjball

hjball commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Great start @NDCallahan

Few bits of feedback:

  • Filtering and sorting needs to be driven by the API rather than the client to allow for pagination
  • We can get rid of the divider line underneath the tabs
  • I don't think we need "Sort" next to the buttons - we can always use a tooltip if this isn't clear

Give me a shout if I can help with anything

@NDCallahan

Copy link
Copy Markdown
Author
  • Filtering and sorting needs to be driven by the API rather than the client to allow for pagination

So, it appears, there might need to be additions to the API. I'm definiely not a programming expert on the backend. Here's what I think is needed based on review. Please let me know how far off base that I am.

Proposed Solution

Phase 1: API Enhancement

Extend the card.getActivities endpoint to accept filtering and sorting parameters:

// Input Parameters
{
  cardPublicId: string        // Required, existing
  limit?: number              // Optional, existing (1-100, default: 10)
  cursor?: string             // Optional, existing (ISO datetime for pagination)
  filter?: 'all' | 'activity' | 'comments'  // NEW
  sortOrder?: 'asc' | 'desc'  // NEW (default: 'desc')
}

// Response (unchanged structure)
{
  activities: ActivityItem[]
  hasMore: boolean
  nextCursor: string | null
}

Phase 2: Backend Implementation

Modify the card.getActivities route to:

  1. Accept the new filter and sortOrder parameters (with validation)
  2. Apply filtering logic before pagination:
    • Filter activities by type based on filter parameter
    • Activities are already merged by the backend (5-min window for label/description updates)
  3. Apply sorting:
    • "asc": Order by createdAt ascending (oldest first)
    • "desc": Order by createdAt descending (newest first)
  4. Return paginated results with correct nextCursor for the filtered/sorted set

Filtering Logic:

if filter === 'all': return all activities
if filter === 'activity': return activities where type includes "card.updated.*"
if filter === 'comments': return activities where type === "card.updated.comment.added"

Phase 3: Frontend Updates

Modify ActivityList.tsx to:

  1. Pass filter and sortOrder to the API call (instead of filtering locally)
  2. Remove client-side filtering/sorting logic
  3. Update pagination to work with the new API behavior
  4. Handle loading/error states appropriately

@hjball

hjball commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

That sounds correct to me @NDCallahan

Give me a shout if I can help with anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separate Activity and Comments into a Tabbed view

2 participants