Skip to content

fix: Activity timeline for company and deal entities#49

Merged
anujeet98 merged 1 commit intomainfrom
fix/activity-for-company-and-deals
Mar 20, 2026
Merged

fix: Activity timeline for company and deal entities#49
anujeet98 merged 1 commit intomainfrom
fix/activity-for-company-and-deals

Conversation

@Rishavraaj
Copy link
Contributor

@Rishavraaj Rishavraaj commented Mar 18, 2026

fix: Activity timeline for company and deal entities

Problem

Company and deal activity timelines were returning 404 errors:

  • Company 404 — the frontend API client pluralized "company" as "companys" instead of "companies", so requests hit a non-existent route.
  • Deal 404DealActivitiesController was never implemented, so GET /deals/:id/activities and POST /deals/:id/activities/comments didn't exist.

Contact activities were unaffected as "contact""contacts" is a regular plural.


Changes

Backend

  • Add DealActivitiesController with GET /deals/:dealId/activities and POST /deals/:dealId/activities/comments routes
  • Register DealActivitiesController in SalesModule

Frontend

  • Fix entity pluralization in activities.ts: company → companies (was companys)

E2E Tests

  • Expand DealDetailPage with full activity helper methods (createComment, editComment, cancelEditComment, isPostButtonDisabled, hasNoActivityMessage, etc.)
  • Uncomment and re-enable 3 previously skipped deal activity tests in deals.spec.ts
  • Add deal-activities.spec.ts with a full timeline test suite

Test Plan

  • Navigate to a company detail page — activity timeline loads without 404
  • Post a comment on a company — comment appears in timeline
  • Navigate to a deal detail page — activity timeline loads without 404
  • Post a comment on a deal — comment appears in timeline
  • Edit and cancel editing a deal comment
  • Run bun e2e — all deal activity tests pass

Root Cause

Entity Plural (expected) Plural (actual) Result
contact contacts contacts
company companies companys ❌ 404
deal deals deals ❌ 404 (no controller)

…e2e tests

- Add DealActivitiesController with GET timeline and POST comment routes
- Register DealActivitiesController in SalesModule
- Fix company entity pluralization bug (companys → companies) in frontend API client
- Expand DealDetailPage with full activity helper methods
- Uncomment and enable previously skipped deal activity timeline tests
- Add deal-activities.spec.ts with full timeline e2e test suite

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Rishavraaj Rishavraaj self-assigned this Mar 18, 2026
@anujeet98 anujeet98 merged commit e390806 into main Mar 20, 2026
1 check passed
@anujeet98 anujeet98 deleted the fix/activity-for-company-and-deals branch March 20, 2026 05:53
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.

2 participants