Mobile duplicated useLiveQuery, useQuery, useMutation, and buildQueryClient
from packages/ui with the only difference being the executor mechanism
(appService.mediator vs window.colanode). This consolidates them by:
- Adding a DOM-free core-api module to packages/ui with getColanode() and
getEventBus() helpers that access globalThis, avoiding Window/DOM types
- Updating shared hooks and buildQueryClient to use these helpers instead
of window.colanode/window.eventBus directly
- Installing a globalThis.colanode bridge in mobile's _layout.tsx that
delegates to appService.mediator (matching the web/desktop pattern)
- Migrating all 41 mobile files to import hooks from @colanode/ui
- Deleting 4 duplicate mobile files (3 hooks + query-client)
- Adding Metro resolver override to force react/react-native resolution
from the mobile app's node_modules (packages/ui ships a separate
web-only React 19.2.4 that conflicts with mobile's RN-compatible 19.1.0)
Also standardizes useQuery to use buildQueryKey instead of inline sha256.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract duplicated CRDT lifecycle, node views, record layout, and database
layout from the mobile WebView editor into shared primitives in packages/ui.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract duplicated database view business logic from
apps/mobile/webviews/editor/src/database-runtime.tsx (734→188 lines)
into shared packages/ui components and hooks:
- Add NavigationContext for platform-agnostic node navigation
(desktop uses TanStack Router, mobile uses WebView bridge)
- Extract useDatabaseViewValue hook with all DatabaseViewContext
computation (fields, filters, sorts, record creation)
- Make DatabaseViews accept renderLayout prop for custom view rendering
- Refactor ViewFullscreenButton and TableViewNameCell to use
NavigationContext instead of hardcoded TanStack Router Link
- Fix TableViewNameCell canEdit to use useRecord().canEdit (was
hardcoded true on desktop)
- Add readOnly={database.isLocked} to shared TableViewRow
- Merge mobile's view-delete logic into shared TableViewSettings
- Keep open-record button always visible on mobile (no hover)
- Add database node type support to mobile rename-node-sheet
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Align password validation with shared schema, harden workspace/member role
invariants on both client and server, fix page editor CRDT reconciliation
for incremental updates, and replace file download polling with reactive
local-file state tracking.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Mobile: add prebuild hook and submit config for EAS builds
Add prebuildCommand to run copy-editor.js during EAS builds so the
editor.html asset is available for Metro bundling. Also restore the
App Store Connect submit credentials (appleId, appleTeamId, ascAppId)
so builds auto-submit to TestFlight.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Mobile: use eas-build-post-install hook for editor asset
prebuildCommand replaces expo prebuild entirely, causing build failures.
Use eas-build-post-install lifecycle hook instead to run copy-editor.js
after npm install but before the native build.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Mobile: fix page editor keyboard and interaction issues
- Disable native WebView scrolling and use CSS overflow to prevent
scroll-to-top when keyboard opens
- Fix slash command click-through by preventing ProseMirror from
processing mousedown events immediately after command selection
- Remove keyboard from auto-opening on page load and auto-focusing
cursor; keyboard now only appears on user tap
- Add eas-build-post-install hook to build editor HTML asset during
EAS builds
- Improve editor.html iframe sandbox and CSP settings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Mobile: replace inline page editor with WebView-based TipTap editor
Replaces the plain-text block-by-block page editor with a Vite-built
WebView that runs the full TipTap rich text editor. The editor HTML is
bundled as a single self-contained asset, loaded via expo-asset and
rendered in react-native-webview. Communication between RN and the
WebView uses postMessage/onMessage bridge for init, mutations, queries,
theme changes, and navigation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Mobile: reorganize WebView editor as standalone package
Moves the editor WebView app from apps/mobile/src/editor-webview/ to
apps/mobile/webviews/editor/ as a first-class build target with its own
package.json, tsconfig.json, and vite.config.ts. This fixes TypeScript
compilation (editor code no longer typechecked as React Native) and
makes the build story clearer.
- WebView editor is now at apps/mobile/webviews/editor/
- Built artifact copied to apps/mobile/assets/editor-dist/ on prestart
- Vite dev server support for fast iteration
- Tailwind CSS @source path fixed (../../../../packages/ui)
- Page title editing restored via RenameNodeSheet
- File preview now converts file:// to base64 data URLs for WebView
- WebView hidden until ready to avoid white flash
- Keyboard accessory bar hidden on iOS
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Use tanstackdb for records query
* Use tanstackdb for chat list
* Use tanstackdb for database and view queries
* Use tanstackdb for space queries
* Remove unused query
* Use tanstackdb for files query and update live query deps
* Use tanstackdb for message queries
* Use tanstackdb for some node queries
* Use tanstackdb for channel deletes
* Improve node delete handling
* Use tanstackdb for channel creation
* Use tanstackdb for folder creation
* Use tanstackdb for space creation
* Flatten node object attributes
* Use tanstackdb for page creation
* Use tanstackdb for record creation
* Use tanstackdb for record updates
* Use tanstackdb for channel update
* Use tanstackdb for folder updates
* Use tanstackdb for space update
* Use tanstackdb for page update
* Use tanstackdb for database created & update
* Use tanstackdb for view create & delete
* Use tanstackdb for some field mutations
* Use tanstackdb for select option mutations
* Refactor workspace collections
* Use paced mutations for some rename inputs
* Use paced mutations for select option settings
* Use paced mutations for record updates
* Refactor some record queries
* Improve some view update handlers
* Improve view filters and sorts
* Use live infinite queries for some paginated lists
* Use tanstack/db for node reactions
* Fix message reactions dialog
* Remove unused file
* Remove node tree get query with tanstackdb recursive queries
* Replace live queries with plain ones for emojis and icons
* Replace some live queries
* MInor updates
* fix node updates
* fix tanstack db queries
* cleanup some inputs
* Init mobile app
* Minor fixes and improvements
* Improve assets loading
* Fix event bus proxy
* Improve emojis and icons loading
* Improve app initialization in web
* Init tanstack router
* Refactor components
* Refactor some more components
* Refactor layouts
* Improve routing
* Improve routing
* Routing improvements
* Make sidebar work in mobile
* Refactor container and breadcrumb
* Fix some packages and warnings
* Encode and decode yjs update for ipc communication
* Refactor servers in client
* Fix some errors and warnings in editor and sidebar
* Add route masking for web
* Improve container layout
* Improve ui for mobile
* Improve mobile ui
* Create custom link component
* Router improvements
* Implement tabs for desktop
* tabs improvements
* Refactor routes
* Layout improvements
* Improve desktop tabs
* Use tanstack-db for global collections
* Improve tanstack db collections
* Refactor workspaces and accounts databases and routes locally
* Use tanstackdb for users
* Use tanstackdb for uploads and downloads
* Use tanstackdb for temp files
* Rename database to collections
* Improve tabs
* Fix packages
* Improve local file handling
* Rename sync cursor keys
* Save some bootstrap data in a file
* Reset all data on new version update in desktop
* Minor refactor
* Implement app reset on startup
* UI fixes and improvements
* More Ui improvements
* Fix logout
* Add tab in route contexts for workspace routes
* Store last used workspace id as metadata
* Fix account logout
* Fix file preview
* Fix file thumbnail loading in tabs
* Fix chat tab loading
* Fix some redirect handling
* Disable staletime for icon.svg.get query
* Fix not found pages and throws
* add readme for mobile
* fix some keys
* Improve add tab handler
* Fix path
* Latest npm in @colanode/web Docker, add optional plat/arch dependencies
There are a number of issues with lightningcss and node 22/npm.
This is related to platform-/architecture-specific packages.
This uses a number of pieces from multiple solutions found in the notes
for #160.
This addresses the issues by the following measures:
- Make sure npm is up-to-date in the @colanode/web Docker build
- Add optional dependencies for all the platform-specific lightningcss
packages that are most likely to be used in the project (HSF and
mainline) in the npm project modules that require them:
- @colanode/desktop
- @colanode/web
- @colanode/ui
Closes#159.
* Fix darwin-arm64 version.
* Remove unnecessary optional dependencies; remove duplicate version property
* Fix merge issue where the version field got deleted.
* Move the version field back to where it was before.