mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 08:59:40 +02:00
feat(tiles): tile header (status dot, name, menu, remove) and the in-tiles tab marker
Every tile gets a fixed-height header above its body: `● name ......... ⋯ ×`.
- The dot is the six-state classifier the tab rows and both home screens
share (_sidebarRichRow), with the existing .home-sessions-dot--* classes;
hovering the header says the state and for how long ("working 3m"). A
tile whose session waits on a permission prompt or question gets a pulsing
red border (box-shadow only, never layout; still under reduced motion).
- The name is text with data-i18n-skip; a double-click renames it through
the tab rename's own write queue (Enter or leaving the field commits,
Escape cancels, an IME composition owns Enter), and an in-flight name shows
as already applied, as on the tab.
- ⋯ is the tab rail's session menu (options, new window, close session with
its confirm); × removes the tile ONLY, the session keeps running. Neither
button focuses a tile that is not focused.
- The header is fixed at 24px so nothing in it can resize the body, and with
it the xterm and its PTY (#464).
Every tab render refreshes the headers, so they follow status and name
changes. Tabs of tiled sessions carry .in-tiles (both render paths), and the
tab strip re-renders when tiles come and go.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,24 @@ export class FakeEl {
|
||||
this.className = [...set].join(' ');
|
||||
return on;
|
||||
}
|
||||
append(...children: FakeEl[]) {
|
||||
for (const child of children) this.appendChild(child);
|
||||
}
|
||||
replaceWith(other: FakeEl) {
|
||||
const parent = this.parentElement;
|
||||
if (!parent) return;
|
||||
other.remove();
|
||||
const i = parent.children.indexOf(this);
|
||||
parent.children.splice(i, 1, other);
|
||||
other.parentElement = parent;
|
||||
this.parentElement = null;
|
||||
}
|
||||
title = '';
|
||||
textContent = '';
|
||||
value = '';
|
||||
type = '';
|
||||
focus = vi.fn();
|
||||
select = vi.fn();
|
||||
appendChild(child: FakeEl) {
|
||||
child.remove();
|
||||
child.parentElement = this;
|
||||
|
||||
Reference in New Issue
Block a user