fix(portals): live channels sidebar overwrites shell panel width in localStorage#1114
Merged
Merged
Conversation
…hell panel The live-layout channels sidebar (Xtream and Stalker) persisted its width under the shared "sidebar-width" localStorage key — the same key used by the workspace shell context panel. Unlike the shell panel variants, which swap in one slot and never coexist, the channels sidebar is on screen at the same time as the category context panel, so resizing either one silently overwrote the other's stored width and both snapped to the same size after a reload. Give the live channels sidebar its own "live-channels-sidebar-width" key (shared between Xtream and Stalker, which never coexist), matching the precedent already set by unified-live-tab-sidebar-width and m3u-groups-nav-width. The unified key remains in place for the shell slot panels, where sharing is intentional. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #1114 +/- ##
===========================================
- Coverage 71.05% 57.35% -13.71%
===========================================
Files 40 559 +519
Lines 691 32572 +31881
Branches 87 7096 +7009
===========================================
+ Hits 491 18681 +18190
- Misses 176 11092 +10916
- Partials 24 2799 +2775
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Owner
|
Thank you for the fix! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The live-layout channels sidebar (Xtream and Stalker) persists its width under the shared
sidebar-widthlocalStorage key — the same key used by the workspace shell context panel (the Groups/categories sidebar).The unified key works well for the shell slot panels (sources / category / settings / collection), which swap in one place and are never visible together. But on the Live TV view the category context panel and the channels sidebar are on screen at the same time, both writing to the same key:
Fix
Give the live channels sidebar its own
live-channels-sidebar-widthkey. Xtream and Stalker share it, since those two never coexist — same reasoning as the existing unified key, applied at the correct boundary. This follows the precedent already in the codebase:unified-live-tab-sidebar-widthandm3u-groups-nav-widthare dedicated keys for exactly this kind of content-area panel.The unified
sidebar-widthkey is deliberately left in place for the shell slot panels, where sharing one width across swapped-in panels is the intended behavior (ff76eb1).Existing users lose only the stored width for this one sidebar on first load after the update (it falls back to the 400px default once, then persists normally).
Testing
live-stream-layout.component.spec.tsandstalker-live-stream-layout.component.spec.tsasserting the sidebar uses the dedicated key — verified it fails against the old shared key and passes with the fix.pnpm nx test portal-xtream-feature(35 tests) andpnpm nx test portal-stalker-feature(17 tests) pass.pnpm nx run-many --target=lint --projects=portal-xtream-feature,portal-stalker-featureclean.🤖 Generated with Claude Code