Skip to content

FileTree: List of valid files in error message is always empty #1185

Open
@mootari

Description

@mootari

In https://svelte.dev/tutorial/svelte/universal-reactivity, when you add or rename a file with a name other than shared.svelte.js the following error message is displayed:

Image

The missing file list in the message is sourced from workspace.exercise.editing_constraints which are commonly empty (only one tutorial defines them in its frontmatter).

The constraint is instead enforced via the file list in the solution store:

add: async (name, type) => {
const expected = $solution[name];

I suspect the right approach here might be to list only those entries that are present in solution but missing in workspace.files (and vice versa for rename and remove), to prevent the list from getting excessively long.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions