Skip to content

[BUG] Rich markup mangles bracketed table cell text (follow-up from #754: per-cell Text(value)) #757

Open

Description

@kambiz-aghaiepour

Summary

The emoji-substitution half of the #754 root cause is fixed by disabling emoji at the
console level (Gerrit change 1255419), but markup=True is still active for table cell
strings. Every cell is parsed as Rich markup, so bracketed free text is silently dropped
or restyled instead of being rendered verbatim.

Observed with rich 14.3.2 and emoji=False:

"rack [h01] u01"            -> "rack  u01"      # [h01] eaten entirely
"vsan[b]x"                  -> "vsanx"
"alloc [red]urgent[/red]"   -> "alloc urgent"
"env [DEV] tier-1"          -> unchanged (unknown tag kept)

Where it is reachable

  • quads --summary --detail: the Description column carries assignment descriptions
    (free text) through RichTable cells.
  • The Detailed Report (src/quads/tools/reports.py), which renders the same descriptions
    into tables.

Any future table column holding user-controlled text (descriptions, rack/location,
tickets, ...) has the same exposure.

Expected

Cell values are rendered exactly as stored.

Suggested fix

Pass per-cell Text(value) renderables to add_row (or rich.markup.escape(value)) for
data columns, so markup and emoji parsing are both skipped. Text is a renderable, so
Text("04:32:01:ab:62:f1") and Text("rack [h01] u01") render verbatim. Console-level
emoji=False then remains useful for non-table output.

Context

Raised as the non-blocking follow-up in the review for #754 (Gerrit change 1255419) so
the markup half does not get lost with that change.

Activity

  1. ttlogan commented on Oct 29, 2026

    @ttlogan
    Contributor

    Confirmed in the tree. make_console() in src/quads/helpers/console.py now forces emoji=False structurally, so the #754 half is closed. It leaves markup at Rich's default True, so a string cell like rack [h01] u01 still gets parsed and [h01] is dropped as an unknown tag. cli.py and reports.py feed raw strings into add_row. One wrinkle for the fix: reports.py:_report_to_html prints [bold]{label}[/bold] through the same factory, so blanket markup=False there would print the tags literally. Per-cell Text(value) (or rich.markup.escape) on the data columns is the safer scope. Will circle back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions