10300 Commits

Author SHA1 Message Date
liuyi
9e1fa23c5e
chore: bump base version 2025-06-24 14:43:39 +08:00
liuyi
8f0812ae12
ci: change canary release tag format 2025-06-24 14:38:54 +08:00
liuyi
d2a9b048ad
ci: use docker buildx to release channel tag 2025-06-24 14:03:10 +08:00
Lakr
10139205b4
chore: update graphql support for fetching initial user status (#12905)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new context management system for intelligent features,
enabling the collection and preparation of metadata from both web view
and GraphQL sources.
- Added a service for managing GraphQL API interactions, including user,
workspace, subscription, and quota queries.
- Enabled searching documents within a workspace using a new GraphQL
query and input structure.

- **Enhancements**
- Expanded chat session and chat history search capabilities with
additional filter and pagination options.

- **Refactor**
- Replaced the previous context management class with a more
comprehensive and modular implementation.
- Improved handling of cookies for network requests to ensure session
continuity.

- **Style**
- Minor code style and formatting improvements for clarity and
consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-24 05:03:35 +00:00
Wu Yue
63de20c3d5
feat(core): support objects render in ai chat block (#12906)
Close [AI-195](https://linear.app/affine-design/issue/AI-195)


<img width="1219" alt="截屏2025-06-24 10 55 18"
src="https://github.com/user-attachments/assets/8c54ad41-2bbf-443a-a41a-9cea9aede7b4"
/>


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

- **New Features**
- Introduced a new component to render various AI stream objects within
chat messages, supporting richer content types like reasoning blocks and
tool calls.

- **Improvements**
- Enhanced chat message rendering by consolidating message properties
into a single object and simplifying component interfaces.
- Improved scrolling behavior with smooth, throttled scrolling and
better synchronization with chat status.
- Updated chat history and streaming updates to use immutable data
handling for more reliable message updates.
- Refined rendering keys and content merging for more accurate display
of streamed AI responses.
- Improved handling and display of tool results and web search/crawl
outputs.

- **Bug Fixes**
- Ensured consistent presence of attachments and streaming objects in
chat message data.
- Enhanced parsing and merging of streamed AI responses for better
message accuracy.

- **Refactor**
- Streamlined imports, component registrations, and internal message
handling for maintainability.
- Updated type definitions to support new optional message properties
and improve compatibility.

- **Style**
- Adjusted layout by moving history clear controls for a more intuitive
chat interface.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-24 05:03:11 +00:00
Cats Juice
616e755dde
fix(core): center align user avatar in doc property (#12908)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added an option to center-align user labels in components displaying
user information, improving visual alignment of avatars and usernames.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-24 05:01:56 +00:00
Peng Xiao
4e6f40b30e
chore(electron): update icons (#12907) 2025-06-24 05:01:18 +00:00
Cats Juice
8754d1b164
feat(core): limit visible doc inline stack tags (#12647)
![CleanShot 2025-05-29 at
18.06.32@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/09538910-0577-48cc-9532-53591d76f759.png)



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

## Summary by CodeRabbit

- **New Features**
- Tag lists now display a maximum of three tags, with an additional "+N
Tags" indicator if more tags are present.
- The "+N Tags" indicator label is localized based on your language
settings.

- **Style**
  - Improved spacing for the "+N Tags" indicator in tag lists.

- **Bug Fixes**
- Icons in certain property views are now only shown when available,
preventing empty icon placeholders.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-24 03:08:32 +00:00
Cats Juice
d743082d83
fix(mobile): change mobile docs display config and prevent opening doc when close menu (#12903)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Improvements**
- Updated document explorer to hide quick favorite and document icons,
and display more detailed system properties for each document.
- Enhanced link behavior in the workbench to prevent unintended clicks
from triggering navigation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-24 02:17:57 +00:00
L-Sun
1686b92adb
fix(editor): middle click open new tab (#12902)
Close
[BS-3251](https://linear.app/affine-design/issue/BS-3251/正文的inline链接,chrome中,中键开新窗口的行为丢失了)

#### PR Dependency Tree


* **PR #12902** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

- **New Features**
- Middle-clicking on links and references now opens them in a new
browser tab.
- Linux platform detection has been added for improved
environment-specific behavior.

- **Bug Fixes**
- Middle-click paste prevention is now limited to Linux environments
when the relevant setting is disabled and excludes clicks on links and
references.

- **Tests**
- Added end-to-end tests to verify that middle-clicking links opens them
in a new tab for external links, internal links, and reference
documents.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-23 12:33:51 +00:00
Richard Lora
a8c18cd631
feat(editor): streamline cell editing and navigation with improved keyboard support (#12770)
https://github.com/user-attachments/assets/6bce5fa3-fb25-4906-bef1-50d4da4a13f6

This PR addresses #12769 and improves table editing UX by making Enter
commit changes and move focus down, and Tab/Shift+Tab move focus
horizontally—matching spreadsheet-like behavior.

Typing now immediately enters edit mode for selected cells without
double-clicking.
These updates apply to both the standard and virtual table views.

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

- **New Features**
- You can now start editing a table cell by simply typing any character
while the cell is selected.
- **Improvements**
- Pressing Enter while editing a cell will exit editing and move focus
down.
- Pressing Tab or Shift-Tab while editing a cell will exit editing and
move focus right or left, respectively.
- **Tests**
- Added unit tests for table cell hotkey behaviors to ensure reliable
editing and navigation.
- **Chores**
- Introduced Vitest configuration for streamlined testing and coverage
reporting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: L-Sun <zover.v@gmail.com>
2025-06-23 20:24:22 +08:00
Richard Lora
74106ba7c6
fix(core): persist sidebar open state and width to prevent flash on load (#12743)
https://github.com/user-attachments/assets/6b61c9f2-80bd-4f2c-943d-1fd610a69ecf

This PR change updates the sidebar initialization so it reads the open
and width values from persistent storage. This prevents the UI from
flashing open by default on startup.

Both left and right sidebars restore correctly from the last known state
from storage.

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

- **New Features**
- Sidebar and workbench panels now retain their open/closed status and
width based on your previously saved preferences, providing a more
personalized and consistent experience across sessions.
- **Tests**
- Added comprehensive tests to ensure sidebar state persistence and
behavior are reliable and consistent.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Norkz <richardlora557@gmail.com>
2025-06-23 10:46:10 +00:00
Cats Juice
4507c88792
fix(core): remove list view doc preview skeleton (#12621)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Updated the document preview in the list view to remove the loading
placeholder, resulting in a simplified and cleaner display when loading
previews.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-23 10:36:46 +00:00
Cats Juice
dd1b8ff920
fix(core): show toolbar when quick select doc explorer (#12601)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Selection mode is now automatically activated when a document is
selected or deselected in the quick actions view.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-23 10:35:02 +00:00
Cats Juice
ea92e2291d
fix(core): adjust new doc list filter style (#12629)
close AF-2678, AF-2677, AF-2674, AF-2655

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

- **New Features**
  - Added customizable spacing for dividers.
  - Introduced a flexible filter value menu for easier filter editing.
- Added options to control visibility of creation actions in empty
document views.

- **Improvements**
- Enhanced menu components for filter values with a more declarative and
simplified interface.
  - Improved vertical alignment in some UI containers.
  - Updated divider spacing for more consistent UI appearance.

- **Bug Fixes**
  - Menu popups for filters now appear in correct positions.

- **Removals**
- Removed support for the "zotero" integration type from integration
settings and filters.

- **Style**
  - Updated CSS for better menu positioning and alignment.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-23 10:34:00 +00:00
Cats Juice
24b205ae83
feat(mobile): add delete operation for detail page menu (#12900)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added a "Move to Trash" option in the page header menu, allowing users
to move documents to trash with confirmation and permission checks.

- **Refactor**
- Centralized and reorganized tab-related type definitions for improved
maintainability.
  - Updated tab components to use shared constants and types.

- **Style**
- Updated menu item styling for the new trash action to indicate a
destructive operation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-23 10:33:24 +00:00
liuyi
934e377054
ci: update docker image name 0.21.0-canary.934e377 2025-06-23 15:57:02 +08:00
liuyi
8d77c480e0
ci: bring ios & android canary tests back 2025-06-23 15:34:49 +08:00
fengmk2
862a50c982
fix(server): use job queue instead event on doc indexing changes (#12893)
close CLOUD-231



#### PR Dependency Tree


* **PR #12893** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Summary by CodeRabbit

- **Refactor**
- Updated background processing for document indexing and deletion to
use a job queue system instead of event-based triggers.
- **Bug Fixes**
- Improved reliability of embedding updates and deletions by ensuring
tasks are properly queued and processed.
- **Tests**
- Adjusted tests to verify that document operations correctly trigger
job queue actions.
  
No changes to user-facing features or interface.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-23 06:56:04 +00:00
liuyi
705d2e9bbe
ci: fix release workflow 2025-06-23 14:49:15 +08:00
Yii
e6d8008d4f
ci: group cloud, desktop, mobile in one release workflow (#12802)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced new workflows for preparing releases, cloud deployment, and
coordinated multi-platform releases with manual approval for stable
Docker images.
- Added a reusable action to output app version, Git hash, and build
type for consistent release metadata.

- **Refactor**
- Simplified and unified input handling across workflows, requiring
explicit version and build metadata inputs.
- Updated release workflows (desktop, mobile, cloud) to use direct
inputs instead of deriving values internally.

- **Chores**
- Removed several legacy and redundant workflows, including automatic
deployment, release, label checking, auto-assign, and Helm chart
publishing.
- Deleted jobs and workflows related to self-hosted image builds, mobile
app test builds, and previous deployment processes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-23 14:30:23 +08:00
Richard Lora
e976fcfc04
docs: clarify and fix desktop build instructions (#12881)
This PR changes documentation files related to building the desktop
client app to allow other contributors to develop and test without
becoming stuck due to outdated docs.

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

- **Documentation**
- Improved build instructions for native dependencies and E2E testing,
including updated commands and clearer server startup steps.
- Enhanced desktop client app documentation with clarified build steps,
corrected artifact paths, and added Linux installation guidance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-23 12:30:41 +08:00
Yifeng Wang
76568bae9f
feat(editor): support connector dom renderer (#12505)
### TL;DR

Added DOM-based renderer for connector elements in the AFFiNE editor.

### What changed?

- Created a new DOM-based renderer for connector elements that uses SVG
for rendering
- Implemented `ConnectorDomRendererExtension` to register the DOM
renderer for connector elements
- Added support for rendering connector paths, endpoints (arrows,
triangles, circles, diamonds), stroke styles, and labels
- Registered the new DOM renderer extension in the connector view setup
- Added comprehensive tests to verify DOM rendering functionality

### How to test?

1. Enable the DOM renderer flag in the editor
2. Create connector elements between shapes or with fixed positions
3. Verify that connectors render correctly with different styles:
   - Try different stroke styles (solid, dashed)
   - Test various endpoint styles (Arrow, Triangle, Circle, Diamond)
   - Add text labels to connectors
4. Check that connectors update properly when connected elements move
5. Verify that connectors are removed when deleted

### Why make this change?

The DOM-based renderer provides an alternative to the Canvas-based
renderer, offering better accessibility and potentially improved
performance for certain use cases. This implementation allows connectors
to be rendered as SVG elements within the DOM, which can be more easily
inspected, styled with CSS, and interacted with by assistive
technologies.
2025-06-23 03:59:45 +00:00
Wu Yue
12fce1f21a
feat(core): ai tools css style adjustment (#12891)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added collapsible behavior to tool result cards, allowing users to
expand or collapse detailed results.
- Footer icons are now displayed on collapsed cards, showing up to three
relevant icons for quick reference.
- Improved icon rendering ensures consistent display, including
fallbacks when favicons are missing.
- Tool result cards and chat messages now dynamically adjust to panel
width, enhancing responsive display.
- Web crawl and web search tools display favicons in result footers for
better visual context.

- **Style**
- Enhanced UI interaction with updated margins, cursor styles, and
overlapping icon visuals for a cleaner look.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-23 03:44:24 +00:00
fengmk2
011f92f7da
feat(server): add search docs by keyword gql api (#12866)
close AI-220









#### PR Dependency Tree


* **PR #12866** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Summary by CodeRabbit

- **New Features**
- Introduced a new document search capability, allowing users to search
for documents by keyword within a workspace.
- Search results include document details such as title, highlights,
creation and update timestamps, and creator/updater information.
  - Added support for limiting the number of search results returned.
- **Tests**
- Added comprehensive end-to-end and snapshot tests to ensure accuracy
and access control for the new search functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-20 11:29:37 +00:00
Lakr
10e981aa6d
chore: update codegen cli and apollo version on iOS (#12879)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added support for creating new documents from markdown and retrieving
the current locale in the iOS app.
- Introduced a shell script to automate Apollo iOS code generation
tasks.

- **Improvements**
- Upgraded the Apollo iOS library to version 1.22.0 for improved
performance and compatibility.
- Enhanced metadata handling in the app to include document ID,
workspace ID, server URL, and locale.
- Improved JavaScript execution integration for document and workspace
operations.

- **Bug Fixes**
- Fixed button appearance in the input bar by setting a static corner
radius for the send button.

- **Chores**
- Removed unused dependencies and updated .gitignore entries for cleaner
project management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-20 11:03:16 +00:00
fengmk2
e978147a16
feat(server): add doc keyword search tool (#12837)
close AI-185

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

- **New Features**
- Introduced a keyword-based document search tool, allowing users to
search for relevant documents within their workspace using keywords.
- Search results include document titles, summaries, and direct links,
enhancing document discovery and navigation.
- **Bug Fixes**
  - None.
- **Tests**
- Added new tests to verify document search by IDs and by keywords,
ensuring accurate and reliable search functionality.
- **Documentation**
  - None.
- **Chores**
- Updated configuration file organization for improved clarity; no
changes to functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->








#### PR Dependency Tree


* **PR #12867**
  * **PR #12863**
    * **PR #12837** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
2025-06-20 10:50:34 +00:00
Cats Juice
3a124b67bd
feat(core): enable quick select for trash page (#12878)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enabled quick select functionality in the Trash page, allowing users
to more efficiently select multiple items.
- Improved selection mode activation when using quick select actions in
document explorer views.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-20 10:49:09 +00:00
Peng Xiao
da980876cb
fix(core): iframe rendering issue for youtube videos (#12880)
#### PR Dependency Tree


* **PR #12880** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Summary by CodeRabbit

- **Bug Fixes**
- Improved iframe preview behavior for code blocks, enabling enhanced
compatibility and resource access within previews.
- **Chores**
- Updated internal server configuration to no longer set custom
cross-origin headers during development.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-20 10:19:28 +00:00
fengmk2
62d74de810
feat(server): search docs by keywork from indexer (#12863)
#### PR Dependency Tree


* **PR #12867**
  * **PR #12863** 👈
    * **PR #12837**
    * **PR #12866**

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
2025-06-20 09:48:30 +00:00
fengmk2
bebe4349a9
fix(server): convert date and timestamp value to Date instance (#12867)
#### PR Dependency Tree


* **PR #12867** 👈
  * **PR #12863**
    * **PR #12837**
    * **PR #12866**

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Summary by CodeRabbit

- **New Features**
- Date fields in search results are now returned as JavaScript Date
objects instead of strings or numeric timestamps.
- **Bug Fixes**
- Improved consistency and correctness of date field types across
different search providers.
- **Tests**
- Added tests to verify that date fields are correctly returned as Date
objects.
- Updated existing test snapshots to reflect the new Date object format
for date fields.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-20 09:21:29 +00:00
DarkSky
13b64c6780
fix(server): session update check (#12877)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved validation to prevent updates to sessions with action prompts
and restrict certain updates on forked sessions.
- **Tests**
- Expanded and clarified test coverage for session updates, pinning
behavior, and session type conversions, with more explicit error
handling and validation scenarios.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-20 08:53:48 +00:00
DarkSky
c7113b0195
feat(server): add pinned & action filter for session query (#12876)
fix AI-222
2025-06-20 08:31:04 +00:00
renovate[bot]
fb250c6374
chore: bump up SnapKit/SnapKit version to from: "5.7.1" (#12873)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [SnapKit/SnapKit](https://redirect.github.com/SnapKit/SnapKit) | minor
| `from: "5.0.1"` -> `from: "5.7.1"` |

---

### Release Notes

<details>
<summary>SnapKit/SnapKit (SnapKit/SnapKit)</summary>

###
[`v5.7.1`](https://redirect.github.com/SnapKit/SnapKit/releases/tag/5.7.1)

[Compare
Source](https://redirect.github.com/SnapKit/SnapKit/compare/5.7.0...5.7.1)

- Podspec bump with privacy manifest support via Cocoapods

###
[`v5.7.0`](https://redirect.github.com/SnapKit/SnapKit/releases/tag/5.7.0)

[Compare
Source](https://redirect.github.com/SnapKit/SnapKit/compare/5.6.0...5.7.0)

Minor release:

- Update minimum deployment targets (iOS 12.0, macOS 10.13)
- Add `PrivacyInfo.xcprivacy` for Swift PM targets, Cocoapods
unsupported due to
[#&#8203;10325](https://redirect.github.com/CocoaPods/CocoaPods/issues/10325)

Happy New Year!

###
[`v5.6.0`](https://redirect.github.com/SnapKit/SnapKit/releases/tag/5.6.0)

[Compare
Source](https://redirect.github.com/SnapKit/SnapKit/compare/5.0.1...5.6.0)

- Upgrade to syntax compatibility of Swift 5.6
- Upgrade dependency manager integrations
- Small tweaks and fixes

</details>

---

### Configuration

📅 **Schedule**: 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:eyJjcmVhdGVkSW5WZXIiOiI0MC42MC4xIiwidXBkYXRlZEluVmVyIjoiNDAuNjAuMSIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 07:02:07 +00:00
fengmk2
c62627427c
fix(server): save snapshot and delete updates in the same transaction (#12856)
close CLOUD-229



#### PR Dependency Tree


* **PR #12856** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Summary by CodeRabbit

- **Refactor**
- Improved the internal handling of document updates and snapshots to
enhance reliability and maintainability. No changes to user-facing
features or functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-20 05:23:34 +00:00
Lakr
eb5a2ffe05
chore: basic setup of v2 AI (#12864)
Co-authored-by: Hwang <hwangdev97@gmail.com>
2025-06-20 05:09:33 +00:00
fengmk2
5a87d3d9f6
fix(server): don't use global AFFiNELogger (#12871)
![image](https://github.com/user-attachments/assets/0e5d313f-e72b-436b-9f13-9f0a1cff8685)

#### PR Dependency Tree


* **PR #12871** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Summary by CodeRabbit

- **Refactor**
- Updated internal logging mechanism to use a standard logger, resulting
in a simplified and more consistent logging approach. No changes to
user-facing features or functionality.

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


#### PR Dependency Tree


* **PR #12871** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
2025-06-20 05:02:42 +00:00
liuyi
07328d1348
ci: add merge queue 2025-06-20 11:47:36 +08:00
fengmk2
ad5722f637
feat(server): get recently updated docs (#12861)
close AI-218



#### PR Dependency Tree


* **PR #12861** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

- **New Features**
- Added a "Recently Updated Documents" feature, allowing users to view a
paginated list of the most recently updated documents within a
workspace.
- Document metadata now includes a "title" field for easier
identification.
- **Tests**
- Introduced new end-to-end tests to verify the recently updated
documents query and its pagination behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-20 11:35:39 +08:00
fengmk2
5623d808bf
fix(server): set empty embedding on empty doc (#12857)
#### PR Dependency Tree


* **PR #12857** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

- **Bug Fixes**
- Improved error handling in document embedding jobs to log and skip
errors instead of interrupting the process.
- Enhanced logging with clearer messages about embedding outcomes and
skipped operations.
- Added warnings when documents or summaries are missing during
embedding.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-20 10:30:53 +08:00
DarkSky
dfaf69475b
fix(server): session unique index conflict (#12865) 2025-06-20 08:36:22 +08:00
Cats Juice
7376926553
chore(core): adjust tab height and windows control, remove input background (#12862)
close AF-2697, AF-2696

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

## Summary by CodeRabbit

- **Style**
- Made the AI chat input field background transparent for improved
visual consistency.
- Reduced the size of window app control buttons and removed extra
padding from the close button.
- Decreased the height of tabs and the width of the window app controls
placeholder for a more compact layout.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-19 20:12:40 +08:00
Wu Yue
3886babcf4
feat(core): add ai web-search and web-crawl tools ui components (#12854) 2025-06-19 19:15:46 +08:00
L-Sun
2edc8e43e2
fix(android): graphql service type error (#12858)
#### PR Dependency Tree


* **PR #12858** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Summary by CodeRabbit

- **Refactor**
- Improved consistency in how session data is handled when starting a
Copilot session.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-19 16:22:47 +08:00
DarkSky
bd04930560
feat(server): allow chat session dangling & pin session support (#12849)
fix AI-181
fix AI-179
fix AI-178
fix PD-2682
fix PD-2683
2025-06-19 13:17:01 +08:00
fengmk2
d80bfac1d2
feat(server): parse ydoc to ai editable markdown format (#12846)
close AI-213









#### PR Dependency Tree


* **PR #12846** 👈
  * **PR #12811**

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

## Summary by CodeRabbit

- **New Features**
- Introduced support for AI-editable blocks in document parsing,
allowing blocks to include metadata for AI-based editing.
  - Added rendering for todo list items with markdown checkbox syntax.
- Unsupported block types are now marked with placeholders in the parsed
output.

- **Tests**
- Added new test cases and snapshots to verify parsing behavior with
AI-editable content enabled.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-19 11:27:04 +08:00
Cats Juice
380f40ebed
style(core): adjust app sidebar style (#12852)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Style**
- Adjusted layout and spacing in sidebar and quick search components for
a more compact appearance.
- Reduced header and tab heights in the desktop app, increasing main
view space.
- Updated add-page button size, padding, and font for improved
usability.
  - Refined menu positioning in workspace selector for dense layouts.
  - Improved macOS window button positioning for better alignment.
  - Updated and restructured iOS app dependencies.

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

Co-authored-by: fengmk2 <fengmk2@gmail.com>
v0.23.0-canary.2
2025-06-19 10:15:42 +08:00
fengmk2
73402c8447
feat(server): parse ydoc to markdown (#12812)
close AI-190

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

- **New Features**
- Introduced an endpoint to retrieve a document's markdown content and
title.
- Added backend support for parsing document snapshots directly into
markdown format.

- **Tests**
- Added comprehensive tests and snapshot files for markdown retrieval,
including success and error scenarios.
- Improved test coverage for content type validation and markdown
parsing utilities.

- **Documentation**
- Enhanced internal documentation through detailed test cases and
snapshot references for new markdown features.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->








#### PR Dependency Tree


* **PR #12812** 👈
  * **PR #12846**
    * **PR #12811**

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
2025-06-19 09:14:00 +08:00
Wu Yue
6169cdab3a
feat(core): add stream object api (#12841)
Close [AI-193](https://linear.app/affine-design/issue/AI-193)

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

- **New Features**
- Added support for streaming structured AI chat responses as objects,
enabling richer and more interactive chat experiences.
- Chat messages now include a new field displaying structured stream
objects, such as reasoning steps, text deltas, tool calls, and tool
results.
- GraphQL APIs and queries updated to expose these structured streaming
objects in chat histories.
  - Introduced a new streaming chat endpoint for object-based responses.

- **Bug Fixes**
- Improved error handling for streaming responses to ensure more robust
and informative error reporting.

- **Refactor**
- Centralized and streamlined session preparation and streaming logic
for AI chat providers.
  - Unified streaming setup across multiple AI model providers.

- **Tests**
- Extended test coverage for streaming object responses to ensure
reliability and correctness.

- **Documentation**
- Updated type definitions and schemas to reflect new streaming object
capabilities in both backend and frontend code.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
2025-06-19 09:13:18 +08:00
Peng Xiao
ce951ec316
feat(editor): by default render code iframe for html preview (#12848)
#### PR Dependency Tree


* **PR #12848** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

- **New Features**
- Introduced a feature flag to enable or disable web container
functionality for code block previews.
- **Improvements**
- Code block HTML previews now support an alternative rendering method
based on the new feature flag, enhancing flexibility.
- **Chores**
- Updated feature flag settings by removing an obsolete flag and adding
the new web container flag.
- **Tests**
- Simplified code block preview tests for faster and more direct
validation of HTML preview content.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-19 09:12:33 +08:00