feat(cli): improve tab and window tree rendering

- Add shared rendering helpers for width-aware tree labels, truncation, and no-wrap Rich text.
- Preserve tab index and group window metadata through the extension and SDK factories.
- Render tab trees in browser/window/index order with grouped tab details and optional shortened URLs.
- Reuse the tab tree labels in window trees to keep output compact and consistent.
- Cover legacy missing-index responses, grouped/collapsed tabs, URL display, and rendering helpers with tests.
This commit is contained in:
2026-06-15 01:04:02 +02:00
parent 657b1b0923
commit 0b43408a8d
9 changed files with 409 additions and 181 deletions
+2
View File
@@ -44,6 +44,7 @@ class Tab:
title: str = ""
url: str = ""
group_id: int | None = None
index: int = 0
browser: str | None = None
_browser: BoundBrowser | None = field(default=None, repr=False, compare=False, init=False)
@@ -149,6 +150,7 @@ class Group:
color: str
collapsed: bool
tab_count: int
window_id: int | None = None
browser: str | None = None
_browser: BoundBrowser | None = field(default=None, repr=False, compare=False, init=False)