Commit Graph
11598 Commits
Author SHA1 Message Date
DarkSky 31df4f3917 fix(test-db-harness): converge concurrent shared container starts and require owners for removal
- ensure_shared: a caller that wins the start returns its container as
  soon as its port is published; a caller that loses the race for the
  name waits with short backoff until the winner's container runs. The
  10 s window starts after the caller's own first lookup or start, so
  pulling the image is not counted, and a last lookup runs before giving
  up. A stopped leftover of ours is removed without force and started
  again; a paused or unknown-state shared container is kept and
  reported, since it may hold other runs' databases.
- remove_owned takes a required, non-empty owner run and removes only
  containers labeled affine.test.shared=false, so the shared container
  and containers without the shared label are always refused. The
  owner-less Container::remove is gone; drop passes this run's id.
- Tests: eight callers cold-starting one fresh shared container converge
  on one container and port; a paused shared container is reported and
  kept; every container state maps to its action; empty owners and
  containers missing the shared label are refused.
2026-11-23 13:58:04 +09:00
DarkSky 4a08e49642 feat(ci): add crates/ test harness workspace, shared frame audit and fast CI lanes
- crates/: standalone server-side Rust workspace (resolver 3, edition
  2024, own lock and toolchain 1.98.1)
  - frame-audit: the one serde-only FrameSnapshot schema and audit
    engine; native-playground's ui depends on it by path and re-exports
    it. The six structural rules keep their ids; evidence rules (first-
    line baseline, footer reverse wrap, divider placement, static cursor,
    overlay z-order via renderer hit-test probes, text truncation) report
    missing evidence instead of skipping, and concentric radii reject
    negative and step-limited radii. Old snapshots still load.
  - test-db-harness / affine-test-env: a marker-checked PostgreSQL test
    cluster (explicit URL or a reused machine-wide pgvector container),
    read-only migration-digest templates with Prisma bookkeeping,
    template clones under owner-token leases, and an orphan reaper. Clone,
    heartbeat, release and reap serialize per database on an advisory
    lock and re-check under it; every maintenance connection re-checks
    the cluster marker. Private Redis or a prefix-isolated URL. Images
    pinned to multi-arch digests; only private harness containers of the
    expected run, by full id, can be removed. run.json reports.
- scripts/ci/check-l0-tier-a.mjs: dependency-free gates for crates/
  layering and hygiene, a waitForTimeout/.skip ratchet with per-file
  ceilings, workflow references, pinned test images and .gitignore.
- native-playground.yml: resolve the change base to a commit SHA, call
  np-web-fast.yml (lint, typecheck, Node-only Vitest projects without
  Electron, browser or Rust-binary dependencies) when web sources
  change, and always run L0, the frozen server contract checks, crates/
  and the parity harness (fmt, clippy, tests against real services).
- Web lint and format: the frozen contract artifacts and
  blocksuite/native-playground (checked by its own lane) are ignored via
  .prettierignore, from which .oxlintrc.json is generated; the server
  contract and parity harness scripts are formatted and lint-clean.
- tools/parity-harness/rustfmt.toml keeps the default style there.
- Remove the copilot cron workflows and the skipped migration spec;
  ignore test-results/ and .artifacts/.
2026-11-23 13:58:04 +09:00
DarkSky 616597ec28 test: freeze server oracle contracts and add parity harness 2026-11-23 13:58:04 +09:00
DarkSky 033803f1a4 refactor(native-playground): modularize large modules and tighten render hot paths
Split oversized modules across crates/doc and crates/playground into cohesive submodules under 800 non-test lines, enable workspace-wide Rust structure checks in scripts/check-invariants.sh, add solid-quad fast path in WGSL and Metal shaders, remove redundant page viewport background overdraw, and cache theme token lookups.
2026-11-23 13:58:04 +09:00
DarkSky ebc5eb6fb2 feat(native-playground): add interactive edgeless authoring and polish 2026-11-23 13:58:04 +09:00
DarkSky 5565057fb6 feat(playground): read and render typed whiteboard surfaces 2026-11-23 13:58:04 +09:00
DarkSky ba55dd7058 feat(native-playground): add GPU 2D transforms, procedural dot-grid, and Edgeless Note/Frame/Text canvas
Add GPU paint transform and local content-mask stacks across Metal, wgpu, and WebGL2 shaders, quarter-octave glyph zoom bucketing, and procedural single-draw-call dot-grid backgrounds in crates/ui (plus TextSystem::line_gap).

Implement the Edgeless spatial canvas (camera, dot-grid, Surface-parented Frame and EdgelessText, Note scale/collapse/style parity, cached per-note BlockFlow with zero pan/zoom relayouts, and zoom bar), register edgeless_1k_pan_zoom_blocks_relayout in perf/compare-n3.mjs, and add cross-backend headless regression tests and Chromium WebGL2 smoke assertions.
2026-11-23 13:58:04 +09:00
DarkSky 5b82831fd8 feat(native-playground): add slash menu, formatting toolbar, drag handle, and interactive block controls
Page mode gains its floating controls on top of the page editor: a slash menu typed in the document, a formatting toolbar over the text selection, a gutter drag handle with a drop indicator, and clickable to-do boxes, toggle and heading chevrons and a code copy button. The editor stays the single owner of the selection, the caret and text edits; every overlay edit goes through its `PageDocSession`, is one undo step, and reaches a live room like any other editor commit.

- crates/playground `overlays.rs` (new): `Overlays` takes an `OverlayScene` (page snapshot, world-space layout, window geometry) with an `OverlayEvent` or a key and answers with `OverlayEffects` (document edits, clipboard text, a timer to start). The `PlaygroundView` glue at the end of the file feeds it input and carries the effects out; `dispatch_overlay` is the entry for pointer listeners, hosts and tests. The overlays read the editor's selection as a `SelectionFormat` (its box, the marks every selected unit carries, the shared alignment) and paint no caret or selection of their own.
- Pointer and keys: a press on the page dismisses the slash menu, the link field and a block drag and then goes to the editor; moves and the release are handled at the window root, so a drag continues outside the page, and a pointer on an open popover does not change the hovered block under it. `editor_key_down` offers every key to the overlays first: an open link field takes every key but the ones that type text, the slash menu takes `Up`, `Down`, `Tab`, `Shift+Tab`, `Enter` and `Escape`, and the rest is the editor's.
- Slash menu: typing `/` at a caret in paragraph or list text, outside inline code, opens the menu on that character, remembered as a relative position, so text a peer inserts before it moves the menu along. The text between the `/` and the caret is both document text and the filter; the menu closes when the caret leaves that text, whitespace follows the `/`, or the character at the position is no longer that `/` (deleted, or deleted and typed again by a peer). Running an item is one `structural_edit` after BlockSuite's `updateBlockType` and `appendDivider`: it removes the typed command, then a paragraph type, a list type or code converts the block with the text it has left (in place within a flavour, as a fresh block across flavours), and a divider goes right below the block, followed by an empty paragraph when the block was the last of its parent. One undo restores the typed command. `Tab` and `Shift+Tab` step through the items, and `Enter` without a match closes the menu without splitting the block. `OpenSlashMenu` keeps a menu with a query row of its own for hosts. Items follow BlockSuite's order in two groups with all six headings listed; each icon sits in a bordered 28 px box; the menu is 8 px round with 4 px padding and 4 px rows, without a border, scrolls under a cap with a thumb and keeps a `No results` row.
- Formatting toolbar: bold, italic, underline, strikethrough, inline code, a link field with `Apply` / `Remove`, and left / center / right alignment above a finished, non-empty selection of paragraph and list text, in one block or across blocks; a selection touching the title or code gets none. It waits while the button of a plain press is held and opens at once on a double or triple click. Marks use the editor's `format_mark`; a link and an alignment run in one `structural_edit`, the alignment on every selected paragraph and list block, empty ones included, and a block that sets no alignment reads as its nearest aligned ancestor's.
- Link field: `LinkBar` is a one-line text input with its own text, selection and input-method composition. While it is open it is the view's text input: every `EntityInputHandler` call goes to it, the document's text, selection and composition stay untouched until `Apply`, and the platform is told whenever it opens, closes or changes. Caret keys, deletion, select-all, copy and cut edit the field, `Escape` abandons a composition before it closes the field, and a keyboard paste reads the clipboard where the platform can; in a browser the key keeps its default action so the `paste` event that follows reaches the field.
- Drag handle: shown for the hovered or dragged block, 24 px left of it and at least 4 px from the window edge, one step further out beside a heading's collapse chevron. It draws BlockSuite's grabber, a 4 × 12 px bar that turns into two columns of dots on a pill under the pointer or in a drag. A drag picks the nearest slot among the block's siblings, looked up in one pass over the layout, and drops through `reparent_block`, so numbered runs are renumbered.
- Block controls: 24 px targets toggle `prop:checked` and `prop:collapsed` as isolated undo steps; the chevron turns over 150 ms. A hovered code block offers a copy button that reads `Copied` for 1.5 s on the scheduler clock, and a sideways scroll moves the lines of an unwrapped code block instead of the page; the caret, the selection, the bounds given to the input method, collaborators' carets and selections, and pointer hit-testing follow that scroll and stay inside the code area.
- Positioner and motion: the pure, screen-space `place_popover` places a popover `Above` (centered) or `BelowStart` its anchor, flips it at the top bar and the window bottom, and clamps it inside the edge margins on the pixel grid. Popovers fade with an ease-out cubic `EaseOut` evaluated at scheduler time; a fully transparent popover is not mounted, and one fading out carries no listeners.
- crates/playground `editor_session.rs`: the first selection box records `page.selection`; typing `/` reports its position to the overlays, and a remote update moves the typed slash menu with its character; the input handler answers for the link field while that is open; a dropped selection publishes an empty `<pageId>:native` awareness entry, so peers stop drawing the caret and keep the name and color.
- crates/playground `block_flow.rs`: `page_elements` takes a `PagePaint` (a chevron in flight, a code block's scroll); `ScrolledCode` maps carets and selection boxes onto the scrolled lines of a code block; `BlockBody` exposes its chevron and `code_scroll` range, and `PageViewport` maps world rectangles into the viewport element.
- crates/playground `theme.rs`: `PlaygroundTheme::shadows` parses the `--affine-*-shadow` tokens, and `IconPaint::paint_rotated` turns an icon around its center.
- crates/doc: `PageDocSession::correct_numbered_order_from` is public, for a numbered item inserted by a command; `bs_doc_driver` learns the `reorder`, `align` and `link` structural edits.
- `bs-harness`: `render --state <name>` renders one overlay state of the showcase, `audit-states` audits every state in both themes at 1280 px and 320 px, `fps-check` also replays the slash menu and the formatting toolbar opening and closing at 60, 120, 24 and 7 fps, and `record-demo <dir>` writes the audited frames of a 60 fps walk through typing, composition, the slash menu, the toolbar, the block controls and undo.
- `scripts/web-smoke.mjs` opens the link field over a selection in Chromium and checks composition, the paste key and the `paste` event against the hidden textarea, and that the paragraph is untouched afterwards.
- `perf/accepted.json` acknowledges the larger Web bundle and headless binary.
- Tests: popover placement and flipping, easing end states, slash filtering and grouping, typed commands on empty and non-empty blocks with one-step undo, a typed `/` followed through a peer's concurrent edits, slash menu keys, mouse selection into toolbar marks, links and alignment across blocks, the link field as a text input with composition, block controls, code scrolling with local and remote carets, drag reordering, popover hover shielding, narrow windows, overlay edits and a cleared selection reaching the peers of a live room, and the JS room-sync suite observing a native reorder, alignment and link.
2026-11-23 13:58:04 +09:00
DarkSky 222d6d6de0 Add collaborative rich-text editing to the native page 2026-11-23 13:58:04 +09:00
DarkSky bdad4ecff5 feat(native-playground): add BlockFlow page renderer, light/dark themes, and live room sync
Renders any page document in Page mode from the same y-octo CRDT state the JavaScript editor edits, in both themes, on macOS, Linux headless and the Web.

- crates/doc: typed read snapshot (`read.rs`, `PageDocSession::read_page_snapshot`) returning an ordered `PageSnapshot` tree for every supported block flavour with the normalized JSON of each `prop:*`, numbered-list run indices, `prop:textAlign`, the note display modes by their wire values (`both` / `doc` / `edgeless`), detached blocks and lossless `Unknown` blocks; `add_raw_block` for flavours without a typed spec; the room hub now forwards the equal-clock live-to-`null` awareness removal once the last owning connection releases a client; `RoomAwareness::reannounce_local_payload` lands a reconnecting client above the tombstone the relay wrote for it.
- crates/playground `theme.rs`: `PlaygroundTheme::{Light, Dark}` resolved from the generated `tokens.rs` / `icons.rs` (included, never copied), `IBM Plex Mono` registered next to `Inter`, and a top bar theme toggle.
- crates/playground `block_flow.rs`: world-space `BlockFlow` layout mapped to the screen by `PageViewport`, with per-block reuse across passes. Title, paragraphs and headings, quotes, nested bulleted / numbered / to-do / toggle lists, dividers, code, images, bookmarks and unknown-block cards follow BlockSuite's page metrics (collapsing margins, first-line list prefixes, heading letter spacing, 944px container narrowing below 640px). Text alignment is inherited by nested children, a collapsed heading hides its own children and the siblings under it, and remote carets, selections, name tags and presence badges are drawn from `selectionV2` entries of the shown page only.
- crates/playground `rich_text.rs`: `RichParagraph` is the one rich-text engine. `BlockFlow` lays out and paints paragraph and list text with it (`LaidOutRichParagraph::paint_at`) and reads remote carets and selections from its geometry. It now resolves `color` and `background` marks through the theme, follows CSS `bolder`, paints the generated `LinkedPageIcon` for references, wraps a reference as one inline object so the words before it stay on their line, aligns lines left, center or right together with their carets and decorations, and takes its code box metrics from constants a test keeps equal to `tokens/style-oracle.json` instead of embedding the oracle.
- crates/playground `room_client.rs`: sans-I/O `RoomProtocol` for the relay's binary room protocol with `tokio-tungstenite` (`--room` / `--relay`) and browser `WebSocket` (`?room=&ws=`) transports, blob fetch (a bare HTTP/1.1 `GET` over TCP natively, `fetch` on the Web) and reconnect with backoff. Native transports reject `wss://` / `https://` relays up front, and a pending connect times out and never holds up blob fetches or shutdown.
- Images decode PNG, JPEG, WebP, GIF and BMP once; bytes that are no image stay unavailable. A blob the page references before its upload finished is fetched again on the scheduler clock with a backoff capped at 4 s for as long as the page references it, showing `Loading image`, then `Image unavailable`, then the image.
- Deterministic `seed_showcase_doc` workspace when no room is given; `bs-harness render` gains `--theme light|dark` and `--mode page|edgeless`.
- `scripts/web-smoke.mjs` gains `--query` and `--min-title-ink` so a page that arrives over a live room is captured after it rendered.
- `perf/accepted.json` acknowledges the larger Web bundle and headless binary; the comparator's gate self-test no longer depends on the repository's acceptance file.
- Tests: token and block metrics against `tokens/style-oracle.json` in both themes on constants and rendered frames, showcase and edge-content audits across viewports down to 320px, scroll mapping, incremental relayout, text alignment with an inherited child and a remote caret, selection key matching, and live in-process relay tests covering edits, blobs, awareness, a blob uploaded after its image block, and presence after a reconnect.
- @blocksuite/playground: `reusePartialSeedDoc` keeps `doc.load(initFn)` initializers working when a promoted seed winner fills a partially seeded doc (a bare `load()` leaves the initializer for the `load(initFn)` that follows), and `initRoomDocWithSeed` rejects a winner whose seed leaves no `affine:page` root.
2026-11-23 13:58:04 +09:00
DarkSky 25a35c83b8 feat(native-playground): lay out and paint rich paragraphs 2026-11-23 13:58:03 +09:00
DarkSky 4e26a040ee feat(native-playground): add y-octo doc engine, binary room sync, and unified workspace
Unifies the 3-crate native-playground workspace (ui, doc, playground) with:
- crates/doc (#![forbid(unsafe_code)], y-octo 0.3.0, 53-bit JS-safe client IDs, full block & surface element schemas with 0-writeback defaults, blocks-scoped undo/redo with SelectionSnapshot, deterministic RoomAwareness with BlockSuite TextSelectionState, Sans-I/O binary room framing, Axum room hub / bs-relay with WS-only seed-claim FIFO waiter promotion & equal-clock awareness refcount hardening & permissive blob CORS, and bs_doc_driver).
- @blocksuite/sync DocPeer finishPull listener ordering (preserving 0-writeback while capturing mid-handshake edits) and pendingIncomingUpdates subdoc buffer.
- @blocksuite/playground RoomWebSocketClient (+2 awareness clock re-announce on reconnect, disconnect removal before detaching listener, socket-only detached offline fallback, in-place Proxy reuse for partial-seed recovery without destroying shared subdocs, winner flush & non-winner affine:page root wait, ?ws= relay origin forwarding to MockServerBlobSource) + live Rust-JS E2E convergence suite.
- Real doc_1k_edits_ms and room_sync_1k_ops_ms benchmarks in bs-harness bench.
- Updated check-invariants.sh (doc GUI isolation + forbid(unsafe_code)), AGENTS.md active invariants, and native-playground CI workflow (wasm32 doc check, macOS doc tests, and parallel js-room-coop job).
2026-11-23 13:58:03 +09:00
DarkSky 74bcafa70f feat(native-playground): add N-3 perf guardrail, theme/style oracle, and CI self-tests 2026-11-23 13:58:03 +09:00
DarkSky dbe1e2f2c7 feat(native-playground): headless GPUI harness, variable Inter weights, web bundle, and CI gates
- Prune undeclared cfg gates in crates/ui and enforce unexpected_cfgs = deny
- Restore lean HeadlessPlatform driving real PlaygroundView via Window::draw()
  and Element::paint() FrameSnapshot capture (removing shadow scene builder)
- Restore PlatformWindow::draw invocation in Window::present for desktop and web
- Support OpenType variable-font 'wght' axis across CosmicTextSystem (Linux and
  WebAssembly) and AppleTextSystem (macOS CoreText) with Bold vs Regular advance
  width and rasterized ink unit test
- Bundle tracked Inter variable font in crates/playground across macOS, Linux,
  and WebAssembly; add minimal Web HTML harness and headless Chromium smoke test
- Unify animation time onto TestScheduler / BackgroundExecutor::now() and verify
  60/120/24/7 fps PlaygroundView pill transitions with identical terminal snapshots
- Add warm 30-frame steady-state bench with schema-aligned ci_wall_ms object,
  optional unmeasured v1 metric fields, and strict 40-hex commit resolution
- Commit Cargo.lock, enforce --locked in CI, harden check-invariants.sh link-flag
  check, align CI wasm-bindgen CLI with Cargo.lock, and keep AGENTS.md exact
2026-11-23 13:58:03 +09:00
Jason 8e549b05d2 fix(server): detect svg root behind xml declaration (#15889)
## Description

Refs #15871

`get_mime` asks `infer` first, and `infer` returns `text/xml` for
anything that starts with `<?xml`. An SVG exported from draw.io,
Inkscape or Illustrator usually carries that declaration, so it was
labelled `text/xml`, while the same file without the declaration came
out as `image/svg+xml`.

`get_mime` now looks at the root element before calling `infer`. It
walks the first 64 KiB with `xmlparser` (already in the lock file
through `instant-xml`, now a direct dependency), skipping BOM,
whitespace, comments, processing instructions and DOCTYPE with an
internal subset, and stops at the first element name. A root of `svg` or
`prefix:svg` gives `image/svg+xml`. No DTD is fetched and no entity is
expanded.

`file-format` matches `<svg` as a bare prefix or substring, so
`<svg-image/>` or `<svgFoo>` used to come out as SVG. When the scan
finds a root with a different name, the result is now `text/xml`. When
the scan is inconclusive (truncated root tag, root beyond 64 KiB,
invalid UTF-8), the old result is kept.

Scope, to be precise about what this changes on canary: the normal image
upload path (`setBlob`, presigned and multipart) stores the MIME type
the client sends and never sniffs, so a correctly typed upload does not
hit this. What does hit it is every path that relies on server-side
detection: object storage writes without a content type
(`complete_for_body`), comment attachments (`getMime`), and the
`sniffMime` callers (copilot attachments, workspace files, transcripts,
conversation inbox, avatars). Blobs already stored as `text/xml` are not
migrated.

Security: `applyAttachHeaders` already treats both `text/xml` and
`image/svg+xml` as dangerous inline types (forced `attachment`
disposition plus `nosniff`), so download handling does not change.
Avatars and inbox images still go through `processImage`, which rejects
SVG just as before.

Tests:

- `cargo test -p affine_server_native file_type::tests`: declaration,
BOM, comments, DOCTYPE with entities, `xml-stylesheet` PI, `svg:svg`, a
long Illustrator-style header; non-SVG roots, `<svg>` inside comments,
entities and children, `<SVG>`, `<svg-image>`; truncated and empty
input; the 64 KiB bound.
- `cargo test -p affine_server_native
runtime::object_storage::fs::tests`: put without a content type, then
HEAD/GET, for bare SVG, declaration SVG and plain XML; explicit
`image/svg+xml` and `text/xml` are kept as given.
- `cargo clippy -p affine_server_native --lib` is clean.

## 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/)
- [x] Tests are added or updated where it makes sense
- [x] `yarn lint` and `yarn typecheck` pass locally (Rust-only change;
`cargo clippy` and `cargo fmt --check` on the touched files)
- [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.
v2026.11.23-canary.455
2026-11-23 12:01:46 +08:00
DarkSky 12df368ad6 fix(server): add forward compatibility for 0.27.5 cutover 2026-11-23 10:44:42 +08:00
DarkSky 577ae12b51 feat(mobile): bump xcode deps (#15885)
#### PR Dependency Tree


* **PR #15885** 👈

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 handling of app links and shared content when the iOS app
opens or returns to the foreground.
* iOS simulator tests now install and launch the app before running, and
verify that it stays open.
* **Chores**
* Updated the iOS build and release process to use Xcode 27 and require
an iOS SDK version of 27 or later.
* Adjusted release builds to preserve the required components for iOS
app packaging.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-22 22:30:44 +08:00
DarkSky 9e28d069bf fix(server): blob read guard (#15886)
fix #15867 

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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Workspace manifests now reference only the current avatar, including
when the workspace document is incomplete. Stale avatars and unrelated
image references are no longer treated as accessible through the
manifest.
* Generated images can be returned inline when a signed link is
unavailable, avoiding unnecessary failures in that case. Image results
and remotely fetched images are also stored consistently.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-22 22:17:24 +08:00
DarkSky 3d25727076 feat(core): improve sync stability (#15883)
#### PR Dependency Tree


* **PR #15883** 👈

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**
* Document creation can now recover incomplete registrations without
recreating document content.
* Document updates can detect revision conflicts, helping prevent
changes from overwriting newer edits.
* **Improvements**
* Document sync and update handling are improved across desktop,
Android, and iOS.
* Workspace metadata and legacy document pages are handled more
consistently during migration and recovery.
* Creator and editor details are better preserved when documents are
recovered or compacted.
* **Configuration**
  * Removed the experimental document-merge setting.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
v2026.11.22-canary.1003
2026-11-22 01:37:22 +08:00
Mohamed Hussein a2dbbec72b fix(editor): keep select all in the equation editor on Firefox (#15858)
Fixes #15643

## Problem

In Firefox, pressing Ctrl+A in the LaTeX editor popup (inline equation
or equation block) selects the formula for a moment, then the selection
disappears. After that, typing has no effect. Chromium works.

Two things go wrong on Firefox:

1. **The select-all is dropped.** Firefox places the native select-all
range on the inline root rather than on text nodes. The editor's range
sync (`RangeBinding._onNativeSelectionChanged`) removes ranges whose
endpoints aren't inside a `v-text`. Table and database cells already
handle `Mod+A` themselves with `inlineEditor.selectAll()`, but the popup
didn't.
2. **Input over a full selection goes to the end.** Even with a proper
selection, Firefox's `beforeinput` `getTargetRanges()` starts at the
inline root (for example `DIV[data-v-root]@2`, just before the
`v-line`). That point resolves to the end of the text.
`EventService._onBeforeInput` then lets the target range replace the
native one, so `a+b=c` + `x` became `a+b=cx` instead of `x`, and
Backspace did nothing.

## Fix

- `LatexEditorMenu` handles `Mod+A` with `inlineEditor.selectAll()` and
stops the event, the same way `table-cell.ts` and the database cell
renderers do.
- `EventService._onBeforeInput` uses the target range only when the
native selection is collapsed. A non-collapsed selection is exactly what
the input replaces. Target ranges are still used for collapsed
selections, e.g. word deletion and the embed/empty-line case above it.

## Testing

- New unit test in `event-beforeinput.unit.spec.ts`. It selects the
whole text and feeds a Firefox-shaped target range that starts at the
inline root.
- Without the `event.ts` change it fails with `expected 'a+b=cx' to be
'x'`, the same result as in Firefox.
  - With the change it passes.
- `yarn vitest run` in `blocksuite/framework/std`: 12 files, 102 tests
pass.
- `oxlint --deny-warnings` and `oxfmt --check` pass on the changed
files, and `tsc -b blocksuite/affine/inlines/latex/tsconfig.json`
passes.
- I couldn't run a patched build in Firefox. Instead I checked both
changes in Firefox and Chromium (Playwright, headless) on
app.affine.pro, using a guest doc and injecting equivalent handlers into
the page. With both changes, Ctrl+A in the inline equation editor keeps
`a+b=c` selected, typing `x` gives `x`, and Backspace clears it. Without
them, Firefox shows the bug described in the issue.


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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* Select-all now works in the LaTeX editor with the platform’s standard
keyboard shortcut.
* Fixed text replacement after selecting all, including cases where the
browser reports the selection from the start of the editor.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
v2026.11.21-canary.904
2026-11-20 18:23:36 +08:00
alkank 6ce486b2b8 fix(i18n): complete and correct Turkish translations (#15868)
## Description

Complete the Turkish catalog with all 288 entries missing from the
current English resources, covering AI tools, sync/storage warnings,
BYOK, MCP credentials, device sessions and server errors. Correct 55
existing translations, including the missing SSRF `{{reason}}`, reversed
frame-link wording, the omitted snapshot export action, and inconsistent
Edgeless/seat/token terminology. Preserve BlockSuite as a product name
and update Turkish completeness from 90 to 100.

### Validation

- All 2,622 English keys have Turkish translations; four existing legacy
keys are preserved.
- Interpolation variables and rich-text tags match English for every
source key.
- All source keys resolve and interpolate with i18next 25.0.0; SSRF
reasons, MCP validity dates and AI action counts were exercised.
- JSON parsing, duplicate-key checks, `oxfmt` 0.63.0 on both changed
files and `git diff --check` pass.
- Follow-up validation used Node 22.23.4 and Yarn 4.18.0. Full `yarn
install --immutable` fetched 2,620 packages but failed during linking
with ENOSPC on the 7.9 GB workspace. A focused `yarn workspaces focus
@affine/i18n` installation succeeded.
- Full lint remains blocked by missing root ESLint plugins
(`eslint-plugin-import-x`) in the focused installation. Package
TypeScript checking was attempted with the installed TypeScript compiler
and reports missing `affine__env` definitions. These checks are not
claimed as passing. No full application build was run.

Prepared with OpenAI Codex; translations and diff reviewed against the
English catalog.

## Checklist

- [x] I have signed the [AFFiNE Contributor License
Agreement](https://cla-assistant.io/toeverything/AFFiNE) — CLA status to
be verified by the repository check.
- [x] The PR targets `canary` and its title follows Conventional
Commits.
- [x] Tests are added or updated where it makes sense — locale
validation and runtime checks performed as described above; no
application code changed.
- [ ] `yarn lint` and `yarn typecheck` pass locally — blocked by
incomplete monorepo dependencies as described above.
- [x] AI-generated edits have been carefully reviewed for scope and
correctness.
- [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

* **Localization**
* Expanded Turkish translations across AI chat, search, synchronization,
account, workspace, subscription, and import experiences.
* Added localized messages for provider and model settings, credentials,
device sessions, connection issues, and empty explorer views.
  * Updated terminology and clarified several error messages.
  * Turkish translation coverage is now complete.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-20 18:22:20 +08:00
DarkSky 15bcb880c9 chore: bump version (#15873) 2026-11-20 17:52:12 +08:00
DarkSky dc2b221244 fix(editor): resolve doc title with references (#15865)
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 -->
v2026.11.18-canary.905
2026-11-17 18:05:20 +08:00
DarkSky 0d594345a3 fix(core): sync indicator style (#15863)
#### PR Dependency Tree


* **PR #15863** 👈

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**
* The notification menu item no longer displays an active state solely
because the notification list is open; opening and closing the list
works as before.
* **Style**
* Refined the layout of the workspace sync-status button while
preserving its existing label and appearance details. The status content
now has more consistent spacing and alignment within the workspace card.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
v2026.11.17-canary.905
2026-11-17 13:41:13 +08:00
DarkSky d863bfcd67 feat(server): bump model version (#15864) 2026-11-17 13:40:47 +08:00
DarkSky 66bca643da fix: sync compatibility v0.27.5-beta.3 2026-11-17 01:09:14 +08:00
DarkSky c471cfc9a5 feat(core): improve sync protocol (#15854)
#### 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 -->
2026-11-16 19:37:14 +08:00
DarkSky 9c61550279 feat(server): cleanup embedding after workspace deleted (#15851) v2026.11.13-canary.905 2026-11-12 18:41:30 +08:00
DarkSky e2767cb271 chore: cleanup codes v2026.11.11-canary.905 2026-11-10 20:58:06 +08:00
DarkSky 5aa30aa7fa fix(server): image process error handle (#15820)
#### 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 -->
v2026.11.10-canary.1049
2026-11-10 18:49:03 +08:00
DarkSky 63297bca34 feat(server): improve copilot module (#15817)
#### 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 -->
v2026.11.10-canary.905
2026-11-10 09:42:06 +08:00
DarkSky 9c316636e0 fix(server): discover CalDAV principals with PROPFIND (#15811)
fix #15482



#### PR Dependency Tree


* **PR #15811** 👈

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 CalDAV account setup across server configurations, including
servers that redirect discovery requests or use relative calendar links.
* CalDAV connection errors for unauthorized or forbidden access are now
surfaced without attempting fallback requests.
* Calendar and event retrieval continues to work across supported
discovery scenarios.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
v2026.11.9-canary.907
2026-11-09 01:08:30 +08:00
Nir b4539cee35 feat(core): add Radix DirectionProvider for RTL support (#15214)
## What

Mounts a `DirectionProvider` in `AffineContext` that feeds the current
language's text direction to all Radix UI primitives. Adds an `rtl` flag
to `LanguageInfo` (from `SUPPORTED_LANGUAGES`), with a colocated unit
test.

Part of #8966.

## Why

Radix primitives read direction from React context, not from the
document `dir` attribute. Since #14624, `document.documentElement.dir`
correctly flips to `rtl` for Arabic/Persian/Urdu — but every Radix
dropdown, popover and menu still hard-renders LTR internally.

## Notes for reviewers

- `@radix-ui/react-direction` is pinned to the exact version the other
Radix primitives resolve (`1.1.1`), not a caret range. A caret range
resolves to a newer duplicate module copy, which means a different React
context object — the primitives would silently ignore the provider.
Verified at runtime both ways.
- Portaled Radix content preserves React context, so portaled popovers
inherit direction too.

## Testing

- `yarn typecheck`, `yarn vitest run
packages/frontend/core/src/modules/i18n` (3 tests) pass.
- Verified in the running web app (Playwright + manual): with language
set to العربية, the workspace selector popover and menus render
`dir="rtl"`; English UI unaffected.
2026-11-08 22:21:44 +08:00
DarkSky 1433ac7b35 fix(editor): malformed database cells at the read boundary (#15809)
fix #15746



#### PR Dependency Tree


* **PR #15809** 👈

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**
* Database cells with values that don’t match their property type now
display the property’s default value instead of appearing empty or
undefined. Valid values continue to display as before, and the stored
cell value is not changed. This provides a more consistent display for
affected cells while preserving existing behavior for valid data.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-08 22:20:11 +08:00
Arnaud A. a2d15841a5 fix(editor): handle empty column names in kanban view (#15807)
## Description

Allows columns and tags with empty or whitespace names to remain visible
and clickable in Kanban and Table views.

- Display fallback `"Untitled"` label and placeholder when tag name is
empty or whitespace.
- Set minimum height on `SelectGroupView` tag pill to prevent height
collapse.
- Add unit test verifying fallback rendering.

<img width="519" height="633" alt="image"
src="https://github.com/user-attachments/assets/1fed7a72-5154-4dcb-a5f8-a7c6f6ac132f"
/>


Closes #15805
2026-11-08 22:19:53 +08:00
Leo Camus 4ac16368e6 fix(core): keep fractional index keys below the next key (#15709)
## Description

`generateFractionalIndexingKeyBetween(a, b)` can return a key that sorts
after `b`.

When the subkeys of `a` and `b` share a prefix, the key is built as
`generateKeyBetween(a, b) + '0' + postfix()`. If `b` itself starts with
`generateKeyBetween(a, b) + '0'`, the order against `b` is decided by
the random postfix. For example, with `a =
Zz0KDAn9nhfbtFAOnyTqT45wXkV4SGW7XBh` and `b =
Zz10c5IY1TbnCK75NE22mfQEp2rpu6q1n6Z7`, `generateKeyBetween(a, b)` is
`Zz1` and the returned key was `Zz10UESACG9CHEXJNxgEDqhyCILR7N91EmcV`,
which is greater than `b`.

This is easy to reach from the UI helpers: `FolderNode.indexAt('after',
firstId)`, the favorites list, pinned collections, workspace properties
and table rows/columns all call it with their neighbours and sort with a
plain string compare. Starting from an empty list, adding one item
before the first and then repeatedly inserting right after the first
item breaks the order in 1000 out of 1000 runs within 20 inserts; the
inserted item ends up after its intended next neighbour.

The fix keeps stepping towards `b` with `generateKeyBetween(key, b)`
while `b` still starts with `key + '0'`, so the appended postfix can no
longer push the key past `b`. Each step lengthens the shared prefix with
`b`, so the loop ends. Both copies of the helper (`@toeverything/infra`
and `@blocksuite/affine-shared`) get the same change.

Proof: the added tests in `fractional-indexing.spec.ts` and
`fractional-indexing.unit.spec.ts` insert right after the first key 50
times, 100 rounds each. Before the fix both fail (`key < b` is false);
after, both pass across 5 reruns. I also fuzzed 1500 sequences of 200
inserts with mixed insertion strategies: 677 ordering violations before,
0 after, no throws.
v2026.11.8-canary.830
2026-11-08 16:11:08 +08:00
Wei-Lun Li 2e0f1156dd fix(editor): keep numbered list start number in markdown and html export (#15726)
## Description

Closes #14098

When a numbered list doesn't start at 1 (for example it picks up at 3
after a paragraph or a code block), AFFiNE keeps that number in the list
block's `order` prop. Importing markdown/html already reads the list's
start number into `order`, but the markdown and html exporters never
wrote it back, so the exported list always restarted at 1.

This sets `start` on the exported markdown list / `<ol>` from the first
item's `order` when it's above 1. Lists that start at 1, or older blocks
without `order`, export exactly as before. I added a test for each
exporter; the markdown one is the reverse of the existing "non
consecutive numbered list" import test. PDF export already used `order`,
so it wasn't affected.
2026-11-08 16:10:09 +08:00
王开心 0276a74cb9 fix(journal): prefer the tighter match when suggesting week dates (#15768)
## Description

`@next sa` gives me Next Sunday, same with `@last sa`. Saturday never
shows up.

The week loop returns the first alias that fuzzy-matches, and
`nextsunday` is checked before `nextsaturday`. Since `fuzzyMatch`
accepts any subsequence, `nextsa` finds an `s` and then an `a` inside
"sunday" and stops there.

Now it ranks the candidates instead of short-circuiting. A contiguous
run beats a scattered subsequence, and month names compete on the same
score, so `@no` reaches November instead of Next Monday. Ties keep the
old order, so `@ns` still gives Next Sunday and `@nxtus` still gives
Next Tuesday.

Tests in `suggest-date.spec.ts`. The saturday cases and the november
case fail on canary without the change.

fix #15745


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

## Summary by CodeRabbit

* **New Features**
* Journal date suggestions now rank fuzzy matches, favoring prefixes
over contiguous and subsequence matches.
* Month matches can take precedence over weaker weekday matches. When
suggestions tie, the earlier candidate is retained; for the tested
query, this selects next Sunday.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-08 16:09:01 +08:00
DarkSky 3ecd57ac3b fix(client): restore realtime subscriptions once per connection (#15803)
fix #15576



#### PR Dependency Tree


* **PR #15803** 👈

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 reliability of real-time subscriptions during disconnects,
reconnects, context changes, and concurrent requests.
* Subscription updates are now routed to the matching topic and input,
and canceled subscriptions are handled without disrupting other active
subscriptions.
  * User-profile requests can resume after a disconnect and reconnect.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-08 12:24:35 +08:00
DarkSky a37334a150 feat(server): improve order sync (#15802) 2026-11-08 12:24:01 +08:00
renovate[bot] ef401b20cb chore: bump up apple/swift-collections version to from: "1.7.5" (#15778)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[apple/swift-collections](https://redirect.github.com/apple/swift-collections)
| patch | `from: "1.7.4"` → `from: "1.7.5"` |

---

### Release Notes

<details>
<summary>apple/swift-collections</summary>

###
[`v1.7.5`](https://redirect.github.com/apple/swift-collections/releases/tag/1.7.5):
Swift Collections 1.7.5

[Compare
Source](https://redirect.github.com/apple/swift-collections/compare/1.7.4...1.7.5)

#### What's Changed

- \[OrderedCollections] Resolve filename ambiguity with
InternalCollectionsUtilities/UnsafeBitSet/\_UnsafeBitSet.swift by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;805](https://redirect.github.com/apple/swift-collections/pull/805)
- Bump swiftlang/github-workflows from 0.0.16 to 0.0.17 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;802](https://redirect.github.com/apple/swift-collections/pull/802)
- Bump
swiftlang/github-workflows/.github/workflows/swift_package_test.yml from
0.0.16 to 0.0.17 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;803](https://redirect.github.com/apple/swift-collections/pull/803)
- Bump swiftlang/github-workflows/.github/workflows/soundness.yml from
0.0.16 to 0.0.17 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;804](https://redirect.github.com/apple/swift-collections/pull/804)
- Document standalone macOS backdeployment requirements by
[@&#8203;0xSixtos](https://redirect.github.com/0xSixtos) in
[#&#8203;800](https://redirect.github.com/apple/swift-collections/pull/800)
- \[DequeModule] Fix RigidDeque prepend example capacity and
direction-word slips by
[@&#8203;aashish254](https://redirect.github.com/aashish254) in
[#&#8203;801](https://redirect.github.com/apple/swift-collections/pull/801)
- Fix prepend(copying:) dropping items from multi-span sources by
[@&#8203;awaisdev5765](https://redirect.github.com/awaisdev5765) in
[#&#8203;796](https://redirect.github.com/apple/swift-collections/pull/796)
- Review RigidDeque/UniqueDeque tests; add better tests for prepends by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;806](https://redirect.github.com/apple/swift-collections/pull/806)

#### New Contributors

- [@&#8203;0xSixtos](https://redirect.github.com/0xSixtos) made their
first contribution in
[#&#8203;800](https://redirect.github.com/apple/swift-collections/pull/800)
- [@&#8203;awaisdev5765](https://redirect.github.com/awaisdev5765) made
their first contribution in
[#&#8203;796](https://redirect.github.com/apple/swift-collections/pull/796)

**Full Changelog**:
<https://github.com/apple/swift-collections/compare/1.7.4...1.7.5>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/toeverything/AFFiNE).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODguMiIsInVwZGF0ZWRJblZlciI6IjQ0LjE4OC4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
v2026.11.7-canary.904
2026-11-06 18:46:24 +08:00
DarkSky 6b19f1c51b chore: bump image model support (#15798)
#### 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 -->
2026-11-06 18:45:46 +08:00
DarkSky b2c882c8de fix(core): retain chat drafts until runtime accepts the send (#15796)
fix #15708



#### PR Dependency Tree


* **PR #15796** 👈

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**
* Draft text and attachments are preserved when a message cannot be
sent, including when preparation fails or another send is in progress.
* After a send is accepted, submitted text and context are cleared while
edits and attachments made during preparation are retained.
* Draft updates are saved in order, and later edits continue to be saved
even if an earlier save is delayed or fails.
* Sending now waits for the chat to be ready, helping prevent input from
being lost when a send cannot proceed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-06 13:46:48 +08:00
DarkSky 0e0f26f06b fix(mobile): doc visible loading (#15797)
fix #15774
fix #15707



#### PR Dependency Tree


* **PR #15797** 👈

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 permission handling for mobile navigation. Linked documents
are shown only when the user has read access, and denied access is
handled consistently.
* Document permissions are revalidated and reused across navigation
views, reducing repeated checks.
* Owners wait for document indexing before navigation references begin
loading; users without access do not start that work.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-06 02:01:47 +08:00
DarkSky 4db3ac8d6b fix(server): doc parse cycle (#15794)
#### PR Dependency Tree


* **PR #15794** 👈

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 search reliability when documents are changing, including
more consistent handling of invalid or incomplete document data.
* Prevented overlapping scheduled search updates, helping keep
background processing consistent.
* Improved coordination between search projections and payment
processing when both operate on document snapshots.
* Search processing now better isolates failures, helping other
documents continue to be processed and allowing recovery after source
data changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-06 01:55:27 +08:00
DarkSky e1261c40bf chore: bump deps (#15795) 2026-11-06 00:58:55 +08:00
DarkSky 8bbbfcf078 fix(native): recover refresh attempts after response loss (#15792)
fix #15654
fix #15551



#### PR Dependency Tree


* **PR #15792** 👈

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**
* Session refreshes can now recover from interrupted requests using the
same refresh attempt, including after an app restart.
* **Bug Fixes**
* Retrying a successful refresh no longer unnecessarily rotates tokens
or invalidates the session. Invalid or mismatched retries continue to be
rejected, while expired credentials are handled without revoking an
otherwise valid session.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-04 22:32:21 +08:00
DarkSky 3b41302757 fix(editor): preserve canvas input ownership in table selection (#15791)
fix #15770
fix #15605


#### PR Dependency Tree


* **PR #15791** 👈

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**
* Text insertion at the end of a table cell now produces the expected
cell content while keeping the table selection consistent.
* Selecting and clearing a table column no longer changes an unrelated
canvas selection in edgeless mode. In page mode, clearing the column
selection leaves the graphics selection empty.
* These selection behaviors are verified in both page and edgeless
modes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-04 22:18:36 +08:00
DarkSky 91ac3ca384 fix(editor): prevent code menu switches from toggling twice (#15782)
fix #15706
fix #15336
fix #15760
fix #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 -->
2026-11-02 21:43:59 +08:00
DarkSky 149629dee8 fix(native): missing update date for doc (#15783)
fix #15466
fix #15467


#### PR Dependency Tree


* **PR #15783** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
2026-11-02 21:43:32 +08:00