Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Member activity reports #93

Merged
merged 10 commits into from
Dec 20, 2024
Merged

Member activity reports #93

merged 10 commits into from
Dec 20, 2024

Conversation

vcarl
Copy link
Member

@vcarl vcarl commented Dec 16, 2024

This is an early draft PR of a first revision of a feature to support the Reactiflux Star Helper program — tho it will be useful for other types of roles as well! That's the whole point of automating this.

Screenshot 2024-12-16 at 2 15 19 AM

This is ~ a proof of concept to get a query together for examining the data, which it accomplishes. There's a lot lot lot of supporting code needed to turn this into "a feature", my intentions with this PR are to get enough code together to support the 2024 Q4 Star Helper program, then productize in the next few months.

Some examples of work that will need to be done before this is a production feature:

  • Add configurable channels/categories, and intervals
  • Flexible scoring criteria
  • Clearer details around data collection (privacy policy — I believe we're very light here, as we don't store any content, just metadata)
  • Inline scoring/member review? (I don't think it's feasible to pull in user history here, as I don't want to store it and Discord doesn't make it convenient to retrieve)
  • Exploration into the best reporting options (inline discord messages from the bot? attached PDFs/PNGs? web app?)

This is basically a baseline query to get minimum-required data out. I'd like to improve this to do more work at the database, rather than pulling it out and munging it around in JS
Copy link

what-the-diff bot commented Dec 16, 2024

PR Summary

  • Modification in Message Stats Data Type
    The data type of 'sent_at' in MessageStats has been changed from 'string' to 'number'. This update will ensure consistent, precise, and efficient handling of data.

  • Addition of 'activity.server.ts' file
    A new file activity.server.ts is added, which:

    • Provides functionality to identify top participants based on message stats within a specific period.
    • Implements SQL queries to consolidate message data, which also takes into account participant characteristics like message count and word count.
    • Includes supportive functions to group and fill date gaps in the participation data for maintaining data continuity.
  • Establishment of new dashboard route
    A new route in dashboard.tsx has been created, which:

    • Facilitates a loading function to fetch top participants' data as per the start and end dates from the URL.
    • Presents a straightforward form for users allowing them to input their date range.
    • Provides the data of participants in a well-organised table using sparkline charts for an easy to understand data visualization.
  • Update of package resource files
    The files package.json and package-lock.json have been updated to bring in new dependencies for react-sparklines and the corresponding types for expected performance improvement and efficient functioning.

@vcarl vcarl marked this pull request as ready for review December 20, 2024 02:56
@vcarl
Copy link
Member Author

vcarl commented Dec 20, 2024

This was helpful enough to get me ready to review Star Helpers, but there's a lot of work to be done productizing it. Scoped out some projects, see #94 and subissues. This is worth merging though so it's not just hanging out, I've gated it behind an isProd() check so it's inaccessible.

@vcarl vcarl merged commit 954d75e into main Dec 20, 2024
5 checks passed
@vcarl vcarl deleted the vc-sh-reporting branch December 20, 2024 02:57
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.

1 participant