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:
Codeman maintainer
2026-10-07 02:48:40 +02:00
parent 5da25f782b
commit caf5248e22
10 changed files with 37 additions and 262 deletions
+2 -15
View File
@@ -4,8 +4,8 @@
* the headless frame bar. The layout table still covers 7 to 9 (unreachable).
*
* Every way into the grid stops at the cap even where the window would fit
* nine (the harness window is 2400x1200): opening, adding, a tile's +, a
* session Run makes, Ctrl/Cmd+click, the picker and "Open group as tiles".
* nine (the harness window is 2400x1200): opening, adding, a session Run
* makes, Ctrl/Cmd+click, the picker and "Open group as tiles".
* The texts say which limit binds: "at most 6" for the cap, "what this window
* fits" for a smaller window.
*
@@ -63,19 +63,6 @@ describe('the cap', () => {
});
describe('every way in stops at the cap', () => {
it("a tile's + offers the rest, disabled, and says why", () => {
const app = fullGrid();
app.openTileAddMenu({ stopPropagation: vi.fn(), preventDefault: vi.fn(), currentTarget: null }, 's-1');
const menu = body.children.find((c) => c.className.includes('tile-add-menu'))!;
const items = menu.children.filter((c) => ['s-7', 's-8'].includes(c.children[0]?.textContent ?? ''));
expect(items).toHaveLength(2);
for (const item of items) {
expect(item.disabled).toBe(true);
expect(item.title).toBe(AT_MOST);
}
expect(menu.children.find((c) => c.className === 'tile-add-new')!.disabled).toBe(true);
});
it('a session Run makes opens on its own, with a toast', () => {
const app = fullGrid();
expect(app._joinTileGridFromRun('s-7')).toBe(false);