cloudfoundry / cloudfoundry/stratos
Cross-CF org/space filter: dedupe by name when CF=All on Applications, Services, Marketplace walls
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 267
- Forks
- 137
- Avg merge
- 5h 14m
- Merged PRs (30d)
- 77
Description
Narrowed scope of #2629.
Today
Primary walls (Applications, Services, Marketplace) aggregate apps / instances / offerings across all connected CFs. CF / Org / Space dropdowns exist on each wall. When CF = "All", the Org dropdown aggregates orgs across CFs but dedupes by guid — seen.set(o.guid, o.name) at src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app/cf-apps-signal-config.service.ts:233 (and equivalents in services / marketplace configs). The predicate matches by guid: if (org && app.orgGuid !== org) return false; at :314.
Result: an org named platform in prod and another named platform in staging appear as two indistinguishable-looking entries in the Org dropdown. Picking one filters to that single CF's org.
What to change
When selectedCnsi === null:
orgOptionsandspaceOptionsdedupe by name rather than guid (seen.set(o.name, o.name)); option value becomes the name.- Filter predicate matches by name in that mode:
app.orgName !== organdapp.spaceName !== spaceinstead of guid-equality. - When
selectedCnsi !== null, behavior unchanged — pick a CF, see its orgs, filter by guid.
Apply to
cf-apps-signal-config.service.ts(Applications wall)cf-service-instances-signal-config.service.ts(Services wall)cf-service-offerings-signal-config.service.ts(Marketplace)
Plus tests covering: All-CF dedupe collapses identical names, single-CF mode unchanged, locked-space-scope unaffected.
Edge cases
- Case sensitivity — pick a stance (
platformvsPlatform). Recommend case-insensitive match for permissive behavior. - Naming convention divergence —
platform-prodvsplatformwon't unify; out of scope for this ticket. Document that this fix unifies exact (or normalized) name matches; naming guidance is separate. - Whitespace / unicode normalization — match-by-name is fragile to invisible characters; consider a normalized comparison (
trim()+normalize('NFC')at minimum).
Scope
Three frontend signal-config services + tests. Half-day estimate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing orgOptions, spaceOptions, and filter predicates in cf-apps-signal-config.service.ts, then compare the equivalent logic in cf-service-instances-signal-config.service.ts and cf-service-offerings-signal-config.service.ts. Run the existing tests for these signal-config services and add coverage for identical-name deduplication in All-CF mode, unchanged single-CF behavior, and locked-space scope. Done means the three walls behave consistently while single-CF filtering remains guid-based.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- Half a day
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100