From e22322166c3b7c04bcc789173770f22d48fccd00 Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Sat, 6 Jun 2026 17:02:42 +0200 Subject: [PATCH 1/3] feat: linkify #NNN references in ChangeLog to Codeberg issues Closes #472 Co-Authored-By: Claude Sonnet 4.6 --- lib/ui/screens/changelog_screen.dart | 14 +++++++++++++- test/widget/changelog_screen_test.dart | 14 ++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/lib/ui/screens/changelog_screen.dart b/lib/ui/screens/changelog_screen.dart index 2012242..aa13b25 100644 --- a/lib/ui/screens/changelog_screen.dart +++ b/lib/ui/screens/changelog_screen.dart @@ -31,6 +31,17 @@ class ChangeLogScreen extends ConsumerWidget { return '$h:$m, ${dt.day} $month ${dt.year}'; } + static const _repoUrl = 'https://codeberg.org/guettli/sharedinbox'; + + static final _issueRefPattern = RegExp(r'#(\d+)'); + + static String _linkifyIssueRefs(String text) { + return text.replaceAllMapped( + _issueRefPattern, + (m) => '[#${m[1]}]($_repoUrl/issues/${m[1]})', + ); + } + // Changelog lines have the form: // * 2026-06-05 [abc1234](https://...): subject // This pattern captures the short hash inside the markdown link. @@ -82,7 +93,8 @@ class ChangeLogScreen extends ConsumerWidget { child: Text('Error loading changelog: ${snapshot.error}'), ); } - final content = snapshot.data ?? 'No changelog entries found.'; + final raw = snapshot.data ?? 'No changelog entries found.'; + final content = _linkifyIssueRefs(raw); final versions = installedVersions.value ?? {}; final annotated = _injectInstallMarkers(content, versions); return Markdown( diff --git a/test/widget/changelog_screen_test.dart b/test/widget/changelog_screen_test.dart index 6d9aae3..13f22cc 100644 --- a/test/widget/changelog_screen_test.dart +++ b/test/widget/changelog_screen_test.dart @@ -102,4 +102,18 @@ void main() { expect(find.textContaining('Installed:'), findsNothing); expect(find.textContaining('initial release'), findsOneWidget); }); + + testWidgets('ChangeLogScreen renders #NNN as a tappable link', ( + tester, + ) async { + const changelog = '* 2024-03-01 fix: resolve crash, see #42\n'; + + await tester.pumpWidget( + _buildScreen(assets: {'assets/changelog.txt': changelog}), + ); + await tester.pumpAndSettle(); + + // The link text "#42" must be visible in the rendered output. + expect(find.textContaining('#42'), findsOneWidget); + }); } From 9fd30d8f28a36e124e4f7c832ecd04bd81ae21a0 Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Sat, 6 Jun 2026 22:34:16 +0200 Subject: [PATCH 2/3] ci: re-trigger CI check From 156ccae83b6f334bc6dac0184ffa8926fe2934f8 Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Sat, 6 Jun 2026 23:41:13 +0200 Subject: [PATCH 3/3] fix(ci): forward SSH tunnel directly to dagger engine socket Eliminates the socat bridge dependency by using OpenSSH's built-in Unix socket forwarding (-L port:socket_path). The dagger user already owns /run/dagger/engine.sock so no intermediate TCP listener is needed. Co-Authored-By: Claude Sonnet 4.6 --- scripts/setup_dagger_remote.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/setup_dagger_remote.sh b/scripts/setup_dagger_remote.sh index 0f01768..974e93a 100755 --- a/scripts/setup_dagger_remote.sh +++ b/scripts/setup_dagger_remote.sh @@ -76,11 +76,12 @@ if [ "$_elapsed" -gt 10 ]; then echo "::warning::ssh-keyscan took ${_elapsed}s — Dagger engine host may be slow to respond" fi -# Create a background SSH tunnel to the Dagger engine. -# We map local port 8080 to remote port 1774 (where our socat bridge is listening). +# Create a background SSH tunnel to the Dagger engine Unix socket. +# Forwards local TCP port 8080 directly to /run/dagger/engine.sock on the remote host, +# eliminating the need for a socat bridge on the server side. echo "Establishing SSH tunnel to $DAGGER_ENGINE_HOST..." _t0=$SECONDS -timeout 30 ssh -i ~/.ssh/dagger_key -o StrictHostKeyChecking=no -f -N -L 8080:localhost:1774 "dagger@$DAGGER_ENGINE_HOST" +timeout 30 ssh -i ~/.ssh/dagger_key -o StrictHostKeyChecking=no -f -N -L 8080:/run/dagger/engine.sock "dagger@$DAGGER_ENGINE_HOST" _elapsed=$(( SECONDS - _t0 )) if [ "$_elapsed" -gt 10 ]; then echo "::warning::SSH tunnel setup took ${_elapsed}s"