Commit Graph

6837 Commits

Author SHA1 Message Date
DarkSky
027f741ed6 chore: bump deps (#14065)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Updated dependency versions across the monorepo (notably zod →
^3.25.76 and vitest-related packages → ^3.2.4), plus minor package bumps
to align tooling and libraries. These are manifest/test-tooling updates
only; no public API, behavior, or end-user features were changed.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-08 21:47:25 +08:00
DarkSky
776ca2c702 chore: bump version 2025-12-08 10:47:37 +08:00
DarkSky
f29e47e9d2 feat: improve oauth (#14061)
fix #13730
fix #12901
fix #14025
2025-12-08 10:44:41 +08:00
Daniel Dybing
6e6b85098e fix(core): handle image-blob reduce errors more gracefully (#14056)
This PR is related to issue
https://github.com/toeverything/AFFiNE/issues/14018

When uploading a new profile photo avatar the Pica function, which is
responsible for reducing and resizing the profile photo, may crash if
the browser's Fingerprint Protection is enabled. This is because
Fingerprint Protection prevents Pica from modifying the canvas.

This fix introduces a try-catch inside the function that calls the
reduction and resizing of the photo. Also, the Error object is no longer
passed directly to the notification service, which also caused issues
previously. Now a message will appear that tells the user that the
upload failed and to check the browser's fingerprint protection (check
photo below).

Affected files: packages/frontend/core/src/utils/reduce-image.ts

<img width="408" height="136" alt="new_error"
src="https://github.com/user-attachments/assets/d140e17c-8c13-4f4b-bdf7-7dd5ddc5c917"
/>

I'm open to any suggestions in terms of wording of the error messages. 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved error handling for image compression with clearer,
user-facing messages when compression is blocked or fails.
* Ensures the original or reduced image is reliably returned as a
fallback if compression is not performed.
* Preserves file metadata (original lastModified, name, type) when
returning processed files.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: DarkSky <darksky2048@gmail.com>
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-12-07 21:59:07 +08:00
DarkSky
cf14accd2b fix: unstable test 2025-12-07 20:22:43 +08:00
DarkSky
cf4e37c584 feat(native): native reader for indexer (#14055) 2025-12-07 16:22:11 +08:00
DarkSky
69cdeedc4e fix: lint 2025-12-06 17:55:14 +08:00
Zegnos
0495fac6f1 feat(i18n): update FR translate & corrections (#14052)
Added a complete French translation for several user interface elements.

Updated existing translation strings to improve consistency and clarity.

Corrected inaccurate or unclear wording in the language files.

Harmonized terminology to maintain a uniform vocabulary across the
interface.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Localization**
  * Corrected Spanish branding text for AFFiNE consistency.
* Expanded French locale with many new keys (AI features, calendar,
import/doc labels, shortcuts).
* Trimmed trailing spaces and fixed grammar, punctuation, diacritics
across French strings.
* Added French "Copied to clipboard" confirmation and other refined UI
labels.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-06 17:53:10 +08:00
DarkSky
5cac8971eb fix: apple sign (#14053) 2025-12-06 15:36:50 +08:00
Daniel Dybing
88a2e4aa4b fix: improved error description of proxy size limits (#14016)
**Summary:**
This PR improves the user feedback when encountering an HTTP 413
(_CONTENT_TOO_LARGE)_ error caused by a file size limit in the proxy /
ingress controller in a self-hosted environment.

**Example scenario:**
A self-hosted environment serves AFFiNE through an nginx proxy, and the
`client_max_body_size` variable in the configuration file is set to a
smaller size (e.g. 1MB) than AFFiNE's own file size limit (typically
100MB). Previously, the user would get an error saying the file is
larger than 100MB regardless of file size, as all of these cases
resulted in the same internal error. With this fix, the
_CONTENT_TOO_LARGE_ error is now handled separately and gives better
feedback to the user that the failing upload is caused by a fault in the
proxy configuration.

**Screenshot of new error message**

<img width="798" height="171" alt="1MB_now"
src="https://github.com/user-attachments/assets/07b00cd3-ce37-4049-8674-2f3dcb916ab5"
/>


**Affected files:**
  1. packages/common/nbstore/src/storage/errors/over-size.ts
  2. packages/common/nbstore/src/impls/cloud/blob.ts


I'm open to any suggestions in terms of the wording used in the message
to the user. The fix has been tested with an nginx proxy.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved user-facing error messages for file upload failures. When an
upload exceeds the file size limit, users now receive a clearer message
indicating that the upload was stopped by the network proxy due to the
size restriction, providing better understanding of why the upload was
rejected.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-27 12:06:07 +08:00
DarkSky
33a014977a chore: ignore empty key 2025-11-19 13:46:11 +08:00
Altamir Benkenstein
221c493c56 feat(server): add Brazilian Portuguese translation support (#13725)
* Added 'Brazilian Portuguese' to the list of supported translation
languages in both backend and frontend.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added Brazilian Portuguese as a supported translation language across
the app.
* Brazilian Portuguese now appears in language selection for translation
actions.
* AI translation prompts now include Brazilian Portuguese as a valid
target option.
  * No other translation behaviors or controls were modified.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-11-18 15:09:48 +08:00
ents1008
6c36fc5941 fix(editor): switch to PanTool on same frame for middle mouse; restore selection snapshot (#13911)
Bug: In Edgeless mode, pressing and dragging the middle mouse button
over any element incorrectly triggers DefaultTool in the same frame,
causing unintended selection/drag instead of panning. Dragging on empty
area works because no element intercepts left-click logic.

Reproduction:
- Open an Edgeless canvas
- Press and hold middle mouse button over a shape/text/any element and
drag
- Expected: pan the canvas
- Actual: the element gets selected or moved; no panning occurs

Root cause:
1. PanTool switched via requestAnimationFrame; the current frame’s
pointerDown/pointerMove were handled by DefaultTool first (handing
middle mouse to left-click logic).
2. Selection restore used a live reference to
`this.gfx.selection.surfaceSelections`, which could be mutated by other
selection logic during the temporary pan, leading to incorrect
restoration.

Fix:
- Switch to PanTool immediately on the same frame when middle mouse is
pressed; add a guard to avoid switching if PanTool is already active.
- Snapshot `surfaceSelections` using `slice()` before the temporary
switch; restore it on `pointerup` so external mutations won’t affect
restoration.
- Only register the temporary `pointerup` listener when actually
switching; on release, restore the previous tool (including
`frameNavigator` with `restoredAfterPan: true`) and selection.
Additionally, disable black background when exiting from frameNavigator.

Affected files:
- blocksuite/affine/gfx/pointer/src/tools/pan-tool.ts

Tests:
-
packages/frontend/core/src/blocksuite/__tests__/pan-tool-middle-mouse.spec.ts
- Verifies immediate PanTool switch, selection snapshot restoration,
frameNavigator recovery flag, and no-op when PanTool is already active.

Notes:
- Aligned with docs/contributing/tutorial.md. Local validation
performed. Thanks for reviewing!

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
  * Prevented accidental re-activation of the middle-click pan tool.
* Preserved and restored the user's selection and previous tool options
after panning, including correct handling when returning to the frame
navigator.
* Ensured immediate tool switch to pan and reliable cleanup on
middle-button release.

* **Tests**
* Added tests covering middle-click pan behavior, restoration flows, and
no-op when pan is already active.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-11-18 14:26:27 +08:00
DarkSky
477e6f4106 fix: lint 2025-11-18 14:14:41 +08:00
Adit Syed Afnan
20ba8875c1 feat(core): pixelated to image component to improve clarity for low-resolution images (#13968)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Style**
* Updated rendering quality for images displayed in chat content,
applying a pixelated effect to both row and column layouts.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-11-18 13:42:48 +08:00
DarkSky
8544e58c01 fix: transaction timeout 2025-11-18 13:41:25 +08:00
DarkSky
36a08190e0 fix: prettier 2025-11-17 22:04:21 +08:00
DarkSky
b229c96ee5 fix: lint 2025-11-17 21:57:34 +08:00
DarkSky
62fe6982fb chore: cleanup logs 2025-11-16 11:13:56 +08:00
Mau Nguyen
71d682c1c0 feat(editor): add font size adjustment in editor settings (#13549)
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
Co-authored-by: DarkSky <darksky2048@gmail.com>
2025-11-15 23:57:17 +08:00
DarkSky
d90eeffe84 fix: ci 2025-11-15 23:52:14 +08:00
DarkSky
12fe7a5ced fix: flatpak build 2025-11-15 22:01:24 +08:00
Roger Clotet
a35bcdc3ef feat(i18n): add missing catalan strings (#13914)
I'm a native Catalan and Spanish speaker. 

There are lots of changes, if I notice something is off when using it,
I'll submit more patches to improve it.

One decision I'm not sure about is keeping "edgeless" as the
translation, since it's difficult to find a proper way of saying it
that's not too similar to "borderless" or "without borders" in Catalan.
I noticed Spanish has some of the strings as "Edgeless" and others "sin
bordes", so I'm guessing this is a bit subjective and in my opinion
leaving it unchanged is easier to understand than if poorly translated.
2025-11-15 21:27:05 +08:00
DarkSky
29cb937493 feat(native): add events feature for yocto 2025-11-15 21:17:02 +08:00
AKY
e52bcb7fd6 feat(i18n): korean translation (#13733)
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-11-15 19:31:19 +08:00
DarkSky
4e082e4170 chore: bump version 2025-11-15 17:29:54 +08:00
github-actions[bot]
f644454c5c chore(i18n): sync translations (#13949)
New Crowdin translations by [Crowdin GH
Action](https://github.com/crowdin/github-action)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-11-15 16:30:48 +08:00
DarkSky
1654d8efe4 feat: improve sub sync (#13932) 2025-11-15 15:52:35 +08:00
DarkSky
46e7d9fab7 chore: bump electron (#13935)
fix #13647

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

* **Chores**
* Updated development tooling and build dependencies to latest stable
versions
  * Increased minimum Node.js requirement to version 22
  * Updated macOS deployment target to version 11.6
  * Enhanced type safety and error handling in build processes
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-15 15:52:04 +08:00
Xun Sun
17ec76540b feat(editor): import docs from docx (#11774)
Support importing .docx files, as mentioned in
https://github.com/toeverything/AFFiNE/issues/10154#issuecomment-2655744757

It essentially uses mammoth to convert the docx to html, and then
imports the html with the standard steps.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Import Microsoft Word (.docx) files directly via the import dialog
(creates new documents).
* .docx added as a selectable file type in the file picker and import
options.

* **Localization**
* Added localized labels and tooltips for DOCX import in English,
Simplified Chinese, and Traditional Chinese.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
Co-authored-by: DarkSky <darksky2048@gmail.com>
2025-11-15 15:51:23 +08:00
DarkSky
e5db0e66c1 chore: update schema 2025-11-15 14:45:18 +08:00
Kevin
525b65c6ca fix(server): config typo (#13913)
Fix a typo on the SMTP configuration page
2025-11-15 14:41:03 +08:00
DarkSky
c302425a05 fix(server): doc squash timeout (#13939) 2025-11-15 03:19:51 +08:00
DarkSky
abe73e9996 fix: config escape error (#13936)
fix #13702
2025-11-14 23:24:44 +08:00
3720
6ec1948f62 feat(editor): release callout (#13896)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Callout is no longer gated as an experimental option — it now
consistently appears in the editor’s slash menu and toolbar where
applicable.

* **Tests**
* End-to-end slash-menu tests updated to expect the Callout item in
search results and adjusted item ordering.

* **Chores**
  * Repository ignore rules updated to exclude .kiro files.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-12 06:46:18 +00:00
DarkSky
7e6ead4232 feat: native doc reader (#13881) 2025-11-08 23:07:16 +08:00
Hongxu Xu
02dcfdcc40 chore(native): remove unused deps (#13854)
Identified some unused dependencies and refactored them.
2025-11-07 11:31:19 +08:00
Vitaly Barakov
5a2f508dac feat(editor): hidden 'add icon' label on print if icon is not set (#13868)
This caption (see screenshot) is added when you try to print doc, even
if there is no icon.
<img width="1269" height="897" alt="изображение"
src="https://github.com/user-attachments/assets/d63383e6-48a2-44fb-8f32-ae91d1e9e8c6"
/>
2025-11-07 11:30:54 +08:00
Martin Pauli
2bd9f1a353 feat: implement tray and minimize behaviors (#13851)
This PR introduces new window behaviors, which can be enabled when the
menubar setting is active:

New Features:
- Quick open from tray icon
- Minimize to tray
- Exit to tray
- Start minimized

These changes have not yet been tested on macOS.

<img width="645" height="479" alt="image"
src="https://github.com/user-attachments/assets/7bdd13d0-5322-45a4-8e71-85c081aa0c86"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Configurable menubar/tray behaviors: open on left-click, minimize to
tray, close to tray (exit to tray), and start minimized.

* **UI**
* Appearance settings add a Menubar → Window Behavior group with four
toggles; group shows only when menubar/tray is enabled (hidden on
macOS).

* **Settings**
* Tray settings persisted and exposed via the settings API with getters
and setters for each option.

* **Localization**
* Added translation keys and English strings for the new controls and
descriptions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Peng Xiao <pengxiao@outlook.com>
2025-11-06 20:10:15 +00:00
DarkSky
d33df659f8 feat: check server type in chat (#13875) 2025-11-06 20:55:32 +08:00
Peng Xiao
c9a4129a3e fix: a security issue related to open external (#13864) 2025-11-06 20:54:25 +08:00
DarkSky
dd676611ce test: fix mock api 2025-11-01 01:36:11 +08:00
Lakr
f3bb2be5ef feat: request apply subscription mutation (#13844) 2025-10-31 22:53:30 +08:00
DarkSky
8535b3dc41 feat(server): refresh subscription if event is from anonymous account (#13840) 2025-10-31 22:53:20 +08:00
DarkSky
89cc9b072b feat(server): early subscription for iap (#13826)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a mutation to request/apply a subscription by transaction ID
(client mutation and server operation), returning subscription details.
* **Bug Fixes / Improvements**
* More robust external subscription sync with safer conflict detection,
optional short-lived confirmation, improved parsing and error logging.
* **Chores**
  * Standardized time constants for clarity.
* **Tests**
* Updated subscription test data (expiration date) to reflect new
lifecycle expectations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-10-29 14:25:43 +00:00
DarkSky
e4b5b24fdd chore: bump package version 2025-10-29 21:14:34 +08:00
DarkSky
9904f50e0b feat(server): improve crypto (#13822)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
  * Resolved cryptographic compatibility issues with OpenSSL 3.x.

* **New Features**
  * Broader support for multiple key types for signing and verification.
  * OTP generation adjusted (affects digit distribution/values).

* **Refactor**
* Internal cryptographic key handling reworked for improved stability,
compatibility, and multi-key-type support.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-10-29 18:12:23 +08:00
DarkSky
b7ac7caab4 chore(server): improve transcript stability (#13821)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Enhanced audio/video detection for MP4 files to better distinguish
audio-only vs. video.

* **Dependencies**
* Added MP4 parsing dependency and updated AI provider libraries
(Anthropic, Google, OpenAI, etc.).

* **Bug Fixes**
  * Tightened authentication state validation for magic-link/OTP flows.
* Stricter space-join validation to reject invalid client
types/versions.
  * Improved transcript entry deduplication and data handling.

* **API**
* Transcript submit payload now requires infos and removes deprecated
url/mimeType fields.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-10-29 17:48:15 +08:00
DarkSky
875565d08a fix(server): avoid a snowball effect of email sending failures (#13818)
fix #13802
2025-10-28 22:26:24 +08:00
DarkSky
c102e2454f feat(server): fetch missing field from rcat (#13794)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Performance**
* Added caching mechanism for subscription product data to reduce API
calls and improve response times.

* **Improvements**
* Enhanced asynchronous processing of subscription entitlements for more
reliable product data retrieval from the payment provider.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-10-23 08:35:08 +00:00