fix test suite — green on make test

tabsFor() sorts by contribution priority when no user order is
set. Test expectations updated for sidebar defaultSize 400 and
decision ID D-1 (no zero-padding). PTY tests tagged forkpty and
run via dart test (forkpty output unreliable inside flutter test
runner). CI script adds --no-fatal-infos and --exclude-tags.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-03 21:52:39 +02:00
co-authored by Claude
parent 864a1062a6
commit b45699ccd1
9 changed files with 68 additions and 56 deletions
+8 -9
View File
@@ -53,10 +53,7 @@ class PanelRegistry extends ChangeNotifier {
entry.value.removeWhere((c) => c.id == contributionId);
if (entry.value.length != before) {
if (_activeTab[entry.key] == contributionId) {
_activeTab[entry.key] =
entry.value.whereType<TabContribution>().isEmpty
? null
: entry.value.whereType<TabContribution>().first.id;
_activeTab[entry.key] = entry.value.whereType<TabContribution>().isEmpty ? null : entry.value.whereType<TabContribution>().first.id;
}
}
}
@@ -66,19 +63,21 @@ class PanelRegistry extends ChangeNotifier {
Iterable<SlotDefinition> get slots => _defs.values;
SlotDefinition? definitionFor(SlotId id) => _defs[id];
List<ContributionPoint> contributionsFor(SlotId id) =>
List.unmodifiable(_mounts[id] ?? const []);
List<ContributionPoint> contributionsFor(SlotId id) => List.unmodifiable(_mounts[id] ?? const []);
List<TabContribution> tabsFor(SlotId id) {
final tabs = contributionsFor(id).whereType<TabContribution>().toList();
final order = _order[id];
if (order == null || order.isEmpty) return tabs;
if (order == null || order.isEmpty) {
tabs.sort((a, b) => a.priority.compareTo(b.priority));
return tabs;
}
tabs.sort((a, b) {
final ai = order.indexOf(a.id);
final bi = order.indexOf(b.id);
if (ai < 0 && bi < 0) return 0;
if (ai < 0 && bi < 0) return a.priority.compareTo(b.priority);
if (ai < 0) return 1;
if (bi < 0) return 1;
if (bi < 0) return -1;
return ai.compareTo(bi);
});
return tabs;