Merge upstream/dev (86 commits) into tth
build / ci-image (push) Successful in 10s
build / build (push) Failing after 4m27s

Upstream redesigned the chat composer (bubble, round +/send button,
ChatComposerQuote for the reply preview); our terminal theme had tweaked
the old layout. Took upstream's structure and re-applied the terminal
look to the new widgets: compact panel padding, square bubble, square
button, square and one-line-low reply quote. The terminal reply padding
in channel_chat_screen now lives in ChatComposerQuote, so DMs get it too.

Also fixed for the merge:
- mesh_ui: AvatarCircle uses upstream's avatarInitials() (nullable); the
  terminal glyph falls back to the person icon like upstream does;
- chat_screen: upstream split maxMessageRetries into direct/flood limits,
  the terminal line now shows the bubble's maxSendAttempts;
- test/screens/copy_messages_test.dart: the 1x1 PNG had a bad IDAT CRC.
  Its async decode failure leaked into the next test; upstream's real
  flutter_langdetect hides that by timing, our stub (instant init) does
  not, so the DM test failed ~3 of 5 runs. Replaced with a valid PNG.

Checked in the CI image (Flutter 3.47.9): flutter analyze lib test clean;
flutter test all green except settings_reveal_test "hides Image Messages
sub-options", which fails the same way on plain upstream/dev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-23 12:43:57 +01:00
commit 63907cb17d
210 files changed
+47623 -4900

No files matched your search

+43 -32
View File
@@ -8,6 +8,7 @@ import '../l10n/l10n.dart';
import '../theme/mesh_theme.dart';
import '../theme/terminal_theme.dart';
import '../theme/theme_icons.dart';
import 'contact_visuals.dart';
/// MeshCore shared design kit.
///
@@ -301,7 +302,8 @@ class StatTile extends StatelessWidget {
/// Initials avatar with a deterministic per-name hue, or a fixed [color]
/// for node-type coloring. Optional [icon] or themeable [iconSlot] replaces
/// initials.
/// initials. Initials come from [avatarInitials]; a name with no letters,
/// digits or emoji shows a generic person icon instead.
class AvatarCircle extends StatelessWidget {
final String name;
final double size;
@@ -338,7 +340,7 @@ class AvatarCircle extends StatelessWidget {
@override
Widget build(BuildContext context) {
final accent = color ?? _colorFor(name);
final initials = _initials(name);
final initials = avatarInitials(name);
if (MeshStyle.of(context).terminal) {
// Terminal theme: just the glyph, small enough for a one-line row.
final s = math.min(size, 20.0);
@@ -346,8 +348,12 @@ class AvatarCircle extends StatelessWidget {
width: s,
height: s,
child: Center(
child: (icon ?? iconSlot?.icon) != null
? Icon(icon ?? iconSlot!.icon, size: s * 0.85, color: accent)
child: (icon ?? iconSlot?.icon) != null || initials == null
? Icon(
icon ?? iconSlot?.icon ?? Icons.person_outline,
size: s * 0.85,
color: accent,
)
: Text(
initials,
style: MeshTheme.mono(
@@ -399,9 +405,9 @@ class AvatarCircle extends StatelessWidget {
size: size * 0.55,
color: readableAccent(accent, background, minContrast: 3),
)
: icon != null
: icon != null || initials == null
? Icon(
icon,
icon ?? Icons.person_outline,
size: size * 0.5,
color: readableAccent(accent, background, minContrast: 3),
)
@@ -415,21 +421,6 @@ class AvatarCircle extends StatelessWidget {
),
);
}
static String _initials(String name) {
final words = name
.trim()
.split(RegExp(r'\s+'))
.where((w) => w.isNotEmpty)
.toList();
if (words.isEmpty) return '?';
if (words.length == 1) {
return words.first.characters.take(2).toString().toUpperCase();
}
return (words.first.characters.take(1).toString() +
words[1].characters.take(1).toString())
.toUpperCase();
}
}
/// Four-bar signal strength indicator driven by an SNR value (dB), colored
@@ -738,6 +729,11 @@ class ErrorRetryCard extends StatelessWidget {
/// Staggered fade + slide entrance for list items. Wrap each item and pass
/// its [index]; animation only plays once per widget lifecycle.
///
/// Only rows built while their list is at rest at the top play it. Rows that
/// a scroll brings into view appear at once: a delayed fade there leaves
/// blank rows trailing the finger and adds a ticker and an opacity layer per
/// row during a fling.
class ListEntrance extends StatefulWidget {
final int index;
final Widget child;
@@ -750,41 +746,56 @@ class ListEntrance extends StatefulWidget {
class _ListEntranceState extends State<ListEntrance>
with SingleTickerProviderStateMixin {
// Created eagerly: a lazy `late final` initializer would run on first
// access — which can be dispose(), where ticker creation throws.
late final AnimationController _controller;
late final CurvedAnimation _curve;
// Created in initState, not lazily: a lazy initializer would run on first
// access — which can be dispose(), where ticker creation throws. Null when
// the row skips the entrance.
AnimationController? _controller;
CurvedAnimation? _curve;
/// Whether the enclosing list has scrolled away from the top or is moving,
/// i.e. this row is entering because of a scroll.
bool _enteredByScroll() {
final scrollable = context.findAncestorStateOfType<ScrollableState>();
if (scrollable == null) return false;
final position = scrollable.position;
return position.isScrollingNotifier.value ||
(position.hasPixels && position.pixels != 0);
}
@override
void initState() {
super.initState();
_controller = AnimationController(
// Decided once: changing the tree shape later would rebuild the row.
if (_enteredByScroll()) return;
final controller = _controller = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 280),
);
_curve = CurvedAnimation(parent: _controller, curve: Curves.easeOutCubic);
_curve = CurvedAnimation(parent: controller, curve: Curves.easeOutCubic);
final delay = Duration(milliseconds: 24 * widget.index.clamp(0, 12));
Future.delayed(delay, () {
if (mounted) _controller.forward();
if (mounted) controller.forward();
});
}
@override
void dispose() {
_curve.dispose();
_controller.dispose();
_curve?.dispose();
_controller?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
final curve = _curve;
if (curve == null) return widget.child;
return FadeTransition(
opacity: _curve,
opacity: curve,
child: SlideTransition(
position: Tween(
begin: const Offset(0, 0.04),
end: Offset.zero,
).animate(_curve),
).animate(curve),
child: widget.child,
),
);