File input: Users cannot add or replace files after initial upload in interaction dialog

Open Beginner friendly
#18,663 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
csharp
Domain
frontend

Research direction

Start in InteractionsInputDialog.razor by tracing the conditional rendering around the FluentButton and the FluentInputFile AnchorId, then inspect how localItem and input names are available for a stable ID. Done means the browse button remains beside uploaded files, supports adding or replacing selections, and produces unique anchor IDs for multiple inputs.

Written by the indexing model from the issue text.

Description

area-dashboard

Context

From review feedback on #14882.

Problem

In the InteractionsInputDialog.razor, the file upload browse button (FluentButton) is only rendered when there are no uploaded files. Once a file is successfully uploaded, the button is removed from the DOM and replaced with the file list display.

Because FluentInputFile triggers the file picker via AnchorId pointing at the button, once the button is gone:

  • Users cannot add more files (for multi-file inputs)
  • Users cannot replace an incorrect file selection
  • The only option is to cancel the entire dialog and start over

Additionally, the button/anchor ID is derived from _elementRefs[localItem]?.Id, which can be null early in rendering, producing an ID like "-FileUploadButton". With multiple file inputs, this risks duplicate IDs and incorrect label/anchor associations.

Expected behavior

  • The browse button should remain visible alongside the uploaded file list so users can add/replace files
  • Use a deterministic ID based on the input name (or similar stable key) rather than element ref IDs that may be null

References

Dominant language
C#
Stars
6.3k
Forks
992
Avg merge
2d 16h
Merged PRs (30d)
176

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.

More from microsoft/aspire

All issues in microsoft/aspire

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.