Skip to content

fix(cli): an interactive restore that ticks nothing restores everything #805

Description

@blafourcade

Description

An interactive aidd sync (restore) that finds drifted files asks which to restore. Ticking nothing yields [], which runConfigRestore reads as "no selection made", the same as a non-interactive run, and restores every drifted file. Found by the mutation pass of #798; no test asserts either reading.

Affected file(s)

cli/src/contexts/framework/application/global/restore-all-use-case.tsselectFiles returns selected.length === 0 ? [] : selected, and the caller treats [] and undefined alike.

Expected behaviour

Ticking nothing restores nothing and says so; only an absent selection (non-interactive, or --force) means "all".

Observed behaviour

Deselect-all restores every drifted file.

AI tool

All

aidd-cli version

5.2.2 (branch next)

OS

Any

Additional context

Surfaced in #804. The fix is a distinct "none chosen" value between the prompt and the filter, with a test that fails on today's code.

Activity

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

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions