Skip to content

Scope string parsing is fragile with hyphens #8

Description

@dotsdl

Problem

On the networks page, scope strings are parsed by splitting on - and assuming exactly 3 parts:

const parts = scope.split('-');
const [scopeOrg, scopeCampaign, scopeProject] = parts.length === 3
  ? parts
  : [scope, '*', '*'];

If any org, campaign, or project name contains a hyphen, this splits incorrectly and silently produces the wrong scope filter.

Suggested fix

Check whether the Alchemiscale API provides structured scope data (separate fields for org/campaign/project) instead of a single delimited string. If not, use a more robust delimiter or document that scope component names must not contain hyphens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions