Skip to content

[News] Preserve source filter across responsive layout changes #16

Open

Description

@2233admin

The News source filter resets when the responsive layout remounts the page. A reader viewing one publisher unexpectedly returns to all publishers after narrowing the window.

Reproduction:

  1. Open /market/news in the current local preview at 1440px width.
  2. Select cls in the News source dropdown and wait for the 财联社 reports.
  3. Resize the viewport to 375px width and allow the responsive layout to settle.
  4. The dropdown changes to All sources (value: "") and the stream includes other publishers. Important events also reflect the broader source scope.

Expected: retain the selected source across responsive layout changes, or persist it in the tab/URL state before remounting.

Observed evidence on 2026-10-28 (Asia/Shanghai):

  • Desktop: source cls; 21 filtered groups/reports; viewport/document widths both 1440.
  • Narrow layout: source ""; 200 all-source reports; viewport/document widths both 375.
  • Manually selecting cls again at 375px works. The collection API and persisted subscription configuration are unaffected.
  • Local screenshots: F:/temp/openalice-news-stability-20261028/news-cls-desktop.png, news-cls-mobile.png, and news-cls-mobile-filtered.png.

Suspected owner: NewsPage local filter state, responsive tab remounting and URL/tab-state adoption. Root cause beyond the observed state reset has not been established.

Deferred because the current increment activates and verifies public/Chinese source intake and fixes cache eviction; it does not change the reader layout or filter lifecycle. This issue records the existing UI follow-up independently. No archived news or reading state is lost; reselecting the source is a temporary workaround.

Activity

  1. self-assigned this
    on Oct 27, 2026
  2. 2233admin commented on Oct 27, 2026

    @2233admin
    OwnerAuthor

    已在 Draft PR #1767 的 f5b14dfa7ffbb3ef8c2b5dfd99de0c1a3c8006a6 交付修复,尚未合入 dev,本 Issue 保持开放。

    来源筛选进入 News ViewSpec/URL,并在 URL adoption、tab 序列化和 NewsPage 的导航同步中恢复。分类/关联/视图转换保留 source;Clear 清掉 source,浏览器 Back 恢复它。

    真实构建 UI index-BIULOqvM.js 验收(2026-10-28):source=cls 在 1440px → 375px → 1440px 后仍为 cls;分类、Hot、QA 关联筛选、Clear/back、刷新均通过。1440px 和 375px 的 documentWidth 各等于 viewport,浏览器未记录错误。采集配置、原归档前缀和人工阅读状态核对未变。

    回归:NewsPage.navigation.spec.tsx 使用实际 Router/adopter/tab store 与 remount,修复前实际失败,修复后通过。相关 66 项检查通过;冻结源码完整套件 7978 passed / 0 failed / 152 skipped,critical-local 15/15 必需断言通过。PR 保持 Draft 的其他数据/制品验收门见其正文,不把本修复当作全部项目完成。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions