Bug
The /quota slash command hardcodes % left regardless of the percentDisplayMode config setting.
The sidebar and compact status correctly use formatDisplayedPercentLabel() which respects percentDisplayMode, but /quota does not.
Reproduction
- Set
percentDisplayMode: "used" in config
- Run
/quota -> shows XX% left (wrong)
- Sidebar shows
XX% used (correct)
Root cause
quota-command-format.js:60 hardcodes:
lines.push(` ${labelCol} ${bar(pct, barWidth)} ${pct}% left${suffix}`);
Should use formatDisplayedPercentLabel(row.percentRemaining, params.percentDisplayMode) instead, and pass percentDisplayMode from runtime.config through handleQuotaSlashCommand.
Fix
- Import
formatDisplayedPercentLabel in quota-command-format.js
- Replace hardcoded
% left with formatDisplayedPercentLabel(row.percentRemaining, params.percentDisplayMode)
- Pass
percentDisplayMode: runtime.config.percentDisplayMode in plugin.js handleQuotaSlashCommand
Happy to open a PR if helpful.
Bug
The
/quotaslash command hardcodes% leftregardless of thepercentDisplayModeconfig setting.The sidebar and compact status correctly use
formatDisplayedPercentLabel()which respectspercentDisplayMode, but/quotadoes not.Reproduction
percentDisplayMode: "used"in config/quota-> showsXX% left(wrong)XX% used(correct)Root cause
quota-command-format.js:60hardcodes:Should use
formatDisplayedPercentLabel(row.percentRemaining, params.percentDisplayMode)instead, and passpercentDisplayModefromruntime.configthroughhandleQuotaSlashCommand.Fix
formatDisplayedPercentLabelinquota-command-format.js% leftwithformatDisplayedPercentLabel(row.percentRemaining, params.percentDisplayMode)percentDisplayMode: runtime.config.percentDisplayModeinplugin.jshandleQuotaSlashCommandHappy to open a PR if helpful.