Skip to content

namir-ui: error notices render their {placeholder} tokens verbatim #99

Description

@ErwanLegrand

crates/namir-ui/src/notices.rs:43-48

notice_text prints code.message_template verbatim, never substituting its placeholders. namir_core::ErrorCode's own doc (namir-core/src/error.rs:37-39) says it is "a {placeholder}-style template the UI fills in", and 20+ live codes carry placeholders.

A failed device open renders on screen as:

io.device.open_failed: Could not open audio device {device}: {reason}. (Focusrite USB, format not supported)

Literal braces, in the shipped UI. Directly undercuts FR-UI-070's requirement that a notice "state what failed, which file or device it concerned, and what the user can do".

Fix: substitute named fields from a detail key/value payload, or minimally drop the unfilled template and render id plus detail.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions