fix(web): keep abort next to Send by default (#988)

* refactor(web): pin abort button to end of composer left cluster

Abort's position shifted with conditional siblings (terminal/switch/
schedule), making the destructive action's location unpredictable.
Move it to the last child of the left button group so it's always
immediately left of Send — pure JSX reorder, no markup/props/handler
changes.

* fix(web): keep abort last in default toolbar

Keep the product default predictable without changing saved custom order or the registry used to append missing items.
This commit is contained in:
Junmo Kim
2026-07-31 18:17:34 +01:00
committed by GitHub
parent 7ad454f9a2
commit 770439730a
2 changed files with 21 additions and 1 deletions
@@ -5,6 +5,23 @@ import {
normalizeComposerToolbarLayout,
} from './useComposerToolbarLayout'
describe('DEFAULT_COMPOSER_TOOLBAR_LAYOUT', () => {
it('keeps abort last in the default order', () => {
expect(DEFAULT_COMPOSER_TOOLBAR_LAYOUT.left).toEqual([
'attachment',
'settings',
'piModel',
'piThinking',
'terminal',
'switch',
'voiceMic',
'scratchlist',
'schedule',
'abort',
])
})
})
describe('normalizeComposerToolbarLayout', () => {
beforeEach(() => localStorage.clear())
+4 -1
View File
@@ -25,7 +25,10 @@ export type ComposerToolbarLayout = {
export const DEFAULT_COMPOSER_TOOLBAR_LAYOUT: ComposerToolbarLayout = {
mode: 'left',
left: [...COMPOSER_TOOLBAR_ITEM_IDS],
left: [
...COMPOSER_TOOLBAR_ITEM_IDS.filter((item) => item !== 'abort'),
'abort',
],
right: [],
}