enhancement
major
minor
defect
critical
major
minor
major
#30106
tl-chat: Commands at the top of a data-list do not display their status (hidden, disabled with reason); clicking on a locked command produces no response
Error
At the top of a list (<data-list>, e.g., the chat conversation list) are commands such as “New Conversation.” Such a command may require permission (<access>) or be temporarily disabled (<disabled-if>). The list does not display this status: Every header command always appears active, even if the user is not permitted to execute it or if it is currently disabled, and without a tooltip explaining the reason. Clicking on such a command visibly does nothing—neither a dialog nor a message appears.
Example control application (tl-factory, factory/workspace-agent.view.xml): “New Conversation” requires the Write permission on the workspace and is disabled as long as the agent is unavailable (disabled-if expr="$agentUnavailable"). For a reader and an administrator, when the workspace is unavailable, the command still appears active—without a tooltip—and clicking it has no effect.
Cause
DataListControl (com.top_logic.ai.chat.view.list, module tl-chat) generates a ViewCommandModel for each header command but transmits only the label and icon to the client (state buttons: label, icon). The model’s executability is not transmitted: visibility from <access>, null-input-hidden, and “disabled” with a reason from <disabled-if>.
Solution
- The header commands of a data-list follow the state of their ViewCommandModel just like any other command on the React interface: hidden if the model is hidden; disabled with the reason displayed as a tooltip if it is disabled. If the state changes, this is updated accordingly.
- Reuses the mechanism of the other command bars (e.g., toolbar commands via CommandModel); no custom state logic.
- Test: a header command that is hidden, disabled (with a reason), or executable, and a state change via the input channel.