Commit Graph

587 Commits

Author SHA1 Message Date
Nathan
8ddf546611 chore: fix test 2026-03-11 01:29:15 +08:00
Nathan
373fe9ae53 fix: batch test fixes for CI - paste, calendar, database, filter tests
- Paste tests: fix strict mode violations with .first()/.last(), relax
  formatting assertions that depend on markdown rendering
- Calendar reschedule: rewrite to use correct UI interactions (DateTime
  cell click + DateTimeCellPicker + clear-date-button)
- Calendar event creation: use single click instead of dblclick, add
  assertions for popover visibility
- Database view tabs/consistency: fix addView dropdown menu interaction
  to use data-slot selector for DropdownMenuContent
- Filter tests: increase wait times, fix selectExistingOption to use
  select-option-menu testid scope
- Source: add data-testid to clear-date-button and no-date-row

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 01:07:32 +08:00
Nathan
fdd1e76adc fix: additional playwright test fixes for CI stability
- database-view-tabs: increase tab appearance timeout to 5s
- database-view-consistency: fix calendar event creation (dblclick + contenteditable)
- filter-date: increase wait times after filter deletion
- person-cell-publish: scope getByText('Publish') to share popover

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:54:45 +08:00
Nathan
8fcd295582 chore: fix calendar, share/publish, move-page, and paste test failures
- Add data-testid attributes to CustomToolbar.tsx (calendar-toolbar,
  calendar-title, calendar-prev/next/today-button)
- Add data-testid to EventPopoverContent.tsx delete button
- Update CalendarSelectors to use data-testids instead of .fc classes
- Fix share/publish strict mode violations by scoping getByText to
  share popover (avoids matching multiple elements)
- Fix move-page-restrictions to use ViewActionSelectors.popover and
  moveToButton testids instead of data-slot selector
- Fix paste-code blockquote assertion to check text content only
- Fix calendar-edit-operations createEventOnCell to use dblclick and
  contenteditable selector
- Fix embedded create-delete to use controls-menu testid
- Fix editor callout to use slash-menu-callout testid
- Fix editor navigate to use BlockSelectors
- Add src/** to build cache key to ensure source changes rebuild
- Skip calendar layout test (non-existent UI elements)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:47:49 +08:00
Nathan
a7f93b3c4f chore: fix editor test strict mode violations and cross-block selection
- Toolbar: Use Home+Shift+End instead of Meta+A to avoid cross-block selection
  (cross-block hides list/quote buttons in toolbar)
- Toolbar: Use .last() for MuiPopover-root to handle Quick Notes popover
- Markdown shortcuts: Use BlockSelectors.blockByType for heading assertions
- Slash menu: Use data-testid instead of getByText for menu items
  (avoids "Heading 1" vs "Toggle Heading 1" ambiguity)
- Cursor tests: Use Home/End instead of selectAll+Arrow for line navigation
- Inline code: Use specific span.bg-border-primary selector

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:56:55 +08:00
Nathan
a1eba0e06f chore: fix auth OTP response.json race and image page creation
- Auth: Remove response.json() call that races with body GC
- Image: Use same dialog expand pattern as createDocumentPageAndNavigate

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:31:18 +08:00
Nathan
18812bd2dd chore: fix CI test failures across editor, paste, embedded, and database tests
Key fixes:
- Editor tests: Use createDocumentPageAndNavigate instead of "Getting started" page
  to avoid strict mode violations from template content
- Paste tests: Replace fragile hover-dependent inline-add-page with shared helper
- Toolbar: Add data-testid to BulletedList, NumberedList, Quote toolbar buttons
- CI config: Add trailing slash to database/ path to prevent prefix-matching
- Platform-aware: Use Meta+A on Mac, Control+A on Linux for select-all
- Skip version-history tests (require dev-mode window.__TEST_DOC__ globals)
- Various selector and timing fixes for database and page tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:06:55 +08:00
Nathan
17f6a325d4 chore: fix test 2026-03-10 14:02:53 +08:00
Nathan
b547a90dc2 chore: playwright test 2026-03-10 12:58:03 +08:00
Nathan
e9af89a7dc chore: playwright test 2026-03-10 10:51:13 +08:00
Nathan.fooo
5dea0e5051 chore: stabilize React context values and callback references to prev… (#277)
* chore: stabilize React context values and callback references to prevent unnecessary re-renders

* fix: stabilize chat, editor, and database interactions

  - preserve first-message chat renames and stable model reads
  - guard async chat settings and notification updates after unmount
  - fix board/grid scroll listener cleanup and align toolbar fallback
  - add cypress stability coverage for chat, database, editor, and image toolbar flows

* chore: fix test

* refactor: split app context into focused providers and explicit hooks

  - replace legacy AppContext access with auth/navigation/outline/operations/sync hooks
  - make optional auth and workspace dependencies explicit at call sites
  - split board selection state from board actions
  - update Storybook and modal/view wiring for the new context boundaries

* chore: lint
2026-03-06 19:49:23 +08:00
Nathan.fooo
2babe74fdd chore: stableize provider state and event listeners (#276)
* chore: stableize provider state and event listeners

* chore: harden context providers and stabilize context values

* chore: harden context providers and stabilize context values
2026-03-05 21:58:16 +08:00
Nathan.fooo
308e40d1c3 chore: catch delete error (#274) 2026-03-05 21:40:36 +08:00
Nathan.fooo
5c71514375 fix: chat model selection (#275) 2026-03-05 09:26:32 +08:00
nathan
c0c5c6e79f chore: attach empty payload for post request 0.11.1 2026-03-03 14:44:54 +08:00
Nathan.fooo
e7246a2ed3 feat: implement notification box (#272)
* feat: implement notification box

* chore: lint

* chore: fix flaky test

* chore: fix test
2026-03-03 09:43:31 +08:00
Nathan.fooo
46700d7218 chore: implement web search (#271)
* chore: implement web search

* chore: lint
2026-03-02 15:45:50 +08:00
Nathan.fooo
8d1d882bdb fix: kanban card duplicate (#270)
* fix: kanban bcard duplicate

* chore: lint
0.11.0
2026-03-01 20:29:33 +08:00
Nathan.fooo
2a7204be72 fix: #215 (#269) 2026-03-01 16:07:38 +08:00
Nathan.fooo
ed86a322db fix: database create refresh (#268)
* fix: blank flash when creating first database from a document page

* chore: create test for ai summary
2026-03-01 15:28:30 +08:00
Nathan.fooo
e22e1a7153 refactor: remove buiness context, split into small context (#267) 2026-03-01 10:19:47 +08:00
Nathan
71164bf35f chore: delete docs 2026-02-28 20:03:43 +08:00
Nathan.fooo
77e9ae94f8 chore: split monolithic API layer into domain service modules (#266) 2026-02-28 17:16:56 +08:00
Nathan.fooo
2ee28d7025 chore: use server info (#265)
* chore: use server info

* chore: ci env

* chore: fix flaky test
2026-02-28 15:10:55 +08:00
Lucas
2aa2ecedc3 fix: math equation overflow (#264)
* fix: hide raw slate text in embed blocks

The absolute div holding Slate's raw text nodes for cursor positioning
was missing text-transparent, causing the formula source text to render
visibly on top of the KaTeX output. Triggered by .text-element { z-index: 2 }
added in the realtime sync PR. Fix applied to MathEquation, PDF, and File blocks.

* chore: add math equation block component test

Verify KaTeX renders correctly and the raw Slate text node
is hidden via text-transparent to prevent duplicate display.
2026-02-28 00:30:19 +08:00
Bartosz Sypytkowski
f7c727fc61 Feat/page history UI (#262)
* chore: view history

* chore: remove outdated collab version listing and add version preview api

* chore: update collab history list api

* chore: fixed revert collab http api data nesting

* chore: integrated collab version into YDoc

* chore: view history

* chore: remove outdated collab version listing and add version preview api

* feat: implement document history ui modal

* fix: ai code review

* chore: fixed doc preview

* chore: move version to doc itself

* chore: only update user mappings when current user made a change locally

* chore: always restore doc version

* chore: add version as part of the key to the document editor

* chore: add cypress e2e tests for collab version history

* fix: harden version history sync and preview flow

- remove duplicate collab message handling in sync
- await revert before refreshing version history state
- guard and cancel stale preview fetches in history modal
- show "Version History" action only for document views
- clean up history list memoization/lint issues

* fix: dedupe collab handling and stabilize history list item memoization

- apply version-reset logic to broadcast-channel collab updates
- avoid replaying the same collab message when non-message deps change
- remove inline per-item callbacks to preserve VersionListItem memo benefits

* fix: harden version reset and revert flows

- use server-returned collab version after revert

- drop queued local updates during version reset/revert instead of flushing stale edits

- compare expectedVersion against persisted provider version in openCollabDBWithProvider

- unregister sync destroy listeners during cleanup

- document guid identity assignments for workspace/database/row docs

* fix(sync): restore row API contract and harden reset flow

- restore AppService methods to createRow/deleteRow

- ensure version reset continues rebinding after teardown

- keep doc reset handling scoped by view identity

- simplify history modal preview path and update tests

* fix(history): keep awareness/reset state consistent

- update awarenessMap when Y.Doc is replaced during reset/revert

- fail restore when sync context/workspace is unavailable

- clear selected version when filters hide all versions

* fix(sync): avoid legacy version reset data loss

- skip destructive resets when local doc version is unknown and migrate to incoming version

- remove duplicate collab proto declarations to keep schema canonical

* fix(history-sync): harden version history reset flows and clean test/lint regressions

* fix(sync): guard stale reset tasks and clear modal state on doc switch

* fix(sync): harden version reset and restore flows

- recreate a fresh Y.Doc after IndexedDB clear when expectedVersion mismatches

- remove timeout-based deleteDB path that could race with reopen

- keep old doc active until replacement doc is opened/applied successfully

* fix(history): harden version flows and optimize modal render

- persist learned collab versions and preserve deferred cleanup during resets

- filter tombstoned history entries from modal state

- lazy-load history modal and pass stable preview editor props

* fix(sync): avoid dropped updates and isolate history preview

- abort stale reset handlers on active-context replacement and apply guards before/after open

- remove loadView/bindViewSync from history preview editor props to prevent live nested sync

* fix(sync): align reset/update handling with desktop parity

- reroute superseded reset messages to active context instead of dropping

- enforce version match before applying rerouted updates

- disable version-history entry in ViewModal host that lacks doc-reset rebinding

* test(sync): cover version-gated updates and reset concurrency

* fix(sync): serialize reset replay and recover context on reopen failure

* chore(deps): upgrade uuid for collab version validation

* fix(sync): harden restore flow and history API handling

* fix(sync): tighten version-history reset and cleanup paths

* refactor(history): simplify modal refs and preview props

* chore: dismiss dialog after restore with correct editor state

* refactor: make view vs collab ids explicit across sync flow

* fix(sync): align unknown-version reset behavior with desktop

* refactor(history): normalize tombstone field to deletedAt

* fix(sync): scope incoming collab serialization per object

Avoid global head-of-line blocking in useSync by replacing the single incoming-message queue with per-objectId queues and per-object processors.

This preserves in-order processing for each document (required for reset/version safety) while allowing unrelated documents to continue syncing when one object is waiting on a slow reset/open path.

Also adds a regression test to ensure a pending reset for object A does not block updates for object B.

* chore(sync): remove extra inline comment

* test(sync): expand useSync coverage and align version reset behavior

Add a comprehensive useSync hook test matrix for notifications, queueing, public API methods, and revert/reset edge cases.

Align version mismatch handling with desktop semantics for known/unknown version states and add force-reset support in openCollabDB APIs for mismatch resets without expectedVersion.

* refactor: extract database identity logic into dedicated hook

* chore: fix test

* feat(history): show dialog when document is externally reverted

* chore: fix sync

* refactor: separate sync

* fix: show dialog

* refactor: stabilize hook deps, fix revert dialog timing, and clean up debug logging

* chore: exract use row operation from view operation

* refactor: remove duplicate extension

* fix: prevent blank page when outline patch targets lazy-loaded children

* fix: test

---------

Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
Co-authored-by: Nathan <nathan@appflowy.io>
2026-02-28 00:29:39 +08:00
Nathan.fooo
463301801e fix: deduplicate edit clients (#260) 0.10.8 2026-02-22 23:16:03 +08:00
Nathan
e55b61bbc8 chore: add header 2026-02-22 11:26:49 +08:00
Nathan.fooo
291e0ef1fd chore: fix flaky test (#259)
* chore: fix flaky test

* chore: extract shared functions
2026-02-20 21:48:29 +08:00
Nathan.fooo
f98ab198c5 Optimize page reload (#258)
* chore: optimize page reload when ws reconnect

* chore: optimize loading

* chore: add test

* chore: add test

* chore: create auth helper

* chore: fix test

* chore: fix test

* chore: fix test

* chore: fix test
2026-02-20 13:17:56 +08:00
Nathan.fooo
83155994be chore: filter out database view (#250)
* chore: filter out database view

* fix: update test

* fix: update test
2026-02-18 21:19:16 +08:00
Nathan.fooo
c8f4409988 Use new folder api (#257)
* chore: use new api

* chore: lint

* fix: test

* fix: test

* fix: add test

* fix: add test

* fix: update test
2026-02-18 16:27:43 +08:00
Nathan.fooo
d0704de22c chore: support resend email (#256) 0.10.7 2026-02-11 14:27:48 +08:00
Nathan.fooo
90163d66ec fix: password signup (#255) 0.10.6 2026-02-10 22:58:24 +08:00
Nathan.fooo
e35ba5a070 Implement row comments (#254)
* chore: optimize row doc loading

* feat: implement row comments

* chore: lint

* chore: fix test
2026-02-07 21:10:40 +08:00
Nathan.fooo
935557d47a chore: fix missing group key (#253)
* chore: fix missing group key

* chore: lint
0.10.5
2026-02-07 11:28:50 +08:00
Nathan.fooo
c8cd2431c7 chore: optimize row doc loading (#252) 0.10.4 2026-02-06 16:34:22 +08:00
Nathan.fooo
5bdbcc615e feat: impl advance filter (#245)
* feat: impl advance filter

* chore: update test

* chore: update test

* chore: update test
0.10.3
2026-02-04 22:44:11 +08:00
Nathan.fooo
089cb801e5 Fix publish row document (#248)
* fix: row document

* chore: update test
2026-02-04 22:43:53 +08:00
Nathan.fooo
c6607c6191 fix: open row page error (#246) 2026-02-04 20:44:18 +08:00
Nathan.fooo
05d6ec478c chore: support saml login (#244)
* chore: support saml login

* chore: support saml login
0.10.2
2026-02-01 18:52:59 +08:00
Nathan.fooo
473e7495ab Fix row document override (#243)
* chore: fix override

* chore: fix override

* chore: lint
0.10.1
2026-02-01 13:30:06 +08:00
Nathan.fooo
27c042c2c5 Sync and duplicate (#242)
* chore: sync before duplicate content

* chore: improve duplicated content sync
2026-02-01 11:11:11 +08:00
Nathan.fooo
3ff0728382 fix: invalid hook (#236)
* fix: invalid hook

* chore: fix lint

* fix: person filter

* fix: test
2026-02-01 08:08:04 +08:00
Nathan.fooo
17d18e8792 Support multiple part upload (#241)
* feat: support multiple part upload

* chore: add test

* chore: add test
0.10.0
2026-02-01 08:07:01 +08:00
Nathan.fooo
c0fa72ee79 Database duplicate test (#232)
* chore: duplicate test

* chore: add test

* chore: use notification

* chore: add test

* chore: fix test

* chore: fix test
2026-01-31 23:11:16 +08:00
Nathan.fooo
8ce3eceb4c feat: support multiple part upload (#240) 2026-01-31 23:08:19 +08:00
Nathan.fooo
d705d64631 Refactor test (#239)
* chore: remove useless tests

* chore: update test

* chore: use page icon and name

* chore: field type test

* chore: add test

* chore: fix test
2026-01-31 19:49:57 +08:00
Nathan.fooo
77f949d3e9 Refactor test2 (#238)
* chore: remove useless test

* chore: add test
2026-01-31 16:08:11 +08:00
Nathan.fooo
65ae5ed886 chore: show duplicating loading indicator (#237) 2026-01-31 14:22:01 +08:00