Skip to content

fix: report web bundle version to server-info - #589

Merged
appflowy merged 2 commits into
codex/database-version-historyfrom
fix/database-history-version-header
Sep 28, 2026
Merged

appflowy merged 2 commits into
codex/database-version-historyfrom
fix/database-history-version-header

Conversation

@appflowy

@appflowy appflowy commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Server-info requests identify the web platform but omit the client version, so the server cannot enable database history selectively for web 0.18.6 and later. Send the version embedded in the loaded bundle as Client-Version; an older browser tab continues to report the version it actually runs.

Source builds without APPFLOWY_WEB_VERSION use the hardcoded 0.18.6 fallback, meeting the database-history web version floor. Builds providing APPFLOWY_WEB_VERSION report their embedded build version.

This is a companion to the server's database-history version checks and is based on #549. The UI continues to follow the returned enable_database_history capability.

Validation: all 74 compatibility and HTTP client tests passed, including the request-header assertion. pnpm type-check, source ESLint, and diff checks passed.

Summary by Sourcery

Report the embedded web client version in server-info requests to enable accurate server capability negotiation.

Bug Fixes:

  • Include the loaded web bundle version in server-info requests so the server can apply version-dependent capabilities such as database history correctly.

Enhancements:

  • Document web client version reporting and capability negotiation for server compatibility.

Documentation:

  • Document that web server-info requests report the embedded client version and that the UI follows the server's returned database-history capability.

Tests:

  • Update HTTP client coverage to verify the web platform and bundle version headers are sent with server-info requests.

@sourcery-ai

sourcery-ai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Server-info requests now report the embedded web bundle version via Client-Version, allowing the server to apply version-dependent capabilities such as database history while the UI continues to honor the returned capability flag. Tests cover the header and documentation explains the compatibility behavior.

Sequence diagram for version-aware web server-info request

sequenceDiagram
    participant WebApp
    participant Server
    WebApp->>Server: getServerInfo()
    Note over WebApp,Server: Headers: X-Platform: web#59; Client-Version: WEB_CLIENT_VERSION
    Server-->>WebApp: ServerInfo with enable_database_history
    WebApp->>WebApp: Use enable_database_history
Loading

File-Level Changes

Change Details Files
Include the embedded web bundle version in server-info requests.
  • Add Client-Version alongside the web platform header.
  • Use the version of the currently loaded bundle, preserving accurate reporting for older browser tabs.
src/application/services/js-services/http/auth-api.ts
Verify version reporting and document capability negotiation.
  • Extend the server-info HTTP test to assert the client-version header.
  • Document that the server controls version-dependent database-history availability through enable_database_history.
src/application/services/js-services/http/__tests__/http_api.test.ts
doc/web-server-compatibility.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@appflowy
appflowy marked this pull request as ready for review September 28, 2026 08:23

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@appflowy
appflowy merged commit ee6d967 into codex/database-version-history Sep 28, 2026
1 check passed
@appflowy
appflowy deleted the fix/database-history-version-header branch September 28, 2026 09:07
appflowy added a commit that referenced this pull request Sep 28, 2026
* feat: add database version history previews and restore

* fix: harden database history restore and synchronization

* fix: preserve restore consumers and recover deferred synchronization

* fix: address database history sync and selection review

* fix: refresh sidebar after database history restore

* fix: keep reopened database history visible after restore recovery

* fix: retain authoritative sidebar refresh after database restore

* fix: apply remote database restores independently of history UI

* fix: recover database aggregates from remote root version changes

* fix: block background interaction during database restore

* fix: refresh dependent views after database restores

Invalidate relation and rollup caches after restores and rebind mounted dependent observers. Guard stale asynchronous loads and cover repeated restores across relation labels, formulas, filters, and sorts.

* fix: notify database restores and discard retired client updates

* fix: repair database history CI failures

- Enable the database history restore permission fence in web CI so the
  backend advertises database history to the e2e suite
- Expect the initial-hydration flag when rediscovering a restored database
- Allow the first feed discussion mount more time on cold CI workers
- Apply lint padding fixes to database test files

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: keep restore notice focus when an interrupted editor remounts

A peer restore can remount the in-progress cell editor after the
"Database restored" notice opens. The editor's autofocus takes focus,
and MUI's focus trap returns it to the dialog frame rather than the
acknowledgement button, so Enter no longer dismisses the notice.

Forward focus that lands on the dialog frame to the confirm button.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* refactor: gate database history on a single server capability

Drop the separate enable_database_history_version_ui flag. The web
client now enables database history (menu entry, preview and restore)
from enable_database_history alone; a missing flag still means disabled.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: stop hidden block controls and filter toggle from flaking e2e

Hover controls: until the editor's mousemove handler positions the
strip, it sits invisible at its static position over the first block
and still receives pointer events, swallowing clicks and hovers there
(subpage-creation hover timed out on it). Ignore pointer events until
the handler enables them.

rollup-final-parity: wait for the auto-expanded conditions bar instead
of clicking the filter button when the chip is not yet visible, which
collapsed the bar while it was still expanding.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: keep cross-tab document sync per keystroke and lossless

The database restore barrier gated every collab type: with beforeSend
configured, enqueueOutboxUpdate skipped its synchronous sibling-tab
fan-out and immediate send for documents too, broadcasting only after
the IndexedDB commit. Keystrokes then reached follower tabs in bursts,
and the follower read BroadcastChannel collab messages through
last-value React state, which keeps only the final message of a burst.
Yjs parked every later update behind the lost one, freezing the
follower at a prefix (tab_sync.spec.ts failed on 7 of 14 PR runs vs 0
of 39 on main).

- Apply the restore barrier only to Database and DatabaseRow updates.
- Deliver every BroadcastChannel collab message to the per-object
  incoming queue in arrival order instead of through last-value state.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: report web bundle version to server-info (#589)

* fix: report web bundle version to server-info

* fix: set web client fallback version to 0.18.6

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant