fix: expose project registration and align Linux app id

This commit is contained in:
Hamza Ayed
2026-10-04 02:20:09 +03:00
parent 5ab7ec2713
commit ddfb26c14f
5 changed files with 90 additions and 2 deletions
@@ -1407,6 +1407,11 @@ class _ChatPageState extends State<ChatPage> {
),
),
SizedBox(width: compact ? 2 : 12),
IconButton.filledTonal(
onPressed: chat.isSending ? null : _addWorkspaceProject,
tooltip: 'تسجيل مشروع من مجلد موجود',
icon: const Icon(Icons.create_new_folder_outlined),
),
IconButton(
onPressed: _chooseWorkspace,
tooltip:
@@ -7,7 +7,7 @@ project(runner LANGUAGES CXX)
set(BINARY_NAME "flutter_app")
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "com.example.flutter_app")
set(APPLICATION_ID "com.mithqal.ai")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
@@ -0,0 +1,46 @@
# Linux desktop build and runtime
The Linux desktop entry, installed icon, and GTK application must all use the
same application ID: `com.mithqal.ai`.
## Ubuntu and Debian build dependencies
Install Flutter's Linux desktop toolchain and the native secret-storage
development library:
```sh
sudo apt-get update
sudo apt-get install -y \
clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-12-dev \
libsecret-1-dev libsecret-1-0
```
Then check the host and build the release bundle:
```sh
flutter doctor -v
flutter devices
flutter pub get
flutter build linux --release
```
The executable bundle is produced at
`build/linux/x64/release/bundle/`. Distribute the complete bundle and verify
its native runtime dependencies on the target distribution, for example with
`ldd build/linux/x64/release/bundle/flutter_app`.
## Secure session storage
`flutter_secure_storage` uses Libsecret on Linux. Build machines need
`libsecret-1-dev`; packaged applications need the runtime library
`libsecret-1-0`. The desktop session must also provide D-Bus and an unlocked
Secret Service keyring, commonly GNOME Keyring or KDE Wallet. Run the
application in an interactive desktop session to verify login, token
persistence after restart, and logout deletion. Do not treat a successful
Linux build as proof that secure storage works: headless sessions and CI may
have no unlocked keyring.
Upstream setup references:
- [Flutter Linux development setup](https://docs.flutter.dev/platform-integration/linux/setup)
- [flutter_secure_storage Linux implementation](https://pub.dev/documentation/flutter_secure_storage_linux/latest/)
@@ -182,6 +182,39 @@ void main() {
await chatCubit.close();
});
testWidgets('project registration stays visible when sidebar is hidden', (
tester,
) async {
tester.view.physicalSize = const Size(700, 600);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.resetPhysicalSize);
addTearDown(tester.view.resetDevicePixelRatio);
final api = _TestApiRepository();
final chatCubit = ChatCubit(
api,
settingsStore: LocalSettingsStore.inMemory(),
);
await tester.pumpWidget(
MultiRepositoryProvider(
providers: [RepositoryProvider<ApiRepository>.value(value: api)],
child: MultiBlocProvider(
providers: [
BlocProvider.value(value: chatCubit),
BlocProvider(create: (_) => VoiceCubit(api, AudioRecorder())),
],
child: const SovereignApp(),
),
),
);
await tester.pumpAndSettle();
expect(find.text('مشاريعي'), findsNothing);
expect(find.byTooltip('تسجيل مشروع من مجلد موجود'), findsOneWidget);
expect(tester.takeException(), isNull);
await chatCubit.close();
});
testWidgets('model selector displays capabilities reported by Ollama', (
tester,
) async {