Skip to content

[P2][Tier-1] markdown_viewer mode attr silently dropped (reserved :mode key) (audit C4) #193

Description

@ty13r

Severity: P2 (renderer work that can't land) · Tier-1 (mechanical rename)
Co-maintained repo (Pascal = architect).
Location: packages/live_ui/lib/live_ui/widget.ex:153 (drops :mode); renderer.ex:736

The renderer passes mode={... [:document, :mode] ...} to MarkdownViewer, but LiveUi.Widget.build_render_assigns/1 Map.drops :mode (reserved key), so MarkdownViewer.render/1 always falls back to attr :mode default: "rendered". The IUR's [:document, :mode] ("raw"/"source") never takes effect.

Fix: rename the markdown attr to a non-reserved name (e.g. :view_mode / :format) on both the renderer call and the component; verify no other widget relies on :mode.

2026-05-28 cross-repo review — see ariston-ui docs/audits/cross-repo-review-2026-05-28.md (finding C4).

Activity

  1. ty13r commented on May 29, 2026

    @ty13r
    MemberAuthor

    Codex cross-validation (2026-05-28): the same :mode drop also affects canonical OVERLAYS — the renderer passes overlay mode (renderer.ex:953-960) but OverlaySurface expects @mode for data-live-ui-mode (overlay_surface.ex:10-29). Fix both surfaces together.

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions