Commit Graph

109 Commits

Author SHA1 Message Date
Ylber Gashi
8d3020e6e5 Unify mobile data access hooks with shared packages/ui (#363)
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>
2026-03-28 19:11:18 +01:00
Ylber Gashi
591f69885e Consolidate mobile WebView editor logic into shared packages/ui (#362)
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>
2026-03-28 15:52:32 +01:00
Ylber Gashi
7e1ec764c7 De-duplicate mobile database view logic into shared packages/ui (#361)
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>
2026-03-28 00:21:48 +01:00
Ylber Gashi
b2efa1b09c Mobile: stability fixes for auth, workspace settings, editor sync, and file downloads (#358)
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>
2026-03-22 13:47:24 +01:00
Ylber Gashi
2be4b599e7 Mobile: fix page editor keyboard and interaction issues (#346)
* 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>
2026-03-15 22:17:36 +01:00
Ylber Gashi
c945579abd Mobile: WebView-based page editor with TipTap (#345)
* 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>
2026-03-15 13:43:17 +01:00
Hakan Shehu
1259f7bd91 Update packages (#322) 2026-02-09 15:42:21 +01:00
Hakan Shehu
d8a3df9e06 Add app info route and page (#320) 2026-02-09 13:20:34 +01:00
Hakan Shehu
60ccfe7940 Fix internal link handling in editor (#315) 2026-02-02 10:01:43 +01:00
Hakan Shehu
6d40a2b574 Fix undo & redo for documents (#314) 2026-02-02 09:38:00 +01:00
Hakan Shehu
5ea69ba06d Update packages (#311) 2026-01-30 17:38:34 +01:00
Hakan Shehu
4217eedad5 Fix workspace update (#310) 2026-01-30 17:12:02 +01:00
Hakan Shehu
0a6b7b7714 Fix workspaces routing and redirects (#309)
* fix initial redirect check for last used workspace
* fix workspace and account redirect
2026-01-30 16:54:34 +01:00
Ylber Gashi
3e1070f3a6 test(server): add vitest harness and initial integration tests (#302) 2026-01-19 22:17:32 +01:00
Hakan Shehu
6a9255dfed Fix cleanup on account logout (#296) 2026-01-15 23:40:07 +01:00
Hakan Shehu
22d7d4bf17 Fix workspace create account context (#294) 2026-01-15 22:38:22 +01:00
Hakan Shehu
b5f5b6bc7d Fix scroll in node modal (#293) 2026-01-15 10:09:35 +01:00
Hakan Shehu
6a90063f0d Fix otp code expiresAt parsing (#292) 2026-01-15 10:01:01 +01:00
Hakan Shehu
a1fbeaa16f Allow decimal values in number field (#291) 2026-01-13 23:25:50 +01:00
Hakan Shehu
734f59fa95 Minor improvements and fixes (#286) 2026-01-10 23:04:03 +01:00
Hakan Shehu
33a6110e24 Adjust zIndex in ActionMenu component for improved layering (#283) 2026-01-09 12:20:18 +01:00
Hakan Shehu
be42137b99 Remove storage checks and add a workspace readonly state (#282)
* Remove storage checks and add a workspace readonly state
* Make deprecated migrations as no-op
2026-01-09 11:57:52 +01:00
Hakan Shehu
7334a11a8a Implement node tree in sidebar (#280)
* render node tree in sidebar

* create database view container

* fix link clicking

* Improve database views
2026-01-09 00:14:13 +01:00
Hakan Shehu
0e79e47eb1 Implement database locks (#279) 2026-01-08 14:23:09 +01:00
Hakan Shehu
98fe12f90c Improve markdown parser for editor 2026-01-08 12:41:08 +01:00
Hakan Shehu
3ccde245e9 Update pakcages (#278) 2026-01-08 11:17:53 +01:00
Hakan Shehu
d35804790b fix calendar view day component to use td for proper table structure (#277) 2026-01-08 10:43:34 +01:00
Hakan Shehu
6a89303e7e Refactor forms with tanstack-form (#276) 2026-01-07 16:58:30 +01:00
Hakan Shehu
c93f416a5a Use tanstackdb for queries and mutations (#275)
* 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
2026-01-07 16:05:26 +01:00
Hakan Shehu
7149ef5466 Update packages (#267) 2025-11-19 13:55:39 -08:00
Hakan Shehu
22b8ce6970 Open in modal and other file improvements (#263) 2025-11-18 22:58:19 -08:00
Hakan Shehu
f46f65c7a3 Open records in a modal (#261) 2025-11-18 11:07:58 -08:00
Hakan Shehu
a3df5e5f26 Fix calendar view filtering (#260) 2025-11-17 22:14:19 -08:00
Hakan Shehu
18cc7b44be Improve storage tracking and UI (#259) 2025-11-17 16:56:28 -08:00
Hakan Shehu
eee31d61bd Improve server loading and syncing (#253) 2025-11-14 07:50:19 -08:00
Hakan Shehu
cff19b1c5b Add animation for login screen and improve app loading screen (#252) 2025-11-13 23:22:36 -08:00
Hakan Shehu
b4cd046b53 Improve authentication flow (#251) 2025-11-13 22:38:19 -08:00
Hakan Shehu
239b4d0632 Improve breadcrumbs, headers and tabs (#249) 2025-11-11 09:49:16 -08:00
Hakan Shehu
3e4c8b8125 Implement new routing with tanstack router and mobile app kickoff (#248)
* 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
2025-11-11 07:00:14 -08:00
Jonathan Hyry
316a388d4a Fix node22 lightningcss workaround (#231)
* 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.
2025-11-04 05:47:30 -08:00
Hakan Shehu
9fb4467d56 Add Colanode Cloud plan upgrade card (#244) 2025-10-23 15:44:50 +02:00
Hakan Shehu
94815bca5c Fix date picker date conversion (#243) 2025-10-23 11:28:24 +02:00
Hakan Shehu
80b4235bf2 Update packages (#233) 2025-10-15 09:37:45 +02:00
Hakan Shehu
73af9582e1 Fix toolbar menu rendering (#232) 2025-10-15 09:18:22 +02:00
Hakan Shehu
c64c5a6406 Update packages (#224) 2025-10-07 20:22:27 +02:00
Hakan Shehu
d6d84be194 Fix MacOS title dots placeholder (#219) 2025-09-30 00:12:03 +02:00
Hakan Shehu
f8cf2c8c56 Improve file preview handling for non finished uploads (#213) 2025-09-11 16:44:35 +02:00
Hakan Shehu
3217764a7b Update packages (#212) 2025-09-11 14:19:45 +02:00
Hakan Shehu
095651ea60 Add a message in file preview if it hasn't been uploaded yet (#211) 2025-09-11 11:39:38 +02:00
Hakan Shehu
49ee759e93 Fix message files handling (#210) 2025-09-11 11:22:40 +02:00