Commit Graph
11589 Commits
Author SHA1 Message Date
CommaBotandDarkSky 10ea096689 fix(editor): keep sorted table row in place when typing starts editing (#15915)
Row order is locked while a table cell is being edited, but typing into
a selected cell wrote the first character before that lock applied. In a
sorted view the row moved immediately, while the selection kept pointing
at its old index, so typing was interrupted.

Typing now enters edit mode and locks the rows before writing the
character. The row re-sorts when editing ends, the same as when editing
starts with a double click.

fix #14043

Co-authored-by: DarkSky <darksky2048@gmail.com>
2026-11-23 22:43:02 +08:00
CommaBotandDarkSky f0e5009a9f fix(editor): keep connector endpoints free inside frames (#15917)
A connector endpoint dropped anywhere inside a frame snapped to the
frame's nearest anchor, so arrows inside a frame could not be placed
freely.

Frames now accept a connection only within 8px of their border.
Endpoints elsewhere inside a frame stay free, and shapes inside a frame
still receive connections.

fix #13876

Co-authored-by: DarkSky <darksky2048@gmail.com>
2026-11-23 22:41:35 +08:00
CommaBotandDarkSky 0e7fa49adc fix(editor): paint editor popups above the bi-directional links panel (#15919)
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>
2026-11-23 22:40:25 +08:00
DarkSky e866985317 chore: bump deps 2026-11-23 17:27:12 +08:00
CommaBotandDarkSky 6bf2a097df fix: test & lint (#15920)
## Summary

- Ignore `packages/backend/native/src/*.license.json` in
`.prettierignore` and `.oxlintrc.json` so signed license payloads stay
byte-stable.
- Format native Rust sources to `rustfmt.toml` and box
`VerifiedAnyLicense::V2` to keep enum size small.
- Set `claimed_attempt` on the claimed worker snapshot in
`snapshot_commit_is_atomic_and_transfer_moves_the_entitlement` to match
receipt generation fencing.
- Inject the `event` stub in `gateway-cluster.spec.ts` and add
table-driven checks for cross-channel `sync-027` invalidation
broadcasts.

## Production Lock-Release Race Fix

- `PaymentConnection::reacquire_with` previously dropped its
`close_on_drop()` connection and called `try_acquire` before Postgres
finished releasing session advisory locks.
- Under load, that race caused self-collision and spurious
`payment_busy` failures.
- `PaymentConnection::release` now runs `SELECT
pg_advisory_unlock_all()` and closes the connection before
`reacquire_with` or partial `try_acquire` failures return.
- `payment_session_locks_are_sorted_nonblocking_and_connection_bound`
now verifies 32 consecutive `reacquire_with` lock expansions without
collision.

## Verification

- `yarn lint:format` passed across 7504 files.
- `cargo +nightly fmt --all -- --check` passed.
- `cargo clippy --workspace --exclude affine_server_native --all-targets
--all-features -- -D warnings` passed.
- `cargo clippy -p affine_server_native --all-targets --all-features --
-D warnings` passed.
- `cargo test -p affine_server_native` passed for `license_v2`,
`receipt_attempt`,
`payment_session_locks_are_sorted_nonblocking_and_connection_bound`, and
`snapshot_commit_is_atomic_and_transfer_moves_the_entitlement` against
PostgreSQL 16 and Redis.
- `ava` passed both tests in
`packages/backend/server/src/__tests__/sync/gateway-cluster.spec.ts`.

Models: Gemini 4 Neon, Gemini 4 Carbon.
Test frameworks: Cargo test, Clippy, rustfmt, oxfmt, AVA.

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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved payment connection recovery so locks acquired before a failed
scope acquisition are released before retrying. Connections now release
their locks explicitly, and failures to unlock are reported as database
errors.
* Corrected gateway invalidation broadcasts so updates reach appropriate
remote channels without unnecessary broadcasts to local or unspecified
channels.
* **Tests**
* Expanded coverage for payment lock cleanup and gateway invalidation
routing, including cases with missing or local channel information.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: DarkSky <darksky2048@gmail.com>
2026-11-23 17:19:29 +08: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
overlily b2200d4b67 chore(i18n): complete zh-Hans translations for 0.27 (#15776)
### What changed

Adds the missing `zh-Hans` translations so the locale fully covers
`en.json`.

### Coverage

- Before: 2450 / 2604 keys
- After: 2604 / 2604 keys (100%)

### Areas covered

- AI BYOK settings: connect provider, model catalog, API dialect,
connection test, probe status
- Devices management: sign out, last used, load/sign-out failures
- Real-time connection errors (auth / network / server / timeout)
- Auth, Copilot and search error codes
- Mobile settings screens: account & data, experimental, plans, support,
empty states
- Invitation account-mismatch flow
- AI chat panel live-editor status lines, code block line numbers,
journal placeholder

### Notes

- Terminology follows the existing file: provider -> 服务商, sign out ->
登出, collection -> 集合, attachment -> 附件, workspace -> 工作区.
- Placeholders (`{{count}}`, `{{title}}`, `{{email}}`, `{{spaceId}}`)
are preserved.
- `zh-Hans.json` still carries 4 keys that no longer exist in `en.json`
(`com.affine.settings.workspace.byok.title-beta`,
`error.COPILOT_CONTEXT_FILE_NOT_SUPPORTED`,
`error.COPILOT_FAILED_TO_ADD_WORKSPACE_FILE_EMBEDDING`,
`error.COPILOT_FAILED_TO_MATCH_GLOBAL_CONTEXT`).
Left untouched to keep this diff focused; happy to remove them in a
follow-up.
- JSON validated; key parity with `en.json` re-checked after the edit.

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

## Summary by CodeRabbit

* **Localization**
* Added Simplified Chinese translations for AI chat tools, source
errors, authentication and sync messages, Copilot and search errors,
realtime connection failures, and invitation account mismatches.
* Expanded translations for Journal and mobile settings, account
deletion confirmation, code-block line-number preferences, BYOK model
and connection settings, device management, and mobile explorer empty
states.
  * Kept the existing translation for comment-attachment quota errors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-01 20:25:56 +08:00
DarkSky 8cef09e1dd fix(client): windows static link (#15753)
fix #15728
v2026.10.27-canary.909
2026-10-27 16:08:45 +08:00
NazarkinRoman fa653147d9 fix(server): accept custom-scheme referers in the worker endpoints (#15748)
## Description

`isRefererAllowed` compares `new URL(referer).origin`. For non-special
schemes that is the opaque string `"null"`:

```js
new URL('assets://./').origin          // 'null'
new URL('capacitor://localhost/').origin // 'null'
new URL('file:///index.html').origin   // 'null'
```

So a `Referer` coming from the desktop (`assets://.`), mobile
(`capacitor://localhost`) or legacy (`file://`) clients can never match
the allowed origins, although the same origins are accepted when they
arrive in an `Origin` header (`DESKTOP_CLIENT_ORIGINS` /
`MOBILE_CLIENT_ORIGINS`, merged into the worker's list since #15547).
Requests that carry only a `Referer`, such as `<img
src=".../api/worker/image-proxy?...">` loads, are rejected with `400
Invalid header`.

This serializes such origins as `protocol//host`, which is how a browser
writes them in an `Origin` header. http(s) referers are unchanged.

Refs #14865 (the `Origin` half of that issue is already fixed on
canary).

## Testing

- Added `plugins/worker/__tests__/headers.spec.ts`: http(s) referers,
custom-scheme referers from the list, custom-scheme referers not in the
list, invalid input.
- I could not run the full `ava` suite locally. The function was checked
in isolation with Node on the same cases (9/9).

## Not included

Allowing `image-proxy` requests that have neither `Origin` nor `Referer`
(bug 3 in #14865). That loosens the check and I could not confirm what
the Electron `<img>` loads actually send.


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

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

## Summary by CodeRabbit

* **Bug Fixes**
* Referer checks now correctly recognize allowed client origins using
custom URL schemes, alongside allowed HTTP and HTTPS origins. Unlisted
origins and invalid URLs continue to be rejected, helping ensure
requests from supported clients are handled consistently without
broadening access to unapproved origins.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-27 16:05:10 +08:00
fa809e861b fix(client): auto-detect Linux password store before app ready (#15450)
## Summary

- Detect Linux desktop/session environments before Electron app
readiness and set a secure `--password-store` backend when Electron
would otherwise miss it.
- Prefer `gnome-libsecret` for GNOME-compatible desktops and common
tiling/window-manager sessions that often run libsecret/gnome-keyring.
- Prefer the appropriate KWallet backend for KDE/Plasma sessions,
including KDE 5/6 detection, while respecting any user-provided
`--password-store` flag.
- Add unit coverage for Linux/non-Linux behavior, existing user flags,
GNOME/libsecret desktops, tiling WMs, KDE/Plasma KWallet variants,
colon-separated desktop values, and fallback session variables.

## Test plan

- [x] `yarn vitest
packages/frontend/apps/electron/test/main/secure-storage.spec.ts`
- [x] Electron main-process related tests were run; relevant tests
passed, with unrelated existing failures noted in
`recording-feature.spec.ts`.
- [x] Prettier, oxlint, eslint, and TypeScript checks passed for the
modified Electron files.

Closes: #15301 

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

* **Bug Fixes**
  * Improved secure password-store selection on Linux.
* Added support for KDE/Plasma and GNOME-compatible desktop
environments.
* Preserves manually configured password-store settings and selects an
appropriate fallback when needed.

* **Tests**
* Added coverage for Linux desktop detection, fallback behavior, session
variations, and non-Linux environments.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
Co-authored-by: donqu1xotevincent <vincent@toeverything.info>
2026-10-27 15:55:08 +08:00
DarkSky 80e1c26815 fix(client): add aarch64 linux release (#15752)
fix #13701

#### PR Dependency Tree


* **PR #15752** 👈

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**
  * Linux ARM64 builds on ARM64 hosts now use the native build path.
* **Bug Fixes**
* Improved updater handling of Linux ARM64 installer filenames so
platform and architecture filtering can be verified for those packages.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-27 15:52:32 +08:00
DarkSky 21e07b6635 fix(client): glibc version & linux secret store (#15751)
fix #15732
fix #15750
fix #15548

#### PR Dependency Tree


* **PR #15751** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
2026-10-27 15:47:55 +08:00
DarkSky 83064df258 fix(server): search table lock (#15749) 2026-10-27 15:11:40 +08:00
renovate[bot] 5f19254997 chore: bump up apple/swift-collections version to from: "1.7.4" (#15741)
This PR contains the following updates:

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

---

### Release Notes

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

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

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

This is a patch release shipping a number of bug fixes.

#### What's Changed

- Fix implementation of `InputSpan.removeAll()` by
[@&#8203;glessard](https://redirect.github.com/glessard) in
[#&#8203;766](https://redirect.github.com/apple/swift-collections/pull/766)
- SortedSet: keep the existing member on insert, replace it on
update(with:) by
[@&#8203;aniketatgithub](https://redirect.github.com/aniketatgithub) in
[#&#8203;761](https://redirect.github.com/apple/swift-collections/pull/761)
- \[SortedCollections] Check SortedSet's SetAlgebra conformance by
[@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;758](https://redirect.github.com/apple/swift-collections/pull/758)
- Check the set predicates and isEqualSet(to:) against plain sequences
by [@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;759](https://redirect.github.com/apple/swift-collections/pull/759)
- \[BitCollections] Check BitSet.Counted's BidirectionalCollection
conformance by
[@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;767](https://redirect.github.com/apple/swift-collections/pull/767)
- Fix implementation of OutputSpan.\_consumeAll() by
[@&#8203;glessard](https://redirect.github.com/glessard) in
[#&#8203;775](https://redirect.github.com/apple/swift-collections/pull/775)
- Bump
swiftlang/github-workflows/.github/workflows/swift_package_test.yml from
0.0.15 to 0.0.16 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;778](https://redirect.github.com/apple/swift-collections/pull/778)
- Bump swiftlang/github-workflows from 0.0.15 to 0.0.16 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;780](https://redirect.github.com/apple/swift-collections/pull/780)
- Bump swiftlang/github-workflows/.github/workflows/soundness.yml from
0.0.15 to 0.0.16 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;779](https://redirect.github.com/apple/swift-collections/pull/779)
- \[BasicContainers] Fix RigidSet.hash(into:) never returning by
[@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;768](https://redirect.github.com/apple/swift-collections/pull/768)
- Add checkSetAlgebraMemberIdentity, a law checker for which equal
member SetAlgebra keeps by
[@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;769](https://redirect.github.com/apple/swift-collections/pull/769)
- \[BasicContainers] Fix UniqueArray.append(moving:) dropping and
leaking every element by
[@&#8203;aniketatgithub](https://redirect.github.com/aniketatgithub) in
[#&#8203;776](https://redirect.github.com/apple/swift-collections/pull/776)
- \[UniqueDeque] Fix prepend(from:) reversing batch order across
producer passes by
[@&#8203;SwastikTripathi](https://redirect.github.com/SwastikTripathi)
in
[#&#8203;777](https://redirect.github.com/apple/swift-collections/pull/777)
- \[BasicContainers] Fix returned range of
replaceSubrange(\_:addingCount:initializingWith:) by
[@&#8203;aashish254](https://redirect.github.com/aashish254) in
[#&#8203;781](https://redirect.github.com/apple/swift-collections/pull/781)
- \[BasicContainers] Fix RigidSet/UniqueSet batch insertion never
terminating without the preview trait by
[@&#8203;aashish254](https://redirect.github.com/aashish254) in
[#&#8203;782](https://redirect.github.com/apple/swift-collections/pull/782)
- \[BigString] Resync character breaks after removeSubrange by
[@&#8203;sebxt](https://redirect.github.com/sebxt) in
[#&#8203;784](https://redirect.github.com/apple/swift-collections/pull/784)
- Saturate producer buffers by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;789](https://redirect.github.com/apple/swift-collections/pull/789)
- Fix nextSpan/previousSpan implementations by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;793](https://redirect.github.com/apple/swift-collections/pull/793)
- \[BorrowingMapProducer] Fix skip(by:) hanging at end of iterator by
[@&#8203;SwastikTripathi](https://redirect.github.com/SwastikTripathi)
in
[#&#8203;794](https://redirect.github.com/apple/swift-collections/pull/794)
- \[OrderedCollections] Check the remaining Hashable conformances by
[@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;792](https://redirect.github.com/apple/swift-collections/pull/792)
- \[ContainersPreview] Add missing RigidSet+Extras.swift to CMake source
list by [@&#8203;aashish254](https://redirect.github.com/aashish254) in
[#&#8203;797](https://redirect.github.com/apple/swift-collections/pull/797)
- \[BitCollections] Fix BitSet intersection doc examples for Range
inputs by [@&#8203;aashish254](https://redirect.github.com/aashish254)
in
[#&#8203;799](https://redirect.github.com/apple/swift-collections/pull/799)
- \[BitCollections] Fix BitArray.resizingShiftRight leaving stale bits
by [@&#8203;aashish254](https://redirect.github.com/aashish254) in
[#&#8203;798](https://redirect.github.com/apple/swift-collections/pull/798)
- fix: guard InputSpan methods against nil base address in debug builds
by
[@&#8203;SwastikTripathi](https://redirect.github.com/SwastikTripathi)
in
[#&#8203;795](https://redirect.github.com/apple/swift-collections/pull/795)

#### New Contributors

- [@&#8203;SwastikTripathi](https://redirect.github.com/SwastikTripathi)
made their first contribution in
[#&#8203;777](https://redirect.github.com/apple/swift-collections/pull/777)
- [@&#8203;aashish254](https://redirect.github.com/aashish254) made
their first contribution in
[#&#8203;781](https://redirect.github.com/apple/swift-collections/pull/781)
- [@&#8203;sebxt](https://redirect.github.com/sebxt) made their first
contribution in
[#&#8203;784](https://redirect.github.com/apple/swift-collections/pull/784)

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

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

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

This is a patch release resolving a correctness issue with
`BitSet.Counted.isEqualSet(to:)`, improving test coverage throughout the
library, and continuing the development of unstable interfaces.

#### What's Changed

- \[Heap] Add exhaustive permutations and duplicate-value coverage by
[@&#8203;rksharma-owg](https://redirect.github.com/rksharma-owg) in
[#&#8203;750](https://redirect.github.com/apple/swift-collections/pull/750)
- \[BitCollections] Fix BitSet.Counted.isEqualSet(to:) rejecting
sequences with duplicates by
[@&#8203;kwy404](https://redirect.github.com/kwy404) in
[#&#8203;749](https://redirect.github.com/apple/swift-collections/pull/749)
- SortedSet: generalize set operations to arbitrary Sequences by
[@&#8203;aniketatgithub](https://redirect.github.com/aniketatgithub) in
[#&#8203;746](https://redirect.github.com/apple/swift-collections/pull/746)
- \[SortedCollections] Check the BidirectionalCollection, Equatable and
Hashable conformances by
[@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;742](https://redirect.github.com/apple/swift-collections/pull/742)
- Build BigString in Embedded Swift - with a custom implementation of
grapheme walking instead of using the stdlib by
[@&#8203;parkera](https://redirect.github.com/parkera) in
[#&#8203;752](https://redirect.github.com/apple/swift-collections/pull/752)
- Revive configuration for Foundation toolchain module builds by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;753](https://redirect.github.com/apple/swift-collections/pull/753)
- Copy every source span in replaceSubrange(copying:) by
[@&#8203;hamed75kazemii](https://redirect.github.com/hamed75kazemii) in
[#&#8203;755](https://redirect.github.com/apple/swift-collections/pull/755)
- 1.7.3: Clean up minor issues in build configuration by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;756](https://redirect.github.com/apple/swift-collections/pull/756)
- CMake: Enable UnstableContainersPreview and UnstableHashedContainers
by default by [@&#8203;lorentey](https://redirect.github.com/lorentey)
in
[#&#8203;757](https://redirect.github.com/apple/swift-collections/pull/757)

#### New Contributors

- [@&#8203;rksharma-owg](https://redirect.github.com/rksharma-owg) made
their first contribution in
[#&#8203;750](https://redirect.github.com/apple/swift-collections/pull/750)
- [@&#8203;kwy404](https://redirect.github.com/kwy404) made their first
contribution in
[#&#8203;749](https://redirect.github.com/apple/swift-collections/pull/749)
- [@&#8203;aniketatgithub](https://redirect.github.com/aniketatgithub)
made their first contribution in
[#&#8203;746](https://redirect.github.com/apple/swift-collections/pull/746)
- [@&#8203;hamed75kazemii](https://redirect.github.com/hamed75kazemii)
made their first contribution in
[#&#8203;755](https://redirect.github.com/apple/swift-collections/pull/755)

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

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

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

This is a patch release shipping a few internal cleanups.

- On Swift 6.4, the package is now built with strict memory safety
enabled. (I don't expect to ever get rid of all `unsafe` keywords: safe
data structures have to be built on top of unsafe allocator primitives,
after all. But I do expect we will gradually move to using memory-safe
constructs whenever it's possible to do so, and the keywords will serve
as a helpful incentive for that.)
- The package has now fully migrated its testing to rely on `package`
access modifiers rather than `@testable import` or `@_spi` trickery.

#### What's Changed

- \[Xcode, CMake]: Build ContainersPreview as a standalone module by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;744](https://redirect.github.com/apple/swift-collections/pull/744)
- Stop using `@_spi` attribute and `@testable import` by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;745](https://redirect.github.com/apple/swift-collections/pull/745)
- Enable strict memory safety on Swift 6.4 by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;747](https://redirect.github.com/apple/swift-collections/pull/747)

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

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

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

This is a patch release that ships a workaround for a Swift 6.4 defect
that prevents code that uses the package from deploying before macOS/iOS
27
([#&#8203;733](https://redirect.github.com/apple/swift-collections/issues/733)),
alongside fixes for a handful of other bugs uncovered since 1.7.0.

#### What's Changed

- Housekeeping: replace repo-level CODE_OF_CONDUCT by
[@&#8203;apple-ospo](https://redirect.github.com/apple-ospo)\[bot] in
[#&#8203;738](https://redirect.github.com/apple/swift-collections/pull/738)
- \[HashTreeCollections] Fix union misplacing items pushed into a new
child by
[@&#8203;Denimworld12](https://redirect.github.com/Denimworld12) in
[#&#8203;737](https://redirect.github.com/apple/swift-collections/pull/737)
- \[BitCollections] Fix BitSet.Counted.update(with:) not maintaining the
cached count by
[@&#8203;Denimworld12](https://redirect.github.com/Denimworld12) in
[#&#8203;736](https://redirect.github.com/apple/swift-collections/pull/736)
- validateContainer: report a mis-sized expectation instead of trapping
or ignoring it by
[@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;735](https://redirect.github.com/apple/swift-collections/pull/735)
- Avoid using `Ref` in Swift 6.4 by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;739](https://redirect.github.com/apple/swift-collections/pull/739)
- Version 1.7.1 release preparations by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;740](https://redirect.github.com/apple/swift-collections/pull/740)

#### New Contributors

- [@&#8203;apple-ospo](https://redirect.github.com/apple-ospo)\[bot]
made their first contribution in
[#&#8203;738](https://redirect.github.com/apple/swift-collections/pull/738)
- [@&#8203;Denimworld12](https://redirect.github.com/Denimworld12) made
their first contribution in
[#&#8203;737](https://redirect.github.com/apple/swift-collections/pull/737)

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

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

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

This is a feature release raising the minimum required toolchain to
Swift 6.2. It formalizes `Equatable`/`Hashable` conformances on the
ownership-aware container types, adds a new stable `OrderedSet`
operation, and continues to develop the experimental ownership-aware
container model behind the `UnstableContainersPreview` trait. It also
includes a number of performance improvements and bug fixes.

#### New stable APIs

##### `OrderedCollections`

- `OrderedSet.replace(at:with:)` replaces the member at a given index
with a new element, returning the element that was removed. Replacing a
member with an element that already exists elsewhere in the set is a
runtime error. Expected amortized O(1) complexity.
([#&#8203;669](https://redirect.github.com/apple/swift-collections/pull/669))

##### `BasicContainers`, `DequeModule`

- On a Swift 6.4 or later toolchain, `RigidArray`, `UniqueArray`,
`RigidDeque`, `UniqueDeque`, `RigidSet`, `UniqueSet`, `RigidDictionary`,
and `UniqueDictionary` now formally conform to `Equatable` and
`Hashable`. (The underlying `==` and `hash(into:)` members were already
available in 1.6.0; what is new is the conformances themselves.)
Building with Swift 6.2 or 6.3 still gets you the `==`/`hash(into:)`
members, but no conformances.

- `RigidDeque.isTriviallyIdentical(to:)` and
`UniqueDeque.isTriviallyIdentical(to:)` are now available for every
element type, including noncopyable ones. Previously these required
`Element: Equatable`.

- New spelling for the capacity, cloning, and range-replacement
operations; see **Renamed APIs** below. The new names are the stable
spelling going forward; the old ones remain as deprecated shims.

##### `Collections` umbrella module

The `Collections` module is back to re-exporting its constituent modules
with `@_exported import`, instead of restating each type as a `public
typealias`
([#&#8203;716](https://redirect.github.com/apple/swift-collections/pull/716)).
A single
`import Collections` therefore now brings in the *entire* contents of
`BitCollections`, `DequeModule`, `HashTreeCollections`, `HeapModule`,
and `OrderedCollections` — including types that previously were not
exposed in the `Collections` module, such as `RigidDeque` and
`UniqueDeque`. This allows `import Collections` to work even for clients
that have `MemberImportVisibility` enabled.

#### Renamed APIs

`BasicContainers` and `DequeModule` are stable modules, so every rename
below ships with a deprecated shim carrying `@available(*, deprecated,
renamed:)`. Existing code keeps compiling, and Xcode/`swift build` will
offer fix-its.

| Old name | New name |
| ------------------------------------------ |
---------------------------------------------------------------- |
| `reallocate(capacity:)` | `setCapacity(_:)` |
| `copy()` | `clone()` |
| `copy(capacity:)` | `clone(capacity:)` |
| `UniqueDeque.init(capacity:)` | `init(minimumCapacity:)` |
| `replace(_:with:)` and friends | `replaceSubrange(_:copying:)` /
`(_:moving:)` / `(_:consuming:)` |
| `replace(_:count:initializingWith:)` |
`replaceSubrange(_:addingCount:initializingWith:)` |
| `append(count:initializingWith:)` |
`append(addingCount:initializingWith:)` |
| `insert(count:at:initializingWith:)` |
`insert(addingCount:at:initializingWith:)` |
| `nextSpan(after:maximumCount:)` | `nextSpan(after:maxCount:)` |
| `nextMutableSpan(after:maximumCount:)` |
`nextMutableSpan(after:maxCount:)` |
| `previousSpan(before:maximumCount:)` |
`previousSpan(before:maxCount:)` |
| `RigidSet.insert(count:initializingWith:)` |
`insert(addingCount:initializingWith:)` |
| `RigidSet.insert(count:from:)` | `insert(addingCount:from:)` |

Most of the new names sync this package with the API names recently
adopted in the Standard Library in `Iterable` and `UniqueArray`.

#### Performance improvements

- **`BitSet.count` is roughly 3× faster.**
([#&#8203;702](https://redirect.github.com/apple/swift-collections/pull/702))
- `_Word.allBits` is now `@inlinable`, which unblocks specialization in
several
bit-twiddling paths.
([#&#8203;704](https://redirect.github.com/apple/swift-collections/pull/704))
- `OrderedSet.reverse()` now reverses the hash table in place instead of
rebuilding it from scratch.
([#&#8203;668](https://redirect.github.com/apple/swift-collections/pull/668))
- `UniqueArray` no longer performs duplicate bounds checks on subscript
and
mutation paths.
([#&#8203;699](https://redirect.github.com/apple/swift-collections/pull/699))
- `RigidArray`'s internal representation was split from a `(buffer
pointer, count)` pair into separate pointer, capacity, and count fields.
This exposes an unused bit pattern for the compiler to use for
representing nil values in optional wrapped arrays, avoiding having to
add an out-of-line discriminator. The representation of
`RigidDictionary` was
adjusted in a similar way.
([#&#8203;692](https://redirect.github.com/apple/swift-collections/pull/692),
[#&#8203;717](https://redirect.github.com/apple/swift-collections/pull/717))
- `Deque` and the `TreeSet`/`TreeDictionary` types are no longer using a
`malloc_size` to make use of any "extra" storage allocated.
([#&#8203;700](https://redirect.github.com/apple/swift-collections/pull/700))
- `OrderedDictionary.replaceElement` now uses `exchange(_:with:)` on its
equal-key path to avoid copying the outgoing value.
([#&#8203;688](https://redirect.github.com/apple/swift-collections/pull/688),
[#&#8203;703](https://redirect.github.com/apple/swift-collections/pull/703))
- `RigidDictionary` now stores a sentinel value rather than `nil` for
its values pointer, removing a branch from value access.

#### Notable bug fixes

- **`BitCollections`:** `BitSet.isEqualSet(to:)` returned the wrong
result when given an empty `Range<Int>`. A non-empty bit set incorrectly
compared equal to an empty range.
([#&#8203;718](https://redirect.github.com/apple/swift-collections/pull/718))
- **`SortedCollections`** (`UnstableSortedCollections` trait):
`SortedDictionary.Keys`, `.Values`, and `.SubSequence` had inverted `==`
implementations, so equal instances compared unequal and vice versa.
`SubSequence` equality also now uses tuple comparison rather than an
element-by-element loop with the wrong short-circuit.
([#&#8203;697](https://redirect.github.com/apple/swift-collections/pull/697))
- **Embedded Swift:** the `_UniqueCollection` fast paths in
`BitSet.isEqualSet(to:)`, `OrderedSet.isEqualSet(to:)`,
`TreeSet.isEqualSet(to:)`, and `TreeSet.symmetricDifference(_:)` rely on
dynamic conformance checks, which are unavailable in embedded Swift.
They are now compiled out with `#if !$Embedded`.
([#&#8203;715](https://redirect.github.com/apple/swift-collections/pull/715))

#### Experimental container protocols (`UnstableContainersPreview`
trait)

This is the first swift-collections release that ships a fully
operational container protocol hierarchy, including some massive
updates. However, things are still subject to change, and we expect to
need to make breaking changes as we gain experience using the new
constructs. Nothing under this trait is stable API, and source-breaking
changes land without deprecations.

**New:**
[`Documentation/Container-design.md`](Documentation/Container-design.md)
is a work-in-progress document describing the container design
implemented in the `ContainersPreview` module. As of the 1.7.0 release,
it explains some of the design decisions behind the container protocols,
up to and including `MutableContainer`. (The `Producer` hierarchy and
the range-replaceable container protocol family is not yet fully
covered; we expect those parts to be fleshed out later.)

##### New `SpanPreview` module

`InputSpan` has moved out of `ContainersPreview` into a new
`SpanPreview` module. `SpanPreview` holds span-adjacent primitives that
are expected to graduate to the standard library, and it is entirely
empty unless the `UnstableContainersPreview` trait is enabled. It also
ships basic `MutableSpan`/`OutputSpan` helpers for producing and
consuming `InputSpan`s.

Some core APIs on the container types require the use of `InputSpan`,
and this change lets these APIs continue to live in their defining
module.

`SpanPreview` is explicitly not part of the package's stable public API,
as we expect to soon replace it with the Standard Library's own
`InputSpan` definition.

##### Dependency inversion

`ContainersPreview` and the concrete container modules have swapped
places in the dependency graph. `BasicContainers` and `DequeModule` no
longer depend on `ContainersPreview`; instead `ContainersPreview`
depends on them, and all
container conformances for the concrete types now live there, under
`Sources/ContainersPreview/Conformances/`.
([`842f125c`](https://redirect.github.com/apple/swift-collections/commit/842f125c))

**Source-breaking for trait adopters:** getting `Container` (etc.)
conformances for `RigidArray`, `UniqueArray`, `RigidDeque`,
`UniqueDeque`, `RigidSet`, or `UniqueSet` now requires `import
ContainersPreview`. Importing just `BasicContainers` or `DequeModule`
gets you the types and their intrinsic operations, but not the protocol
conformances.

##### Standard library adoption

- The locally-defined `BorrowingSequence_`/`BorrowingIteratorProtocol_`
protocols have been replaced by the standard library's `Iterable` and
`BorrowingIteratorProtocol`. The package's own definitions have been
removed.
([#&#8203;657](https://redirect.github.com/apple/swift-collections/pull/657))
- Similarly, `Ref` and `MutableRef` now ship in the Standard Library
rather than being declared in `ContainersPreview`. (`UniqueBox` is part
of the package's stable API, so its definition continues to remain
available. We expect to deprecate it in a future package release.)

##### New protocols

- Removal and consumption operations were spun off from
`RangeReplaceableContainer` into the new parent protocol
`DrainableContainer`. This protocol models containers supporting partial
in-place consumption (and removal) of their contents. Range-replacement
operations now all return indices to the subranges they affected, so
that we can perform insertions/removals without losing our place in the
container. (This is particularly important for linked lists and similar
linked data structures capable of performing O(1) insertions/removals.)
([#&#8203;723](https://redirect.github.com/apple/swift-collections/pull/723))
- `CountedProducer` refines `Producer` adding a precise count of
remaining elements. `Drain` now refines `CountedProducer`.
- `ContainerDrain` refines `Drain` to allow retrieving a valid index
after the items have been drained.
- `RangeExpression2` now refines the standard `RangeExpression`, so that
we can use the standard range expression notation over container types.
(The name (as well as the protocol itself) is a placeholder, so that we
have something that works while we are looking for a better solution.)
([#&#8203;22a94a97](https://redirect.github.com/apple/swift-collections/commit/22a94a97))

##### Reworked core requirements

- `Container`'s core primitive is now
`nextSpan(after:maxCount:limitedBy:)`, with optional delimiter
arguments; the
bidirectional counterpart is
`spanBoundary(before:maxDistance:limitedBy:)`.
- `Container` gained `makeBorrowingIterator(from:)`,
`makeBorrowingIterator(from:to:)`, and `currentIndex(of:)` requirements.
- `Container` now expects its indices to be `Comparable` again, as we
have found a way to provide them in conforming linked list types.
([#&#8203;727](https://redirect.github.com/apple/swift-collections/pull/727))
- `[Mutable]Container` gained subscript requirements expressed with
borrow and mutate accessors.
- `Producer.generate(into:)` switched to saturating semantics — it now
fills the destination when possible, unless it reaches its end or
throws.
([#&#8203;728](https://redirect.github.com/apple/swift-collections/pull/728))

##### New algorithms

- `MutableContainer` gained bulk update operations (`updateSubrange` and
friends), in both mutating and copying forms, plus a default `swapAt`
implementation for copyable elements.
([#&#8203;724](https://redirect.github.com/apple/swift-collections/pull/724))
- `PermutableContainer` gained `reverse()`, `shuffle()`,
`moveSubrange(_:to:)`, and a heap sort.
- `Producer` gained `UnfoldProducer` (an unfold-style generator), and
- `BorrowingIteratorProtocol` gained `mapError`, and `map` was fixed;
`_map2` and `_map3` were added alongside it to demonstrate different
throwing behaviors. Error handling across the producer/drain algorithms
was reviewed.
- New `Container` conformances for `Span`, `MutableSpan`, `OutputSpan`,
and `InputSpan`.

#### Experimental hashed containers (`UnstableHashedContainers` trait)

These types are functional, but they still have known usability gaps in
their API surface that prevents us from declaring them API stable.

- The trait no longer needs `UnstableContainersPreview` to be enabled
alongside it.
[`70dc2389`](https://redirect.github.com/apple/swift-collections/commit/70dc2389))
- `RigidSet` and `UniqueSet` now conform to `Container`.
([#&#8203;713](https://redirect.github.com/apple/swift-collections/pull/713))
- `RigidDictionary` and `UniqueDictionary` gained a `keys` property and
`mutableValue(forKey:)`, which yields in-place mutable access to a
stored value.
([#&#8203;698](https://redirect.github.com/apple/swift-collections/pull/698),

#### Testing and infrastructure

- **`checkSetAlgebra`**, a new law checker in `_CollectionsTestSupport`,
verifies set-like types against the `SetAlgebra` laws — and additionally
checks each mutating operation against its non-mutating twin.
([#&#8203;719](https://redirect.github.com/apple/swift-collections/pull/719),
[#&#8203;730](https://redirect.github.com/apple/swift-collections/pull/730))
- A **`Container` conformance validator** has been added, along the
lines of the existing `Sequence`/`Collection` conformance checkers, and
is now applied to `RigidSet`, `UniqueSet`, `RigidDeque`, and
`UniqueDeque`.
([#&#8203;713](https://redirect.github.com/apple/swift-collections/pull/713),
[#&#8203;720](https://redirect.github.com/apple/swift-collections/pull/720))
- New tests cover `Deque`'s storage allocation behavior and
`MutableContainer`'s requirements (the latter uncovered and fixed
several issues).
([#&#8203;722](https://redirect.github.com/apple/swift-collections/pull/722))
- We added a first draft of a `swift-format` configuration for this
package.
- CI workflows were updated (`swiftlang/github-workflows` 0.0.11 →
0.0.15, `actions/checkout` 6 → 7), and the matrix was simplified now
that 6.0/6.1 are out of support.
- The unstable Xcode project had its groups converted to folders.

#### Detailed List of Changes

- Run heap node tests in release by
[@&#8203;sorinc03](https://redirect.github.com/sorinc03) in
[#&#8203;662](https://redirect.github.com/apple/swift-collections/pull/662)
- \[BasicContainers] Rename reallocate to setCapacity for Rigid and
UniqueArray by [@&#8203;Azoy](https://redirect.github.com/Azoy) in
[#&#8203;667](https://redirect.github.com/apple/swift-collections/pull/667)
- Define SwiftStdlib 6.4 with actual version numbers by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;670](https://redirect.github.com/apple/swift-collections/pull/670)
- Update `BorrowingSequence` to `Iterable` by
[@&#8203;natecook1000](https://redirect.github.com/natecook1000) in
[#&#8203;657](https://redirect.github.com/apple/swift-collections/pull/657)
- Bump swiftlang/github-workflows/.github/workflows/soundness.yml from
0.0.11 to 0.0.12 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;678](https://redirect.github.com/apple/swift-collections/pull/678)
- Bump
swiftlang/github-workflows/.github/workflows/swift_package_test.yml from
0.0.11 to 0.0.12 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;677](https://redirect.github.com/apple/swift-collections/pull/677)
- Fix [@&#8203;inlinable](https://redirect.github.com/inlinable) deinit
incompatibility with library evolution (HashTree/Sorted storage) by
[@&#8203;itej13](https://redirect.github.com/itej13) in
[#&#8203;679](https://redirect.github.com/apple/swift-collections/pull/679)
- Bump actions/checkout from 6 to 7 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;672](https://redirect.github.com/apple/swift-collections/pull/672)
- \[OrderedCollections] OrderedSet.reverse(): update the hash table in
place by [@&#8203;inju2403](https://redirect.github.com/inju2403) in
[#&#8203;668](https://redirect.github.com/apple/swift-collections/pull/668)
- Fix superset set algebra doc comments by
[@&#8203;wjdtjq6](https://redirect.github.com/wjdtjq6) in
[#&#8203;674](https://redirect.github.com/apple/swift-collections/pull/674)
- Fix typos in doc comments and a DocC article by
[@&#8203;wjdtjq6](https://redirect.github.com/wjdtjq6) in
[#&#8203;673](https://redirect.github.com/apple/swift-collections/pull/673)
- \[OrderedCollections] Add OrderedSet.replace(\_:at:) by
[@&#8203;inju2403](https://redirect.github.com/inju2403) in
[#&#8203;669](https://redirect.github.com/apple/swift-collections/pull/669)
- Bump swiftlang/github-workflows/.github/workflows/soundness.yml from
0.0.12 to 0.0.13 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;689](https://redirect.github.com/apple/swift-collections/pull/689)
- Bump
swiftlang/github-workflows/.github/workflows/swift_package_test.yml from
0.0.12 to 0.0.13 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;690](https://redirect.github.com/apple/swift-collections/pull/690)
- \[ContainersPreview] Update Container protocols by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;682](https://redirect.github.com/apple/swift-collections/pull/682)
- \[RigidArray/UniqueArray] Split up the buffer pointer in RIgidArray by
[@&#8203;Azoy](https://redirect.github.com/Azoy) in
[#&#8203;692](https://redirect.github.com/apple/swift-collections/pull/692)
- Fix stale paths in internals documentation by
[@&#8203;ZayanKhan-12](https://redirect.github.com/ZayanKhan-12) in
[#&#8203;691](https://redirect.github.com/apple/swift-collections/pull/691)
- More updates to the container model by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;694](https://redirect.github.com/apple/swift-collections/pull/694)
- More ContainersPreview updates by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;695](https://redirect.github.com/apple/swift-collections/pull/695)
- \[Rigid/UniqueDictionary] Add mutableValue(forKey:) to new dictionary
types by [@&#8203;Azoy](https://redirect.github.com/Azoy) in
[#&#8203;698](https://redirect.github.com/apple/swift-collections/pull/698)
- \[OrderedCollections] Share OrderedSet's replace primitive with
OrderedDictionary.replaceElement by
[@&#8203;inju2403](https://redirect.github.com/inju2403) in
[#&#8203;688](https://redirect.github.com/apple/swift-collections/pull/688)
- Fix inverted SortedDictionary Keys/Values/SubSequence equality by
[@&#8203;Hashim1999164](https://redirect.github.com/Hashim1999164) in
[#&#8203;697](https://redirect.github.com/apple/swift-collections/pull/697)
- \[Deque/HashTree] Remove references to ManagedBuffer.capacity and use
the given minCapacity by
[@&#8203;Azoy](https://redirect.github.com/Azoy) in
[#&#8203;700](https://redirect.github.com/apple/swift-collections/pull/700)
- \[Rigid/UniqueArray] Eliminate some duplicate bounds checks for
UniqueArray by [@&#8203;Azoy](https://redirect.github.com/Azoy) in
[#&#8203;699](https://redirect.github.com/apple/swift-collections/pull/699)
- Mark `_Word.allBits` as `@inlinable` by
[@&#8203;dnadoba](https://redirect.github.com/dnadoba) in
[#&#8203;704](https://redirect.github.com/apple/swift-collections/pull/704)
- Improve `BitSet.count` performance by \~3x by
[@&#8203;dnadoba](https://redirect.github.com/dnadoba) in
[#&#8203;702](https://redirect.github.com/apple/swift-collections/pull/702)
- \[workflows] Update CI workflows by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;706](https://redirect.github.com/apple/swift-collections/pull/706)
- Name the documented arguments the way the declarations name them by
[@&#8203;karpovantonme](https://redirect.github.com/karpovantonme) in
[#&#8203;701](https://redirect.github.com/apple/swift-collections/pull/701)
- \[OrderedCollections] Use exchange(\_:with:) in replaceElement's
equal-key path by
[@&#8203;inju2403](https://redirect.github.com/inju2403) in
[#&#8203;703](https://redirect.github.com/apple/swift-collections/pull/703)
- \[SortedCollections] Name the documented arguments the way the
declarations name them by
[@&#8203;karpovantonme](https://redirect.github.com/karpovantonme) in
[#&#8203;705](https://redirect.github.com/apple/swift-collections/pull/705)
- More container updates by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;707](https://redirect.github.com/apple/swift-collections/pull/707)
- Bump
swiftlang/github-workflows/.github/workflows/swift_package_test.yml from
0.0.14 to 0.0.15 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;712](https://redirect.github.com/apple/swift-collections/pull/712)
- Bump swiftlang/github-workflows/.github/workflows/soundness.yml from
0.0.14 to 0.0.15 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;711](https://redirect.github.com/apple/swift-collections/pull/711)
- Conform RigidSet/UniqueSet to Container and add Container validator by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;713](https://redirect.github.com/apple/swift-collections/pull/713)
- Disable `_UniqueCollection` fast paths in embedded Swift by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;715](https://redirect.github.com/apple/swift-collections/pull/715)
- Reinstate exported imports in Collections module by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;716](https://redirect.github.com/apple/swift-collections/pull/716)
- \[RigidDictionary] Store a sentinel value for values ptr if null by
[@&#8203;Azoy](https://redirect.github.com/Azoy) in
[#&#8203;717](https://redirect.github.com/apple/swift-collections/pull/717)
- \[BitSet] Fix isEqualSet(to: Range<Int>) for empty ranges by
[@&#8203;dylanpulver](https://redirect.github.com/dylanpulver) in
[#&#8203;718](https://redirect.github.com/apple/swift-collections/pull/718)
- Refactor DrainableContainer/RangeReplaceableContainer/DynamicContainer
by [@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;723](https://redirect.github.com/apple/swift-collections/pull/723)
- MutableContainer: Add some bulk update operations by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;724](https://redirect.github.com/apple/swift-collections/pull/724)
- Container: Reinstate requirement for Comparable indices by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;727](https://redirect.github.com/apple/swift-collections/pull/727)
- Add checkSetAlgebra, a law checker for set-like types by
[@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;719](https://redirect.github.com/apple/swift-collections/pull/719)
- Fix typos in documentation and comments by
[@&#8203;eliorpom-cmd](https://redirect.github.com/eliorpom-cmd) in
[#&#8203;725](https://redirect.github.com/apple/swift-collections/pull/725)
- \[DequeModule] Add tests for Deque's storage allocation behavior by
[@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;722](https://redirect.github.com/apple/swift-collections/pull/722)
- Unbacktick parameter names so DocC binds the parameter docs by
[@&#8203;hxperl](https://redirect.github.com/hxperl) in
[#&#8203;721](https://redirect.github.com/apple/swift-collections/pull/721)
- Validate the Container conformance of RigidDeque and UniqueDeque by
[@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;720](https://redirect.github.com/apple/swift-collections/pull/720)
- `Producer.generate(into:)`: Switch to saturating semantics by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;728](https://redirect.github.com/apple/swift-collections/pull/728)
- Check the mutating form\* twins against their non-mutating originals
by [@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio) in
[#&#8203;730](https://redirect.github.com/apple/swift-collections/pull/730)
- 1.7.0 release preparations by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;729](https://redirect.github.com/apple/swift-collections/pull/729)
- Finalize the 1.7.0 release by
[@&#8203;lorentey](https://redirect.github.com/lorentey) in
[#&#8203;731](https://redirect.github.com/apple/swift-collections/pull/731)

#### New Contributors

- [@&#8203;sorinc03](https://redirect.github.com/sorinc03) made their
first contribution in
[#&#8203;662](https://redirect.github.com/apple/swift-collections/pull/662)
- [@&#8203;itej13](https://redirect.github.com/itej13) made their first
contribution in
[#&#8203;679](https://redirect.github.com/apple/swift-collections/pull/679)
- [@&#8203;wjdtjq6](https://redirect.github.com/wjdtjq6) made their
first contribution in
[#&#8203;674](https://redirect.github.com/apple/swift-collections/pull/674)
- [@&#8203;ZayanKhan-12](https://redirect.github.com/ZayanKhan-12) made
their first contribution in
[#&#8203;691](https://redirect.github.com/apple/swift-collections/pull/691)
- [@&#8203;Hashim1999164](https://redirect.github.com/Hashim1999164)
made their first contribution in
[#&#8203;697](https://redirect.github.com/apple/swift-collections/pull/697)
- [@&#8203;karpovantonme](https://redirect.github.com/karpovantonme)
made their first contribution in
[#&#8203;701](https://redirect.github.com/apple/swift-collections/pull/701)
- [@&#8203;dylanpulver](https://redirect.github.com/dylanpulver) made
their first contribution in
[#&#8203;718](https://redirect.github.com/apple/swift-collections/pull/718)
- [@&#8203;Joseph-Cursio](https://redirect.github.com/Joseph-Cursio)
made their first contribution in
[#&#8203;719](https://redirect.github.com/apple/swift-collections/pull/719)
- [@&#8203;eliorpom-cmd](https://redirect.github.com/eliorpom-cmd) made
their first contribution in
[#&#8203;725](https://redirect.github.com/apple/swift-collections/pull/725)
- [@&#8203;hxperl](https://redirect.github.com/hxperl) made their first
contribution in
[#&#8203;721](https://redirect.github.com/apple/swift-collections/pull/721)

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

</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:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE4MC4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-26 16:51:30 +08:00
DarkSky b2e56529ee chore: improve ci (#15743) 2026-10-26 16:49:45 +08:00