Use Tooltip for non-diagnostic sync status in WorkspaceCard so hover
shows sync progress and clicks still open the workspace selector. Pass
withoutHover and tooltip to the diagnostic status Button to prevent
double hover backgrounds.
Co-authored-by: DarkSky <darksky2048@gmail.com>
Render mobile navigation doc rows with their local title when `canRead`
is undefined, showing the no-permission row only when `canRead` is
`false` to match the desktop sidebar and avoid permanent `Loading...`
states offline or on transient permission errors.
Co-authored-by: DarkSky <darksky2048@gmail.com>
On the US macOS layout Option+S produces `ß`. The guard from #14866
skips every Alt shortcut whose key is a non-ASCII character, so the
page/edgeless switch never fired there.
The event cannot tell a US user pressing Option+S for the shortcut from
a Polish user typing `ś` with the same keys, so this keys the guard on
the target instead: when the event targets an editable element (input,
textarea, contenteditable) the character is text input and the shortcut
is skipped, as in #14866; anywhere else there is nothing to type and the
shortcut runs.
Note: in page mode the doc root is contenteditable, so with the caret in
the doc Option+S still types `ß`; the shortcut works when focus is
outside text (edgeless canvas, header, sidebar). Fixing it inside text
would mean dropping #14866's protection or changing the binding.
fix#15232
Co-authored-by: DarkSky <darksky2048@gmail.com>
Pressing Tab in a table cell called `preventDefault` and did nothing
else, so the cursor stayed in the same cell.
Tab now moves to the next cell and Shift+Tab to the previous one. Both
wrap across rows and stop at the first and last cells.
fix#13915
Co-authored-by: DarkSky <darksky2048@gmail.com>
Closes#15763.
- Move `correctNumberedListsOrderToPrev` from `affine-block-list` to
`affine-shared/utils` (re-exported from
`@blocksuite/affine-block-list`).
- Call `correctNumberedListsOrderToPrev` in `indentBlock` and
`dedentBlock` so numbered list items and following siblings are
renumbered after indenting or dedenting in edgeless notes.
Co-authored-by: kaventro <301901286+kaventro@users.noreply.github.com>
Brings `ja.json` in line with `en.json` for the AFFiNE AI chat panel by
adding all 43 missing `com.affine.ai.*` Japanese translations (chat
panel tools, scopes, session deletion, and selected-source errors) and
updating `ja` in `i18n-completenesses.json` from 83 to 84.
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
**Blank Norwegian labels.** `nb-NO.json` had 168 keys with empty values
(for example `Publish`, `Link`, `Unpin`, `Disable Public Sharing`).
i18next returns an empty string for those instead of falling back, so
Norwegian users saw blank buttons and labels. This removes the empty
entries so they fall back to English, and updates `nb-NO` in
`i18n-completenesses.json` from 41 to 35.
**Stale SSRF error.** `error.SSRF_BLOCKED_ERROR` still said "Invalid
URL" in ar, de, fr, kk, ur, zh-Hans and zh-Hant. That text predates the
English message "URL blocked by SSRF protection: {{reason}}", so those
users never saw the reason. The current message is now translated in all
seven, including `{{reason}}`.
Closes#15954Closes#15937
- Reject legacy `space:join` requests with `UnsupportedClientVersion`
and disconnect the socket.
- Update `affine_merge` to `0.4.1` so markdown updates with repeated
characters succeed.
- Split model display names on whitespace or hyphens so GPT labels
highlight only `GPT`.
Co-authored-by: DarkSky <darksky2048@gmail.com>
Closes#15953
## What changed
- Set `options.max_matches` to `offset + size` in
`translate_search_request` when that sum exceeds 1000.
- Return `nextCursor` from `normalize` only when the page has hits and
the next offset stays below `total`.
- Enforce the 10000 pagination offset limit on offset-based cursors in
`query::compile` using the shared `parse_offset_cursor` helper.
- Keep non-offset cursors and background scan paths unchanged.
- Add table-driven unit tests for `max_matches` sizing, `nextCursor`
termination, and cursor offset bounds.
## Why
Manticore Search keeps 1000 matches per query by default. Requests past
that window return truncated pages or zero hits while reporting the full
`total`. Previously, `normalize` did not check for an empty page. An
empty page returned the same cursor and caused background sweeps to loop
on the same offset.
Raising `max_matches` also allows an external query with a large offset
cursor to request a large match buffer. Checking offset-based cursors in
`query::compile` blocks oversized user requests while keeping background
scans past 10000 rows working.
## Verification
- Model: Gemini 4 Neon
- Test frameworks: `cargo test` (`affine_server_native` search unit
suite, 36 passed), `rustfmt --check`, and a live pagination test against
`manticoresearch/manticore:29.0.2` with 1050 indexed rows.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Search pagination now handles empty and completed result pages more
reliably, avoiding misleading next-page links.
* Cursor offsets and page limits are checked more consistently,
including when values are unusually large.
* **Improvements**
* Searches that need to reach beyond the default result threshold can
now retrieve the requested page.
* Page limits above 10,000 are rejected.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
## Description
The Persian (`fa`) value of `com.affine.calendar-date-picker.week-days`
was `ش,ی,د,س,چ,ج,ش`. It starts on Saturday (شنبه) and skips Thursday
(پنجشنبه). The date picker renders this string as a Sunday-first
header, so every Persian column was labelled with the wrong day:
| Column | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|---|
| Before | ش (Sat) | ی (Sun) | د (Mon) | س (Tue) | چ (Wed) | ج (Fri) | ش
(Sat) |
| After | ی | د | س | چ | پ | ج | ش |
The new value matches the CLDR narrow weekday names
(`Intl.DateTimeFormat('fa', { weekday: 'narrow' })`).
Tests: added `packages/frontend/i18n/src/__tests__/week-days.spec.ts`.
- Every supported locale has 7 week-day labels.
- Locales with single-character labels (`fa`, `ja`, `ko`) match `Intl`'s
narrow weekday names in Sunday-first order. The `fa` case fails on
current canary and passes with this change.
I checked the other non-Latin locales by hand (ar, kk, tr, ur, zh, ru,
uk, el-GR); they are already Sunday-first.
```
yarn vitest run packages/frontend/i18n/src/__tests__/week-days.spec.ts # 25 passed (fa fails without the fix)
yarn oxlint --deny-warnings packages/frontend/i18n/src/__tests__ # clean
yarn oxfmt --check <changed files> # clean
yarn tsc -b packages/frontend/i18n/tsconfig.json # no errors
```
## Checklist
- [x] I have signed the [AFFiNE Contributor License
Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required
before merge; the `license/cla` check must be green ([how it
works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first))
- [x] The PR targets the `canary` branch and its title follows
[Conventional Commits](https://www.conventionalcommits.org/)
- [x] Tests are added or updated where it makes sense
- [x] `yarn lint` and `yarn typecheck` pass locally (run on the changed
package)
- [x] If the PR code includes AI-generated edits, I have carefully
reviewed it to ensure that the scope of the PR is consistent with what
is claimed in the title and description, and that there are no redundant
or invalid implementations.
- [x] I agree that maintainers may close the PR without discussion if
they consider the code quality to be too low.
This PR was written with AI assistance and reviewed before submitting.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Corrected the weekday labels shown in the Persian calendar date
picker, providing a consistent sequence of day names.
* The updated labels help users identify weekdays more accurately when
selecting a date.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
Adds Hungarian (`hu`) to the supported languages, with all 2,643 keys
translated.
Closes#15926
This replaces #15922, which I opened by mistake before the translation
was finished. Sorry for the noise.
**Changes** (three files, the same shape as the Turkish translation in
#15000):
- `resources/hu.json`: the new translation
- `resources/index.ts`: `hu` in `Language` and `SUPPORTED_LANGUAGES`
- `i18n-completenesses.json`: `hu` at 100
**How it was made and checked:**
- The translation was drafted by machine and revised with AI assistance.
I am a native Hungarian speaker and reviewed the result in the running
app.
- A script checked every key against `en.json`: placeholders, tags,
`$t()` references, line breaks and leading or trailing spaces all match.
- I built it on v0.27.4 and ran it on a self-hosted instance. In
Hungarian I went through the settings, sidebar, doc list, doc
properties, collections, tags, journals, trash, share menu and quick
search.
Some strings stay in English because they are hardcoded rather than in
`en.json`. They are not part of this PR.
## Checklist
- [x] I have signed the [AFFiNE Contributor License
Agreement](https://cla-assistant.io/toeverything/AFFiNE)
- [x] The PR targets the `canary` branch and its title follows
[Conventional Commits](https://www.conventionalcommits.org/)
- [ ] Tests are added or updated where it makes sense
- [x] `yarn lint` and `yarn typecheck` pass locally
- [x] If the PR code includes AI-generated edits, I have carefully
reviewed it to ensure that the scope of the PR is consistent with what
is claimed in the title and description, and that there are no redundant
or invalid implementations.
- [x] I agree that maintainers may close the PR without discussion if
they consider the code quality to be too low.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Added Hungarian as a supported language, with translations across the
interface and a reported translation completeness of 100%.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
Fixes#15617
After a middle-click pan in edgeless, the selected elements were
deselected.
`PanTool` saved the selection and restored it on pointer up, but it did
so **before** switching back to the previous tool.
`ToolController.setTool` clears the selection (`selection.set({
elements: [] })`), so the restore was always undone. The restore now
runs after `setTool`.
Scope: this covers the middle-mouse-button pan. Holding space to pan
(`edgeless-keyboard.ts`) already restores the selection after `setTool`,
so it is unchanged.
Tests: added a case to `pan-tool.unit.spec.ts` that checks the restore
runs after the tool switch. It fails on current canary and passes with
this change.
```
yarn vitest run --project=@blocksuite/affine-gfx-pointer # 8 passed (new test fails without the fix)
yarn oxlint --deny-warnings blocksuite/affine/gfx/pointer # clean
yarn oxfmt --check blocksuite/affine/gfx/pointer/src # clean
yarn tsc -b blocksuite/affine/gfx/pointer/tsconfig.json # no errors
```
## Checklist
- [ ] I have signed the [AFFiNE Contributor License
Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required
before merge; the `license/cla` check must be green ([how it
works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first))
- [x] The PR targets the `canary` branch and its title follows
[Conventional Commits](https://www.conventionalcommits.org/)
- [x] Tests are added or updated where it makes sense
- [x] `yarn lint` and `yarn typecheck` pass locally (run on the changed
package)
- [x] If the PR code includes AI-generated edits, I have carefully
reviewed it to ensure that the scope of the PR is consistent with what
is claimed in the title and description, and that there are no redundant
or invalid implementations.
- [x] I agree that maintainers may close the PR without discussion if
they consider the code quality to be too low.
This PR was written with AI assistance and reviewed before submitting.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
- **Bug Fixes**
- Restored the saved selection when temporary panning ends and the
previous tool is resumed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## What
Brings `zh-Hans.json` in line with `en.json`.
| | before | after |
|---|---|---|
| keys | 2450 | **2608** |
| falling back to English | 158 | **0** |
Also refreshed ~25 entries that still held the English source string.
## Notes
- `{{placeholders}}` preserved verbatim; verified zero placeholder
mismatches across all changed strings.
- JSON only, no code changes.
- **If you sync this file from Crowdin**, just say so and I'll close
this in favour of the Crowdin round instead — I mostly wanted to flag
that Simplified Chinese is currently ~6% behind `en`.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
- **Localization**
- Expanded Simplified Chinese translations for journal labels,
properties, menus, empty states, and the Intelligence workspace.
- Added translations for AI editor tools, BYOK provider and model
settings, mobile settings, and device management.
- Added localized messages for selected-source errors, billing and
purchases, document validation, invitation account mismatches,
authentication, sync, search, and real-time connection failures.
- Updated existing Chinese labels and descriptions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
## Description
The Markdown shortcut for creating code blocks currently accepts only
alphanumeric language identifiers. This prevents supported languages
such as `ts-tags` from being selected through the shortcut.
Updated the regular expression to accept hyphens in language identifiers
and added a regression test to verify code block creation with
TypeScript with Tags.
## Testing
Validated through GitHub Actions on my fork.
42 checks passed, 14 were skipped, and no checks failed. Lint, Typecheck
and BlockSuite test jobs passed.
[[View CI
results](https://github.com/ammarkaskar/AFFiNE/pull/1/checks)](https://github.com/ammarkaskar/AFFiNE/pull/1/checks)
## Checklist
- [x] I have signed the AFFiNE Contributor License Agreement.
- [x] The PR targets the `canary` branch and its title follows
Conventional Commits.
- [x] Tests are added or updated where it makes sense.
- [ ] `yarn lint` and `yarn typecheck` pass locally.
- [x] I have carefully reviewed the AI assisted code changes.
- [x] I agree that maintainers may close the PR without discussion if
they consider the code quality to be too low.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Code blocks now recognize language identifiers containing hyphens,
such as `ts-tags`.
* **Tests**
* Added coverage to verify that a hyphenated language identifier
displays the expected language label.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
This fixes translation strings that render as broken text. I found them
with a placeholder and markup check across all locale files, then
checked each one against how its key is rendered (`<Trans>` or plain
`t()`).
**Unclosed `<Trans>` tags.** For example, `<1>7 days<1>` should be `<1>7
days</1>`. Without the closing tag, `<Trans>` nests the second tag and
the rest of the sentence turns bold.
- Version history prompts
(`com.affine.history.confirm-restore-modal.{free,pro}-plan-prompt.description`):
en.json and the 17 locales copied from it. ca, ko and pl already had it
right.
- `recommendBrowser`: ca, es.
- `com.affine.payment.lifetime.caption-2`: ru, where `<a>…<a>` made the
link swallow the end of the sentence.
- `com.affine.payment.upgrade-success-page.support`: fr used `<3>`, but
only component `1` is passed, so the support email link was missing.
**Literal markup in plain `t()` strings.** These strings are rendered as
text, so the tags appear on screen.
- `<b>(</b>` in `com.affine.m.explorer.tag.manage-docs` (ar, it, pl, uk)
and in
`com.affine.m.selector.{info-total,title,info-added,info-removed}` (ar,
it, pl).
- `<b>` in `com.affine.payment.cloud.team-workspace.benefit.g1-3/g1-4`
(ja, zh-Hant) and in `Find 0 result` (sv-SE).
- `{AFFiNE}` in `com.affine.ai-onboarding.general.2.{title,description}`
(es).
**Wrong or missing variables.**
- ru `com.affine.payment.ai.billing-tip.end-at` used `{{due}}`, but the
code passes `end`, so the expiry date showed as a literal `{{due}}`.
- ru `com.affine.editor.at-menu.more-{docs,members}-hint` packed all
four plural forms into one string, so users saw "5 документа, 5
документов, 5 документов, 5 документа(ов)". They are now "Ещё
документов: {{count}}" and "Ещё участников: {{count}}", which read
correctly for any count, including `100+`.
- fr `com.affine.cmdk.affine.create-new-edgeless-as` dropped
`{{keyWord}}`. It now reads `Nouvelle page sans bords "{{keyWord}}"`, in
line with the existing French strings.
| Before (en, version history prompt) | After |
| --- | --- |
| …up to **7 days of version history.** | …up to **7 days** of version
history. |
I rendered the four `<Trans>` keys in every locale with react-i18next
15.5.1 and html-parse-stringify 3.0.1 (the versions in `yarn.lock`),
before and after the change, and all 26 locales now render correctly.
Only values change: key order and completeness are the same, and the
files keep their existing JSON format. The two doc comments in
`i18n.gen.ts` that quote the English history prompts are updated to
match.
Not included, left for a separate change: stale
`error.SSRF_BLOCKED_ERROR` translations that drop `{{reason}}`, and
style-only differences such as a missing highlight.
The fixes were drafted with AI assistance (Claude).
## Checklist
- [x] I have signed the [AFFiNE Contributor License
Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required
before merge; the `license/cla` check must be green ([how it
works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first))
- [x] The PR targets the `canary` branch and its title follows
[Conventional Commits](https://www.conventionalcommits.org/)
- [ ] Tests are added or updated where it makes sense (translation-only
change)
- [ ] `yarn lint` and `yarn typecheck` pass locally (not run: the change
touches JSON values and two comments only)
- [x] If the PR code includes AI-generated edits, I have carefully
reviewed it to ensure that the scope of the PR is consistent with what
is claimed in the title and description, and that there are no redundant
or invalid implementations.
- [x] I agree that maintainers may close the PR without discussion if
they consider the code quality to be too low.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Corrected malformed rich-text markup in document-history prompts
across multiple languages, improving the display of plan details and
durations.
* Fixed several translation issues in browser recommendations,
onboarding, billing, editor hints, and tag-management labels.
* Cleaned up stray formatting in localized text.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15941** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Document update tools now distinguish missing documents from other
failures and provide clearer error messages.
* Invalid legacy workspace snapshots are reported consistently, and
embedding sync retries those workspaces after a brief delay.
* **Chores**
* Updated a workspace dependency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
- add a fullscreen control to Mermaid previews
- use the browser Fullscreen API to enter and exit fullscreen
- add fullscreen-specific layout styles
- add E2E coverage for the fullscreen request
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Added a fullscreen control to Mermaid diagram previews. Previews
expand to fill the screen with adjusted spacing and dimensions, and the
same control exits fullscreen. This gives diagrams more room to view
while keeping the preview’s fullscreen controls available.
* **Tests**
* Added end-to-end coverage verifying that the fullscreen control enters
and exits fullscreen mode for Mermaid previews.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
Resolves#15423
## Summary
Adds a per-doc read/edit toggle button to both the desktop and mobile
document headers, so a doc can be locked into a read-only view without
navigating away — primarily to avoid the mobile on-screen keyboard
popping up while scrolling.
## Relation to #15453
This replaces #15453, which was opened from a branch named
`fix/issue-15435` (an unrelated date-picker bug) and linked the wrong
issue (#15444, which is actually a previous closed PR, not an issue).
This PR carries forward all of that PR's code, rebased on latest
`canary`, plus fixes for the review feedback left on #15453:
- **Mobile toggle guard**: the mobile toggle button had no
`canEdit`/trash guard at all (desktop already had one) — both platforms
now hide/disable the toggle when the user can't edit or the doc is
trashed.
- **i18n**: added the missing
`com.affine.header.readonly-toggle.read-only` / `...editing` translation
keys (previously referenced keys that did not exist in `en.json`).
- **Styling**: removed redundant inline `style={{ marginRight: 8 }}` on
both header buttons — the surrounding containers already apply the
correct `gap`.
- **Analytics**: added a typed `toggleReadOnlyMode` event under
`track.$.header.actions`, following the existing `toggleFavorite: { on:
boolean }` convention.
- **Tests**: added `tests/affine-local/e2e/readonly-toggle.spec.ts`
covering toggle-on → body not editable → toggle off → editable again →
navigate to a new doc → no state leak.
## Known follow-up (not in this PR)
As raised in review, routing this through `doc.blockSuiteDoc.readonly`
(the same channel `DetailPageWrapper` already uses for trashed docs)
instead of local `isReadOnlyMode` state duplicated across desktop/mobile
would also fix the title editor staying editable while the body is
read-only. Keeping this PR scoped to the existing local-state approach;
open to a follow-up if the team wants the architecture change.
Interaction design (mobile-only vs. desktop+mobile, persisted vs.
ephemeral) is also still open for design feedback.
## Test plan
- [x] `tsc --noEmit` clean on all touched files
- [x] New e2e test covering the toggle/reset flow
- [ ] CI (build/typecheck/e2e workflows)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Added a read-only/editing toggle to eligible document headers on
desktop and mobile. Its icon and label reflect the current mode.
* Read-only mode resets when you open a different document.
* **Bug Fixes**
* Prevented edits to document content, titles, and names while read-only
mode is enabled.
* Limited editing and the toggle to eligible documents. On mobile, the
toggle is unavailable in Edgeless mode when editing is disabled.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: donqu1xotevincent <vincent@toeverything.info>
Co-authored-by: DarkSky <darksky2048@gmail.com>
Table drag selection captured cell positions and the start point once,
in viewport coordinates. After the table or page scrolled, live pointer
coordinates were compared with those stale positions, so the selected
area no longer matched the pointer.
Cell positions are now read on each update, the drag anchor is stored
relative to the table, and the selection also updates on scroll while
the pointer rests.
fix#14416
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Table cell selections stay aligned with the pointer when the table
scrolls during a drag, including when the pointer remains stationary
after scrolling. Selected cells reflect the table’s current position
throughout the drag.
* **Tests**
* Added coverage verifying that drag selection spans the expected
columns after horizontal scrolling, both when the pointer moves again
and when it stays in place, ensuring consistent selection behavior in
both scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
## Description
The Block Diff Playground modal (the dev-only 🧪 button) was portaled
into `editor-host` via `container: this.host`. `editor-host` sets
`isolation: isolate`, so the modal's z-index only applies inside that
stacking context. Anything painted after the editor at the same level
ends up on top of the modal — in practice the backlinks panel's "Show"
button shows through right over the action buttons.
Removing the `container` option lets `createLitPortal` fall back to its
default (`document.body`), so the modal is no longer trapped under the
editor's stacking context. Positioning is unaffected since it's still
computed against the 🧪 button.
To reproduce: run the web app in dev mode, open a doc that's long enough
for the backlinks panel to sit behind the modal, click 🧪.
## Checklist
- [x] I have signed the [AFFiNE Contributor License
Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required
before merge; the `license/cla` check must be green ([how it
works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first))
- [x] The PR targets the `canary` branch and its title follows
[Conventional Commits](https://www.conventionalcommits.org/)
- [ ] Tests are added or updated where it makes sense
- [x] `yarn lint` and `yarn typecheck` pass locally
- [ ] If the PR code includes AI-generated edits, I have carefully
reviewed it to ensure that the scope of the PR is consistent with what
is claimed in the title and description, and that there are no redundant
or invalid implementations.
- [x] I agree that maintainers may close the PR without discussion if
they consider the code quality to be too low.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Refactor**
* Updated the playground portal to use its default container behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
`hi.json` translates 5 of the 2,622 current keys in `en.json`, so Hindi
is selectable in the language menu but almost every screen stays in
English. This PR adds 229 Hindi strings for the first-run path:
- `com.affine.auth.*` (sign in, sign up, magic link, password,
self-hosted server)
- `com.affine.rootAppSidebar.*` (favorites, organize, tags, collections)
- `com.affine.all-docs.*`, `com.affine.page.*` (doc list and display
options)
- `com.affine.workspace.*`, `com.affine.empty.*`,
`com.affine.toastMessage.*`
`i18n-completenesses.json` is updated with the same formula as
`build.ts` (`ceil(keys / en keys * 100)`): `hi` 1 -> 10. The formula
reproduces the committed `ur` value (90), which is how I checked it.
Every added string keeps the exact interpolation and tags of `en.json`
(`{{email}}`, `{{count}}`, `<1></1>`, `<a></a>`, `<b></b>`, `<0></0>`),
checked per key with a script that fails on any mismatch. Existing Hindi
entries are untouched; new keys are inserted in `en.json` order, so the
diff is additions only. Terminology matches the existing file
(कार्यक्षेत्र for workspace).
Same shape as the Urdu expansion in #14995.
Fixestoeverything/AFFiNE#14741
### Issue
When attempting to insert a table inside a nested numbered list using
the slash menu, the table would fail to insert and nothing would happen.
### Fix
- `insertTableBlockCommand` uses `addSiblingBlocks` which tries to add
the table as a child of the `affine:list` parent block — invalid for
a table block
- Added a walk up the parent chain while the parent flavour is
`affine:list`, so the table is inserted as a sibling of the outermost
list block instead
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
## Release Notes
* **Bug Fixes**
* Fixed table placement when inserting from a nested list item. Tables
now appear after the top-level list, while the list retains any
non-empty nested item.
* When inserting a table with empty-line removal enabled, the selected
empty line is removed instead of the insertion target.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
Mobile search rendered doc results with a plain `DocCard` linking to
`/<docId>`, dropping the `blockId` of the matched block from the search
payload. Opening a result therefore neither scrolled to nor highlighted
the match.
The search page now keeps the matched `blockId`, and `DocCard` takes
`blockIds` and links to `/<docId>?blockIds=<id>`. The mobile detail page
already binds the editor to the view's query string, so this is the same
path desktop quick search uses (`workbench.openDoc({ docId, blockIds
})`): the editor scrolls to and highlights the block.
fix#15153
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Mobile search results now open the matching document and navigate to
the specific section where the result was found, highlighting that
section when available.
* When a result has no matched section, selecting it opens the document
without a section-specific destination, preserving the existing
document-level navigation behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
Keydown events from the database search input bubbled to the editor's
document listener. With a cell selected, Backspace edited the search
text and also cleared that cell.
The search input now stops keydown propagation, so its keys only affect
the input.
fix#13796
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Pressing Escape in the data view search field no longer propagates the
keyboard event to document-level handlers.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
Markdown, HTML and Word imports silently dropped a file when it could
not be read or converted: the per-file loop only kept files that
returned a doc id, and the file picker's snapshot step dropped
unreadable files with a `console.error`. The dialog then reported
"Import completed".
This change:
- moves snapshotting of picked files into the importer
(`snapshotReadableFiles`, already used by the Obsidian import), which
records unreadable files as warnings; the picker no longer has a
`snapshot` option
- records files the converter returned no doc for as `skipped_doc`
warnings
- shows "Import completed with warnings" and the list of warnings
instead of the success message when there are any
- sets `sourcePath` on Markdown zip docs so skipped entries are named by
path instead of a generated id
fix#15718
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Import status now reports when files are skipped, unreadable, or only
partially imported.
* Imported Markdown documents retain their source paths within the
archive.
* File and directory pickers can use the standard browser picker instead
of the File System Access API.
* **Bug Fixes**
* Importing multiple files now handles unreadable files and files that
cannot be converted without interrupting the remaining imports.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
The desktop sign-in dialog set an inline `min-height: 550px`, which wins
over the modal's `calc(100dvh - 32px)` cap, and the dialog content had
no overflow, so in a window shorter than the dialog the controls below
the fold could not be reached.
This caps the min and max height at the viewport and lets the dialog
scroll. An e2e test opens the dialog in a 400px-high viewport and checks
that it fits and that its last button can be scrolled into view.
fix#15620
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* The sign-in dialog now adapts to shorter screens and scrolls when its
content exceeds the available space.
* **Tests**
* Added coverage to check that the login dialog and its final button
remain accessible in a short viewport.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
The formatting actions of the iOS selection menu send `formatBold`,
`formatItalic` and `formatUnderline` beforeinput events and no key
event. The inline editor prevents their default and ignored them, so
they did nothing.
Route these input types to the Mod-b, Mod-i and Mod-u bindings of the
keymap, the same way Android delete and enter input is routed to its key
bindings.
fix#15445
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Formatting shortcuts for bold, italic, and underline now work with
native text input events.
* Keyboard bindings continue to handle Android-specific deletion and
paragraph insertion events.
* **Bug Fixes**
* Prevented formatting input events from triggering unrelated shortcuts,
and stopped the browser’s default action when a matching shortcut
handles the event.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
The DOM renderer placed the connector label at its absolute canvas
coordinates inside the connector element, which is already positioned at
the connector's origin, so the label was offset by the connector's
position. Subtract the connector origin as the canvas renderer does.
fix#15777
Co-authored-by: DarkSky <darksky2048@gmail.com>
After the icon of a callout was removed, any click inside the callout,
including clicks meant to place the caret in its text, opened the icon
picker. The icon can still be added back from the callout toolbar.
fix#15292
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Clicking the text area of a callout without an icon no longer opens
the icon picker. Clicking an existing icon continues to open the picker,
while clicks on the icon’s emoji area remain unaffected.
* **Tests**
* Added coverage for icon-picker behavior when clicking callout icons
and text areas, with and without an icon.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
The mobile collection menu offered "Edit collection", which opens the
`collection-editor` dialog, but the mobile dialog registry never
registered it (the editor is the desktop dialog and was left commented
out when the mobile app got its own dialogs), so tapping it did nothing.
This removes the action and the handlers that only served it. A mobile
e2e test checks the collection menu no longer offers it.
fix#15005
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Changes**
* Removed the “Edit collection” action from collection menus in mobile
navigation.
* Collection menus continue to offer rename, add page, favorite, open,
split view, and delete actions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
Fixes#15658
## Problem
With `enable_pdfmake_export` on, **Export to PDF** loads its fonts from
hardcoded `https://cdn.affine.pro/fonts/...` URLs. The CDN only sends
`Access-Control-Allow-Origin: https://app.affine.pro`, so the font fetch
fails on self-hosted origins and in the desktop app.
The export then gives no feedback at all. In pdfmake 0.2.x, `_createDoc`
rethrows a failed font fetch from inside a promise handler
(`urlResolver.resolved().then(..., result => { throw result })`), so the
`getBlob` callback never runs. `PdfAdapter._createPdfBlob` therefore
never settles, and `useExportPage` never reaches its "Export failed"
toast.
## Fix
The adapter now loads the fonts itself before calling pdfmake, through
`createPdfFontLoader` in `adapters/pdf/fonts.ts`:
- Each font is fetched from the CDN first, as before. If that fails, the
loader uses the matching Inter face (same weight and style) from the
editor's `FontConfigIdentifier`. The app already points that config at
its own `fonts/*.woff2` files (`environment.publicPath + 'fonts/'` in
`blocksuite/manager/view.ts`), which
`scripts/download-blocksuite-fonts.mjs` bundles. This mirrors the
CDN-to-local fallback the Typst renderer already has
(`createTypstFontFetcher`).
- The CJK font (`SarasaGothicCL-Regular.ttf`) has no bundled copy, so it
falls back to Inter Regular, as the Typst fallback does. Export then
works, but CJK glyphs need the CDN.
- The loaded fonts are passed to `pdfMake.createPdf(definition,
undefined, fonts, vfs)`, and the global `pdfMake.fonts` assignment is
removed.
- If neither source loads, the adapter rejects instead of hanging, so
the existing "Export failed" toast shows.
- Loaded fonts are cached per URL, as pdfmake's own URL resolver did.
Failures are not cached.
- `PdfTransformer.exportDoc` takes an optional provider, and
`useExportPage` passes `std.provider`. The font config is registered on
the editor (view) provider, not on `doc.provider`.
## Testing
- New `src/__tests__/adapters/pdf/fonts.unit.spec.ts` in
`@blocksuite/affine-shared` covers four cases:
- CDN fonts are used when they load;
- the editor's woff2 fonts are used when the CDN fetch throws, with the
CJK font falling back to Inter Regular;
- the loader rejects when a font loads from nowhere;
- a second export reuses loaded fonts.
- I also ran a throwaway check, not committed, in the same happy-dom
environment. pdfmake's browser build rendered a PDF from the loader's
vfs using the real `Inter-*.woff2` files. With the CDN blocked, the PDF
embeds `Inter-Regular` and `Inter-SemiBold`, and the CJK text falls back
to Inter. In Node, pdfmake 0.2.20 also embeds the woff2 faces (as CFF
`FontFile3`).
- `yarn vitest run` passes in `blocksuite/affine/shared` (17 files, 129
tests). The existing 34 tests in
`blocksuite/affine/all/src/__tests__/adapters/pdf.unit.spec.ts` also
pass.
- `tsc -b` passes for `blocksuite/affine/widgets/linked-doc` and
`packages/frontend/core`.
- `oxlint --deny-warnings` and `oxfmt --check` pass on the changed
files.
I couldn't test a self-hosted Docker build end to end.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* PDF exports now load fonts for supported typefaces, including Inter
and Sarasa Gothic CL.
* If a font cannot be fetched from the CDN, exports can fall back to a
matching font configured in the editor.
* PDF exports use the editor’s standard provider to reflect its current
configuration.
* **Bug Fixes**
* PDF export reports an error when required fonts cannot be loaded,
rather than proceeding without them.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
Co-authored-by: m86hussein <317587333+m86hussein@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Description
Closes#15862.
When selecting **Move Up** from a row's action menu in a table block,
the row failed to move up because `this.dataManager.moveRow(rowIndex,
rowIndex - 1)` was called.
In `TableDataManager.prototype.moveRow(from, after)`, the second
parameter `after` specifies the index of the item *after which* the
moved element should be positioned (via fractional indexing
`getOrder(rows, after)`):
- For **Move Down**, `moveRow(rowIndex, rowIndex + 1)` places the row
after the subsequent row (`rowIndex + 1`), which correctly moves it
down.
- For **Move Left** on columns, `moveColumn(columnIndex, columnIndex -
2)` correctly places the column after `columnIndex - 2` (i.e. before
`columnIndex - 1`).
- For **Move Up**, passing `rowIndex - 1` calculated an order after
`rowIndex - 1` (which falls between `rowIndex - 1` and `rowIndex`
itself), keeping the row in its original relative position.
This fixes **Move Up** to call `moveRow(rowIndex, rowIndex - 2)`
matching the pattern of **Move Left**, correctly positioning the row
before the preceding row.
## Checklist
- [x] I have signed the [AFFiNE Contributor License
Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required
before merge; the `license/cla` check must be green ([how it
works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first))
- [x] The PR targets the `canary` branch and its title follows
[Conventional Commits](https://www.conventionalcommits.org/)
- [x] Tests are added or updated where it makes sense
- [x] `yarn lint` and `yarn typecheck` pass locally
- [x] If the PR code includes AI-generated edits, I have carefully
reviewed it to ensure that the scope of the PR is consistent with what
is claimed in the title and description, and that there are no redundant
or invalid implementations.
- [x] I agree that maintainers may close the PR without discussion if
they consider the code quality to be too low.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Corrected the row menu’s **Move Up** action so it moves the selected
row to the intended position above its current location.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Abdul karim mia <akmia51@gmail.com>
## Summary
- Raise `zh-Hant` coverage from ~86% to full key parity with `en.json`
(+392 keys).
- Polish existing Traditional Chinese toward Taiwan wording
(工作區、垃圾桶、資料夾、連結、設定、預設、匯入/匯出、用戶端、本機、載入…).
- Fix Simplified leftovers (e.g. 删除 / 邀请链接) and translate newer AI /
BYOK / devices / realtime error strings.
- Update `i18n-completenesses.json` (`zh-Hant` → 100 by key count).
## Notes for maintainers
AFFiNE’s community translation flow currently points to Crowdin
(`i18n.affine.pro`). Happy to re-apply these strings on Crowdin if
preferred; this PR is a reviewable full `zh-Hant.json` patch for canary.
## Test plan
- [ ] Diff `packages/frontend/i18n/src/resources/zh-Hant.json` against
previous canary
- [ ] Spot-check settings / trash / workspace / AI BYOK / mobile
settings in `zh-Hant`
- [ ] Confirm interpolation placeholders `{{...}}` and tags like
`<1>...</1>` remain intact
- [ ] Run i18n package build / completeness generation if required by CI
Made with [Cursor](https://cursor.com)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Localization**
* Updated Traditional Chinese translations across workspace,
authentication, AI, settings, billing, sharing, integrations, and error
messages.
* Added translations for several settings, account and device controls,
analytics, integrations, and mobile empty states.
* Turkish and Traditional Chinese translation completeness now both show
100%.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
- **New Features**
- Added Claude Haiku as an AI model option.
- Search can now find database rows through linked-page titles.
- Document creation can be recovered when registration is interrupted.
- **Bug Fixes**
- Improved document syncing and deletion handling across devices.
- Corrected SVG image type detection and linked-page title display in
database fields.
- **Documentation**
- Updated README wording and edition descriptions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: LongYinan <lynweklm@gmail.com>
Co-authored-by: DarkSky <darksky2048@gmail.com>
Upon discovering AFFIiNE today, I began looking at the readme and
noticed a few opportunities for corrections and slight tweaks, this pull
request contains those changes.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Search results can now include matching database rows that link to
relevant documents.
* AI model options and audio transcription routing have been updated.
* Creating a document can be retried if its initial setup is
interrupted.
* Legacy document links continue to work across search, sharing,
comments, and sync.
* **Bug Fixes**
* Linked-document titles now reflect current document metadata in
database fields.
* Select-all keyboard shortcuts work in the LaTeX editor.
* Improved handling of document deletion and synchronization, including
pending updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
## Description
Importing or pasting HTML with a numbered list that has a `start`
attribute numbers the items wrong when there is whitespace between the
`<li>` elements, which is how most HTML out there is written:
```html
<ol start="3">
<li>ccc</li>
<li>ddd</li>
</ol>
```
This gives list blocks with `order` 4 and 6 instead of 3 and 4. The HTML
list matcher computes the number as `start +
parentList.children.indexOf(li)`, and `children` holds the whitespace
text nodes too, so every item is shifted by the text nodes before it.
The editor shows `order` as is (it only renumbers lists whose `order` is
not an integer), and the markdown and HTML exporters from #15726 write
it back out, so the wrong numbers stick. Lists without `start` are not
affected since their `order` stays `null`.
The fix counts only element children with
`HastUtils.getElementChildren`, which matches how browsers number `<li>`
items. Markdown import has no equivalent issue because mdast list
children are only list items.
I added a `html to snapshot` test that imports the list above through
`HtmlAdapter.toBlockSnapshot`. Before the fix it fails with `order` 4
and 6; after, it passes along with the rest of `html.unit.spec.ts` (42
tests) and `markdown.unit.spec.ts`.
## Description
The column background colour picker in a table opens its swatches as a
submenu, but that submenu landed 16px below the trigger and overlapped
the items underneath. Moving the pointer straight down hovered one of
those items, which closes the submenu — only a curved path that stayed
on the trigger worked.
Hover submenus now open beside the trigger instead of below it, with no
gap, and `shift` keeps a tall one inside the viewport. Submenus that
open on click (`openOnHover: false`) pass their own middleware and are
untouched.
Reproduced on a local web build with a table column: before, the
swatches could not be reached and no colour could be picked; after, they
are reachable and picking one applies the column colour.
fix#15731
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Improved navigation and selection behavior in submenus, inline
editors, and document search.
* Added support for linked-page titles in database values and search
results, and for legacy document links across search, sharing, comments,
and sync.
* Added document recovery after incomplete creation and clearer handling
of document deletion and lifecycle changes.
* Added Haiku as an AFFiNE AI model option and updated available Gemini
and Claude models.
* Improved mobile sync, including document updates and local document
deletion.
* Added Turkish translations.
* **Bug Fixes**
* Improved handling of SVG file types, workspace metadata, and
synchronization failures.
* Fixed stale document and payment updates being applied after newer
changes.
* Improved iOS share-link handling and submenu placement.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15927** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Snapshot database transactions now have a one-minute idle timeout when
no timeout is configured or the configured timeout is longer, helping
prevent transactions from remaining idle indefinitely.
* Search generation operations now retry lock acquisition for up to five
seconds instead of waiting indefinitely. If the lock remains
unavailable, the operation reports that the search index is not ready.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
When inviting members failed (for example with `TOO_MANY_REQUEST`), the
error escaped before `isMutating` was reset, so the invite dialog kept
spinning and no error was shown.
The flag is now reset in a `finally` block and the error is shown in a
toast. A unit test covers the success and failure paths.
fix#15536
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Workspace member invitations now display a clear error notification
when an invite attempt fails, including when too many requests are made.
* The invitation button returns to its ready state after either a
successful or failed attempt, so users can continue interacting with the
panel.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
The attachment toolbar, which holds the download action, is never shown
in read-only docs, and only PDF attachments could be opened in the peek
view, so other attachments could not be downloaded from a read-only or
publicly shared doc.
Enable the peek view for every attachment in read-only docs; it offers
the download for files it cannot preview.
fix#15544
Co-authored-by: DarkSky <darksky2048@gmail.com>
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
Build & Test runs about 60 jobs and ~417 job-minutes for every pull
request, and GitHub-hosted runners for the org run at most 60 jobs at a
time, 5 of them on macOS. With twenty-odd open pull requests the macOS
and Windows jobs queue for hours.
On `pull_request` events only:
- `Build AFFiNE native` for macOS/Windows and the macOS/Windows `Desktop
Test` entries run only when the change touches the desktop app, native
code, nbstore, Rust/toolchain files, `package.json`/`yarn.lock` or CI
config. The Linux `Desktop Test` always runs.
- `Server Test` (4 shards), the Elasticsearch, Embedded and Manticore
server tests and `Server E2E Test` run only when the change touches
`packages/backend`, `packages/common`, `tools`, Rust/toolchain files,
`package.json`/`yarn.lock` or CI config. `Build Server native` still
runs because the cloud E2E tests need it.
Pushes and `merge_group` runs are unchanged and run every job. Skipped
jobs report `skipped`, which `3, 2, 1 Launch` already accepts (the
mobile and Rust filters work the same way).
Also:
- Every job has a `timeout-minutes` (60; 90 for the Windows native and
iOS builds), so a step that hangs no longer holds a runner for the
default 6 hours.
- `build-rust` no longer sets `CARGO_INCREMENTAL: '1'` on the toolchain
step. That only stopped `dtolnay/rust-toolchain` from exporting
`CARGO_INCREMENTAL=0`.
For a web/editor-only pull request this drops 4 macOS jobs, 3 Windows
jobs and 11 server test jobs, roughly 200 job-minutes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Chores**
* Pull requests now run desktop and server checks only when their
corresponding files change. Other event types continue to run both
scopes.
* Desktop checks select platforms based on the pull request’s changes;
macOS and Windows native builds run only for desktop-scoped changes.
* Added time limits to most build and test jobs, with longer limits for
iOS and Windows native builds.
* The final test status now also waits for change-scope evaluation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
The tray menu labels were hardcoded in English. They now come from i18n
keys, and the tray menu is rebuilt when the main process language
changes (the renderer already syncs its language to the main process).
Adds the Simplified Chinese translations.
A unit test builds the tray menu, switches the language to zh-Hans and
checks the labels.
fix#15684
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Desktop tray menu labels are now localized in English and Simplified
Chinese.
* Tray labels update when the app’s language changes, including
recording controls, settings, and app information.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
Release builds of the Android app set `usesCleartextTraffic=false` and
`MIXED_CONTENT_NEVER_ALLOW` (#15118), so the app could not reach a
self-hosted server over http at all, including one on the local network.
This allows plain-text http/ws only to local network hosts, matching iOS
`NSAllowsLocalNetworking`:
- unqualified single-label names (`nas`, `localhost`) and `.local` names
- loopback, private and link-local IP literals: 127/8, 10/8, 172.16/12,
192.168/16, 169.254/16, `::1`, fc00::/7, fe80::/10
Anything else is refused, including public-looking names that resolve to
a private address (names are never resolved).
Android WebView cannot allow mixed content per host: the app runs at
`https://localhost`, so every http/ws request is mixed content,
`mixedContentMode` is WebView-wide, and WebView only honours the
app-wide cleartext flag. So cleartext and `MIXED_CONTENT_ALWAYS_ALLOW`
are enabled globally, and the rule is enforced in three places with the
same host check:
- `AffineWebViewClient.shouldInterceptRequest` answers plain http
requests to other hosts with a 403.
- The web app wraps `WebSocket` and `fetch` (main thread and the nbstore
worker), because WebView request interception never sees WebSocket
handshakes. This is where the sync `ws://` connection is refused.
- An OkHttp interceptor rejects plain http to other hosts for the native
clients (GraphQL, SSE, auth).
On Android and iOS, the add-server step rejects public `http://`
addresses with a message asking for an https address, a local IP or a
`.local` name.
The host check exists in TS (`@affine/core/utils/local-network`) and
Kotlin (`LocalNetwork.kt`); both are tested against the same table,
`core/src/utils/local-network/fixtures/hosts.json` (the Android unit
tests read it as a test resource). Other tests show public `http://` and
`ws://` are blocked in the web guard and in an OkHttp client, while LAN,
`.local` and https pass.
#15509 (server on a LAN IP) is fixed by this. The setup in #15438
(`http://affine.home.com`) stays blocked, as it is on iOS: that server
needs https, a local IP address or a `.local` name.
Tested: the TS tests with vitest, the Kotlin tests with JUnit outside
Gradle (Kotlin 2.2.20, JDK 21). Not run on a device or emulator; the
WebView and WebSocket behaviour is covered by unit tests only.
fix#15438fix#15509
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Android now allows HTTP connections to servers on the local network,
while blocking insecure connections to public servers. HTTPS connections
remain available.
* When adding a self-hosted server on Android or iOS, you’ll see
guidance if its public address uses HTTP. Use an HTTPS address or a
local network address instead.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
### Summary
Fixes#15818.
1.
**`blocksuite/affine/blocks/table/src/adapters/{utils,markdown,plain-text}.ts`**:
- Match `database/src/adapters/` and `table/src/adapters/html.ts` by
supporting plain-string cell values (`typeof v.value === 'string'`) and
missing/undefined `.text` in `processTable` (`utils.ts`),
`tableBlockMarkdownAdapterMatcher` (`markdown.ts`), and
`tableBlockPlainTextAdapterMatcher` (`plain-text.ts`).
- Previously, `table/src/adapters/markdown.ts` and `plain-text.ts`
unconditionally called `deltaConverter.deltaToAST(v.value.delta)`, which
threw `TypeError: Cannot read properties of undefined (reading 'map')`
when `cell.text` was a string or missing `.delta`, causing both `Export
-> Markdown` and `Export -> Copy as Markdown` (`copy-markdown`) to fail
inside `adapter.fromDoc(doc)`.
2.
**`packages/frontend/core/src/components/hooks/affine/use-export-page.ts`
&
`blocksuite/affine/widgets/linked-doc/src/transformers/{markdown,html}.ts`**:
- Propagate `Promise<boolean>` from `exportDoc`, `exportToHtml`,
`exportToMarkdown`, `HtmlTransformer.exportDoc`, and
`MarkdownTransformer.exportDoc` instead of hardcoding `return true` in
`exportHandler`.
- When `adapter.fromDoc(doc)` or `docToSnapshot(doc)` fails and returns
`undefined` (or produces empty output with no assets), `exportHandler`
now returns `false` so the user sees the error notification rather than
a false-positive `"Exported successfully / Please open the download
folder to check."` toast.
- In `copyAsMarkdown`, fall back to `new MarkdownAdapter(transformer,
doc.provider)` when `std` is not present (matching
`MarkdownTransformer.exportDoc`).
3. **`blocksuite/affine/widgets/linked-doc/src/transformers/utils.ts`**:
- Defer `element.remove()` and `URL.revokeObjectURL(fileURL)` in
`download()` via `setTimeout(..., 100)` (consistent with
`packages/frontend/admin/src/modules/accounts/utils/csv-utils.ts` and
`packages/frontend/core/src/blocksuite/database-block/properties/file/view.tsx`)
so the blob URL is not revoked synchronously before the download
initiates.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Table exports now handle missing or empty cell text consistently.
* HTML and Markdown export actions now report whether an export was
downloaded, and avoid reporting success when no export is available.
* Copying as Markdown works even when an editor standard scope is
unavailable.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
The code block's editable area inherited the browser's default
spellcheck, so identifiers and keywords were underlined as misspelled.
The code block now sets `spellcheck="false"` on its rich text. Other
text blocks are unchanged.
fix#13686
Co-authored-by: DarkSky <darksky2048@gmail.com>
- Update to DeletePermanentlyIcon in QuickDeletePermanently and
trash-page-footer
- A trivial refactor to use permanentlyDeletePage helper method
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Style**
* Updated permanent-delete buttons in quick actions and the trash page
to use a dedicated permanent-delete icon.
* **Bug Fixes**
* After confirming permanent deletion from the trash page, the app
returns to the All pages view and displays a confirmation once deletion
completes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
fix#13433
Saves the display preferences set on each collection view. So one
collection will open by default in Masonry view, while another will open
in List view. It works nearly identically to how the allDocs page saves
its display preferences, but makes a separate key-value pair for each
collection.
Works as intended right now, but with a bit of duplicate code from the
allDocs, i didn't want to touch that to avoid making too many
opinionated refactorings 😅
EDIT: added Playwright tests for the new functionality
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Collection pages remember list, grid, or masonry view modes and
display settings independently.
* Search results can include database rows linked to matching documents.
* AFFiNE AI offers Haiku and updated Claude and Gemini model options.
* Turkish translations have been updated and expanded.
* Self-hosted deployments support updated license options.
* **Bug Fixes**
* Document links and actions resolve consistently when a document has a
separate storage ID.
* Document deletion and sync are more reliable across devices.
* LaTeX editors support the platform’s select-all shortcut.
* **Tests**
* Added coverage for collection preferences persisting when collections
are reopened.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->