Compare commits

...
2 Commits
Author SHA1 Message Date
Jon Zhang 3996bcf11e fix(flutter): let Tab leave the shortcut recorder (#17421)
Signed-off-by: Jon Zhang <jonathanzhang98@gmail.com>
2026-12-05 15:21:45 +08:00
rustdeskandClaude Opus 5.5 79131554c3 ci(linux-riscv64): keep amd64 and riscv64 packages at the same version
The riscv64 job installs -dev:riscv64 packages from ports.ubuntu.com
next to the runner's amd64 ones. Multi-Arch: same packages must have the
same version on both architectures. linux-libc-dev 6.8.0-155.155 reached
noble-updates on 2026-12-05 02:09 UTC: ports had it by 03:29, but the
runner's Azure mirror was still at its 01:39 snapshot with 6.8.0-151, so
the 1.5.4 tag build failed with "libc6-dev:riscv64 : Depends:
linux-libc-dev:riscv64 but it is not going to be installed".

- Point ubuntu.sources (mirror+file with the Azure mirror first on the
  runner) at archive.ubuntu.com, which is published together with ports.
- Name linux-libc-dev in the riscv64 install. Without it apt does not
  upgrade the runner's preinstalled amd64 copy to match, even when both
  versions are available.

Checked in ubuntu:24.04 containers set up like the runner (apt-mirrors.txt
with Azure at priority 1, linux-libc-dev 151 preinstalled): the old step
fails with the same error; either change alone still fails; with both the
full riscv64 package list installs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkjq1rgjsKR9Xi6WprJ
2026-12-05 12:50:18 +08:00
3 changed files with 68 additions and 1 deletions

No files matched your search

+7 -1
View File
@@ -2553,6 +2553,10 @@ jobs:
run: |
set -euo pipefail
sudo sed -i 's/^Types: deb$/Types: deb\nArchitectures: amd64/' /etc/apt/sources.list.d/ubuntu.sources
# Multi-Arch: same packages such as linux-libc-dev need one version for amd64 and riscv64.
# The runner's Azure mirror can lag ports.ubuntu.com by hours, so take amd64 from the
# archive that ports is published with.
sudo sed -i 's|^URIs: .*|URIs: https://archive.ubuntu.com/ubuntu/|' /etc/apt/sources.list.d/ubuntu.sources
sudo tee /etc/apt/sources.list.d/ports-riscv64.sources > /dev/null <<'EOF'
Types: deb
URIs: http://ports.ubuntu.com/ubuntu-ports
@@ -2567,7 +2571,9 @@ jobs:
sudo apt-get install -y --no-install-recommends gcc-riscv64-linux-gnu \
g++-riscv64-linux-gnu clang libclang-dev lld cmake ninja-build meson pkg-config \
make libssl-dev libsodium-dev qemu-user-static
sudo apt-get install -y --no-install-recommends \
# linux-libc-dev (amd64) is named so apt upgrades the runner's copy to the riscv64
# version when new kernel headers came out after the runner image was built.
sudo apt-get install -y --no-install-recommends linux-libc-dev \
libc6-dev:riscv64 libgtk-3-dev:riscv64 libxcb-randr0-dev:riscv64 \
libxcb-shape0-dev:riscv64 libxcb-xfixes0-dev:riscv64 libxdo-dev:riscv64 \
libxfixes-dev:riscv64 libasound2-dev:riscv64 libpulse-dev:riscv64 libva-dev:riscv64 \
@@ -183,6 +183,15 @@ class _RecordingDialogState extends State<_RecordingDialog> {
if (HardwareKeyboard.instance.isControlPressed) mods.add('primary');
}
// Let plain Tab move focus to the dialog buttons.
if (logical == LogicalKeyboardKey.tab &&
mods.isEmpty &&
!HardwareKeyboard.instance.isMetaPressed &&
!HardwareKeyboard.instance.logicalKeysPressed
.contains(LogicalKeyboardKey.altGraph)) {
return KeyEventResult.ignored;
}
setState(() {
_mods = mods;
if (!_isMac &&
@@ -0,0 +1,52 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_hbb/common/widgets/keyboard_shortcuts/recording_dialog.dart';
import 'package:flutter_hbb/common/widgets/keyboard_shortcuts/shortcut_constants.dart';
import 'package:flutter_hbb/generated_bridge.dart';
import 'package:flutter_hbb/models/platform_model.dart';
import 'package:flutter_test/flutter_test.dart';
class _Binding extends Fake implements RustdeskImpl {
@override
String translate(
{required String name, required String locale, dynamic hint}) =>
name;
}
void main() {
setUp(() => platformFFI.setBindingForTesting(_Binding()));
testWidgets('Tab reaches Save without replacing a recorded Ctrl+Tab',
(tester) async {
await tester.pumpWidget(const MaterialApp(home: Scaffold()));
final result = showRecordingDialog(
context: tester.element(find.byType(Scaffold)),
actionId: kShortcutActionSwitchDisplayNext,
actionLabel: 'Switch to next display',
existingBindings: const [],
actionLabelLookup: (action) => action,
);
await tester.pumpAndSettle();
await tester.sendKeyDownEvent(LogicalKeyboardKey.controlLeft);
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
await tester.sendKeyUpEvent(LogicalKeyboardKey.controlLeft);
await tester.pumpAndSettle();
expect(find.text('Ctrl+Tab'), findsOneWidget);
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
await tester.pump();
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
await tester.pump();
await tester.sendKeyEvent(LogicalKeyboardKey.enter);
await tester.pumpAndSettle();
expect(find.byType(AlertDialog), findsNothing);
expect((await result)?.binding, {
'action': kShortcutActionSwitchDisplayNext,
'mods': ['primary'],
'key': 'tab',
});
}, variant: const TargetPlatformVariant({TargetPlatform.windows}));
}