Skip to content

fix: Views tabs show 1 view in other boards#734

Merged
Xavier-Charles merged 3 commits intodevfrom
fix/views-tabs-show-1-view-in-other-boards
Jan 21, 2026
Merged

fix: Views tabs show 1 view in other boards#734
Xavier-Charles merged 3 commits intodevfrom
fix/views-tabs-show-1-view-in-other-boards

Conversation

@Xavier-Charles
Copy link
Contributor

Problem Summary

When navigating from the main page "/" (showing 12 subscribed views) to another view like "/ethereum", the subscribedViews count dropped from 12 to 1. Root Cause: In [useView.ts:281], when addViewToCache is called for a subscribed view, it calls:

dispatch(viewsStore.updateSubscribedViewsCache([viewPreview]));

The updateSubscribedViewsCache reducer was designed to replace the entire cache with whatever array is passed to it. So passing a single-item array [viewPreview] wiped out all 11 other subscribed views.

Fix

Created a new Redux action addOrUpdateSubscribedView that:

  • Takes a single view (not an array)
  • Merges it into the existing cache instead of replacing
  • Preserves all other views in the cache
    Changed useView.ts:281 to use the new action:
dispatch(viewsStore.addOrUpdateSubscribedView(viewPreview));

This preserves the original updateSubscribedViewsCache behavior (used to sync full server state) while fixing the single-view update case.

Also added and updated tests

@Xavier-Charles Xavier-Charles marked this pull request as draft January 21, 2026 12:54
@Xavier-Charles Xavier-Charles marked this pull request as ready for review January 21, 2026 12:54
@Xavier-Charles Xavier-Charles marked this pull request as draft January 21, 2026 13:07
@Xavier-Charles Xavier-Charles marked this pull request as ready for review January 21, 2026 13:07
@Xavier-Charles Xavier-Charles merged commit 170d446 into dev Jan 21, 2026
1 check passed
@Xavier-Charles Xavier-Charles deleted the fix/views-tabs-show-1-view-in-other-boards branch January 21, 2026 13:24
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.

2 participants