Commit Graph

2300 Commits

Author SHA1 Message Date
CatsJuice
7477ba6d37 feat(core): support sending success feedback via MessagePort for web clipper (#11256) 2025-03-31 03:54:44 +00:00
doodlewind
dffb89c388 feat(editor): add list block turbo renderer scaffold (#11266)
This PR allows placeholder in turbo renderer to cover list block as a basic scaffold.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/lEGcysB4lFTEbCwZ8jMv/eda28656-e56e-4845-9fe6-885e70841697.png)
2025-03-29 04:49:25 +00:00
akumatus
ac815142b3 refactor(core): add request time out error for ai (#11244)
### Why make this change?
Seperate front end timeout errors from server side errors.

### What changed?
- Add `RequestTimeoutError` which extends from `BaseAIError`.
- Track as `request timeout` instead of `server error`.
2025-03-29 04:27:40 +00:00
yoyoyohamapi
317d3e7ea6 test(core): split and enhance copilot e2e tests (#11007)
### TL;DR

Split and enhance copilot e2e tests.

### What Changed

#### Tests Structure

The e2e tests are organized into the following categories:

1. **Basic Tests (`/basic`)**: Tests for verifying core AI capabilities including feature onboarding, authorization workflows, and basic chat interactions.
2. **Chat Interaction Tests (`/chat-with`)**: Tests for verifying the AI's interaction with various ​object types, such as attachments, images, text content, Edgeless elements, etc.
3. **AI Action Tests (`/ai-action`)**: Tests for verifying the AI's actions, such as text translation, gramma correction, etc.
4. **Insertion Tests (`/insertion`)**: Tests for verifying answer insertion functionality.

#### Tests Writing

Writing a copilot test cases is easier and clear

e.g.
```ts
test('support chat with specified doc', async ({ page, utils }) => {
  // Initialize the doc
  await focusDocTitle(page);
  await page.keyboard.insertText('Test Doc');
  await page.keyboard.press('Enter');
  await page.keyboard.insertText('EEee is a cute cat');

  await utils.chatPanel.chatWithDoc(page, 'Test Doc');

  await utils.chatPanel.makeChat(page, 'What is EEee?');
  await utils.chatPanel.waitForHistory(page, [
    {
      role: 'user',
      content: 'What is EEee?',
    },
    {
      role: 'assistant',
      status: 'success',
    },
  ]);

  const { content } = await utils.chatPanel.getLatestAssistantMessage(page);
  expect(content).toMatch(/EEee/);
});
```

#### Summary

||Cases|
|------|----|
|Before|19||
|After|151||

> Close BS-2769
2025-03-29 03:41:09 +00:00
pengx17
387f7211bf fix(electron): cannot enable meetings correctly (#11269) 2025-03-28 11:13:48 +00:00
doodlewind
ebee11f573 refactor(editor): enable forceUpdate by default in viewport apis (#11264)
In this way, all downstream callers can be guaranteed by correct viewport fit result, instead of requiring them to set `forceUpdate: true` param explicitly to them. The resizing optimization is an internal exception.
2025-03-28 10:04:55 +00:00
pengx17
6c125d9a38 feat(electron): audio capture permissions and settings (#11185)
fix AF-2420, AF-2391, AF-2265
2025-03-28 09:12:26 +00:00
pengx17
dccd7c20aa feat(core): call real endpoint for audio transcription (#11139)
fix AF-2359
2025-03-28 07:59:35 +00:00
Saul-Mirone
205cd7a86d refactor(editor): rename block-std to std (#11250)
Closes: BS-2946
2025-03-28 07:20:34 +00:00
L-Sun
af91a0217f refactor(editor): inner toolbar surface-ref block with extension (#11246)
This PR refactor `surface-ref` toolbar with `ToolbarExtension`
2025-03-28 05:48:24 +00:00
darkskygit
3b9d64d74d feat(server): update trascript endpoint (#11196) 2025-03-27 10:18:49 +00:00
Flrande
3303684056 fix(editor): disable at menu member group for collaborator (#11208)
Close [BS-2893](https://linear.app/affine-design/issue/BS-2893/无邀请权限的member-时不需要显示invite入口)
Close [BS-2891](https://linear.app/affine-design/issue/BS-2891/mention-members-sention默认需显示3个人)
2025-03-27 09:45:14 +00:00
EYHN
9c939da6b5 fix(core): fix duplicate in all page (#11229) 2025-03-27 06:36:57 +00:00
EYHN
5f5c27fbdf fix(core): fix upgrade popup (#11227) 2025-03-27 05:08:42 +00:00
akumatus
22ef32f5c2 feat(core): provide document title, tags, createTime and updateTime to llm (#11205)
Close [BS-2915](https://linear.app/affine-design/issue/BS-2915).
2025-03-27 04:34:45 +00:00
donteatfriedrice
0c73fde44a feat(editor): update embed iframe toolbar config (#11221)
part of [BS-2843](https://linear.app/affine-design/issue/BS-2843/iframe-embed-block-占位态)
2025-03-27 04:17:30 +00:00
JimmFly
b00584c4cc fix(core): improve client-app navigation flow after team workspace upgrade (#11201) 2025-03-27 03:23:29 +00:00
JimmFly
5fbee7cc88 fix(core): close popup window when upgrade success (#11199) 2025-03-27 03:23:29 +00:00
JimmFly
4fddf0d000 fix(core): show SentRequestPage when invitation status is NeedMoreSeat (#11207) 2025-03-27 03:00:14 +00:00
EYHN
e311d3d1cb feat(core): more notification type (#11209) 2025-03-27 02:10:49 +00:00
akumatus
42259f5546 fix(core): add try-catch to handle possible errors (#11213)
Close [AF-2343](https://linear.app/affine-design/issue/AF-2343).
2025-03-26 11:20:02 +00:00
Saul-Mirone
0a8d8e0a6b feat: seperate createDoc and createStore (#11182) 2025-03-26 11:03:47 +00:00
Flrande
592f0e8e19 fix(editor): update at menu avatar style (#11204)
Close [BS-2894](https://linear.app/affine-design/issue/BS-2894/at面板头像ui)
2025-03-26 10:00:34 +00:00
L-Sun
c23b8f604b fix(editor): incorrect edgeless viewport in peek view (#11040)
### What Changes
- Fixed incorrect edgeless viewport display in peek view
  - Moved page block viewport fit animation logic from `EdgelessRootBlockComponent` to note config extension
  - Disabled page block viewport fit animation in peek view, using default `fitToScreen` instead
  - @doodlewind Fixed viewport resizing issues by adding a immediate update mechanism to ensure proper rendering during peek view operations.  The setViewportByBound is only called once during peek view initialization, so there are barely perf overhead.
- Updated related test cases
  - Refactored peek view test cases to make them clearer and more reliable
  - Added new test helper function `getViewportBound` for getting viewport boundary information
2025-03-26 09:29:05 +00:00
donteatfriedrice
c5624bfd13 refactor(editor): embed iframe block surface toolbar extension (#11193) 2025-03-26 08:38:07 +00:00
donteatfriedrice
39fa8e87cf feat(editor): add idle status for embed iframe block (#11142)
To close:
[BS-2843](https://linear.app/affine-design/issue/BS-2843/iframe-embed-block-占位态)
[BS-2844](https://linear.app/affine-design/issue/BS-2844/iframe-embed-block-create-modal-ui-调整)
[BS-2880](https://linear.app/affine-design/issue/BS-2880/spotify-选中时圆角有问题)
[BS-2881](https://linear.app/affine-design/issue/BS-2881/miro-圆角有问题-点击-see-the-board-加载之后就好了)
2025-03-26 08:38:06 +00:00
Flrande
30072da929 fix(editor): add member node before mention (#11197) 2025-03-26 08:05:02 +00:00
pengx17
61c0d01da3 feat(electron): recording popups (#11016)
Added a recording popup UI for the audio recording feature in the desktop app, improving the user experience when capturing audio from applications.

### What changed?

- Created a new popup window system for displaying recording controls
- Added a dedicated recording UI with start/stop controls and status indicators
- Moved audio encoding logic from the main app to a dedicated module
- Implemented smooth animations for popup appearance/disappearance
- Updated the recording workflow to show visual feedback during recording process
- Added internationalization support for recording-related text
- Modified the recording status flow to include new states: new, recording, stopped, ready

fix AF-2340
2025-03-26 04:53:43 +00:00
JimmFly
96e83a2141 fix(core): handle invitation failure (#11195) 2025-03-26 04:31:59 +00:00
EYHN
7fb52a97bd fix(core): fix notification setting error (#11194) 2025-03-26 04:00:39 +00:00
JimmFly
014556b61f feat(core): impl invitation link (#11181)
feat(core): add invitee to getInviteInfoQuery

feat(core): enable invitation link

refactor(core): replace AcceptInviteService to InvitationService
2025-03-26 02:45:12 +00:00
Jeroen Heijster
64b25dfd89 fix(core): reverted malicious discord link change (#11189)
Co-authored-by: Jimmfly <yangjinfei001@gmail.com>
2025-03-26 10:13:27 +08:00
akumatus
d991149faa feat(core): add matched context documents to ai prompt (#11148)
Close [BS-2834](https://linear.app/affine-design/issue/BS-2834).

### What Changed?
- Change `reference_index` from chip order to increasing positive integer.
- Add matched context documents to ai prompt.
2025-03-26 01:55:54 +00:00
akumatus
c019d97448 refactor(core): use unsafeCSSVar instead of var (#11188) 2025-03-25 16:49:06 +00:00
zzj3720
af18656759 fix(editor): clear the search text after selecting a member and add whitelist for image attachment (#11063)
fix: BS-2860, BS-2857
2025-03-25 16:05:06 +00:00
akumatus
aefbc11aab feat(core): add candidates popover in ai chat-panel (#11178)
Close [BS-2853](https://linear.app/affine-design/issue/BS-2853).
2025-03-25 15:50:11 +00:00
akumatus
db4406f950 fix(core): no search result in ai chat-panel (#11157)
Close [BS-2466](https://linear.app/affine-design/issue/BS-2466).
2025-03-25 14:36:05 +00:00
EYHN
3df51a217d feat(core): add use guard hook (#11180)
Previously, we used `useLiveData(guardService.can$())` to get the guard result, but `guardService.can$()` will request the server to revalidate the permission when calling it, will cause additional network requests when re-render.

This pr make a new hook `useGuard` to fix this problem.

And the side effect in `can$` is moved to `revalidateCan()` to make that the subscribe method is pure
2025-03-25 14:15:29 +00:00
EYHN
d7567edcb8 feat(infra): remove obsolete pattern (#11177)
React suspense is a deprecated mode, remove the useEnsureLiveData method
2025-03-25 13:20:17 +00:00
Saul-Mirone
1871428021 feat(editor): extensionize clipboards (#11172) 2025-03-25 12:09:24 +00:00
Saul-Mirone
e84c60f53d feat(editor): add provider for base adapter (#11169) 2025-03-25 12:09:23 +00:00
Saul-Mirone
df057b4c12 feat(editor): edgeless clipboard config extension (#11168) 2025-03-25 12:09:23 +00:00
darkskygit
1bb324eeed feat(server): update gql endpoint & workspace doc match test (#11104) 2025-03-25 10:09:22 +00:00
Flrande
bf4107feac fix(editor): fix auto focus item and improve group order (#11165) 2025-03-25 09:51:48 +00:00
EYHN
064586fa3e fix(core): adjust notification list style (#11163) 2025-03-25 09:03:49 +00:00
fengmk2
a8c86c5ede refactor(server): rename settings to user-settings (#11161) 2025-03-25 08:47:27 +00:00
EYHN
dda3103d1b feat(nbstore): allow polling protocol (#11160) 2025-03-25 08:15:23 +00:00
EYHN
36eb4991c9 feat(core): add more notification types (#11156) 2025-03-25 14:51:08 +08:00
fundon
d7eccd10ee chore(editor): add edgeless scribbled style feature flag (#11127)
Closes: [BS-2805](https://linear.app/affine-design/issue/BS-2805/下掉线条样式切换功能,需添加-feature-flag)
2025-03-24 12:55:00 +00:00
Flrande
7e248a1379 fix(editor): support mention user itself (#11133) 2025-03-24 10:42:50 +00:00