An invalid regex read "Invalid regex: Invalid regular expression:
Invalid regular expression: /[abc/: Unterminated character class", and
an empty pattern switched to Regex was called an invalid regex. The
validator now returns only the engine's explanation, and an empty
pattern shows no error. Mobile uses the same validator.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the hard-coded English left in the desktop renderer, the Electron
main process, the mobile app and the shared packages to i18next, with
en, zh-CN, zh-TW, ja and fr-FR translations. SSR share pages are
unchanged.
- Fill every namespace in every language, delete keys no code reads
(server error codes stay) and update translations left behind by
later English changes.
- Stop HTML-escaping interpolated values in the desktop renderer.
React already escapes text, so names with & or quotes showed entities.
- Render error boundary fallbacks as components so they can use hooks.
- Localize zod validation messages with the app language.
- Throw ClipboardError from the clipboard helpers and show translated
toasts. formatEstimatedMins takes a formatter so callers localize the
units.
- Use one glossary term per concept in ja, fr-FR and zh-TW.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Entry titles and settings labels went through title-case unconditionally,
but it applies English capitalization rules, so with a French UI and French
feeds titles rendered as "Pourquoi Votre Café Est Une Arme De Défense" and
settings labels as "Afficher Le Nombre De Non Lus". CJK titles were also
touched ("iOS 27 beta" became "IOS 27 Beta").
titleCaseIfEnglish in @follow/utils only applies title case when the
language is English (en, en-US, en_GB, or franc's eng). On desktop, entry
titles use the entry language and translated titles the translation
language, falling back to the UI language when unknown; settings labels
and section titles use the UI language. Mobile grouped list cells use the
UI language too. AI chat tool names keep title case since they are English
identifiers.
Mobile no longer imports title-case directly, so the dependency moves to
@follow/utils.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One request failing without a response proved little: an endpoint may be slow or
briefly broken while the API itself is fine, and the prompt appeared on every such
hiccup.
- a failed request now only schedules a probe, a cheap `/status/configs` request two
seconds later, repeated once; the API counts as unreachable when every probe fails
and no other request got an answer in the meantime
- while unreachable the probe repeats every fifteen seconds so the prompt goes as soon
as the API answers; any ordinary answer lifts it as well
- the desktop probe travels the same path as its requests, through the main process;
the mobile probe uses the app's fetch
- without a probe, three failures in a row are needed instead of one
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Requests that fail without any response (DNS failure, refused or reset
connection, offline device, timeout) previously failed silently. Track
them through the SDK interceptors and surface a single prompt per outage:
a persistent toast on desktop that is dismissed once the API answers
again, and a transient toast on mobile.
The connection state lives in an atom because the first requests can fail
before the toaster is mounted.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* chore: update workspace dependencies
- bump dependencies across desktop, mobile, ssr, and internal packages
- refresh pnpm lockfile
- apply type compatibility fixes required by upgraded packages
* fix(ssr): prevent tsdown CI warning from failing build
- set inlineOnly to false in tsdown config
* style: format files for CI prettier check
- apply prettier formatting to files reported by format:check
* fix(mobile): downgrade reanimated for rn 0.79 ios build
- Introduced attribution tracking by capturing UTM parameters from the URL.
- Implemented functions to save and retrieve attribution data from local storage.
- Enhanced analytics initialization to include attribution data as user properties.
Signed-off-by: Innei <tukon479@gmail.com>
- Introduced ChatBottomPanel component to manage chat input, shortcuts, and rate limit notices.
- Refactored ChatInterface to utilize ChatBottomPanel, enhancing the structure and readability of the chat layout.
- Created ChatMessageContainer to handle message display and scrolling behavior, improving user experience.
- Added ScrollToBottomButton for easier navigation in long chat histories.
- Consolidated message rendering logic into a new Messages component for better maintainability.
Signed-off-by: Innei <tukon479@gmail.com>
- Replaced manual checks for editable elements in global shortcuts with a utility function `detectIsEditableElement` for cleaner code and better maintainability.
- Updated `AIChatRoot` to use `LexicalRichEditorRef` for the input reference, enhancing type safety and consistency in the chat input handling.
- Integrated `AIPanelRefsContext` in `ChatInput` and `ChatInterfaceContent` to streamline access to the input reference across components.
- Removed the deprecated `animatedPlugin` file to clean up unused code.
These changes aim to enhance the overall structure and functionality of the AI chat interface, improving user experience and code maintainability.
Signed-off-by: Innei <tukon479@gmail.com>
- Added Sentry for error reporting in the mobile application.
- Updated the app configuration to initialize Sentry with the necessary DSN and settings.
- Replaced Firebase Crashlytics with Sentry for error capturing in the ErrorBoundary component.
- Updated various workflows to include Sentry authentication token.
- Adjusted dependencies to use React Native version 0.79.6 and updated related packages.
This integration enhances the application's ability to track and manage errors effectively.
Signed-off-by: Innei <tukon479@gmail.com>
- Upgraded various dependencies in package.json files, including @electron-forge, @sentry/react, and @better-auth.
- Updated devDependencies and fixed version mismatches in internal components and utilities.
- Enhanced settings sync queue to spread object properties for better payload handling.
Signed-off-by: Innei <tukon479@gmail.com>
* init
Signed-off-by: Innei <tukon479@gmail.com>
* refactor: migrate API calls to followClient for improved consistency
- Replaced instances of apiClient with followClient in various modules, including push notifications, analytics, achievements, and wallet management.
- Updated related functions to ensure compatibility with the new API structure.
- This refactor enhances code maintainability and aligns with the new client architecture.
Signed-off-by: Innei <tukon479@gmail.com>
* refactor: update API calls to followClient for consistency
- Replaced instances of apiClient with followClient across various modules, including metadata, entries, feeds, lists, and inbox management.
- Adjusted related functions to align with the new API structure, enhancing maintainability and consistency throughout the codebase.
These changes improve the overall architecture by standardizing API interactions.
Signed-off-by: Innei <tukon479@gmail.com>
* update
* chore: update dependencies and improve profile settings
- Bumped versions of `@better-auth/expo`, `better-auth`, and `@better-auth/stripe` to 1.3.9 for enhanced functionality.
- Updated `@follow-app/client-sdk` reference in internal shared package.
- Added new fields (`bio`, `website`, `socialLinks`) to the profile settings form and adjusted related types for better user data handling.
- Minor adjustments in user store to accommodate new social links data structure.
These changes improve the profile management experience and ensure compatibility with updated dependencies.
Signed-off-by: Innei <tukon479@gmail.com>
* ssr done
* fix type error for action
* chore: update @follow-app/client-sdk to version 0.3.58 and refactor related code
- Updated the version of `@follow-app/client-sdk` to 0.3.58 in `pnpm-lock.yaml` and `pnpm-workspace.yaml`.
- Refactored various components and modules to utilize the updated SDK, including changes in type imports and API calls.
- Removed deprecated `api-fetch` module and replaced it with `followClient` for API interactions.
- Enhanced type safety and consistency across the application by adjusting type definitions and ensuring proper data handling.
These updates improve the overall code quality and maintainability while ensuring compatibility with the latest SDK features.
Signed-off-by: Innei <tukon479@gmail.com>
* chore: remove hono
Signed-off-by: Innei <tukon479@gmail.com>
* fix action type for mobile
* fix(mobile): exclude all view type
* fix(mobile): exclude all for views
* fix(mobile): html render not work
* feat(mobile): auto show source content support
* fix(mobile): show source content action
* feat: more stable switching timeline back to top
* refactor: simplify entry actions handling and improve context menu integration
- Removed the 'compact' parameter from several components to streamline the entry actions logic.
- Updated the CommandActionButton usage in ActionBar for better context menu interaction.
- Enhanced the ActionBar component to handle mouse position for context menu display.
- Cleaned up imports and adjusted related components to reflect the changes in props and structure.
These modifications aim to improve code clarity and maintainability while ensuring consistent functionality across entry actions.
Signed-off-by: Innei <tukon479@gmail.com>
* refactor: streamline ChatInput key handling logic
- Simplified the Enter key handling in the ChatInput component by removing unnecessary conditions.
- Ensured that the handleSend function is called directly when the Enter key is pressed, improving code clarity.
These changes enhance the readability and maintainability of the ChatInput component.
Signed-off-by: Innei <tukon479@gmail.com>
* fix: breadcrumb return back prev page logic
- Updated the logic in useNavigateEntry to ensure the final view is determined correctly based on the type of the view parameter.
- Refactored the EntryTitle component to simplify the rendering of recent readers, improving readability and maintainability.
- Adjusted the EntryHeaderBreadcrumb to pass the view parameter during navigation, enhancing functionality.
These changes aim to improve code clarity and ensure consistent behavior across navigation and entry display components.
Signed-off-by: Innei <tukon479@gmail.com>
* refactor: enhance navigation by integrating view parameter retrieval
- Updated EntryColumnShortcutHandler to utilize getRouteParams for retrieving the view parameter during navigation.
- Ensured that the view parameter is passed correctly when navigating to the next entry, improving the consistency of navigation behavior.
These changes aim to enhance the clarity and functionality of the entry column navigation logic.
Signed-off-by: Innei <tukon479@gmail.com>
* refactor: enhance modal styling and structure
- Updated modal component styles for improved visual consistency, including changes to border radius, padding, and text styles.
- Adjusted shadow properties in the Tailwind CSS configuration for better appearance in both light and dark themes.
- Refined layout and spacing within the modal to enhance user experience.
These changes aim to improve the overall aesthetics and usability of the modal component.
Signed-off-by: Innei <tukon479@gmail.com>
* refactor: enhance entry actions handling and toolbar integration
- Updated the HIDE_ACTIONS_IN_ENTRY_CONTEXT_MENU to explicitly define its type for better type safety.
- Introduced HIDE_ACTIONS_IN_ENTRY_TOOLBAR_ACTIONS to consolidate hidden actions for the toolbar.
- Refactored ActionBar to utilize useSortedEntryActions for improved action filtering and rendering.
These changes aim to streamline the entry actions logic and improve the maintainability of the ActionBar component.
Signed-off-by: Innei <tukon479@gmail.com>
* chore: remove zen and wider mode
Signed-off-by: Innei <tukon479@gmail.com>
* feat: enhance subscription column functionality
- Introduced new components for managing subscription entries, including EntrySubscriptionItem and EntrySubscriptionList, to improve the display and interaction within the subscription column.
- Added hooks for handling entry visibility and data fetching, optimizing performance and user experience.
- Implemented a toolbar for toggling the visibility of the entry list, enhancing user control over the interface.
- Refactored sidebar atoms to support new subscription-related states and actions.
These changes aim to provide a more robust and user-friendly experience in managing subscriptions within the application.
Signed-off-by: Innei <tukon479@gmail.com>
* feat: integrate EntriesContext for improved subscription management
- Added EntriesProvider and context to manage subscription entries more effectively across components.
- Refactored EntrySubscriptionList and related components to utilize the new context for data fetching and state management.
- Introduced EntrySubscriptionSkeleton for better loading states in the subscription column.
- Removed the outdated useEntrySubscriptionData hook to streamline data handling.
These changes enhance the overall architecture and performance of the subscription column, providing a more cohesive user experience.
Signed-off-by: Innei <tukon479@gmail.com>
* chore: fix lock
* fix: remove duplicated feed id, improve performance
* feat: back to feed first
* feat: replace MediaGallery with inline media rendering in SocialMediaLayout
* release(mobile): release v0.2.8
* chore(mobile): update build ID increment script and configuration
- Added a force flag to the build ID increment script to allow manual increments regardless of branch or staged changes.
- Updated iOS build version in Info.plist from 134 to 135.
- Removed unused changelog CLI configuration file.
- Modified bump.config.ts to disable tagging for mobile releases.
Signed-off-by: Innei <tukon479@gmail.com>
* chore: adjust AI chat sidebar and error handling styles
- Added keyboard shortcut support for toggling AI chat in AISmartSidebar.
- Improved styling and transition effects in CollapsibleError for better user experience.
- Updated EntryReadHistory to conditionally render based on user visibility.
- Refactored SourceContentView to simplify rendering logic and improve performance.
- Enhanced Kbd component to support abbreviations for better accessibility.
These changes aim to improve the functionality and usability of the AI chat features and related components.
Signed-off-by: Innei <tukon479@gmail.com>
* refactor: implement comprehensive app layout architecture
- Introduced a new layout architecture for the Follow application, leveraging React Router v7's nested routing capabilities.
- Added multiple layout components including MainDestopLayout, TimelineEntryTwoColumnLayout, AIEnhancedTimelineLayout, and SubviewLayout to support various application modes.
- Enhanced the AI chat functionality with a dedicated AIChatLayout, allowing for dynamic panel styles based on user preferences.
- Implemented responsive design features and error handling mechanisms across layouts to improve user experience.
- Refactored existing components to utilize the new layout structure, ensuring a cohesive and maintainable codebase.
These changes establish a robust foundation for the application's UI, enhancing flexibility and user interaction.
Signed-off-by: Innei <tukon479@gmail.com>
* chore: update bump configuration for PR creation
- Changed the base branch for the GitHub PR creation command from 'main' to 'mobile-main' to align with the new branching strategy.
- Removed the changelog generation script from package.json to streamline the build process.
These updates ensure proper versioning and integration with the new mobile branch structure.
Signed-off-by: Innei <tukon479@gmail.com>
* feat: implement entry context menu functionality
- Added a new hook, useEntryContextMenu, to manage context menu actions for entry items, including copy functionality.
- Integrated the context menu into EntrySubscriptionItem and EntryItemWrapper components, enhancing user interaction with entry items.
- Streamlined context menu handling by consolidating related logic into the new hook, improving code maintainability.
These changes provide a more intuitive context menu experience for users interacting with entries.
Signed-off-by: Innei <tukon479@gmail.com>
* feat: enhance media preview functionality with drag context
- Introduced a new context for managing drag state in the media preview component, allowing for improved user interaction during image dragging.
- Updated the image viewer to handle click events more effectively, considering drag state and timing to prevent unintended dismissals.
- Refactored the modal component to ensure the title is correctly rendered, enhancing accessibility.
These changes improve the overall user experience when interacting with media previews, making the interface more intuitive and responsive.
Signed-off-by: Innei <tukon479@gmail.com>
* chore: update client SDK version and dependencies
- Bumped the version of '@follow-app/client-sdk' from 0.3.59 to 0.3.60 in both pnpm-lock.yaml and pnpm-workspace.yaml.
- Updated dependencies for '@folo-services/drizzle' from 0.1.26 to 0.1.27, and '@folo-services/shared' from 0.0.24 to 0.0.25, ensuring compatibility with the latest changes.
- Adjusted Vite configuration to use 'join' instead of 'resolve' for path handling, enhancing code clarity and consistency.
- Removed an unused import in VideoPlayer component to streamline the code.
These updates improve dependency management and maintain code quality across the project.
Signed-off-by: Innei <tukon479@gmail.com>
* fix: interceptor
* chore: update client SDK version to 0.3.64
- Bumped the version of '@follow-app/client-sdk' from 0.3.63 to 0.3.64 in pnpm-lock.yaml and pnpm-workspace.yaml.
- Adjusted component styles in the header for improved layout consistency.
- Refactored user ID handling in metadata fetching to enhance error handling and clarity.
- Updated API client fetch method to use the native fetch function for better compatibility.
- Added User-Agent header in SSR API headers for improved request handling.
These changes ensure the application is up-to-date with the latest SDK version and improve overall code quality and user experience.
Signed-off-by: Innei <tukon479@gmail.com>
* chore: update client SDK path in pnpm configuration
- Changed the '@follow-app/client-sdk' entry in pnpm-lock.yaml and pnpm-workspace.yaml from version 0.3.64 to a local path for development purposes.
- Refactored the fetchEntryContentByStream method in store.ts to simplify its parameters and improve API call handling.
These updates facilitate local development and enhance code clarity in the entry synchronization service.
Signed-off-by: Innei <tukon479@gmail.com>
* chore: remove hono
Signed-off-by: Innei <tukon479@gmail.com>
* chore: update better-auth and expo dependencies to version 1.3.11
- Updated '@better-auth/expo' and 'better-auth' to version 1.3.11 in mobile and shared packages.
- Updated '@better-auth/stripe' to version 1.3.11 in shared package.
- Adjusted peer dependencies for better-auth to reflect the new version.
This update ensures compatibility with the latest features and fixes in the better-auth library.
Signed-off-by: Innei <tukon479@gmail.com>
* refactor: update auth module imports and clean up code
- Changed import path for AuthPlugins from '@follow-app/client-sdk' to '@follow-app/client-sdk/auth'.
- Removed commented-out socialLinks field from the baseAuthPlugins definition for clarity.
- Added a new line for better code readability.
These changes improve the organization and maintainability of the auth module.
Signed-off-by: Innei <tukon479@gmail.com>
* fix: restore socialLinks field in baseAuthPlugins definition
- Reintroduced the socialLinks field in the baseAuthPlugins configuration, allowing for JSON type input.
- This change enhances the flexibility of the authentication module by enabling social link integration.
Signed-off-by: Innei <tukon479@gmail.com>
* feat: enhance API client and entry list hooks
- Added a request interceptor to the FollowClient to append a timestamp to the URL for cache-busting.
- Simplified the fetch call in the entry list hooks by removing unnecessary parameters, improving code clarity.
- Added a new line in the entry sync services to enhance readability.
These changes improve the functionality and maintainability of the API client and entry list hooks.
Signed-off-by: Innei <tukon479@gmail.com>
* fix: add missing type error suppression for authClientContext
- Added a TypeScript error suppression comment for the authClientContext.provide call to prevent type-checking issues.
- This change ensures smoother integration of the authentication client in the application.
Signed-off-by: Innei <tukon479@gmail.com>
* fix lint
Signed-off-by: Innei <tukon479@gmail.com>
* lint
Signed-off-by: Innei <tukon479@gmail.com>
---------
Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com>
Co-authored-by: DIYgod <i@diygod.me>
* chore: update deps
* chore: update camelcase-keys to version 10.0.0
* chore: update electron-context-menu to version 4.1.1 and remove associated patch
* fix: ts lock
* fix: downgrade linkedom to version 0.18.11
Related to https://github.com/WebReflection/linkedom/issues/249
- Added getAvatarUrl function to handle user avatar retrieval, including fallback logic for missing images.
- Updated EntryUser and UserProfileModalContent components to utilize the new getAvatarUrl function for improved avatar handling.
These changes enhance the user experience by ensuring consistent avatar display across the application.
- Introduced a new higher-order component, withAppErrorBoundary, to wrap components with error boundary functionality.
- Created EntryNotFoundErrorFallback component to display a user-friendly message when an entry is not found.
- Updated error handling in EntryContent to utilize the new EntryNotFound error type.
- Added EntryContentFallback component to manage entry prefetching and loading states, enhancing user experience during data retrieval.
These changes improve error management and user feedback for entry-related issues.
Signed-off-by: Innei <tukon479@gmail.com>
- Bumped version of `@folo-services/ai-tools` from 0.2.31 to 0.2.33 in package.json and pnpm-lock.yaml.
- Refactored `AIDisplayFlowPart` to improve error handling and compatibility with older data structures.
- Enhanced `AIChatMessage` and `AIMessageParts` components to support new props for better message rendering.
- Updated animation styles for chat messages to improve user experience during interactions.
This update improves the overall functionality and visual appeal of the AI chat interface.
Signed-off-by: Innei <tukon479@gmail.com>
- Introduced a new enum for AI chat panel styles, allowing users to toggle between fixed and floating layouts.
- Added state management for the floating panel dimensions and position, ensuring it remains anchored during window resizing.
- Updated various components to utilize the new panel style settings, enhancing the user experience with improved layout flexibility.
- Implemented UI elements for toggling between fixed and floating modes in the chat interface.
These changes collectively enhance the functionality and usability of the AI chat interface, providing users with more control over their layout preferences.
Signed-off-by: Innei <tukon479@gmail.com>
- Integrated ScrollArea for better message editing experience in the EditableMessage component.
- Updated initial editor state handling to streamline the setup process.
- Added MentionPlugin to support mentions within the editor, enhancing user interaction.
- Refactored LexicalRichEditor to utilize EditorRefPlugin for improved editor reference management.
These changes improve the usability and functionality of the message editing interface in the AI chat application.
Signed-off-by: Innei <tukon479@gmail.com>