Skip to content

Conversation

jrainville
Copy link
Member

@jrainville jrainville commented Apr 18, 2025

Fixes #6533
Needed for status-im/status-desktop#17811
Base on top of #6534

Adds the NewsRSSEnabled setting that is going to be used in the Privacy settings of the clients.

Adds API methods to toggle the NewsFeedEnabled and NewsRSSEnabled settings.
By doing so, it will trigger the NewsFeedManager polling if both settings are set to true.
Conversely, if one of them is disabled, it stops the polling.

@status-im-auto
Copy link
Member

status-im-auto commented Apr 18, 2025

Jenkins Builds

Click to see older builds (48)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e62ea86 #1 2025-04-18 15:57:02 ~2 min android 📦aar
✔️ e62ea86 #1 2025-04-18 15:57:15 ~2 min ios 📦zip
✔️ e62ea86 #1 2025-04-18 15:57:56 ~3 min macos 📦zip
✖️ e62ea86 #1 2025-04-18 15:58:47 ~4 min tests 📄log
✔️ e62ea86 #1 2025-04-18 15:58:55 ~4 min windows 📦zip
✔️ e62ea86 #1 2025-04-18 15:59:44 ~5 min linux 📦zip
✔️ e62ea86 #1 2025-04-18 16:00:02 ~5 min macos 📦zip
✔️ e62ea86 #1 2025-04-18 16:02:48 ~8 min tests-rpc 📄log
✔️ d913c62 #2 2025-04-22 17:36:05 ~2 min ios 📦zip
✔️ d913c62 #2 2025-04-22 17:36:08 ~3 min android 📦aar
✔️ d913c62 #2 2025-04-22 17:36:28 ~3 min windows 📦zip
✔️ d913c62 #2 2025-04-22 17:36:41 ~3 min macos 📦zip
✔️ d913c62 #2 2025-04-22 17:38:41 ~5 min linux 📦zip
✔️ d913c62 #2 2025-04-22 17:38:45 ~5 min macos 📦zip
✔️ d913c62 #2 2025-04-22 17:43:55 ~10 min tests-rpc 📄log
✖️ d913c62 #2 2025-04-22 18:08:39 ~35 min tests 📄log
✔️ f96b3da #3 2025-04-23 17:38:51 ~2 min android 📦aar
✔️ f96b3da #3 2025-04-23 17:40:09 ~4 min macos 📦zip
✔️ f96b3da #3 2025-04-23 17:40:33 ~4 min ios 📦zip
✔️ f96b3da #3 2025-04-23 17:41:43 ~5 min windows 📦zip
✔️ f96b3da #3 2025-04-23 17:41:56 ~5 min linux 📦zip
✔️ f96b3da #3 2025-04-23 17:43:15 ~7 min macos 📦zip
✔️ f96b3da #3 2025-04-23 17:46:37 ~10 min tests-rpc 📄log
✖️ f96b3da #3 2025-04-23 18:11:08 ~35 min tests 📄log
✔️ 1902207 #4 2025-05-05 15:45:36 ~2 min ios 📦zip
✔️ 1902207 #4 2025-05-05 15:45:57 ~3 min android 📦aar
✔️ 1902207 #4 2025-05-05 15:46:50 ~4 min macos 📦zip
✔️ 1902207 #4 2025-05-05 15:47:25 ~4 min windows 📦zip
✔️ 1902207 #4 2025-05-05 15:48:25 ~5 min macos 📦zip
✔️ 1902207 #4 2025-05-05 15:49:31 ~6 min linux 📦zip
✔️ 1902207 #4 2025-05-05 15:54:39 ~11 min tests-rpc 📄log
✖️ 1902207 #4 2025-05-05 16:20:36 ~37 min tests 📄log
✔️ a89604d #5 2025-05-07 15:24:17 ~3 min macos 📦zip
✔️ a89604d #5 2025-05-07 15:24:23 ~3 min android 📦aar
✔️ a89604d #5 2025-05-07 15:24:29 ~3 min ios 📦zip
✔️ a89604d #5 2025-05-07 15:25:04 ~4 min windows 📦zip
✔️ a89604d #5 2025-05-07 15:25:49 ~5 min linux 📦zip
✔️ a89604d #5 2025-05-07 15:27:14 ~6 min macos 📦zip
✔️ a89604d #5 2025-05-07 15:33:06 ~12 min tests-rpc 📄log
✔️ a89604d #5 2025-05-07 15:57:46 ~36 min tests 📄log
✔️ a89604d #6 2025-05-08 14:23:38 ~3 min android 📦aar
✔️ a89604d #6 2025-05-08 14:23:47 ~3 min windows 📦zip
✔️ a89604d #6 2025-05-08 14:24:05 ~3 min ios 📦zip
✔️ a89604d #6 2025-05-08 14:25:42 ~5 min macos 📦zip
✔️ a89604d #6 2025-05-08 14:26:32 ~5 min linux 📦zip
✔️ a89604d #6 2025-05-08 14:27:17 ~6 min macos 📦zip
✔️ a89604d #6 2025-05-08 14:32:53 ~12 min tests-rpc 📄log
✖️ a89604d #6 2025-05-08 14:56:51 ~36 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 055d25c #7 2025-05-08 14:29:54 ~3 min android 📦aar
✔️ 055d25c #7 2025-05-08 14:30:16 ~3 min ios 📦zip
✔️ 055d25c #7 2025-05-08 14:30:17 ~3 min windows 📦zip
✔️ 055d25c #7 2025-05-08 14:32:07 ~5 min macos 📦zip
✔️ 055d25c #7 2025-05-08 14:32:53 ~6 min linux 📦zip
✔️ 055d25c #7 2025-05-08 14:33:04 ~5 min macos 📦zip
✔️ 055d25c #7 2025-05-08 14:45:25 ~12 min tests-rpc 📄log
✔️ 055d25c #7 2025-05-08 15:32:50 ~35 min tests 📄log
✔️ 8e95282 #8 2025-05-08 16:41:15 ~3 min android 📦aar
✔️ 8e95282 #8 2025-05-08 16:41:24 ~2 min windows 📦zip
✔️ 8e95282 #8 2025-05-08 16:41:30 ~3 min ios 📦zip
✔️ 8e95282 #8 2025-05-08 16:43:21 ~5 min macos 📦zip
✔️ 8e95282 #8 2025-05-08 16:43:49 ~5 min linux 📦zip
✔️ 8e95282 #8 2025-05-08 16:43:54 ~5 min macos 📦zip
✖️ 8e95282 #8 2025-05-08 16:48:29 ~10 min tests-rpc 📄log
✖️ 8e95282 #8 2025-05-08 17:14:10 ~35 min tests 📄log
✔️ 8e95282 #9 2025-05-08 17:51:24 ~10 min tests-rpc 📄log
✔️ 8e95282 #9 2025-05-08 18:15:10 ~34 min tests 📄log

@jrainville
Copy link
Member Author

@igor-sirotin @osmaczko @seanstrom friendly reminder to review

@jrainville jrainville force-pushed the feat/news-last-fetch branch from 9afcb94 to 93c1e0c Compare May 5, 2025 15:41
@jrainville jrainville force-pushed the news/hook-settings branch from f96b3da to 1902207 Compare May 5, 2025 15:42
@jrainville jrainville force-pushed the feat/news-last-fetch branch from 93c1e0c to 09fbe78 Compare May 7, 2025 15:15
@jrainville jrainville force-pushed the news/hook-settings branch from 1902207 to a89604d Compare May 7, 2025 15:20
Copy link
Collaborator

@igor-sirotin igor-sirotin left a comment

Choose a reason for hiding this comment

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

I didn't get why we need both NewsFeedEnabled and NewsRSSEnabled, but I guess I'm missing some context about it.

handler FeedHandler
fetchFrom time.Time
pollingInterval time.Duration
polling bool
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we even need the manager, if we're not polling? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought it would be simpler to start the polling (when the setting is set back up) if the manager is already set up.
Same thing for stopping it.

It just seems like more complex to delete and initialize the whole manager than just stopping the polling.

Copy link

codecov bot commented May 7, 2025

Codecov Report

Attention: Patch coverage is 51.31579% with 37 lines in your changes missing coverage. Please review.

Project coverage is 60.43%. Comparing base (7f81efb) to head (8e95282).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
protocol/messenger_news_feed.go 61.29% 6 Missing and 6 partials ⚠️
multiaccounts/settings/database.go 64.70% 3 Missing and 3 partials ⚠️
services/accounts/settings.go 0.00% 6 Missing ⚠️
services/ext/api.go 0.00% 6 Missing ⚠️
protocol/messenger.go 0.00% 5 Missing ⚠️
internal/newsfeed/news_feed_manager.go 81.81% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6540      +/-   ##
===========================================
+ Coverage    60.38%   60.43%   +0.04%     
===========================================
  Files          832      832              
  Lines       103699   103771      +72     
===========================================
+ Hits         62623    62712      +89     
- Misses       33536    33537       +1     
+ Partials      7540     7522      -18     
Flag Coverage Δ
functional 25.88% <2.63%> (+0.50%) ⬆️
unit 58.18% <51.31%> (-0.06%) ⬇️

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

Files with missing lines Coverage Δ
multiaccounts/settings/columns.go 88.88% <ø> (ø)
multiaccounts/settings/structs.go 92.85% <ø> (ø)
internal/newsfeed/news_feed_manager.go 84.50% <81.81%> (+2.24%) ⬆️
protocol/messenger.go 64.64% <0.00%> (+0.13%) ⬆️
multiaccounts/settings/database.go 70.21% <64.70%> (-0.22%) ⬇️
services/accounts/settings.go 4.81% <0.00%> (-0.38%) ⬇️
services/ext/api.go 26.84% <0.00%> (-0.20%) ⬇️
protocol/messenger_news_feed.go 52.32% <61.29%> (+5.05%) ⬆️

... and 35 files with indirect coverage changes

@jrainville
Copy link
Member Author

I didn't get why we need both NewsFeedEnabled and NewsRSSEnabled, but I guess I'm missing some context about it.

@igor-sirotin Quick context: Since the RSS comes from a "3rd party", we make sure users can turn it off for privacy reasons. Hence the NewsRSSEnabled.

NewsFeedEnabled is for the feature itself, maybe they don't care about News.

In the future, when we'll use Waku instead (using a bot), we'll get rid of the NewsRSSEnabled setting, since it won't be a centralized source.

Base automatically changed from feat/news-last-fetch to develop May 8, 2025 14:20
@jrainville jrainville force-pushed the news/hook-settings branch from a89604d to 055d25c Compare May 8, 2025 14:26
Needed for status-im/status-desktop#17811

Adds the NewsRSSEnabled setting that is going to be used in the Privacy settings of the clients.

Adds API methods to toggle the NewsFeedEnabled  and NewsRSSEnabled settings.
By doing so, it will trigger the NewsFeedManager polling if both settings are set to true.
Conversely, if one of them is disabled, it stops the polling.
@jrainville jrainville force-pushed the news/hook-settings branch from 055d25c to 8e95282 Compare May 8, 2025 16:38
@jrainville jrainville merged commit e1096ea into develop May 8, 2025
20 checks passed
@jrainville jrainville deleted the news/hook-settings branch May 8, 2025 18:35
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.

[News Feed] Hook the News and Privacy settings to the Messenger
4 participants