Skip to content

refs/callers miss references created by page action button Action property #773

Description

@RivanoCLCC

Summary

mxcli refs and mxcli callers do not detect references created by a page action
button's Action property (e.g. create_object ... then show_page ..., or a direct
microflow call action on a button). Elements that are only reached through such a
button report zero references/callers even though they are actively used and reachable
in the running application.

Environment

  • mxcli version: nightly-20260720-88077af1 (2026-07-20T06:06:00Z), windows/amd64
  • Mendix version: 10.24.2.75382
  • MPR format: v2 (mprcontents/ present)

Scenario

Checking whether a newly-added page and microflow are reachable from the rest of the
app, without opening Studio Pro:

mxcli refs -p "The Company App.mpr" Reminders.TaskGroup_SelectCategory
mxcli callers -p "The Company App.mpr" Reminders.ACT_TemplateCategory_CreateTaskGroup

Expected output

Both should report at least one reference/caller, since:

  • Employee.Employee_Overview has an action button whose Action is
    create_object Reminders.TaskGroup then show_page Reminders.TaskGroup_SelectCategory
    (confirmed via mxcli describe -p "The Company App.mpr" page Employee.Employee_Overview):

    actionbutton actionButton7 (
      Caption: 'Taken starten',
      Action: create_object Reminders.TaskGroup then show_page Reminders.TaskGroup_SelectCategory,
      ...
    )
    
  • Reminders.TaskGroup_SelectCategory itself has an action button whose Action calls
    Reminders.ACT_TemplateCategory_CreateTaskGroup (confirmed via mxcli describe -p "The Company App.mpr" page Reminders.TaskGroup_SelectCategory):

    actionbutton actionButton1 (
      Caption: 'Taken aanmaken',
      Action: microflow Reminders.ACT_TemplateCategory_CreateTaskGroup(TemplateCategory: ..., Employee: ...),
      ButtonStyle: Primary
    )
    

Experienced output

References to Reminders.TaskGroup_SelectCategory
(no references found)

Callers of Reminders.ACT_TemplateCategory_CreateTaskGroup
(no callers found)

Both report zero, despite the button actions shown above existing right there in the
same project's describe output.

Impact

Found during a code review used to judge whether a new page/microflow pair was
integrated into the UI or dead code. refs/callers reporting zero led to an incorrect
conclusion ("this feature isn't wired up anywhere") that had to be manually corrected by
re-reading the calling page's own describe output line by line. Since call-graph
commands (refs, callers, impact) are the intended way to answer "is this used /
safe to change", missing an entire category of real usage (button actions on pages) is a
false-negative that can lead to wrongly deleting or "fixing" code that is actually live,
or wrongly concluding a feature is unreachable when it is not.

Suggestion

The reference/caller graph builder appears to index microflow-to-microflow calls (and
possibly simple page Action: microflow X cases reached some other way) but misses, at
least, the compound create_object ... then show_page ... action form, and possibly
show_page-only actions too — worth checking both forms specifically. Page action
button Action properties should be walked as part of building the call/reference
graph, the same way microflow call activities already are.

AI bug report

Relevant session log lines (mxcli diag --tail), full bundle available on request
(mxcli diag --bundle):

{"time":"...","level":"INFO","msg":"session_start","version":"nightly-20260720-88077af1","go":"go1.26.5","os":"windows","arch":"amd64","mode":"subcommand","args":["mxcli","refs","-p","The Company App.mpr","Reminders.TaskGroup_SelectCategory"]}
{"time":"...","level":"INFO","msg":"connect","mpr_path":"The Company App.mpr","mendix_version":"10.24.2.75382","mpr_format":2}
{"time":"...","level":"INFO","msg":"session_start","version":"nightly-20260720-88077af1","go":"go1.26.5","os":"windows","arch":"amd64","mode":"subcommand","args":["mxcli","callers","-p","The Company App.mpr","Reminders.ACT_TemplateCategory_CreateTaskGroup"]}

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