Skip to content

fix(refresh): preserve article selection while refreshing - #1052

Draft
marcomarcogd wants to merge 1 commit into
DevXDojo:mainfrom
marcomarcogd:codex/fix-refresh-selection-stability
Draft

fix(refresh): preserve article selection while refreshing#1052
marcomarcogd wants to merge 1 commit into
DevXDojo:mainfrom
marcomarcogd:codex/fix-refresh-selection-stability

Conversation

@marcomarcogd

Copy link
Copy Markdown
Contributor

Description

Keeps the currently open article available while a background feed refresh replaces the first article page. This prevents the article list from flashing empty and the detail pane from becoming blank when the selected article is not present in the refreshed first page.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✅ Test addition/update

Related Issues

Fixes #874

Changes Made

  • Add a preserve-selection mode to article fetching.
  • Keep the selected article exactly once when it falls outside the refreshed first page.
  • Use preserve-selection mode only for background refresh and FreshRSS completion paths.
  • Add unit coverage for preserved, already-present, and unselected cases.

Testing

Test Configuration

  • OS: macOS
  • MrRSS Version: current main
  • Node Version: 26.7.0

Test Steps

  1. NODE_OPTIONS=--localstorage-file=/private/tmp/mrrss-vitest-874-localstorage npm test -- --run src/App.test.ts
  2. npm run lint
  3. npm run build
  4. git diff --check

All targeted checks pass.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective
  • New and existing targeted tests pass locally

Breaking Changes

None.

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.

[BUG] 刷新信息列表的时候,页面会闪,用户体验不好,另外右边的正文页内容会变空白

1 participant