Skip to content

Fix Mark as unread on update feed setting#3668

Merged
Grotax merged 2 commits into
nextcloud:masterfrom
wofferl:fix_update_mode
Apr 8, 2026
Merged

Fix Mark as unread on update feed setting#3668
Grotax merged 2 commits into
nextcloud:masterfrom
wofferl:fix_update_mode

Conversation

@wofferl
Copy link
Copy Markdown
Collaborator

@wofferl wofferl commented Apr 6, 2026

Summary

This PR fixes the feed update mode to set updated items to unread when updated.

The feature is broken since the change in bfcf38a, which always uses the unread state from the db item.
In the frontend, the options have been swapped since at least fe03478.

Checklist

@wofferl wofferl added 3. to review API Impact API/Backend code frontend impact Javascript/Frontend code labels Apr 6, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the “Mark as unread on update” feed update-mode behavior by ensuring item unread state is handled according to the feed’s configured update mode, and aligns the frontend naming/behavior with backend semantics.

Changes:

  • Pass feed updateMode through to ItemServiceV2::insertOrUpdate() and preserve unread status only for silent mode.
  • Correct frontend update-mode enum naming/usage and swap the UI labels/actions to match the actual behavior.
  • Update PHP/JS unit tests and add a changelog entry covering the regression.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/Service/ItemServiceV2.php Adds an updateMode parameter to insertOrUpdate() and preserves unread state only for silent mode.
lib/Service/FeedServiceV2.php Passes the feed’s updateMode into insertOrUpdate() during fetch processing.
lib/Service/ImportService.php Updates import path to call insertOrUpdate() with silent update mode.
lib/Service/ShareService.php Updates sharing path to call insertOrUpdate() with silent update mode.
src/enums/index.ts Renames feed update mode enum members to SILENT/NORMAL to match backend semantics.
src/dataservices/feed.service.ts Updates doc comment to reflect the new update mode naming/meaning.
src/components/modals/FeedInfoTable.vue Fixes the UI labeling/actions so toggling update mode matches intended behavior.
tests/Unit/Service/ItemServiceTest.php Updates existing tests for new signature and adds coverage for unread handling by update mode.
tests/Unit/Service/FeedServiceTest.php Adjusts fetch test expectations to include updateMode propagation and unread handling.
tests/Unit/Service/ImportServiceTest.php Updates mocks/expectations for new insertOrUpdate() signature.
tests/javascript/unit/components/modals/FeedInfoTable.spec.ts Updates modal tests to match the corrected update mode values/dispatches.
CHANGELOG.md Adds a “Fixed” entry noting the feed setting had no effect.

Comment thread src/enums/index.ts
Comment thread lib/Service/ImportService.php Outdated
Comment thread lib/Service/ItemServiceV2.php
Comment thread tests/Unit/Service/ItemServiceTest.php Outdated
wofferl added 2 commits April 6, 2026 22:56
Signed-off-by: Wolfgang <github@linux-dude.de>
…ackend

Signed-off-by: Wolfgang <github@linux-dude.de>
@Grotax Grotax merged commit 5b02235 into nextcloud:master Apr 8, 2026
28 checks passed
Grotax added a commit that referenced this pull request Apr 8, 2026
Changed
- Rework feed options menu and feed settings (#3655)
- Added a feature to download the web version of an article on demand, to avoid downloading unnecessary content (#3647)

Fixed
- Show a user-facing error when moving a feed fails (#3649)
- `HTML Sanitizer` options adjusted to fix broken layouts (#3658)
- Feed setting `Mark as unread on update` had no effect (#3668)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
@Grotax Grotax mentioned this pull request Apr 8, 2026
Grotax added a commit that referenced this pull request Apr 8, 2026
Changed
- Rework feed options menu and feed settings (#3655)
- Added a feature to download the web version of an article on demand, to avoid downloading unnecessary content (#3647)

Fixed
- Show a user-facing error when moving a feed fails (#3649)
- `HTML Sanitizer` options adjusted to fix broken layouts (#3658)
- Feed setting `Mark as unread on update` had no effect (#3668)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
@wofferl wofferl deleted the fix_update_mode branch April 30, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review API Impact API/Backend code frontend impact Javascript/Frontend code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants