Repository navigation
feat: add volume selection and display preferences to the storage widget - #275
Closed
matviienkop wants to merge 2 commits into
Closed
matviienkop wants to merge 2 commits into
matviienkop wants to merge 2 commits into
Conversation
|
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.



Motivation
On a NAS with a separate system card and data volume, the default storage widget does not let the user choose which mounted filesystems to monitor. This adds an opt-in view without changing the existing behavior for users who have not saved preferences.
Changes
This is a UI-only change: it uses the existing read-only API and does not modify disks, RAID, mounts, shared folders, or backend configuration. The custom capacity view does not claim to report per-volume SMART/RAID health.
Validation
npm run test:storage-widget— 12 tests passed.git diff --check.The tests cover preference parsing/user scoping, deduplication, stable identity, missing volumes, explicit save/reset, storage write errors, percentage edge cases, aggregate completeness, API failure/recovery, and late responses after unmount. Component-method tests use mocked APIs; they are not a replacement for browser verification.
Existing build-environment caveat
A clean frozen dependency install currently fails with HTTP 404 for the unused
@icewhale/icewhale-files-openapi@1.3.0-alpha133package. To validate compilation, I omitted that dependency only in a temporary build copy, ran the Vue Office/Vue Demi postinstall steps, and explicitly resolved webpack and Babel preset-env to their existing lockfile versions. No dependency removal, version change, lockfile change, or temporary build workaround is included in this PR. I am not claiming that the existing upstream dependency-install/CI issues are fixed here.Screenshots
The actual user-configured view in the Russian locale, published with the device owner's permission.
Selected volumes displayed separately
Widget preferences in Storage Manager
Target branch
The development guide asks contributors not to target
main. However, I could not find a genericdevbranch in this repository, itsCONTRIBUTING.mdis empty, and recent PRs targetmain. For that reason, I opened this PR againstmainrather than an unrelated topic branch. Please let me know if a different base branch is preferred.