microsoft / microsoft/WinAppVSCE

[Bug]: Repeated extension child elements are ambiguous to edit in visual editor

Open
#128 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
13
Forks
3
Avg merge
6d 1h
Merged PRs (30d)
11

Description

Description

When a manifest extension contains repeated child elements (e.g., multiple <uap:Task> nodes in windows.backgroundTasks), the visual editor's field parsing flattens them to identical labels like Task.Type without positional disambiguation.

When the user edits one of these duplicate fields, updateExtensionField resolves the edit by matching the first element with that name, always overwriting the first instance regardless of which one was actually changed.

Steps to reproduce

  1. Open a manifest with a windows.backgroundTasks extension containing two <uap:Task> nodes
  2. In the visual editor, edit the second Task.Type field
  3. Observe that the first <uap:Task> element is modified instead

Expected behavior

Each repeated element should have a unique identity in the field path (e.g., index-based or XPath-like), and edits should target the correct instance.

Context

Surfaced during PR review of #68. This behavior predates the IntelliSense PR — the parsing/editing logic for extension children has had this limitation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at updateExtensionField and trace the visual editor's field parsing for repeated extension children, reproducing the two-node windows.backgroundTasks case from the issue. Define a unique field identity for each repeated child and verify that editing the second Task.Type changes only that instance, without overwriting the first.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.