Skip to content

Band order works again on Claude Code 2.1.323+ - #185

Merged
hamzafer merged 1 commit into
mainfrom
fix/band-order-list
Nov 14, 2026
Merged

hamzafer merged 1 commit into
mainfrom
fix/band-order-list

Conversation

@hamzafer

Copy link
Copy Markdown
Owner

Fixes #184 (thanks @cpatrickalves for the clear report).

What happened

From Claude Code 2.1.323, next(e) in an AbovePrompt hook returns an engine reference instead of the other mods' tree, and the engine stacks one row per plugin itself. stackBands could no longer see the other bands, so the order file (claude-code-mods/bands.json) moved nothing across mods.

Change

  • shared/bands.ts: new orderRows(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.
  • Every band mod (18): also hooks AbovePromptList, the engine's own place to hide or reorder band rows, and passes on the sorted rows.
  • Older Claude Code has no AbovePromptList: validate notes the hook never runs there, and stackBands keeps sorting as before.
  • Versions: patch bump for each band mod (plugin.json, marketplace, site page).

Tests

  • Repo tests: every band mod carries the same AbovePromptList hook, and orderRows sorts as described.
  • usage-meter: a test mounts AbovePromptList with three rows and checks the order. It returns early on a Claude Code without the component.
  • The full CI loop passes on 2.1.288 (CI's pin). On 2.1.325 the new test passes; the older tree-shape band tests still fail there as they do on main, and will be updated in a follow-up that adds a CI job on the latest Claude Code.

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
@hamzafer
hamzafer merged commit f0e7bbc into main Nov 14, 2026
2 checks passed
@hamzafer
hamzafer deleted the fix/band-order-list branch November 14, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Band order (bands.ts) has no effect on Claude Code 2.1.323

1 participant