## 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 -->
## 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>
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 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>
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 -->
Editor popups are mounted inside `editor-host`, which forms its own
stacking context at the default level. The Show/Hide button in the
bi-directional links panel is positioned and rendered later, so it
painted over open database menus.
The editor container is a flex item, so it now sets `z-index: 1`. This
lifts the editor's stacking context above the following panels without
adding a positioned ancestor, so popup placement and click-outside areas
stay the same. The doc viewport uses `isolation: isolate` so the raised
layer stays below overlays outside the viewport, such as the outline
viewer in doc peek.
fix#14723
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Database view options menus now appear above overlapping controls,
making the menu easier to see and use.
* Editor popups are displayed above panels that overlap the editor.
* **Tests**
* Added coverage to verify the database options menu is visible and on
top at an overlapping point.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: DarkSky <darksky2048@gmail.com>
fix#15850
#### PR Dependency Tree
* **PR #15865** 👈
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
* **New Features**
* Search results now include database rows that reference matching
documents, showing the referenced document’s current title.
* Linked-document titles appear consistently in database title and
rich-text values, including after a title changes.
* Search includes ordinary text matches alongside linked-document
references and supports retrieving additional results.
* **Bug Fixes**
* Rows referencing unavailable documents are not presented as
linked-title matches.
* If linked-row lookup fails, ordinary document search results remain
available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15854** 👈
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
* **New Features**
* Added workspace document lifecycle tracking, including trashed and
deleted states, with migration support.
* Added workspace inventory syncing and state refresh across cloud and
local storage, improving document discovery and offline synchronization.
* Added clearer messages for invalid or oversized document updates and
temporarily unavailable sync or validation.
* Added paused-upload diagnostics and a Quick Export shortcut for
relevant workspace sync issues.
* **Improvements**
* Search, indexing, and document metadata now reflect workspace
inventory and lifecycle state.
* Restoring from history preserves concurrent edits made during
recovery.
* Unused-blob checks now scan document content and detect changes during
scanning.
* **Bug Fixes**
* Invalid document updates are rejected without partially saving a
batch.
* Document reading handles missing or cyclic block relationships more
reliably.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15820** 👈
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**
* Improved image handling in AI conversations: supported images are
resized and sent as WebP, with transparency preserved.
* Image attachments that can’t be loaded or encoded now report an error
instead of being silently omitted.
* Invalid image uploads now receive clearer error messages, while
unrelated processing errors retain their original details.
* Copilot message errors now surface more directly, while missing or
inaccessible sessions continue to be reported as unavailable.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15817** 👈
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
* **New Features**
* Added managed Copilot model routing with route choices and defaults
based on available configuration.
* Expanded model routing support to include OpenRouter and additional
request formats.
* Route options are now available for self-hosted deployments when
configured targets support them.
* **Bug Fixes**
* Added clearer errors when a selected Copilot target is unavailable.
* Improved configuration migration behavior to preserve custom model
profiles and legacy credentials.
* Cloud deployments now receive a clear configuration error when
attempting to set Copilot provider profiles.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15798** 👈
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
* **New Features**
* Image generation and the clay, sketch, anime, pixel, sticker, upscale,
and background-removal actions now use an updated image model. Existing
prompts and settings remain unchanged.
* **Changes**
* The OpenAI model `gpt-image-1` is no longer listed in the model
catalog.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fix#15706fix#15336fix#15760fix#15314
#### PR Dependency Tree
* **PR #15782** 👈
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**
* Fixed the code block’s wrap and line-number switches so their
displayed states stay in sync with the selected settings.
* Clicking a switch’s label or control now applies the setting
consistently, and the menu remains open while toggling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Workspace selection, creation, and navigation after import now use
consistent view transitions, including in browsers without native
transition support.
* **Chores**
* Updated supporting components for mathematical notation, diagrams,
desktop functionality, and backend services.
* Refreshed tools used by the app and its documentation, including
components for error reporting and GraphQL operations. These updates do
not change the rendered equations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fix#15650fix#15530fix#15534fix#15506
#### PR Dependency Tree
* **PR #15649** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary
* **New Features**
* Admin settings show configuration sources and secret status, conceal
secret values, and allow database-level overrides to be cleared.
* Self-hosted deployments can automatically upgrade existing
configuration files.
* **Improvements**
* Configuration changes apply without restarting the server, and storage
settings reload automatically.
* Uploads support runtime-managed proxy settings and signed upload
tokens.
* Incomplete managed Copilot profiles are disabled during migration.
* Saving an AI response as a document more reliably targets the matching
editor.
* **Documentation**
* The CLI clarifies that imported configuration changes take effect
after the next server start.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
Closes#13954
The "Turn into" menu was missing the Callout option. Users had no way to
convert an existing paragraph/list/code block into a Callout directly
from the slash menu or context toolbar.
## Root Cause
`textConversionConfigs` in `rich-text/src/conversion.ts` had no entry
for `affine:callout`, so the option never appeared in the menu.
Additionally, Callout is a **hub block** — its text lives in a child
paragraph, not in its own `text` prop. This means the generic
`transformModel` path would silently fail, requiring a dedicated
conversion handler.
## Changes
- `blocksuite/affine/rich-text/src/conversion.ts` — add callout entry to
`textConversionConfigs`
- `blocksuite/affine/blocks/note/src/commands/block-type.ts` — add
`transformToCallout` command that:
1. Creates a new `affine:callout` block at the original position
2. Moves the original text into a child `affine:paragraph` inside the
callout
3. Deletes the original block
## Before / After
| Before | After |
|--------|-------|
| "Turn into" menu had no Callout option | Callout appears in "Turn
into" menu |
| Selecting any block → Turn into showed: Heading, Text, Quote, Divider…
| Now also shows: **Callout** |
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Convert selected paragraphs, lists, and code blocks into callouts
while preserving text and nested content.
* Added callout recognition and icon display in rich-text conversion.
* Conversion results now distinguish between selected blocks and text.
* **Bug Fixes**
* Prevented invalid, nested, or incompatible callout conversions.
* The conversion menu now hides Callout when unavailable.
* Preserved original blocks when conversion fails.
* Improved undo and redo behavior for callout conversions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
fix#15599
#### PR Dependency Tree
* **PR #15623** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Corrected the Control+Y redo shortcut so it only activates on Windows
and Linux, preventing unintended behavior on other platforms.
* **Tests**
* Updated cross-platform keyboard tests to explicitly verify undo and
redo behavior in a Linux browser environment.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
- Search language IDs, display labels, and aliases case-insensitively,
preserving prefix matching and the existing result order.
- Ignore pending grammar-load results when the selected language has
changed, preventing highlighting from returning after switching to Plain
Text.
Related to #15492: display-label matching will also make “Plain Text”
searchable by its full name, while the highlighting fix prevents pending
language loads from restoring highlighting after switching to Plain
Text.
## Validation
Code-block E2E suite (7 passed), scoped TypeScript checks, lint, and
formatting checks passed. Both focused regression tests fail on
unmodified `canary` and pass with the fixes.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Code block language search now matches display names, IDs, aliases,
and labels without regard to letter case.
- Search results prioritize matches at the beginning of language names
and aliases over label-only matches.
- **Bug Fixes**
- Prevented outdated syntax highlighting from appearing after a code
block language is changed or cleared while loading.
- Prevented duplicate language-loading requests during concurrent
highlighting updates.
<!-- 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>
**Problem:** When a language was selected in a code block's language
dropdown, there was no way to reset it back to "Plain Text" (no syntax
highlighting). The dropdown only contained shiki languages, and the null
value representing Plain Text had no corresponding selectable option.
**Solution:** Added a "Plain Text" entry as the first item in the
language selector dropdown. This entry:
- Maps to language: null when selected
- Shows a checkmark when Plain Text is active
- Persists in localStorage alongside recently used languages
- Is searchable via aliases ("plain", "text", "none")
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added Plain Text as a selectable code block language.
* Plain Text is available in newly generated and previously saved
language lists.
* Code blocks correctly show Plain Text when no language is selected.
* Recognizes common names including “plain,” “text,” “plaintext,” “txt,”
and “none.”
* **Tests**
* Added coverage for switching between Rust and Plain Text.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
The changes below are prepared locally and have not been committed or
pushed.
- Save original URLs, user titles, selected text, images and PDFs
through a versioned, file-backed Share Inbox. Stable document/attempt
IDs, serialized imports and committed receipts make retries preserve
user edits and recover native completion.
- Keep rich previews transient. Share previews request transcript
excerpts, clip optional display fields and bound response/image
downloads. Saving does not wait for preview requests or persist provider
metadata, transcript snapshots or dedicated preview blobs.
- Restore the minimal App Group workspace-mode snapshot and
`official`/`deferred` route. Official routes remain fixed for the
pending share; deferred self-hosted previews use the selected server
without a provider fallback.
- Let bookmark and YouTube details read the current workspace's Link
Preview API by URL. Full transcripts, chapters and timestamps load on
expansion without document writes. Reuse editor styles and the existing
portal for canvas details; isolate endpoint/base/transcript caches and
keep transcript results out of persistent cache.
## Validation
- Focused frontend suites: 128 tests passed; the 43 preview/details
cases also passed after the final portal change.
- `ShareInboxSafetyTests`: 57 tests passed on iOS 26.5 simulator.
- `yarn typecheck` and full `yarn lint` passed.
- iOS web bundle, Capacitor asset copy, and signed simulator App build
with embedded ShareExtension passed.
- Browser component checks: desktop, narrow viewport, light/dark themes,
full transcript scrolling, canvas portal positioning and Escape
dismissal.
- Simulator Safari share: rich preview, cancellation, native-to-app
handoff, workspace selection and successful save. The pending manifest
contained original content and routing only, and was removed after
import.
Physical-device and network-capture matrices remain manual. The
simulator YouTube iframe displayed player error 153; this is separate
from the successful preview/import checks and video playback is not
claimed as verified.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* iOS sharing now supports PDF files alongside images, with previews and
attachment validation.
* Share imports offer improved workspace selection, offline handling,
retry recovery, and clearer error messages.
* Link previews can display expandable metadata and transcript details
for bookmarks and YouTube embeds.
* Share inbox entries now identify unsupported versions and provide
safer attachment resolution.
* **Bug Fixes**
* Improved cancellation, cleanup, and stale-request handling during
sharing and importing.
* Enhanced link-preview validation and protection against oversized or
invalid responses.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
fix#15574
#### PR Dependency Tree
* **PR #15575** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## New Features
* Added source-aware blob handling for current documents and page
history.
* Added document lifecycle support for trashing, restoring, and
permanently deleting documents.
* Copilot attachments now upload directly to session attachment
endpoints.
## Bug Fixes
* Document actions now complete before confirmations, notifications, and
navigation proceed.
* Improved cancellation, upload fallback, size-limit handling, and cloud
synchronization reliability.
* Invite-link expiration now remains reliable for long durations.
* Improved synchronization for document permissions and reserved
documents.
## Changes
* Blob management now displays attachment icons instead of image
previews.
* Cloud synchronization now uses a unified batch protocol.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Description
Closes#13579.
On readonly shared pages, selecting text under a heading persisted as
collapsed caused reactive selection handling to restore the persisted
collapsed value over the viewer-local expanded state. This closed the
heading again and prevented selecting or copying its revealed content.
This change:
- separates persisted collapsed-state synchronization from selection
cleanup;
- makes the readonly-local collapsed state reactive for both BlockSuite
effects and Lit rendering;
- preserves selection and copying while a readonly heading is locally
expanded;
- still clears hidden text selection when the heading is collapsed
again;
- adds a Playwright regression covering collapse → readonly → expand →
drag-select → copy → re-collapse.
## 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
## Testing
- Focused Chromium regression: 1 passed
- Adjacent readonly paragraph scenarios: 3 passed
- Targeted `oxfmt --check`: passed
- Targeted `oxlint --deny-warnings`: passed
- `git diff --check`: passed
`yarn typecheck` could not be confirmed in this checkout because
required generated workspace declaration outputs are missing.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved collapsed heading behavior in read-only mode.
* Preserved local heading expansion and text selection when copying
content and collapsing the heading.
* Ensured local expansion state resets correctly when switching out of
and back into read-only mode.
* **Tests**
* Added coverage for read-only heading expansion, keyboard copying,
clipboard access, mode switching, and text selection.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<img width="284" height="132" alt="image"
src="https://github.com/user-attachments/assets/a11f1919-ac91-4f87-b03d-4fab6e8cba7e"
/>
## Description
Add a select-all action next to the Trash page title after document
multi-selection starts.
- Select every unique document ID from the explorer groups, including
items outside the rendered viewport.
- Change the action to Clear selection when every Trash document is
selected.
- Reuse the existing Trash bulk-operation permissions without
introducing artificial grouping.
## Testing
- Trash page Playwright E2E: 2 passed
- Targeted TypeScript project build
- lint-staged
- lint:ox
- oxfmt --check
- git diff --check
## 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
- [ ] Full yarn lint and yarn typecheck pass locally
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added a select-all and clear-selection control to the Trash view when
multiple documents can be managed.
- Select-all actions now update the document selection toolbar.
- **Bug Fixes**
- Improved Trash view controls for users with administrator or owner
permissions.
- **Tests**
- Added end-to-end coverage for selecting, selecting all, and clearing
multiple trashed documents.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Redesigned mobile Settings with localized sections, promotional
content, support actions, subscription access, and improved account
controls.
- Added sign-in prompts for signed-out users and clearer device-session
handling.
- Added a guided account-deletion flow with email confirmation and
completion messaging.
- Added App Store, download, team invitation, rating, and external
support links.
- **Bug Fixes**
- Improved interactive row behavior, keyboard accessibility, navigation,
and subscription availability.
- Prevented account deletion for unresolved team owners.
- **Style**
- Refreshed mobile settings, subscription, profile, and promotional card
layouts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
#### PR Dependency Tree
* **PR #15464** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Replaced the project’s formatting and linting workflow with Oxfmt and
Oxlint.
* Added shared formatting and linting configuration, editor integration,
and updated automated checks.
* Updated generated files, scripts, and lint guidance to use the new
tooling.
* **Style**
* Reformatted templates, source code, examples, and configuration files
for consistent readability.
* No user-facing functionality or rendering behavior changed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
fix#14287fix#15359fix#15424
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Redesigned workspace AI provider settings with connection testing,
storage options, model selection, capability management, ordering, and
custom endpoints.
* AI chat model choices now adapt to the selected workspace and
conversation route.
* Added support for image-based AI requests.
* **Bug Fixes**
* Improved handling of unavailable or outdated model selections.
* App configuration updates now reject overlapping paths and load
deterministically.
* **Tests**
* Expanded coverage for provider models, AI chat scoping, image
requests, and configuration validation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15426** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added workspace BYOK profiles with provider/model catalogs, capability
validation, connection probing, credential rotation, reordering, and
secure local leases.
* Added Copilot route options, selectable targets, managed tiers,
explicit profile/model overrides, and improved streaming with tool
callbacks and abort support.
* Added Copilot availability controls to prevent access when the feature
is disabled.
* **Changes**
* Simplified Copilot configuration and removed legacy provider-specific
settings.
* Removed obsolete model, token-cost, transcript strategy, and provider
metadata fields from public responses.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Add a persistent "Show line numbers in code blocks" setting to Editor
Settings that controls line-number visibility across all code blocks.
Individual blocks can still override the global default via the
per-block More menu toggle.
## Changes
- **schema.ts** - add `codeBlockLineNumbers: z.boolean().default(true)`
to `AffineEditorSettingSchema`
- **code-block.ts** - read `codeBlockLineNumbers` from
`EditorSettingProvider` reactively via a stable `signal(true)` updated
by `effect()` in `connectedCallback`; expose `showLineNumbers` getter as
single source of truth used by both `renderBlock()` and the toolbar
- **config.ts** - toolbar line-number toggle reads
`blockComponent.showLineNumbers` (resolved state) instead of
`model.props.lineNumber ?? true`
- **general.tsx** - add `DefaultCodeBlockLineNumberSettings` Switch row
in editor general settings
- **en.json + i18n.gen.ts** - add i18n strings for the new setting
- **line-numbers.spec.ts** - add 7 e2e tests covering default
visibility, global toggle on/off, per-block override in both directions,
multi-block, newly created blocks, and persistence across reload
## Behaviour
| State | Result |
|---|---|
| Global ON (default), no per-block override | Line numbers shown |
| Global OFF, no per-block override | Line numbers hidden |
| Global OFF, per-block explicitly ON | Line numbers shown |
| Global ON, per-block explicitly OFF | Line numbers hidden |
| Mobile (feature flag) | Always hidden regardless of settings |
## Notes
- Existing per-block toggle behaviour is fully preserved and unchanged
- Default is `true` so no regression for existing users
- The blocksuite-side reads `codeBlockLineNumbers` via a type cast (`as
Record<string, unknown>`) because the key lives in the AFFiNE-level
`EditorSettingSchema`, not in blocksuite's own `GeneralSettingSchema` -
this is an intentional architectural boundary
Closes#14965
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added a global setting to show or hide line numbers in code blocks by
default.
* Added localized title and description text for the new setting.
* Preserved per-code-block overrides through the block’s More menu.
* **Bug Fixes**
* Line-number visibility now stays consistent across existing and newly
created code blocks, including after reloads.
* **Tests**
* Added end-to-end coverage for defaults, overrides, persistence, and
multiple code blocks.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Improved automated validation for AI file embedding readiness.
* Expanded coverage for paragraph behavior when converting between list
types and deleting content.
* Strengthened checks for block structure and formatting outcomes to
help prevent regressions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15317** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Virtualized mobile navigation with shell navigation and interactive
swipe menus; coordinated mobile back handling with interactive
phases/state restoration.
* Added shared auth request proxy and message-port based token handling
across mobile and worker flows.
* **Bug Fixes**
* Hydrated remote worker error stacks for calls and observable errors.
* Improved SQLite FTS/indexer and nbstore optional text handling;
refined docs-search ref parsing and notification loading/retry.
* **Refactor / UX**
* Modal focus-preservation and pointer behavior updates; improved mobile
menu controls and back gesture plugins.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15280** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved workspace document discovery so documents in trashed pages
are correctly included when loading workspace content.
* Fixed dragging collections into Favorites, including reordering
collections within Favorites.
* **Tests**
* Added coverage for document projection behavior and collection
drag-and-drop interactions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
**Issue**
Strikethrough on a link doesn't render. The toolbar button highlights
but no line
appears (#15106).
**Solution**
affine-link hardcoded text-decoration: none in the override it passes to
affineTextStyles, which clobbered the decoration computed from
strike/underline.
Removing it fixes the render; plain links still show no underline
because
affineTextStyles returns none by default.
**Result**
Strikethrough and underline render on links again. Added an e2e test: a
plain link
stays undecorated, a struck link renders line-through, red before the
fix and green
after.
fix#15106
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed link text-decoration styling to properly support strikethrough
and other text formatting when applied to links.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Sign-in flows now reliably propagate richer authentication results
(user data and session type), improving persistence and reducing
intermittent sign-in issues.
* Native token handling gains a fallback for environments without
encrypted storage, improving session reliability.
* **New Features**
* User-visible warning when sign-in is session-only because encrypted
storage is unavailable.
* **Chores**
* Tooling ignore patterns updated to exclude .codex.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15059** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Configurable minimum account age before new accounts can invite
members or create share links (default: 24 hours).
* Sign-in now returns and caches user info for improved session
handling.
* **Bug Fixes**
* Queue handling accepts and resolves job IDs with special characters.
* Improved clipboard/rich-text caret handling and nested-list paste
reliability.
* Calendar tests use dynamic current-month dates.
* AI search returns explicit "No matching documents" when none found.
* Auth session responses are explicitly non-cacheable.
* **Chores**
* Dependency and toolchain bumps; admin UI config/schema exposes the new
account-age setting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #15044** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Stop sending notifications to disabled users; skip member invites when
workspace names contain URLs/domains
* Improve mail retry handling (per-recipient exhaustion, expiry, and
cache cleanup)
* Make many email headers/lead lines more generic and consistent
* Fail-safe workspace content parsing to avoid crashes
* **New Features**
* 24-hour signup protection for sharing, invites, and invite-link
creation
* Job-queue: remove jobs by payload predicate
* **Tests**
* Expanded tests for mail jobs, SMTP hostname handling, payment
checkout, job-queue removal, and abuse-detection utilities
* Updated test fixtures to set createdAt timestamps for new users
* **Chores**
* Added required name input for test-email mutation
* Database flush retry with deadlock detection/backoff
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/toeverything/AFFiNE/pull/15044?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->