Skip to content

States of a named @StateSet are shown as plain ghosts (GhostDTO matches stateN by regex) #177

Open

Description

@CatarinaGamboa

liquid-java/liquidjava#498 adds an optional name to @StateSet:

@StateSet(name = "redo", value = {"redoable", "notRedoable"})

The states of a named set are then encoded as redo(_) == 0, redo(_) == 1, … instead of stateN(_) == ….

Problem

server/src/main/java/dtos/context/GhostDTO.java decides whether a ghost is a state with a regex on its refinement:

Pattern.compile("^state\\d+\\(_\\) == \\d+$")

States of a named set don't match it, so autocomplete and the Context view would list them as plain ghosts.

Fix

Use the verifier's own link instead of the regex: ghostState.getParent() != null (a GhostState that belongs to a state set has a parent). This keeps working for unnamed sets.

Optional follow-up: offer set names in autocomplete. The verifier's ContextHistory only carries states and @Ghosts today, so this needs a verifier change too.

When

After the liquidjava-api 0.0.8 and verifier releases that include #498. The study exercises will use named sets, so this is needed before the study.

Activity

  1. added
    bugSomething isn't working
    studyNeeded before the error-message user study
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstudyNeeded before the error-message user study

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions