Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 7, 2025

Adds a column to the user statistics table showing each user's most recently added semantic domain with timestamp and provenance.

Backend

  • Extended SemanticDomainUserCount model with RecentDomain property
  • Modified GetSemanticDomainUserCounts to track most recent domain by Created timestamp, removing UserId from returned clone
  • Added test verifying correct timestamp comparison and userId removal

Frontend

  • Added column between "Domains" and "Words" using DomainChip with provenance enabled
  • Updated TypeScript model and factory function to include recentDomain field
  • Added translation key statistics.column.recentDomain

The DomainChip component displays the domain ID and name, with hover text showing the creation timestamp and username (fetched separately by the chip).

Original prompt

This section details on the original issue you should resolve

<issue_title>[Statistics]</issue_title>
<issue_description>In src/.components/Statistics/UserStatistics.tsx, there's a table with 3 columns. Add a new column that gives the most recent semantic domain added by the user.

Details:

  • GetSemanticDomainUserCounts in Backend/Services/StatisticsService.cs will need to also return the semantic domain with the most recent timestamp for each project user
  • new UserStatistics.tsx column: recentDomain, right after domainCount
  • cell content uses src/components/WordCard/DomainChip.tsx with the following props:
    • provenance: true
    • most recent domain with userId removed</issue_description>

<agent_instructions>Commit messages should satisfy https://github.com/sillsdev/TheCombine/blob/master/.github/workflows/commit_message_check.yml</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


This change is Reviewable

Copilot AI changed the title [WIP] Add recent domain column to user statistics table Add recent semantic domain column to user statistics Nov 7, 2025
Copilot finished work on behalf of imnasnainaec November 7, 2025 20:45
Copilot AI requested a review from imnasnainaec November 7, 2025 20:46
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.64%. Comparing base (a54e777) to head (69ef847).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4022      +/-   ##
==========================================
+ Coverage   74.58%   74.64%   +0.05%     
==========================================
  Files         293      293              
  Lines       10817    10829      +12     
  Branches     1353     1355       +2     
==========================================
+ Hits         8068     8083      +15     
+ Misses       2354     2351       -3     
  Partials      395      395              
Flag Coverage Δ
backend 85.55% <100.00%> (+0.09%) ⬆️
frontend 66.23% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@imnasnainaec
Copy link
Collaborator

Before:
Screenshot 2025-11-07 163609

After (with hover-text shown for one chip):
Screenshot 2025-11-07 163903

@imnasnainaec imnasnainaec marked this pull request as ready for review November 7, 2025 22:15
@imnasnainaec imnasnainaec changed the title Add recent semantic domain column to user statistics [UserStatistics] Add recent semantic domain column Nov 10, 2025
@imnasnainaec imnasnainaec added the 🟩Low Low-priority PR label Nov 10, 2025
Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@jasonleenaylor reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @copilot and @imnasnainaec)

@imnasnainaec imnasnainaec merged commit 9734714 into master Nov 20, 2025
19 checks passed
@imnasnainaec imnasnainaec deleted the copilot/add-recent-domain-column branch November 20, 2025 19:43
@imnasnainaec imnasnainaec added the enhancement New feature or request label Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UserStatistics] Add column for user's most recent domain

3 participants