Skip to content

file-bugs.sh: redaction replaces spaces and hyphens in ordinary English text, which makes the issue unreadable #759

Open

Description

@thanarat

Versions: Mendix 11.12.4, mxcli v0.28.0, toolkit v2026.10.19-134-gff26aa19

What happens

A journey can scope an action to one row with row: "<text in that row>". This works for data grids but not for list views on Mendix 11:

  1. click with row on a list view fails with no row says "<text>".
    ROW_SEL in tests/e2e/journey-runner.js looks for .mx-listview-item. On Mendix 11.12 a list view item has no such class. The rendered DOM is:

    div.mx-listview.mx-name-<listview>
      ul
        li.mx-name-index-0     <- the item, no .mx-listview-item
          div.mx-dataview
            ...
    
  2. fill ignores row and in entirely. It always types into the first .mx-name-<widget> on the page. On a list view where every item repeats the same textbox name, you cannot fill row 2.

Steps to reproduce

  1. Make a page with a list view whose item template has a textbox, for example txtValue, plus a text that tells the rows apart.
  2. Add a journey step:
    { "do": "fill", "widget": "txtValue", "row": "<text of the second row>", "value": "42" }
  3. Run it. The value goes into the first row. With "do": "click" instead, the step fails with no row says ....

Expected

The action is applied to the widget inside the list view item whose text matches row, the same way it already works for data grid rows.

Workaround we applied (project-local patch)

// ROW_SEL: also accept a Mendix 11 list view item
const ROW_SEL = ':is(tr, [role="row"], .mx-listview-item, .mx-listview > ul > li, .mx-templategrid-item)';

// case 'fill': use the same row / in scoping as click
const el = (a.row !== undefined || a.in)
  ? (await scopedWidget(page, a, vars)).locator('input, textarea').first()
  : page.locator(`.mx-name-${a.widget} input, .mx-name-${a.widget} textarea`).first();

Without row / in, fill behaves exactly as before. journey-runner.selftest.js still passes, and a journey that fills two rows of a list view now passes, including its positive control.

Activity

  1. MendixMau commented on Nov 15, 2026

    @MendixMau
    Owner

    Note: the bodies of #759 and #760 look swapped. This issue's title is the file-bugs report, but its body is the journey-runner one (and the reverse on #760). This triage follows the title.

    Triage: FIX track. bug, verified: reproduced exactly; the garbled title came out byte for byte as reported.
    Root cause / Problem: there are two separate causes.

    1. A . project name becomes a match-everything pattern.
      • bin/init-project.sh:164 takes PROJECT_NAME="$(basename "$PROJECT_DIR")" from the argument as typed, so init-project.sh . stores the name ..
      • :674 writes it into \b%s\b without regex-escaping, giving the denylist line \b.\b. That matches every single character between word boundaries: every space, every hyphen, every one-letter word.
      • bin/lib/file-bugs.py:300-325 reads this toolkit-clone denylist even when the project has no deny list of its own, and applies it at :483-484. That is why the text was garbled before any project deny list existed. The scan at :536-538 then refuses the report with deny-list match.
      • The dedupe at init-project.sh:671 (grep -F .) also matches the file's header comment. So the bad line is written only for a clone's first project, and then stays for good.
    2. Attribute names over-match. Names from mdlsource/ (file-bugs.py:419-433) go through name_pat (:180-194):
      • a name of 5+ letters that is not in COMMON_NAMES (:41) matches anywhere, so Round turns "Workaround" into WorkaAttrN;
      • a short one like Used matches as a whole word, so plain "used" gets redacted.
        Value: H. Anyone who ran init-project.sh . gets bug reports that are unreadable and refused every time. The same \b.\b line also makes check-no-client-data.sh flag every file in that toolkit clone.
        Risk of fixing: L–M. The fix loosens redaction, so attribute names inside code identifiers must still be caught. Baseline words: 0.
        Rigidity check: no process, architecture or performance change.
        Process cost (Process-cost guard: a PR that adds a check, gate, obligation or test step must state its time cost per build row, under a budget #687): none; it runs once per filing.
        Needs clarification: no
        Learning value: learned rule: a name written into a regex file must be resolved (cd && pwd) and escaped, and refused when it is shorter than 3 characters.
        Proposed fix:
    • (a) init-project.sh: resolve the directory to an absolute path before basename, and escape regex metacharacters.
    • (b) file-bugs.py: when loading deny patterns, drop (with a warning) any pattern that matches the empty string, a single space, or the probe a-b c. This repairs clones that already hold the bad line.
    • (c) Always treat attribute names as weak (name_pat(n, sub=False)), matching only as a whole word or an identifier segment. Alternative for "used": match attributes case-sensitively.
      Proof: a new section in tests/wave2/test-file-bugs.sh. A \b.\b denylist leaves the title unchanged. An attribute Round leaves "Workaround" unchanged but still redacts ACT_Round_Save. Both fail on master.
      Effort: S. Recommendation: FIX NOW. Credit thanarat.
      Labels: kind/bug, size/s

    Reply go (FIX) or go option N (DISCUSS). Fix PRs still get independent review and your merge.


    Generated by Claude Code

  2. MendixMau commented on Nov 20, 2026

    @MendixMau
    Owner

    Fix PR opened: #815 (credit thanarat). It fixes two causes:

    • init-project.sh . wrote \b.\b into the denylist, which redacted every space.
    • Attribute names were matched inside ordinary words.

    file-bugs now also ignores, with a warning, any deny line that matches everything, which repairs clones that already hold one. Your exact title now comes out clean. The PR is in independent review.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions