mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-11 01:39:41 +02:00
refactor(tiles): Ctrl+Tab and Alt+[ / ] cycle tiles through one helper
nextSession and prevSession each carried the same grid branch (cycleTile from the active session, a human selection, skip the tab walk). It is now _cycleTileFocus(delta) in tile-grid.js, next to the other focus moves; both call it optionally, so a page or harness without tile-grid.js walks the tabs as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -608,6 +608,19 @@ Object.assign(CodemanApp.prototype, {
|
||||
if (id) this.selectSession(id);
|
||||
},
|
||||
|
||||
/**
|
||||
* Ctrl+Tab / Alt+] (delta 1) and Alt+[ (delta -1) while the grid is open: a
|
||||
* human selection of the next tile in reading order, wrapping. Returns
|
||||
* whether the grid took the chord (it is open), so the tab walk is skipped.
|
||||
*/
|
||||
_cycleTileFocus(delta) {
|
||||
const grid = this._tileGrid;
|
||||
if (!grid?.open) return false;
|
||||
const id = window.CodemanTileGrid.cycleTile(grid.ids, this.activeSessionId, delta);
|
||||
if (id) this.selectSession(id);
|
||||
return true;
|
||||
},
|
||||
|
||||
/** Removes the focused tile (the session keeps running); a neighbour takes focus. */
|
||||
removeFocusedTile() {
|
||||
const grid = this._tileGrid;
|
||||
|
||||
Reference in New Issue
Block a user