1
0
mirror of synced 2026-07-20 03:05:07 +00:00

62 Commits

Author SHA1 Message Date
Rafael dos Santos Silva d9f9e0c461 UX: New visualizations for new reports (#34)
This adds some new visualizations and styles and reports and cleans up
some existing styles and class names.

Daily activity rhythm 

<img width="1588" height="412" alt="image"
src="https://github.com/user-attachments/assets/0c7980e4-7bb6-4e08-9957-24c3c5718572"
/>


Helping new members

<img width="1456" height="310" alt="image"
src="https://github.com/user-attachments/assets/096a13da-ab63-45d4-9b68-53a01df62a78"
/>

Chat activity 

<img width="1442" height="926" alt="image"
src="https://github.com/user-attachments/assets/07ce2cab-1963-4918-a9ff-805c251a1377"
/>

Assigns 

<img width="1388" height="844" alt="image"
src="https://github.com/user-attachments/assets/ee49c6ee-2da6-4bfa-b500-715ed7ceb13a"
/>

AI usage 

<img width="1442" height="1254" alt="image"
src="https://github.com/user-attachments/assets/b382bffb-010d-4072-9144-cb7e6a8680e3"
/>

Invitations 

<img width="1486" height="1346" alt="image"
src="https://github.com/user-attachments/assets/020f68a9-69d2-46ed-9f38-b0d5e98d02de"
/>

Writing analysis

<img width="917" height="409" alt="image"
src="https://github.com/user-attachments/assets/1147427c-513f-4737-8f28-99bfc6f4aff9"
/>

---------

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
Co-authored-by: Martin Brennan <martin@discourse.org>
2025-12-02 09:41:30 -05:00
Martin Brennan 26a77d4c69 DEV: Adding specs and refactors (#21)
Add specs for the following reports:

* Reading time
* Activity calendar
* Best posts
* Best topics
* Top words
* Most viewed tags
* Most viewed categories

Did some minor UI and ruby refactors for related components.

Also made a minor change to the Activity calendar, to show a title based
on the number of posts or if the user was active on hover.

Still missing specs for:

* Reactions
* FBFF

And the newly added reports that don't yet have UI components.
2025-12-01 10:08:30 +10:00
Rafael dos Santos Silva 09ee91ad67 DEV: FakeData for all reports (#32) 2025-11-26 15:50:18 -03:00
Rafael dos Santos Silva f4560c2292 PERF: Migrate AI usage report to use AiApiRequestStat for better perf (#31)
Changes the AiUsage report to query AiApiRequestStat instead of
AiApiAuditLog for significantly improved query performance.
2025-11-26 12:24:07 -03:00
Martin Brennan 1cdd3fd708 FIX: Various bugs from 2024 rewind (#29)
* Use post excerpt for best posts to avoid giant posts
  ruining it
* Make sure short emojis (e.g. `😂`) render in best posts
  and best topics
* Make images show in best post excerpts (requires core change)
* Fix invite action error, using column that doesn't exist
* Add missing # for top category slugs
* Refactor report service + controller a little to make it easier
  to figure out what went wrong if it fails, and to use the guardian
  user

Copies a couple of fixes from
https://github.com/discourse/discourse-rewind/pull/28 to make
things work locally, the conflicts will be easy to resolve.

**Best topics before**

<img width="977" height="712" alt="image"
src="https://github.com/user-attachments/assets/e120507f-d0d8-44f0-b242-e1056084ef03"
/>


**Best topics after**

<img width="969" height="648" alt="image"
src="https://github.com/user-attachments/assets/dd13f6ac-35df-4e9a-907e-9ed5102843b6"
/>

**Categories before**

<img width="904" height="465" alt="image"
src="https://github.com/user-attachments/assets/0d15e73d-3534-4836-b776-2c97381e58ef"
/>


**Categories after**

<img width="925" height="466" alt="image"
src="https://github.com/user-attachments/assets/3d6e4eae-32ed-4f11-a4f4-090e4473ebe9"
/>
2025-11-19 09:36:08 +10:00
Kris 972cc6e5d9 UX: restyling for 2025 (#28)
This generally updates the styles for the 2025 version. I also made more
features work in development environments (so it's easier to test) and
fixed an issue with invites that was causing the report to not show.


<img width="400" alt="image"
src="https://github.com/user-attachments/assets/69a62b79-12e3-4539-a82c-9bbf9673abe2"
/>

<img width="1554" height="896" alt="image"
src="https://github.com/user-attachments/assets/60fabac5-6f20-4e01-9679-fd228c6850c2"
/>

<img width="754" height="459" alt="image"
src="https://github.com/user-attachments/assets/6725c6e2-1bac-417e-b4ee-190841ab656b"
/>

<img width="1472" height="490" alt="image"
src="https://github.com/user-attachments/assets/87c95e6a-5d78-4fb6-9f2d-dad13bcc9788"
/>

<img width="1480" height="702" alt="image"
src="https://github.com/user-attachments/assets/67bec8f9-dce5-4077-a07d-fe9e13696958"
/>
2025-11-18 09:03:41 -05:00
Martin Brennan a600db4d06 FIX: Rename Favorite Tags/Categories to Most Viewed Tags/Categories and isRewindActive fixes (#27)
This was confusing people last year, most people assumed it meant
the tags they used the most / categories they posted in the most.
This should clear things up.

Also removes the `isRewindActive` function in favour of
`is_rewind_active`
on the current user, since then we only have one place to check this,
and
it makes testing easier since we don't have to mock browser time.

Finally it moves the route for rewind in the UI to the new route path
format.
2025-11-07 10:20:25 +10:00
Rafael dos Santos Silva 93b37e4069 FEATURE: Add seven new metrics to Discourse Rewind reports (#26)
## Summary
Adds seven new metrics to the Discourse Rewind plugin, significantly expanding the types of insights users can get about their annual
activity. These new reports cover temporal patterns, community engagement, plugin integrations, and content analysis.

## New Reports

### 1. Time of Day Activity (`time-of-day-activity`)
- Analyzes user activity by hour in their timezone
- Determines personality type: "early bird" (6-9am), "night owl" (10pm-2am), or "balanced"
- Aggregates posts, chat messages, and page views

### 2. New User Interactions (`new-user-interactions`)
- Tracks veteran mentorship and community building behavior
- Measures likes, replies, and mentions to users who joined this year
- Shows unique new users interacted with and total engagement

### 3. Chat Usage (`chat-usage`)
- Total messages and average message length
- Top 5 favorite channels with message counts
- DM statistics (message count, unique conversations)
- Reactions received on messages

### 4. AI Usage (`ai-usage`)
- Integrates with `discourse-ai` plugin
- Total requests, tokens consumed (request/response breakdown)
- Top 5 most used features and AI models
- Success rate calculation

### 5. Favorite GIFs (`favorite-gifs`)
- Extracts GIFs from posts and chat messages
- Ranks by engagement score (usage × 10 + likes + reactions)
- Supports Giphy, Tenor, and direct GIF URLs
- Shows top 5 GIFs with usage statistics

### 6. Assignments (`assignments`)
- Integrates with `discourse-assign` plugin
- Tracks assignments received and given
- Shows completion rate and pending assignments

### 7. Invites (`invites`)
- Total invites sent and redemption rate
- Impact metrics: invitee posts, topics, and likes created
- Most active invitee identification
- Average trust level of invitees

## Technical Details
- All reports extend `BaseReport` class
- Include proper enablement checks for plugin dependencies
- Use efficient database queries with proper joins and aggregations
- Return `nil` when no relevant data exists

Co-authored-by: Martin Brennan <mjrbrennan@gmail.com>
2025-10-30 11:18:35 -03:00
Jarek Radosz cdf6f0d0e7 DEV: Update linting (#23) 2025-10-09 13:53:37 +01:00
Jarek Radosz 5e2acd9c2d DEV: Update linting (#15) 2025-03-17 11:03:35 +00:00
Jordan Vidrine b3f205375a UX: Text & width adjustments (#9) 2025-01-22 12:23:40 -03:00
Rafael Silva 824d4a426b Restrict tags and categories to user visibility level 2025-01-21 12:45:57 -03:00
Joffrey JAFFEUX 6a7efb7f0c disable favorite tags for now 2025-01-20 18:49:08 +01:00
Joffrey JAFFEUX a59d6c7931 caching and load order 2025-01-20 16:50:51 +01:00
Rafael dos Santos Silva 19af3cb107 Merge pull request #7 from jjaffeux/category-links
UX: Match category cards with tag cards
2025-01-15 09:45:32 -03:00
Jordan Vidrine 7cc39605f5 linting 2025-01-14 19:02:34 -06:00
Jordan Vidrine fed8205a64 DEV: Add fake category data 2025-01-14 15:57:23 -06:00
Jordan Vidrine 6a55f56b91 Merge pull request #6 from jjaffeux/reading-series 2025-01-14 15:37:39 -06:00
Rafael Silva 17e30c3933 lint 2025-01-14 18:30:10 -03:00
Jordan Vidrine ef21ee6b35 DEV: Format 2025-01-14 15:27:23 -06:00
Jordan Vidrine b358456b65 more 2025-01-14 15:19:16 -06:00
Jordan Vidrine 472783d1c1 DEV: Add correct data to method 2025-01-14 15:17:10 -06:00
Jordan Vidrine ff72e3ed37 UX: Adjust styles for long words 2025-01-14 11:30:13 -06:00
Jordan Vidrine 2e8e292b01 UX: More books styling (#4)
Allows to style books as series

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-01-14 17:49:57 +01:00
Jordan Vidrine 444085caeb Titles 2025-01-14 09:05:45 -06:00
Jordan Vidrine 6982e76294 more book images 2025-01-14 09:04:12 -06:00
Rafael Silva 33476eafb4 More books suggested by sam 2025-01-14 11:17:55 -03:00
Rafael Silva b6b36f9e4a Fix reaction ordering 2025-01-13 18:56:40 -03:00
Rafael Silva 5fa624a0e7 Fix reaction counting 2025-01-13 18:38:52 -03:00
Joffrey JAFFEUX ac95880bdb disabling cache for now 2025-01-13 22:29:42 +01:00
Joffrey JAFFEUX 193f92c89b requires_login 2025-01-13 18:17:02 +01:00
Joffrey JAFFEUX 6bd637b7b0 fixes 2025-01-13 17:00:32 +01:00
Joffrey JAFFEUX 3049646b65 favorite categories/tags 2025-01-13 14:40:07 +01:00
Joffrey JAFFEUX b985dc8d25 i18n 2025-01-13 13:12:12 +01:00
Joffrey JAFFEUX 2f7cd88bf2 more reports and fake data 2025-01-09 17:55:58 +01:00
Joffrey JAFFEUX 88d928c315 fake data 2025-01-09 16:52:32 +01:00
Jordan Vidrine d32072e974 books 2025-01-08 15:11:42 -06:00
Joffrey JAFFEUX 90a03dec31 create kitchen sink spec for fake data 2025-01-07 23:26:17 +01:00
Jordan Vidrine 5e7daba027 styling: 2025-01-06 11:53:18 -06:00
Joffrey JAFFEUX 9847ecfe6e bests posts/topics 2025-01-03 17:25:18 +01:00
Joffrey JAFFEUX e9e6d80eac simple word cloud 2025-01-03 17:11:20 +01:00
Joffrey JAFFEUX 27b843f2c5 various tweaks 2025-01-02 22:15:10 +01:00
Joffrey JAFFEUX 3af6a12a55 start implementing reports 2024-12-20 18:56:02 +01:00
Rafael Silva bc80558e2d More reports 2024-12-19 15:31:12 -03:00
Joffrey JAFFEUX 1ce447e37f correct class name 2024-12-17 21:21:22 +01:00
Rafael Silva bf0f068938 Word Cloud report 2024-12-13 14:14:13 -03:00
Joffrey JAFFEUX 66ec74bf2b DEV: move to an ember component 2024-12-13 17:00:17 +01:00
Joffrey JAFFEUX df21bc6e73 Fix: visible_post_types expects a user 2024-12-13 16:57:40 +01:00
Rafael Silva 589d2e9761 FBFF report 2024-12-13 10:48:20 -03:00
Rafael dos Santos Silva bc6ad108ea Reaction report (#2) 2024-12-12 21:45:22 +01:00