* ✨ feat(desktop): implement subscription pages embedding with webview
- Add SubscriptionIframeWrapper component for embedding subscription pages in Electron webview
- Replace compile-time ENABLE_BUSINESS_FEATURES with runtime serverConfigSelectors
- Add useIsCloudActive hook to detect cloud sync status
- Add setupSubscriptionWebviewSession service for webview session management
Resolves LOBE-4589
* ✨ feat: enhance SubscriptionIframeWrapper for improved configuration
- Updated iframe URL to use OFFICIAL_URL for better maintainability.
- Integrated server configuration to conditionally enable business features.
- Cleaned up code by removing commented-out lines and unnecessary eslint suppressions.
This update improves the flexibility and readability of the SubscriptionIframeWrapper component.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat: enhance link interception in SubscriptionIframeWrapper
- Updated the script to intercept both link clicks and window.open calls for better URL handling.
- Added functionality to resolve relative URLs to absolute before logging.
This improvement enhances the tracking of external link interactions within the iframe.
Signed-off-by: Innei <tukon479@gmail.com>
* 🔧 chore: clean up useIsCloudActive hook
- Removed unnecessary eslint suppressions related to react-hooks rules.
- Improved code readability by eliminating commented-out lines.
This update enhances the clarity and maintainability of the useIsCloudActive hook.
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
* v2 init
* chore: update eslint suppressions and package dependencies
- Removed several eslint suppressions related to array sorting and reversing from eslint-suppressions.json to clean up the configuration.
- Updated @lobehub/lint package version from 2.0.0-beta.6 to 2.0.0-beta.7 in package.json for improvements and bug fixes.
- Made minor formatting adjustments in vitest.config.mts and various SKILL.md files for better readability and consistency.
Signed-off-by: Innei <tukon479@gmail.com>
* fix: clean up import statements and formatting
- Removed unnecessary whitespace in replaceComponentImports.ts for improved readability.
- Standardized import statements in contextEngineering.ts and createAgentExecutors.ts by adding missing spaces for consistency.
Signed-off-by: Innei <tukon479@gmail.com>
* chore: update eslint suppressions and clean up code formatting
* 🐛 fix: use vi.hoisted for mock variable initialization
Fix TDZ error in persona service test by using vi.hoisted() to ensure
mock variables are available when vi.mock factory runs.
---------
Signed-off-by: Innei <tukon479@gmail.com>
* ♻️ refactor(fileSearch): consolidate determineContentType to base class and use os.homedir()
- Move determineContentType method to FileSearchImpl base class with merged type mappings
- Replace process.env.HOME with os.homedir() in macOS and Linux implementations
- Replace process.env.USERPROFILE with os.homedir() in Windows implementation
- Remove duplicate implementation from three platform-specific classes
* refactor: content search service
* chore: add engine text
* fix: show engine
* test: add unit tests for contentSearch and fileSearch modules
- Add base.test.ts and index.test.ts for contentSearch module
- Add base.test.ts and index.test.ts for fileSearch module
- Test buildGrepArgs, determineContentType, escapeGlobPattern, etc.
- Test factory functions for platform-specific implementations
* 🐛 fix(contentSearch): use correct ripgrep glob patterns for nested path exclusion
Change `!node_modules` and `!.git` to `!**/node_modules/**` and `!**/.git/**`
to properly exclude nested directories as per ripgrep documentation.
* fix: types
- Refresh token on every app launch (with 5-minute debounce to prevent rapid restarts)
- Trigger refresh on Mac app activation (Dock click) with same debounce
- Track lastRefreshAt timestamp in encrypted token storage
- Add isRemoteServerConfigured() helper method to avoid code duplication
- Fix cloud mode check that incorrectly required remoteServerUrl
- Add comprehensive tests for all refresh scenarios
- Add DesktopFileMenuBridge component for native menu integration
- Update navigation events in electron-client-ipc
- Modify menu implementations across all platforms (Linux, macOS, Windows)
- Add hotkey settings for desktop features
- Update layout and menu creation hooks for desktop navigation
* improve local system ability
* fix build
* improve tools title render
* fix tools
* update
* try to fix lint
* update
* refactor the LocalFileCtr.ts result
* refactor the exector result
* 🔧 refactor: streamline theme handling and title bar overlay
* ✨ feat(titlebar): integrate theme update handling in SimpleTitleBar component
* 🔧 chore: move `node-mac-permissions` to optionalDependencies and add TypeScript module declaration
* ✨ feat(electron): implement connection drawer state management and enhance auth modal functionality
* 🐛 fix(ci): fix Windows PowerShell Start-Job working directory issue
Start-Job runs in a separate process with default user directory,
causing npm install-isolated to fail. Fixed by setting correct
working directory in each job using $using:workingDir.
* 🐛 fix(ci): use Start-Process instead of Start-Job for Windows parallel install
Start-Job runs in isolated PowerShell process without inheriting PATH,
causing pnpm/npm commands to fail. Start-Process inherits environment
and provides proper exit code handling.
* 🐛 fix(ci): use desktop-build-setup action for Windows build
Use the same composite action as other desktop workflows instead of
custom PowerShell parallel install which has environment issues.
* ✨ feat(menu): enhance context menu with additional options for image and link handling
* 🔧 fix(auth-modal): prevent modal from opening during desktop onboarding
* ✨ feat(electron): enhance native module handling and improve localization resource loading
resolves LOBE-4370
- Added `copyNativeModulesToSource` function to resolve pnpm symlinks for native modules before packaging.
- Introduced `getNativeModulesFilesConfig` to explicitly include native modules in the build process.
- Updated `electron-builder` configuration to utilize the new functions for better native module management.
- Enhanced localization resource loading by splitting JSON files by namespace.
* 🐛 fix(lint): use slice instead of substring
* 🐛 fix(desktop): include global.d.ts in tsconfig for node-mac-permissions types
* 🐛 fix(desktop): add ts-ignore for optional node-mac-permissions module
* fix: update ui
* ✨ feat(desktop): add manual update check entry in About page
Add a 'Check for Updates' button to the About page that appears only on desktop and when no new version is available. This allows users to manually trigger update checks without relying on the automatic check schedule.
- Add checkForUpdates i18n key and translations (en-US, zh-CN)
- Modify UpdaterCtr to pass manual: true flag
- Add check update button to Version component
- Button hidden when new version is detected
* Update Version.tsx
* 💄 style: format onClick handler
* fix: correct onClick handler syntax in Version component
- Add ShowSaveDialogParams/Result types to electron-client-ipc
- Implement handleShowSaveDialog in LocalFileCtr using Electron dialog API
- Add showSaveDialog method to localFileService
- Create desktopExportService for Desktop-specific export logic
- Use system file picker instead of hardcoded downloads path
- Show toast with actions (open file / show in folder) after export
- Add i18n keys for export dialog and actions
* 🐛 fix(desktop): prevent duplicate IPC handler registration from dynamic imports
Fix an issue where dynamic imports in file-loaders package would cause
the debug package to be bundled into index.js, leading to side-effect
pollution and duplicate electron-log IPC handler registration.
- Add manualChunks config to isolate debug package into separate chunk
- Add @napi-rs/canvas to native modules for proper externalization
* ✨ feat(desktop): enhance afterPack hook and add native module copying
* ✨ feat(trpc): add response metadata and auth header handling
Add createResponseMeta utility to centralize tRPC response metadata handling.
Set X-Auth-Required header for UNAUTHORIZED errors to distinguish real auth failures
from other 401 errors. Update all tRPC routes to use the new utility.
* ♻️ refactor(desktop-bridge): extract auth constants to shared package
Move AUTH_REQUIRED_HEADER and TRPC_ERROR_CODE_UNAUTHORIZED to
@lobechat/desktop-bridge for consistent usage across server and desktop.
* ✨ feat: add server version check for desktop app
- Add /api/version endpoint consumption in globalService
- Add serverVersion and isServerVersionOutdated states to global store
- Add useCheckServerVersion hook to detect outdated server
- Show ServerVersionOutdatedAlert when server version is incompatible
- Display server version tag in settings when different from client
- Support version diff threshold (5 versions) for compatibility check
* 🔧 chore: only show server version alert for self-hosted instances
Check storageMode from electron store - only show alert when
using 'selfHost' mode, not 'cloud' mode.
* 🔧 chore: remove deprecated 'local' storage mode option
* 🐛 fix: only treat 404 as outdated server, throw on other errors
Previously any non-OK response was treated as "server doesn't support
the API", causing transient failures (500s, network issues) to
incorrectly show the outdated alert. Now only 404 returns null to
indicate a missing API, while other errors throw to allow SWR retry.
* ✨ feat: add server version check and update alerts
- Implemented server version check functionality to notify users when their client version requires a newer server version.
- Added localized messages for server version outdated alerts in English and Chinese.
- Enhanced the global state management to track server version and its status.
- Updated UI components to display server version information and warnings appropriately.
- Introduced a new alert component to inform users about the need to upgrade their server for optimal performance.
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
* 🔧 feat(desktop): add legacy local database detection and migration guidance
- Add hasLegacyLocalDb method to SystemController for detecting legacy DB
- Update LoginStep to show migration link for users with legacy DB
- Add i18n translations for legacy database migration feature
- Improve common settings data sync configuration
* 🔧 test: mock getAppPath in electron for improved testing
- Add mock implementation of getAppPath in SystemCtr and macOS test files
- Update LoginStep to use urlJoin for constructing migration guide URL
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
- Add isMissingUpdateManifestError helper to detect manifest 404 errors
- Treat missing manifest as "no update available" during gap period
- Fix sidebar header margin for desktop layout
* ♻️ refactor(ModelSwitchPanel): migrate from Popover to DropdownMenu with virtual scrolling
- Replace Popover with DropdownMenu atom components from @lobehub/ui
- Add react-virtuoso for proper virtual scrolling implementation
- Auto-close submenu when scrolling to prevent position offset issues
- Rename misleading "Virtual*" naming to "List*" for clarity
LOBE-3844
* 🔨 chore: clean up unnecessary comments in ModelSwitchPanel
* 🔨 chore(router): remove unused loader property from route configuration
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
* 🐛 fix(desktop): add auth required modal and improve error handling
- Add AuthRequiredModal component to handle authentication expiration
- Improve backend proxy protocol error handling for auth errors
- Add updater manager authentication header support
- Add i18n strings for auth error messages
* 🔧 fix(desktop): update UpdaterManager to leave channel unset for GitHub prerelease matching
- Modify UpdaterManager to leave the channel unset, allowing GitHub to use version tags for prerelease matching.
- Update logging to reflect the new behavior when the channel is unset or kept as is.
Signed-off-by: Innei <tukon479@gmail.com>
* 🔧 fix(desktop): clarify UpdaterManager behavior for GitHub provider
- Update comments and logging in UpdaterManager to clarify that the channel is left unset for beta/nightly, allowing GitHub to use version tags for prerelease matching.
- Ensure logging accurately reflects the new behavior when the channel is unset.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(desktop): add desktop build channel script and update documentation
- Introduced a new script for building desktop applications for specific release channels (stable, beta, nightly).
- Updated package.json to include a new npm command for the build channel.
- Enhanced README documentation to guide users on simulating CI channel builds and retaining changes.
Signed-off-by: Innei <tukon479@gmail.com>
* 🔧 fix(desktop): streamline NODE_ENV usage in logger and config
- Removed redundant process.env.NODE_ENV definition from electron.vite.config.ts.
- Simplified logger implementation by directly using process.env.NODE_ENV for environment checks.
- Improved readability and maintainability of logging behavior based on the environment.
Signed-off-by: Innei <tukon479@gmail.com>
* 🔧 fix(desktop): enhance logging configuration to support debug mode
- Updated logger configuration to allow for debug level logging when DEBUG environment variable is set.
- Simplified the logic for console logging levels based on the environment, improving clarity and maintainability.
Signed-off-by: Innei <tukon479@gmail.com>
* 🔧 fix(desktop): enhance version generation and logging in UpdaterManager
- Updated version generation logic in manual-build-desktop.yml to handle channel suffixes more effectively.
- Added inferredChannel logging in UpdaterManager to improve clarity on the current update channel being used.
Signed-off-by: Innei <tukon479@gmail.com>
* 🔧 fix(desktop): update localization files and set default entry locale to English
- Changed default entry locale from Chinese (zh-CN) to English (en) in .i18nrc.js.
- Added full disk access messages in multiple languages (Arabic, Bulgarian, German, Spanish, French, Italian, Japanese, Korean, Dutch, Polish, Portuguese, Russian, Turkish, Vietnamese, Traditional Chinese).
- Enhanced menu localization with new settings and permissions options across various languages.
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
* 🐛 fix(desktop): ensure allowPrerelease is set correctly for updater
- Add explicit allowPrerelease check before each update check
- Ensure allowPrerelease is re-applied after setFeedURL call
- Guard against potential internal state resets by electron-updater
* ✨ feat(updater): Enhance prerelease handling for update checks
- Ensure `allowPrerelease` is set correctly before and after update checks to accommodate internal state resets by `electron-updater`.
- Added logging to indicate the configuration of the GitHub update URL and the `allowPrerelease` status.
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(mcp): enhance error handling and logging for MCP connections
- Introduced MCPConnectionError class to capture and log stderr output during MCP connections.
- Updated McpCtr to handle MCPConnectionError and provide enhanced error messages with stderr logs.
- Modified MCPClient to collect stderr logs and throw enhanced errors when connection issues occur.
- Improved error display in MCPManifestForm to show detailed error information when connection tests fail.
- Added utility functions to parse and extract STDIO process output from error messages.
Signed-off-by: Innei <tukon479@gmail.com>
* 🐛 fix(mcp): remove npx check to prevent hanging during installation check
- Remove `npx -y` package check that could download packages or start MCP servers
- This was causing the UI to hang on "Checking installation environment"
- npm packages don't require pre-installation, npx handles on-demand download
---------
Signed-off-by: Innei <tukon479@gmail.com>
* chore: stable updater
* ✨ feat: add local update testing scripts and configuration
- Introduced scripts for local update testing, including setup, server management, and manifest generation.
- Added `dev-app-update.local.yml` for local server configuration.
- Implemented `generate-manifest.sh` to create update manifests.
- Created `run-test.sh` for streamlined testing process.
- Updated `README.md` with instructions for local testing setup and usage.
- Enhanced `UpdaterManager` to allow forced use of dev update configuration in packaged apps.
Signed-off-by: Innei <tukon479@gmail.com>
* 🐛 fix(desktop): update UpdaterManager test mocks for new exports
Add missing mock exports for @/modules/updater/configs:
- isStableChannel
- githubConfig
- UPDATE_SERVER_URL
Add mock for @/env with getDesktopEnv
Add setFeedURL method to autoUpdater mock
* ✨ feat: add Conductor setup scripts and configuration
* ✨ feat: enhance update modal functionality and refactor modal hooks
- Added `useUpdateModal` for managing update modal state and behavior.
- Refactored `UpdateModal` to utilize new modal management approach.
- Improved `useWatchBroadcast` integration for handling update events.
- Removed deprecated `createModalHooks` and related components from `FunctionModal`.
- Updated `AddFilesToKnowledgeBase` and `CreateNew` modals to use new modal context for closing behavior.
This refactor streamlines modal management and enhances the user experience during update processes.
Signed-off-by: Innei <tukon479@gmail.com>
* update flow (#11513)
* ci: simplify desktop release workflow and add renderer tarball
* 👷 ci: fix s3 upload credentials for desktop release
* 🐛 fix(ci): use compact jq output for GitHub Actions matrix
Add -c flag to jq commands to produce single-line JSON output,
fixing "Invalid format" error when setting GITHUB_OUTPUT.
* 🐛 fix(ci): add administration permission to detect self-hosted runner
The /actions/runners API requires administration:read permission
to list repository runners.
* 🔧 refactor(ci): use workflow input for self-hosted runner selection
Replace API-based runner detection with workflow input parameter since
GITHUB_TOKEN lacks permission to call /actions/runners API.
- Add `use_self_hosted_mac` input (default: true)
- Release events always use self-hosted runner
- Manual dispatch can toggle via input
* feat(updater): add stable channel support with fallback mechanism
- Configure electron-builder to generate stable-mac.yml for stable channel
- Update CI workflow to handle both stable and latest manifest files
- Implement fallback to GitHub provider when primary S3 provider fails
- Reset to primary provider after successful update check
* 🐛 fix(updater): remove invalid channel config from electron-builder
- Remove unsupported 'channel' property from electron-builder config
- Create stable*.yml files from latest*.yml in workflow instead
- This ensures electron-updater finds correct manifest for stable channel
* 🐛 fix(updater): use correct channel based on provider type
- S3 provider: channel='stable' → looks for stable-mac.yml
- GitHub provider: channel='latest' → looks for latest-mac.yml
This fixes the 404 error when falling back to GitHub releases,
which only have latest-mac.yml files.
* refactor(env): remove unused OFFICIAL_CLOUD_SERVER and update env defaults
Update environment variable handling by removing unused OFFICIAL_CLOUD_SERVER and setting defaults for UPDATE_CHANNEL and UPDATE_SERVER_URL from process.env during build stage.
* 🐛 fix(ci): add version prefix to stable manifest URLs for S3
S3 directory structure: stable/{version}/xxx.dmg
So stable-mac.yml URLs need version prefix:
url: LobeHub-2.1.0-arm64.dmg → url: 2.1.1/LobeHub-2.1.0-arm64.dmg
* ✨ feat(ci): add renderer tar manifest for integrity verification
Creates stable-renderer.yml with SHA512 checksum for lobehub-renderer.tar.gz
This allows the desktop app to verify renderer tarball integrity before extraction.
* 🐛 fix(ci): fix YAML syntax error in renderer manifest generation
* ✨ feat(ci): archive manifest files in version directory
* refactor(ci): update desktop release workflows to streamline build process
- Removed unnecessary dependencies in the build job for the desktop beta workflow.
- Introduced a new gate job to conditionally proceed with publishing based on the success of previous jobs.
- Updated macOS file merging to depend on the new gate job instead of the build job.
- Simplified macOS runner selection logic in the stable workflow by using GitHub-hosted runners exclusively.
Signed-off-by: Innei <tukon479@gmail.com>
* refactor(electron): reorganize titlebar components and update imports
- Moved titlebar components to a new directory structure for better organization.
- Updated import paths for `SimpleTitleBar`, `TitleBar`, and related constants.
- Introduced new components for connection management and navigation within the titlebar.
- Added constants for title bar height to maintain consistency across components.
This refactor enhances the maintainability of the titlebar code and improves the overall structure of the Electron application.
Signed-off-by: Innei <tukon479@gmail.com>
* feat(ci): add release notes handling to desktop stable workflow
- Enhanced the desktop stable release workflow to include release notes.
- Updated output variables to capture release notes from the GitHub event.
- Adjusted environment variables in subsequent jobs to utilize the new release notes data.
This addition improves the clarity and documentation of releases by ensuring that release notes are included in the workflow process.
Signed-off-by: Innei <tukon479@gmail.com>
* 🐛 fix: call onClose after knowledge base modal closes
* 🧪 test: fix UpdaterManager update channel mocks
---------
Signed-off-by: Innei <tukon479@gmail.com>
* ♻️ refactor(desktop): unify TITLE_BAR_HEIGHT constant to desktop-bridge
- Move TITLE_BAR_HEIGHT constant (38) to @lobechat/desktop-bridge package
- Update all references to import directly from the shared package
- Remove duplicate const.ts file from ElectronTitlebar
- Ensure consistency between main process and renderer process
* ✅ test(desktop): update WindowThemeManager test for new TITLE_BAR_HEIGHT
- Update mock to use @lobechat/desktop-bridge instead of @/const/theme
- Update expected height values from 32 to 38
* 🔧 fix(desktop): adjust TITLE_BAR_HEIGHT to prevent container border blocking
- Decrease TITLE_BAR_HEIGHT by 2px to avoid blocking the container border edge in WindowThemeManager.
- Update related test to reflect the new height adjustment.
Signed-off-by: Innei <tukon479@gmail.com>
* 🔧 fix(desktop): further adjust TITLE_BAR_HEIGHT in tests
- Decrease TITLE_BAR_HEIGHT in WindowThemeManager tests from 38px to 36px to maintain consistency with recent changes.
- Update all relevant test cases to reflect the new height.
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
- Add SimpleTitleBar component for secondary windows (onboarding, settings)
- Configure traffic light position for macOS native window controls
- Enhance isMacOSWithLargeWindowBorders to support Electron environment
- Add getDarwinMajorVersion utility for version detection
- Integrate SimpleTitleBar into desktop onboarding layout
- Re-export platform utilities from packages/utils for better accessibility
* ✨ fix: Implement dynamic macOS permissions handling and improve module loading
* 🛠️ chore: Remove test job from manual build workflow to streamline CI process
* 🚀 chore: Optimize dependency installation in manual build workflow by running jobs in parallel
* 🔧 chore(desktop): exclude node_modules from electron-builder packaging
- Add !node_modules to files config to prevent bundling node_modules
- Remove unused asarUnpack config for sharp and @img (not used in electron main process)
Fixes LOBE-3008
* 🔧 chore(file-loaders): move @napi-rs/canvas to devDependencies
@napi-rs/canvas is only used in test/setup.ts for DOMMatrix polyfill,
not required at runtime. Moving to devDependencies allows Vite to
bundle all runtime dependencies as pure JS.
* 🔧 chore(desktop): remove pdfjs-dist from dependencies
Removed the pdfjs-dist package from the dependencies in package.json as it is no longer needed.
Signed-off-by: Innei <tukon479@gmail.com>
* 🔧 chore(desktop): refactor electron-builder configuration and remove unused files
* 🔧 chore(desktop): refactor electron-builder configuration and remove unused files
---------
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(desktop): improve macOS permission requests and Full Disk Access detection
- Add microphone and camera entitlements for hardened runtime
- Implement Full Disk Access detection using protected directory check
- Add native dialog prompt for Full Disk Access permission
- Add window focus broadcast for permission status refresh
- Extract Full Disk Access utilities to separate module
- Remove macOS-specific permissions from Linux/Windows menus
- Update PermissionsStep UI to show checkmark for all granted permissions
- Add comprehensive tests for permission methods
* ✨ feat(desktop): persist onboarding step for app restart recovery
- Add storage functions to persist/restore current onboarding step
- Restore step from localStorage on app restart (prioritized over URL params)
- Clear persisted step when onboarding completes
- Remove unused fullDisk.autoAdd translation key
* refactor: reduce unused code
Signed-off-by: Innei <tukon479@gmail.com>
* 🐛 fix(desktop): prevent duplicate CORS headers in response
Only add CORS headers if they don't already exist in the server response.
This fixes issues with CDN resources (like cdn.jsdelivr.net) that already
return CORS headers, causing "multiple values" errors.
Fixes LOBE-2765
* 🔧 refactor(desktop): remove IpcServerMethod decorator and related metadata
This update simplifies the IPC method handling by removing the IpcServerMethod decorator and its associated metadata management. The changes include updates to documentation and code references, ensuring a cleaner and more maintainable IPC implementation.
No functional changes were introduced, but the codebase is now more streamlined for future development.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(desktop): introduce HTTP headers utility functions
Added a new utility module for managing HTTP response headers in Electron, addressing case sensitivity issues. This includes functions to set, get, check existence, and delete headers. Updated the Browser class to utilize these utilities for setting CORS headers, ensuring no duplicates are present.
This enhancement improves code maintainability and simplifies header management in the application.
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(navigation): implement history navigation in the desktop app
- Add 'Back' and 'Forward' options to the menu for navigating history.
- Introduce a new NavigationBar component to handle navigation actions.
- Implement hooks for managing navigation history and updating the UI accordingly.
- Enhance the Electron store to support navigation history state management.
- Add route metadata for better navigation context.
This update improves user experience by allowing easy back and forward navigation within the app.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(localization): add navigation labels in multiple languages
- Introduced new localization entries for navigation history in various languages, including Arabic, Bulgarian, German, Spanish, Persian, French, Italian, Japanese, Korean, Dutch, Polish, Portuguese, Russian, Turkish, Vietnamese, Chinese (Simplified and Traditional).
- Updated existing localization files to include 'Back', 'Forward', and 'Go' labels for improved user navigation experience.
This enhancement supports a more inclusive user interface by providing localized navigation options.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ feat(desktop): add Home menu item and simplify navigation UI
- Remove keyboard shortcut hints from Recently Viewed tooltip
- Add Home menu item to Go menu on all platforms (macOS, Linux, Windows)
- Add Home translations for all 17 supported locales
* 🌐 i18n(desktop): use i18n for Recently Viewed tooltip
* ✨ feat(macOS): update history navigation accelerators in menu
- Change keyboard shortcuts for 'Back', 'Forward', and 'Home' menu items to use macOS conventions.
- Add unit test to verify correct accelerators are set for history navigation.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ refactor(ElectronTitlebar): remove unused navigation history hook
- Deleted the `useInitNavigationHistory` hook and its associated logic from the ElectronTitlebar component.
- Cleaned up the code to improve maintainability and reduce unnecessary complexity.
This change streamlines the title bar functionality by eliminating unused code.
Signed-off-by: Innei <tukon479@gmail.com>
* ✨ refactor(NavPanel): streamline navigation panel functionality
- Replaced the `useNavPanel` hook with a new `useNavPanelSizeChangeHandler` for better size management.
- Introduced `NavPanelDraggable` component to encapsulate draggable panel logic, improving code organization and readability.
- Updated `NavHeader` to utilize global store for panel state management, enhancing state consistency across components.
- Removed unused styles and logic from `NavPanel`, simplifying the component structure.
This refactor enhances maintainability and performance of the navigation panel system.
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
* 🐛 fix: resolve desktop upload CORS issue
Expand CORS bypass to handle all HTTP/HTTPS requests in desktop app.
Previously, CORS bypass only applied to local file server (127.0.0.1),
which caused upload failures when the renderer uses app:// protocol.
Changes:
- Remove Origin header from all requests to prevent CORS preflight
- Add permissive CORS headers to all responses
- Update comments to reflect the new behavior
Resolves LOBE-2581
* 🐛 fix: enhance CORS handling in desktop app
Refine CORS bypass implementation to store and utilize the original Origin header for responses. This change ensures proper CORS headers are added based on the request's origin, improving compatibility with credentialed requests and OPTIONS preflight handling.
Changes:
- Store Origin header for each request and remove it to prevent CORS preflight.
- Add CORS headers to responses using the stored origin.
- Implement caching for OPTIONS requests with a max age.
Resolves LOBE-2581
Signed-off-by: Innei <tukon479@gmail.com>
* 🐛 fix: add onBeforeSendHeaders mock to Browser tests
Enhance the Browser test suite by adding a mock for the onBeforeSendHeaders function in the session's webRequest object. This addition improves the test coverage for CORS handling scenarios.
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
Fix failing close event handling tests by restoring the getBounds mock
return value in beforeEach after vi.clearAllMocks(). The issue occurred
because clearAllMocks() removed the getBounds mock behavior set during
hoisting, causing x and y coordinates to be undefined instead of 0.
* feat: Add static export modifier for Electron, refactor route variant constants, and simplify renderer file path resolution.
* refactor: Extract renderer URL and protocol management into a dedicated `RendererUrlManager` and update `App` to utilize it.
Signed-off-by: Innei <tukon479@gmail.com>
* feat: Implement Electron app locale management and i18n initialization based on stored settings.
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>