feat(app-configs): warn when persistent volume label is used by other apps - #226
Merged
githubsaturn merged 4 commits intoJul 31, 2026
Merged
Conversation
…finitions
Build a volume usage index from getAllApps() app definitions and resolve
legacy labels as captain--{name}. Pure helpers with unit tests including
mixed-era non-collision.
Build volumeUsageIndex in AppDetails.reFetchData from the full getAllApps() list and pass it only into AppConfigs. Show a warn-only Ant Design Alert when the Label resolves to a physical volume used by other apps.
Add apps.app_config_vol_in_use_warning and apps.app_config_vol_in_use_warning_desc to all 16 locale files, including ja-JP.
📝 WalkthroughWalkthroughAdded volume usage indexing for modern and legacy app definitions, passed the index through ChangesVolume usage warnings
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant AppDetails
participant volumeHelpers
participant AppConfigs
AppDetails->>volumeHelpers: buildVolumeUsageIndex(appDefinitions)
volumeHelpers-->>AppDetails: VolumeUsageIndex
AppDetails->>AppConfigs: pass volumeUsageIndex
AppConfigs->>volumeHelpers: getOtherAppsUsingVolumeLabel(volumeLabel, index)
volumeHelpers-->>AppConfigs: other application names
AppConfigs-->>AppDetails: render localized volume warning
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/locales/tr-TR.json`:
- Around line 56-57: Update the warning message/description pairs for
consistency: in src/locales/tr-TR.json lines 56-57, use the same term for
“volume” in both strings, replacing “volume'u” with the established Turkish
term; in src/locales/nl-NL.json lines 56-57, change the description to the
informal “je” form used by neighboring volume strings.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7a3dec3f-7183-45c3-8fc9-e4a75a60bb8b
📒 Files selected for processing (20)
src/containers/apps/appDetails/AppConfigs.tsxsrc/containers/apps/appDetails/AppDetails.tsxsrc/locales/ar-EG.jsonsrc/locales/de-DE.jsonsrc/locales/en-US.jsonsrc/locales/es-ES.jsonsrc/locales/fa-IR.jsonsrc/locales/fr-FR.jsonsrc/locales/hr-HR.jsonsrc/locales/id-ID.jsonsrc/locales/ja-JP.jsonsrc/locales/ko-KR.jsonsrc/locales/nl-NL.jsonsrc/locales/pt-BR.jsonsrc/locales/ru-RU.jsonsrc/locales/sv-SE.jsonsrc/locales/tr-TR.jsonsrc/locales/zh-CN.jsonsrc/utils/volumeHelpers.test.tssrc/utils/volumeHelpers.ts
Use consistent "birim" in Turkish description, and informal "je" in Dutch description to match neighboring volume strings.
Collaborator
|
Thank you! |
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.
Summary
getAllApps()/ app-definitions response (already loaded on App Details). No new backend endpoint, nogetAllVolumes, no captain inventory route.Screenshot
Supersedes PR #223 inventory approach
This PR supersedes the data/backend path in #223.
That produces the same warning inputs without another request, backend route, API contract, aggregation implementation, or backward-compatibility fallback.
What we reuse from #223: Alert presentation (
type="warning" showIcon), padding, and i18n key naming for the primary message.What we do not ship:
GET /user/system/volumes/,ApiManager.getAllVolumes, inventory DTOs, or AppConfigs self-fetch.Implementation
src/utils/volumeHelpers.ts—buildVolumeUsageIndex,getOtherAppsUsingVolumeLabel,resolvePhysicalVolumeName,formatLocalized(+ unit tests, including mixed-era same logical Label → no false positive).AppDetails.reFetchDatabuildsvolumeUsageIndexfrom the fullappDefinitionslist before selecting the current app; passes index only intoAppConfigs.AppConfigsshows warning under volume rows when other apps share the physical name.apps.app_config_vol_in_use_warning+apps.app_config_vol_in_use_warning_descin all 16 locales (includingja-JP).Test plan
dataon legacy + modern) → no alert (captain--data≠data).yarn test --watchAll=false --testPathPattern=volumeHelpersyarn formatter/yarn tslintSummary by CodeRabbit
New Features
Bug Fixes
Tests