Problem
The Telegram command menu (shown with / in chat) is generated by the bot via setMyCommands, but the command order is fixed and hardcoded in the COMMAND_DEFINITIONS array in src/bot/commands/definitions.ts.
As a result, every user is forced to scroll through the whole list to find the commands they use most often (e.g. /projects, /task, /commands), even when those are at the bottom of the menu. Usage frequency is subjective: the current order reflects a single choice, but other users have different needs. There is no way to reorder the menu without modifying the code.
Proposal
Make the command menu order configurable, e.g. via an environment variable (in the style of the other options already present in config.ts):
COMMANDS_ORDER (or an equivalent name): ordered list of commands, comma-separated (e.g. new,abort,projects,status).
- Listed commands are shown first, in the given order.
- Unlisted commands are appended at the end, keeping their default order.
- If the variable is unset (or empty), behavior stays identical to the current one (backward compatible).
The implementation would be limited to src/bot/commands/definitions.ts (reordering the COMMAND_DEFINITIONS array in getLocalizedBotCommands()) plus a new option in src/config.ts, with the same structure as getOptionalPathListEnvVar already used for PROJECTS_EXCLUDED_PATHS (see PR #197).
Done criteria
Problem
The Telegram command menu (shown with
/in chat) is generated by the bot viasetMyCommands, but the command order is fixed and hardcoded in theCOMMAND_DEFINITIONSarray insrc/bot/commands/definitions.ts.As a result, every user is forced to scroll through the whole list to find the commands they use most often (e.g.
/projects,/task,/commands), even when those are at the bottom of the menu. Usage frequency is subjective: the current order reflects a single choice, but other users have different needs. There is no way to reorder the menu without modifying the code.Proposal
Make the command menu order configurable, e.g. via an environment variable (in the style of the other options already present in
config.ts):COMMANDS_ORDER(or an equivalent name): ordered list of commands, comma-separated (e.g.new,abort,projects,status).The implementation would be limited to
src/bot/commands/definitions.ts(reordering theCOMMAND_DEFINITIONSarray ingetLocalizedBotCommands()) plus a new option insrc/config.ts, with the same structure asgetOptionalPathListEnvVaralready used forPROJECTS_EXCLUDED_PATHS(see PR #197).Done criteria
COMMANDS_ORDER..env.example.