922 Commits

Author SHA1 Message Date
root
0f4fe33003 Add Opencode (opencode.ai) integration via SSH tunnel
Features:
- Opencode AI chat interface
- SSH tunnel for secure API communication
- Auto-install Opencode on remote servers
- API key management with server-side storage
- Session history and management
- Integration with flutter_server_box server list
2026-04-03 00:41:32 +08:00
GT610
1d3534242c feat (SSH page): Added server sorting, search, and history features (#1097)
* feat (SSH page): Added server sorting, search, and history features

- Added sorting functionality to the SSH page, supporting sorting by name or date added
- Added a server search feature, allowing searches by name, username, or IP address
- Implemented a server access history feature, allowing users to view and clear the history
- Added persistent storage for sorting options in Settings
- Updated the multilingual files to support the new features

* fix(ssh/tab): Fixed an issue where tabs were not refreshed after sorting

Added _tabRN.notify() to refresh tabs after sorting, while also changing _TabBar from ConsumerWidget to StatelessWidget and fixing the sorting logic

* fix(ssh/tab): Fixed an issue where tabs were not refreshed after sorting

Added _tabRN.notify() to refresh tabs after sorting, while also changing _TabBar from ConsumerWidget to StatelessWidget and fixing the sorting logic

* fix(ssh): Fixed the sorting functionality and optimized the UI display

- Fixed performance issues caused by using `indexOf` during server sorting; switched to pre-built index mappings
- Optimized divider colors to use theme colors
- Removed unnecessary nested `Column` and `Expanded` structures
- Replaced hard-coded blue with theme colors
- Added error handling to display a snackbar
- Ensured all `ValueNotifier` instances are properly released upon disposal
2026-04-02 14:46:50 +08:00
GT610
183cdf98eb feat(port_forward): Supports local, remote, and dynamic port forwarding types (#1096)
* feat(port_forward): Supports local, remote, and dynamic port forwarding types

Added the PortForwardType enumeration to extend port forwarding functionality, supporting three modes:
1. Local forwarding (Local)
2. Remote forwarding (Remote)
3. Dynamic forwarding (SOCKS5)

Refactored the PortForwardConfig model and related adapters, and updated the UI configuration interface to support type selection

* fix(port_forward): Fixed display and validation issues with port forwarding configurations

Fixed the display logic for the local host; when the type is set to “Dynamic Forwarding,” 127.0.0.1 is used by default
Added validation for required fields in remote forwarding configurations to ensure that the remote host and port are not empty
Optimized remote forwarding log messages by removing redundant local address displays

* fix(port_forward): Fixed issues with remote port forwarding configuration and connections

- Fixed the handling of default values when the remote port forwarding type field is empty
- Corrected the labels for local/remote host and port displayed on the remote port forwarding interface
- Fixed the local port validation logic to disallow 0 or negative numbers
- Implemented connection management and error handling for remote port forwarding

* feat (Port Forwarding): Add localization labels for types and optimize code

Add localization labels for local and remote types in the port forwarding feature

Simplify the logic for retrieving prompt text on the port forwarding page
Change the default binding host from ‘0.0.0.0’ to 'localhost'

* fix(port_forward): Fixed an issue with the display format of remote port forwarding addresses

Added special handling for remote port forwarding types in the `displayAddr` method of `PortForwardConfig` to correctly display the remote bound address and port. Also optimized the code formatting to improve readability.

* refactor(port_forward): Remove automatically generated JSON serialization code and implement it manually

Modify the JSON parsing logic in PortForwardConfig and remove the automatically generated .g.dart files
Simplify the handling of localhost addresses in displayAddr
2026-04-01 17:30:55 +08:00
GT610
3c592baf2c fix: Use latest dartssh2 and add a switch for temperature between celsius and millicelsius (#1095)
* refactor(sftp): Optimize file download logic and SSH command execution handling

Replace manual chunked downloads with a more concise `sftp.download` method
Consistently use `utf8.decode` to process SSH command output

Remove redundant code and comments, and simplify the logic

* chore: Update `dartssh2` submodule

* feat (Temperature Display): Added an option to switch between degrees Celsius and millicelsius

Allows users to switch temperature units in server settings, resolving the issue of incorrect temperature display on some devices

* chore: Add a participnt

* fix(sftp): Fixed a resource leak issue during file downloads and SSH command execution

Ensured that remote and local file handles are properly closed during file downloads to prevent resource leaks. Additionally, improved error handling during SSH command execution to ensure that all streams are either successfully completed or properly handled in the event of an error.
2026-04-01 11:27:58 +08:00
GT610
3532844879 fix(ssh): Fixed the logic for handling font paths (#1093)
* fix(ssh): Fixed the logic for handling font paths

Correctly handles font filenames to avoid duplicate file extensions. Also optimized the logic for copying font files to ensure path accuracy.

Add an issue participant

* fix (Settings): Fixed the font clearing feature and added cache cleanup

On the SSH settings page, we fixed an issue where the font clearing feature failed to clear the cache and added logic to clear cached font files. Additionally, we changed the clearing operation to run asynchronously to ensure the page closes only after the operation is complete.

* fix: Check if the component has been mounted before popping the context

Avoid calling `context.pop()` when the component is unmounted, which causes an exception
2026-03-28 11:23:39 +08:00
GT610
c0f98e41c8 feat: Bring back completely re-optimized "Connection Stats" feature (#1090)
* feat (Connection Statistics): Restored the server connection statistics feature

* perf(store): Optimize data storage performance and implement caching mechanisms

- Implement caching mechanisms in SnippetStore and ServerStore to reduce redundant loading
- Refactor ConnectionStatsStore to use indexes and optimize query performance
- Adopt a more efficient approach when cleaning up expired records
- Add a maximum record limit to prevent data bloat

* perf(store): Optimize data storage performance and add a caching mechanism

Add a caching mechanism to PrivateKeyStore to reduce redundant loading

Make the cleanup and index rebuilding of ConnectionStatsStore asynchronous

Add database compression and size statistics
Display database size in the interface and optimize compression operations

* fix (Cache): Fixed cache invalidation and join statistics issues

- Added a cache invalidation call to the reload method
- Fixed an error in the calculation of join statistics timestamps
- Optimized the cache index rebuild logic
- Added tooltips and click effects for join statistics

* refactor(connection_stats): Convert file operations from synchronous to asynchronous and optimize record cleanup logic

Convert the database size retrieval method from synchronous to asynchronous to prevent UI blocking

Optimize server record cleanup logic by directly deleting redundant records instead of rebuilding indexes

* fix(connection_stats): Fixed an initialization issue when the index database is empty

During Stores initialization, the code now checks whether `connectionStats.indexDbKeys` is empty; if so, it calls `rebuildIndexAndCompact` to rebuild and compact the database. Additionally, the implementation of the `_pruneExcessRecords` method has been optimized to use tuples instead of temporary lists, thereby improving performance. A `mounted` check has been added at the UI layer to prevent state update issues during asynchronous operations.

* fix(server): Improved error string matching logic to more accurately identify connection issues

Error strings are now uniformly converted to lowercase for comparison, and matching criteria have been expanded to cover a wider range of error scenarios, including timeouts, authentication failures, and network errors

* fix(PrivateKeyStore): Fixed an issue where the cache state was not updated when clearing the cache

When clearing the private key store, ensure that the internal cache state is updated simultaneously to maintain consistency

* refactor(store): Add close methods and clean up subscription logic

Add close methods to PrivateKeyStore, SnippetStore, and ServerStore to unsubscribe

Unify cache cleanup logic to prevent memory leaks

* fix(store): Add a cache update suppression mechanism to prevent circular updates

Add an _suppressWatch flag to multiple Store classes to suppress cache invalidation during internal operations

Add a _putWithoutInvalidatingCache method to prevent recursive watchers from being triggered during data updates

* refactor(store): Improve caching and state management using try-finally

In PrivateKeyStore, ServerStore, and SnippetStore:
1. Remove redundant close methods
2. Use try-finally to ensure the _suppressWatch state is reset correctly
3. Optimize cache invalidation logic
4. Standardize transaction handling for update operations

* refactor(store): Optimize data storage operations and fix potential issues

- Ensure the safety and consistency of list operations in ConnectionStatsStore
- Replace direct calls to `box.put` with the `set` method in SnippetStore and ServerStore
- Extract decoding logic for PrivateKeyStore into a separate method
- Add logic to update server-hopping relationships

* fix: Fixed an issue where asynchronous operations were not being waited on and optimized storage operations

Fixed several issues where asynchronous operations were not being waited on to ensure data consistency

Added the _suppressWatch control to ServerStore and PrivateKeyStore

Optimized index management in ConnectionStatsStore to maintain record order

Added a new GitHub participant

* fix: Fixed potential state issues and memory leaks in asynchronous operations

Fixed potential state issues that could occur on the server edit page after a delete operation; added a mounted check

Changed the statistics clearing operation in connection_stats to run asynchronously

Optimized asynchronous operations in PrivateKeyStore and fixed potential memory leaks

* refactor(store): Convert asynchronous methods to synchronous ones to simplify the code

Fixed an issue where asynchronous operations were not handled correctly on the connection statistics page

* fix: Added mounted check and error handling for connection logs

Added a mounted check in _ConnectionStatsPageState to prevent the state from being updated after the component is unmounted

Added a try-catch block for connection logs in ServerNotifier to catch and log potential storage exceptions
2026-03-27 17:14:07 +08:00
GT610
fa4ac00ced chore: Update dependencies (#1088)
* chore: Update submodules and dependencies

Update the fl_lib and circle_chart submodules to the latest commit

Upgrade the hive_ce_generator dependency from 1.9.2 to 1.11.0

* build: Updated dependency versions

Updated fl_chart to 1.2.0, json_serializable to 6.13.0, and test to 1.29.0

Replaced flutter_secure_storage_macos with flutter_secure_storage_darwin

Removed the animations and screenshot dependencies, which are no longer in use

* chore: Update French i18n
2026-03-25 11:49:50 +08:00
GT610
d6e17ff58c feat: Added Port Forwarding Functionality (#1083)
* feat: Added Port Forwarding Functionality

Implemented port forwarding functionality, including the following major changes:
- Added a port forwarding configuration model and related state management
- Added a port forwarding page and interaction logic
- Implemented forwarding connections between local and remote ports
- Integrated into the server features menu
- Added necessary Hive adapters and storage support
- Updated plugin configurations across all platforms to support the new feature

* feat (Port Forwarding): Added multilingual support and optimized implementation

Added multilingual support for the port forwarding feature, including Chinese, English, and other languages

Optimized the port forwarding implementation by adding connection management and error handling

Fixed an issue with state persistence when updating port forwarding configurations

Updated related dependencies and submodules

* fix(port_forward): Fixed port forwarding error handling and redesigned the configuration dialog

Handled uncaught errors when port forwarding is disabled or during connection attempts

Extracted the configuration dialog into a standalone component and added port range validation

* fix(port_forward): Fixed issues with port forwarding connection management and UI layout

Fixed an issue where port forwarding connections were not closed properly; now uses `clientGetter` to delay the retrieval of `SSHClient`
Added cleanup logic when connections are closed to prevent memory leaks

Added a `mounted` check in `PortForwardPage` to prevent operations from executing after the component is unmounted

Wrapped the configuration dialog content in a `SingleChildScrollView` to prevent content overflow

* fix(port_forward): Fixed a concurrent modification exception that occurred when closing a port forwarding connection

Fixed a concurrent modification exception that could occur when closing a local forwarding entry by copying the connection list to prevent modifications to the collection during iteration. Also improved the UI by using theme colors and added error handling for configuration saving.

* fix(port_forward_provider): Fixed an issue where entries were not properly removed when port forwarding was stopped

When port forwarding is stopped, ensure that the corresponding entries are removed from the _forwards map. Additionally, before adding a new forwarding rule, check for and close any existing forwarding rules with the same ID to prevent resource leaks.

* refactor(l1n): Remove unused localization and remote host port translations

* fix(port_forward_provider): Handle errors when closing port forwarding

Add error handling to prevent the program from crashing due to exceptions when closing port forwarding

* refactor(port_forward): Refactor port forwarding state management to use serverId

Directly link port forwarding state management to the server ID to simplify parameter passing

Remove direct dependencies on Spi and use serverId as the core identifier instead

Update relevant providers and page logic to accommodate the new state structure

* fix(port_forward): Fixed a race condition issue in port forwarding operations

Added an _inFlight collection to prevent duplicate operations

Added a _saving state when saving configurations to prevent duplicate submissions

Automatically cleans up forwarding when changes in server connection status are detected

* refactor(port_forward_provider): Remove unnecessary concurrency control logic

Simplify the `toggleForward` method by removing concurrency control for the `_inFlight` collection, as it is not required in the current scenario
2026-03-23 19:38:58 +08:00
GT610
09431a0b08 fix(pve): Fix connection issues and add more error handlings (#1081)
* feat(PVE): Added display of PVE connection loading steps

Added a detailed display of loading steps during the PVE connection process, including stages such as establishing an SSH tunnel, authentication, and data retrieval

Also optimized the sorting of PVE storage content and the logic for handling connection errors

* feat(pve): Added error handling and prompts for PVE two-factor authentication

Added error handling for PVE servers when two-factor authentication is enabled, along with relevant error types and localized prompts

* feat(PVE): Added support for PVE passwords during key-based authentication

- Added the `pvePwd` field to the `ServerCustom` model
- Added a PVE password input field to the edit page (displayed only during key-based authentication)
- Updated multilingual files to support PVE-related loading states and password prompts
- Optimized PVE connection logic to support password verification during key-based authentication
2026-03-22 16:25:48 +08:00
GT610
2f67938b09 feat (Private Key Editing): Added private key format normalization (#1080)
* feat (Private Key Editing): Added private key format normalization

Added the _normalizePrivateKey method to normalize private key formats:
- Removes whitespace characters from Base64 content
- Ensures the standard format of 64 characters per line
- Ensures that the private key ends with a newline character

* fix(private_key): Fixes PEM private key formatting issues while preserving metadata headers

Properly handles metadata headers (such as Proc-Type and DEK-Info) in encrypted PEM keys and preserves these headers when cleaning up Base64 content. Additionally, optimizes the logic for removing whitespace characters and improves performance by using precompiled regular expressions.

* refactor(ui): Remove unused ctx parameters and optimize the selection window caching logic

- Remove unused egui::Context parameters from functions related to settings_page
- Add a check for the length of items in the selection window cache to improve cache validity
- Simplify the cache data structure and remove unnecessary online data validation logic

* fix(private_key): Fixed an issue with matching header and footer tags in PEM-format private keys

Added validation for consistency of header and footer tags in PEM-format private keys to ensure that the content following “BEGIN” and “END” is identical
2026-03-21 23:33:31 +08:00
GT610
1bea565c21 refactor(server): Move the SSH import and discovery features from the server edit page to the settings page (#1079)
* refactor(server): Move the SSH import and discovery features from the server edit page to the settings page

* feat (SSH Configuration): Added a feature to automatically import SSH configurations upon first launch

Checks for and prompts the user to import SSH configurations upon the first launch on the desktop

Optimized the SSH server import logic, adding duplicate detection and name conflict handling

Fixed an issue with mount status checks that could occur during the import process

* refactor (UI): Adjust the placement of the QR code scanning and SSH configuration import features

Move the QR code scanning feature from the server editing page to the settings page, and display different access points based on the platform

Optimize the SSH configuration import logic to ensure the status is updated correctly after the configuration is read for the first time

* refactor(ssh): Refactor server import logic and extract common methods

Extract server import logic into the `ServerDeduplication` class

Use the `importServersWithNotification` method consistently to handle imports

Remove duplicate `_importServers` and `_resolveServers` methods

Add checks for existing server IDs

* refactor(SSH): Optimized server import logic and fixed permission issues

- Moved the SSH configuration import logic from `edit.dart` to `actions.dart`
- Removed redundant checks for the `mounted` parameter
- Added handling for file permission exceptions
- Improved logic for resolving server name conflicts

* fix(ssh): Fixed an issue with message display during SSH configuration import

- Modified the format of the import success message to display the number of servers successfully imported
- Added a prompt for manual selection when permissions are denied
- Optimized the server deduplication logic to display an “already exists” message based on the original count

* fix(ssh): Fixed an issue with the count display when importing SSH configurations

Adjusted the server's deduplication logic to ensure the correct original count is used when displaying the number of imports

Removed unnecessary flag settings for the first read of SSH configurations

* fix: Fixed an issue where the “first read” flag was not updated when SSH configuration access was denied

When SSH configuration access is denied, set the “first read” flag to false to prevent repeated prompts

* fix(server): Optimized the logic for checking existing servers when importing SSH configurations

Moved the logic for checking existing servers to an earlier stage to avoid unnecessary parsing of SSH configurations
2026-03-20 20:41:09 +08:00
GT610
f858b150a5 feat (Editor): Add an option to set the editor font family (#1078)
* feat (Editor): Add an option to set the editor font family

Add the `editorFontFamily` property to the settings storage and implement font family selection functionality on editor-related pages. Also, update all pages that use the editor settings to support the newly added font family option.

* refactor(editor): Optimize the logic for editor font settings
Standardize the method for retrieving font settings on the editor page to avoid redundant calls to the `fetch()` method. Extract the font retrieval logic into variables or anonymous functions to improve code readability and performance.
2026-03-20 14:00:44 +08:00
GT610
728116e11f fix(storage): Fixed an issue with the SFTP path history (#1077)
* fix(storage): Fixed an issue with the SFTP path history

Added path validity checks when processing the SFTP path history

Standardized the format of stored paths and removed extra slashes

* refactor(sftp): Standardize SFTP path handling and optimize resource management

Extract path normalization logic into a separate method: _normalizeSftpPath
Ensure that the SFTP client is properly closed after use
2026-03-19 20:58:07 +08:00
GT610
e8265bc74a refactor: Remove Cupertino routing options and update the list of contributors (#1076)
- Remove code related to Cupertino routing that is no longer in use
- Update the list of contributors on GitHub
- Update the version of the xterm submodule
2026-03-19 15:56:37 +08:00
lollipopkit🏳️‍⚧️
04b47a385a fix(server): remove connection stats feature (#1063) 2026-03-07 02:06:45 +08:00
lollipopkit🏳️‍⚧️
bc69686d16 feat(ssh): support full multi-hop jump chain (#356) (#1058)
* feat(ssh): support full multi-hop jump chain (#356)

* fix(edit): validate jump cycle for new server saves
2026-02-28 00:12:03 +08:00
lollipopkit🏳️‍⚧️
c3678f3df9 chore(i18n): migrate start stop keys to fl_lib (#1057) 2026-02-27 23:36:59 +08:00
GT610
8b1326ff64 refactor(ssh): Update Terminal page to adapt new copy and paste logic (#1054)
* refactor(ssh): Remove terminal copy button and streamline clipboard functionality

Update dependency versions and remove the copy button from the terminal page, integrating clipboard functionality into the terminal controller.

* refactor(ssh): Optimize clipboard paste functionality implementation

Convert the _OnTerminalPaste method to an asynchronous implementation and remove duplicate _paste methods.

* refactor(ssh): Rename clipboard operation function and add new functionality

Renamed _onTerminalPaste to _onClipboardAction and expanded its functionality

Now supports copying selected text to the clipboard and performing paste operations when no text is selected

* fix: Fixed an issue where clipboard operations did not wait for asynchronous completion.

* fix(ssh): Fixed terminal paste operation return logic

Prevented redundant _onTerminalPaste calls after terminal paste operations
2026-02-27 21:56:16 +08:00
GT610
f9425948ca refactor: Simplify conditional rendering logic using null aware operators (#1049) 2026-02-08 22:18:56 +08:00
GT610
a0a62acdbc feat(database): Add database compression function (#1027)
* feat(database): Add database compression function

Add database compression functionality to the connection statistics page to reduce the size of the database file

Add multi-language support and related UI interactions

* fix(database): Update the description of database compression operations and fix the statistics cleanup logic

Update the description of database compression operations in the multilingual files to explicitly state that data will not be lost

Fix the connection statistics cleanup logic to ensure correct matching of server IDs

Add error handling for the compression operation to prevent the UI from freezing

* Update lib/l10n/app_en.arb

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-26 13:40:42 +08:00
GT610
9ac866644c ref:Refactor Settings UI and Fix Performance Issues (#1026)
* refactor(Settings page): Simplify the click handling logic of the cancel button

* fix(backup_service): Add a cancel button in the restore backup dialog

* refactor(Settings Page): Refactor the ordered list component and optimize state management

- Extract the logic for building list items into a separate method to improve maintainability
- Add animation effects to enhance the dragging experience
- Use PageStorageKey to maintain the scroll position
- Optimize the state management logic of the checkbox
- Add new contributors in github_id.dart

* fix: Add SafeArea to the settings page to prevent content from being obscured

Add SafeArea wrapping content in multiple settings pages to prevent content from being obscured by the navigation bar on certain devices, thereby enhancing user experience

* refactor: Extract file list retrieval method and optimize asynchronous loading of iOS settings page

Extract the `_getEntities` method from an inline function to a class member method to enhance code readability

Preload watch context and push token in the iOS settings page to avoid repeatedly creating Futures

* fix: Add a `key` attribute to the ChoiceChipX component to avoid rendering issues

* refactor(Settings page): Refactor the platform-related settings logic and merge the Android settings into the main page

Migrate the Android platform settings from a standalone page to the main settings page, and remove redundant Android settings page files

Adjust the platform setting logic, retaining only the special setting entry for the iOS platform

* build: Update fl_lib dependency to v1.0.363

* feat(Settings): Add persistent disable state for cards and virtual keys

Add persistent storage functionality for server detail cards and SSH virtual key disable status

Modify the logic of relevant pages to support the saving and restoration of disabled states

* refactor(setting): Simplify save logic and optimize file sorting performance

In the settings page, remove the unnecessary `enabledList` filtering and directly save the `_order` list

Optimize the sorting logic on the local file page by first retrieving the file status before proceeding with sorting

* fix: Optimize data filtering and backup service error handling on the settings page

Fix the data filtering logic in the settings page to only process key-value pairs with specific prefixes
Add error handling to the backup service, capture and display merge failure exceptions

* fix(Settings page): Fixed the issue where disabled items were not included in the order settings and asynchronously saved preference settings

Fix the issue where disabled items in the virtual keyboard and service details order settings are not included in the order list

Change the preference setting saving method to an asynchronous operation, and add a mounted check to prevent updating the state after the component is unmounted

* refactor: Optimize the reordering logic and remove redundant sorting methods

Narrow the scope of state updates in the reordering logic to only encompass the parts where data is actually modified

Remove the unused sorting methods in `_local.dart` to simplify the code

* refactor(view): Optimize the refresh logic of the local file page

Refactor the refresh method that directly calls setState into a unified _refresh method

Use the `_entitiesFuture` to cache the list of files to obtain results and avoid redundant calculations

* Update lib/view/page/storage/local.dart

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-25 18:43:57 +08:00
GT610
e226fec03d fix: Update dependencies and add a cancel button to the color selection dialog (#1025)
Update the fl_lib dependency to version v1.0.362

Add a cancel button in the color selection dialog to enhance user experience
2026-01-25 00:12:22 +08:00
GT610
7d47c9d673 bump: Replace discontinued deps and update fl_lib dep (#1024)
* build: Replace flutter_markdown with flutter_markdown_plus

* build: Update fl_lib dependency to v1.0.361 and synchronize related dependencies

Update the fl_lib dependency version in the pubspec.yaml and pubspec.lock files to v1.0.361, and simultaneously update the dependency versions of camera_avfoundation and objective_c

* build: Add flutter_markdown_plus dependency

* build: update the git reference of fl_lib
2026-01-24 15:04:05 +08:00
GT610
87d7feb823 ref(systemd): Fix safety bugs and improve performance (#1020)
* fix(systemd): Fix the issue of special characters in unit names

In systemd unit processing, filtering of special characters in unit names has been added to prevent command injection and security issues. Additionally, the rendering performance of the unit list has been optimized by merging unnecessary watch calls and removing confirmation dialogs to simplify the operation process.

* feat(Systemd): Add a confirmation dialog for systemd unit operations

Display a confirmation dialog when stopping or restarting systemd units to prevent accidental operations. For other operations, directly navigate to the SSH page to execute commands.

* fix(systemd): Fix the range of characters allowed in unit names

Extend the regular expression to allow more valid characters, including dots, @, and colons, in system unit names, to support a broader range of unit naming conventions

* fix(systemd): Fix the issue of parsing service names with dots

When dealing with service IDs containing multiple dots (such as org.cups.cupsd.service), correctly extract the service name and type. When there are no dots in the service ID, set the type to an empty string.
2026-01-22 17:47:06 +08:00
GT610
84a1bd5519 fix(sftp): FIx Permission Denied While Accessing SFTP (#1019)
* fix(storage): Set the initial SFTP path based on the user's role

When the user is not root, set the initial path to `/home/$user`. For root users, use `/root` as the path

* chore: Add issue participants into github_id

* fix(sftp): Improved the logic for obtaining the initial path and asynchronously processed directory listings

Attempt to obtain the user's home directory path by executing a command, and fall back to the default path if it fails. At the same time, change the _listDir call to asynchronous to avoid potential issues.

* fix(storage): Fixed the logic for determining the initial path of SFTP

Change the condition from checking if the path is not equal to '~' to checking if the path starts with '/', to ensure the correct user home directory path is obtained
2026-01-22 13:49:48 +08:00
GT610
f47d1e7141 fix(server): Add boundary check for editing host name (#1018)
* feat(localization): Add validation prompt for invalid host formats

Add validation for host formats, allowing only IPv4, IPv6, and domain name formats

Add regular expression validation for host format on the server editing page

Update multilingual files to add the invalidHostFormat field

* chore: Update dependent package versions to the latest

* fix(server edit): Update the hostname regular expression to support IPv6 zone identifiers

Modify the regular expression for hostname validation to add support for IPv6 zone identifiers (such as %en0)
2026-01-22 12:03:08 +08:00
GT610
d14e97485f refactor: Optimize process page (#1017)
* refactor(process): Optimize the sorting logic of the process list and add a data integrity check flag

Add the `_checkedIncompleteData` flag to avoid repeatedly checking data integrity

Change `_sortModes` to a final variable and initialize it using `List.from`

Remove unnecessary calls to `_timer.cancel`

* refactor(process): Remove unused focus states and refactor process item operations

Move the stop operation of the process item to the tail button, and remove the focus state-related code that is no longer used

* fix(process): Fix the layout of the process page and the stop confirmation dialog box

Adjust the spacing condition between CPU and memory display, and only add spacing when both are present

Modify the confirmation dialog for stopping the process, and add a cancel button to provide a better user experience

* refactor(process): Merge duplicate sorting mode removal logic

Combine two separate `removeWhere` calls into one, simplifying the code and enhancing readability
2026-01-22 00:22:23 +08:00
GT610
347d294f6e fix: settings page and SSH virtual keys bottom overflow (#1015)
* fix: Add SafeArea to the page to prevent content from being obscured

Add the SafeArea component to multiple pages to ensure that content is not obscured by the device status bar or navigation bar, thereby enhancing the user experience

* fix(ssh page): Fix the issue of the virtual keyboard area being displayed within the security zone

Wrap the virtual keyboard area within the SafeArea to prevent it from being obscured by the system UI, and remove any unnecessary bottom padding
2026-01-21 10:56:39 +08:00
GT610
7926a4d4a6 fix(ssh page): Fix the issue with calculating the height of the virtual keyboard (#1011) 2026-01-17 21:15:05 +08:00
GT610
39a3e0800b opt: Improve container parsing and error handling (#1001)
* fix(ssh): Modify the return type of execWithPwd to include the output content

Adjust the return type of the `execWithPwd` method to `(int?, String)` so that it can simultaneously return the exit code and output content

Fix the issue in ContainerNotifier where the return result of execWithPwd is not handled correctly

Ensure that server operations (shutdown/restart/suspend) are correctly pending until the command execution is completed

* refactor(container): Change single error handling to multiple error lists

Support the simultaneous display of multiple container operation errors, enhancing error handling capabilities

* fix(container): Adjust the layout width and optimize the handling of text overflow

Adjust the width calculation for the container page layout, changing from subtracting a fixed value to subtracting a smaller value to improve the layout

Add overflow ellipsis processing to the text to prevent anomalies when the text is too long

* Revert "refactor(container): Change single error handling to multiple error lists"

This reverts commit 72aaa173f5ceabc952ab5c28e024451ac1309920.

* feat(container): Add Podman Docker emulation detection function

Add detection for Podman Docker emulation in the container module. When detected, a prompt message will be displayed and users will be advised to switch to Podman settings.

Updated the multilingual translation files to support the new features.

* fix: Fix error handling in SSH client and container operations

Fix the issue where the SSH client does not handle stderr when executing commands

Error handling for an empty client in the container addition operation

Fix the issue where null may be returned during server page operations

* fix(container): Check if client is empty before running the command

When the client is null, directly return an error to avoid null pointer exception

* fix: Revert `stderr` ignore

* fix(container): Detect Podman simulation in advance and optimize error handling

Move the Podman simulation detection to the initial parsing stage to avoid redundant checks

Remove duplicated error handling code and simplify the logic

* fix(container): Fix the error handling logic during container command execution

Increase the inspection of error outputs, including handling situations such as sudo password prompts and Podman not being installed

* refactor(macOS): Remove unused path_provider_foundation plugin
2026-01-17 14:40:44 +08:00
lollipopkit🏳️‍⚧️
8589b3b4d7 opt.: add a btn to minimize ai dialog (#1004)
* opt.: add a btn to minimize ai dialog
Fixes #1003

* opt.

* opt.
2026-01-14 15:15:33 +08:00
GT610
7693e30cbf opt: Better performance on server refreshing (#999)
* refactor(server): Replace Future.wait with an explicit list of futures to enhance readability

Refactor the nested map and async functions into explicit for loops and future lists to make the code logic clearer

* fix(server): Fixed the auto-refresh logic and concurrency control issues

- Add `_refreshCompleter` to prevent concurrent refreshes
- Fixed the issue where the status was not updated after the automatic refresh timer was canceled
- Remove the invalid check for `duration == 1`

* refactor(server): Optimize the server refresh logic by filtering out servers that do not need to be refreshed in advance

Move the server filtering logic outside the loop and use the `where` method to filter the servers that need to be refreshed, avoiding repeated condition checks within the loop. This improves code readability and reduces redundant condition checks.

* refactor: Optimize server refresh logic to enhance readability

Break down complex conditional checks into clearer steps, separating the logic for server refresh and rate limiter reset. Replace chained calls with explicit loops to make the code easier to maintain and understand.

* refactor(server): Remove `updateFuture` from `ServerState` and use the `_isRefreshing` flag instead

Simplify the server refresh logic, replace Future state tracking with a boolean flag, and avoid unnecessary state updates

* refactor(server_detail): Extract the setting items as local variables to improve performance

Extract the globally set items that are accessed repeatedly as local variables, reduce unnecessary state retrieval operations, and optimize page performance

* refactor: Rename `_displayCpuIndexSetting` to `_displayCpuIndex` for consistency

* refactor(server): Fix the issue of parallel blocking in server refresh

The original code uses Future.wait to wait for all refresh operations to complete, but in fact, there is no need to wait for the results of these operations. Instead, directly calling ignore() to ignore the results can avoid blocking caused by the slowest server

* fix: Adjust the order of logging and default value settings

Ensure to set the default value after recording the invalid duration warning

* refactor(server): Rename _refreshCompleter to _refreshInProgress to enhance readability

Change the variable name from `_refreshCompleter` to `_refreshInProgress`, so that it more accurately reflects the actual purpose of the variable, which is to indicate whether the refresh operation is in progress

* refactor(server): Remove unnecessary refresh progress status management

Simplify the server refresh logic, remove the unused _refreshInProgress state variable and related Completer handling, making the code more concise and straightforward

* chore: Update dependent package versions

Update the following dependent package versions:
- camera_web has been upgraded from 0.3.5 to 0.3.5+3
- ffi has been upgraded from 2.1.4 to 2.1.5
- hive_ce_flutter is upgraded from 2.3.3 to 2.3.4
- watcher is upgraded from 1.1.4 to 1.2.1

* opt.

---------

Co-authored-by: lollipopkit🏳️‍⚧️ <10864310+lollipopkit@users.noreply.github.com>
2026-01-14 13:47:06 +08:00
GT610
06070c29b9 fix(color-picking): Fix color picking failure and card overflow (#998) 2026-01-11 00:21:48 +08:00
GT610
9ceeaf7cc4 feat(local file page): Display server names for server folders (#996)
* feat(local file page): Display server names for server folders

In the local file list, server folders will display their corresponding server names, enhancing the user experience.

* fix(storage page): Use ref.read instead of ref.watch to fetch the server list

Avoid unnecessary watch operations during construction, reducing potential performance overhead
2026-01-08 18:57:02 +08:00
GT610
29a57ad742 fix(container): Modify container execution commands to prioritize bash or ash (#995) 2026-01-08 09:11:23 +08:00
GT610
2c495a44c3 fix(log): Logging System Improvements and Error Handling Enhancements (#994)
* fix: Added logging to exception handling

Added detailed error logging to exception handling across multiple files, including exception information and stack traces, to facilitate troubleshooting.

* refactor(logging): Standardize logging output methods

Replace existing debugPrint and lprint with Loggers.app.warning to enhance logging consistency and maintainability.

* refactor: Remove redundant debug log prints

Clean up unnecessary log print statements in debug code

* feat(i18n): Added internationalization support for the logging feature
2026-01-07 15:09:22 +08:00
GT610
cc300c141a refactor(sftp): Replace hard-coded path separators with Pfs.seperator (#993)
Unify the use of Pfs.seperator for handling file path separators to enhance cross-platform compatibility.
2026-01-06 23:50:11 +08:00
lxdklp
78ef181d4a feat: support macOS menubar (#976)
* feat: macOS menubar

* feat: Dynamic NavigateMenuItems

* fix: simplify shortcut config

* fix: Simplify the code

* fix: More suitable tab name
2025-12-10 18:05:30 +08:00
lollipopkit🏳️‍⚧️
3f15caeaf2 new: add copy btn for ask ai (#975) 2025-12-07 17:51:07 +08:00
lollipopkit🏳️‍⚧️
6458e736fa fix: tag switcher ui (#974)
Fixes #964
2025-12-07 17:29:12 +08:00
lollipopkit🏳️‍⚧️
99fda8b747 opt. 2025-12-07 17:19:24 +08:00
lxdklp
c5cbb12ac3 feat: Automatic line wrapping of time (#973) 2025-12-07 17:14:45 +08:00
lollipopkit🏳️‍⚧️
5272324be6 feat: prompt user on host key verification (#943) 2025-10-20 09:31:20 +08:00
lollipopkit🏳️‍⚧️
a84231393d opt.: ask ai hint 2025-10-19 23:38:08 +08:00
lollipopkit🏳️‍⚧️
d6c2cafce7 opt.: ssh disconnection helper (#937) 2025-10-19 13:40:17 +08:00
lollipopkit🏳️‍⚧️
729b76177e feat: ask ai (#936)
* feat: ask ai in ssh terminal
Fixes #934

* new(ask_ai): settings

* fix: app hot reload

* new: l10n

* chore: deps.

* opt.
2025-10-18 01:15:43 +08:00
lollipopkit🏳️‍⚧️
bd949288ed fix: code editor tool bar (#933) 2025-10-10 09:14:41 +08:00
lollipopkit🏳️‍⚧️
bb3e3b4848 opt.: no Tag Switcher on desktop (#932) 2025-10-08 21:21:23 +08:00
lollipopkit🏳️‍⚧️
3307fca620 fix: cant sort servers order (#930) 2025-10-08 17:35:07 +08:00
lollipopkit🏳️‍⚧️
da8517bcf7 migrate: riverpod 3 2025-10-08 17:03:13 +08:00