mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 08:59:40 +02:00
feat(tiles): no + in the tile header (owner decision 9)
Owner: "remove the + button from these views". The tile header is now ● name ... ⋯ ⤢ ×. Gone with it, because nothing else used them: the + menu (openTileAddMenu, closeTileAddMenu and their hooks in closeTileGrid and the global Escape handler), its "New session in this case" entry and runInCaseForTiles, the .tile-add-empty rules, the four i18n entries only the menu showed, and buildTilePickerSessions' exclude argument (only the menu passed it). Every other way of adding tiles stays and needed nothing from the menu: the Tiles button and its right-click picker, Ctrl/Cmd+click on a tab, dragging a tab onto a tile or an empty slot, "Open group as tiles", and Run joining the open grid (_joinTileGridFromRun). The picker list, the cap helper _tileGridLimit and the user-text skip on names are shared and kept. Tests: the + menu cases (picker, cap, auto-join, the zh-CN harvest) are removed; tile-grid-chrome pins the header as exactly ⋯ ⤢ × with no add menu or runInCaseForTiles left on the app. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -97,6 +97,22 @@ describe('the header', () => {
|
||||
});
|
||||
|
||||
describe('header buttons', () => {
|
||||
it('are ⋯ ⤢ × and nothing else: no + (owner decision 9)', () => {
|
||||
const app = openGrid();
|
||||
const tile = section.children.find((el) => el.dataset.sessionId === 's-a') as FakeEl;
|
||||
const actions = tile.children[0].children.find((c) => c.className === 'tile-actions') as FakeEl;
|
||||
expect(actions.children.map((b) => b.className)).toEqual([
|
||||
'tile-btn tile-menu',
|
||||
'tile-btn tile-zoom',
|
||||
'tile-btn tile-remove',
|
||||
]);
|
||||
expect(actions.children.map((b) => b.textContent)).toEqual(['\u22EF', '\u2922', '\u00D7']);
|
||||
// The + menu and its "New session in this case" went with it.
|
||||
for (const gone of ['openTileAddMenu', 'closeTileAddMenu', 'runInCaseForTiles']) {
|
||||
expect(gone in app, gone).toBe(false);
|
||||
}
|
||||
});
|
||||
|
||||
it('× removes the tile only: the session keeps running, a neighbour takes focus unacknowledged', () => {
|
||||
const app = openGrid();
|
||||
app._apiDelete = vi.fn();
|
||||
|
||||
Reference in New Issue
Block a user