Repository navigation
Band order works again on Claude Code 2.1.323+ - #185
Merged
Merged
Conversation
From 2.1.323 the engine stacks each plugin's band row itself and next(e) no longer hands over the other mods' bands, so stackBands could not sort them by the order file. Every band mod now also hooks AbovePromptList and sorts the rows the engine hands it, with the same rule: rows not in the order stay on top, the listed ones follow in file order. Older Claude Code has no AbovePromptList, so the hook never runs there and stackBands still sorts. Fixes #184
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #184 (thanks @cpatrickalves for the clear report).
What happened
From Claude Code 2.1.323,
next(e)in anAbovePrompthook returns an engine reference instead of the other mods' tree, and the engine stacks one row per plugin itself.stackBandscould no longer see the other bands, so the order file (claude-code-mods/bands.json) moved nothing across mods.Change
shared/bands.ts: neworderRows(rows, order)sorts the engine's rows by plugin name with the same rule as before: rows not in the order stay on top, the listed ones follow in file order. Copied to every band mod.AbovePromptList, the engine's own place to hide or reorder band rows, and passes on the sorted rows.AbovePromptList: validate notes the hook never runs there, andstackBandskeeps sorting as before.Tests
AbovePromptListhook, andorderRowssorts as described.AbovePromptListwith three rows and checks the order. It returns early on a Claude Code without the component.