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
+6 -7
View File
@@ -1780,21 +1780,20 @@ function dragTrackFractions(fr, index, deltaPx, totalPx, minPx) {
}
/**
* The sessions the Tiles picker (and a tile's + menu) offers, in tab order:
* live ones only, never a session popped out to its own window (that window
* owns its PTY size). A session with no PTY attached IS offered: its tile shows
* the Attach overlay.
* The sessions the Tiles picker offers (and the Tiles button opens, case c of
* tileGridOpenSet), in tab order: live ones only, never a session popped out to
* its own window (that window owns its PTY size). A session with no PTY
* attached IS offered: its tile shows the Attach overlay.
*
* @param {Map<string, {name?: string}>} sessions
* @param {string[]} sessionOrder
* @param {{has(id: string): boolean}} [detachedIds]
* @param {{has(id: string): boolean}} [exclude] - ids not to offer (already tiled)
* @returns {Array<{id: string, label: string}>}
*/
function buildTilePickerSessions(sessions, sessionOrder, detachedIds, exclude) {
function buildTilePickerSessions(sessions, sessionOrder, detachedIds) {
const result = [];
for (const id of sessionOrder) {
if (detachedIds?.has?.(id) || exclude?.has?.(id)) continue;
if (detachedIds?.has?.(id)) continue;
const session = sessions.get(id);
if (!session) continue;
result.push({ id, label: session.name || 'Session' });