implement MultitabPane widget + controller (T-83)

MultitabController<T> is a Flutter-free ChangeNotifier owning the
tab list, active selection, and reorder/close invariants:
- pinned (non-reorderable) entries form barriers that other tabs
  cannot cross
- non-closeable entries silently no-op on remove() so hosts don't
  need to gate the call site
- closing the active tab falls right, then left, then to null
- duplicate ids are rejected

MultitabPane<T> is the widget shell: a horizontal tab strip
followed by the active entry's body. Active tab gets the
panelHeader background and a panelActiveBorder top accent;
inactive tabs blend into the tab bar. Close × is hidden until
hover. Add button only renders when onAddRequested is wired.

Hosts route the user's add/close intent through callbacks so the
widget stays domain-free — for the Claude pane, add will spawn a
new tmux session and close will kill one. Drag-to-reorder is
controller-side only for now (the gesture wiring lands with T-24).

19 controller tests + 9 widget tests.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-06 12:12:42 +02:00
co-authored by Claude
parent bdc46a4fdd
commit 1caaf5f4dd
7 changed files with 776 additions and 1 deletions
+2
View File
@@ -23,6 +23,8 @@ export 'src/clide_scrollbar.dart';
export 'src/clide_spine.dart';
export 'src/clide_surface.dart';
export 'src/clide_tab_bar.dart';
export 'src/multitab_controller.dart';
export 'src/multitab_pane.dart';
export 'src/clide_tappable.dart';
export 'src/clide_text.dart';
export 'src/clide_tooltip.dart';