Commit Graph
11 Commits
Author SHA1 Message Date
tajniak81andClaude Opus 5.5 c239d859b8 Transcribe long recordings, read scanned PDFs, and bring AI writing to phones
Follow-ups to Phase E (ADR-15):

- Recordings over 25 MB are cut into pieces and transcribed in turn:
  with ffmpeg (now in the server and all-in-one images) any format is
  re-encoded to 16 kHz mono MP3 in 20-minute pieces; without it, MP3 is
  cut at frame boundaries and WAV at sample boundaries in Go.
- PDFs without a text layer are written out by a document-capable chat
  model (Anthropic document input, OpenAI file input); Ollama is skipped.
- Phone app: AI answers render as Markdown with tappable citations; the
  editing toolbar opens the writing actions on the selection; audio
  files get Transcribe. Editor bridge protocol 4 adds setAi,
  getSelection, insertMarkdown and transcribe/transcribed.
- The transcript HTML builder moves to @docwell/editor, shared by the
  web app and the phone editor.
- An integration test runs chat, Transcribe and writing actions on a
  device against a live server; the editor test no longer expects
  headings to have only a level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:04:10 +01:00
tajniak81andClaude Opus 5.5 0640004895 Add database relations and rollups, full-page records, and translate the admin panel and phone app
CI / go (Server) (push) Failing after 4m38s
CI / go (Web-App) (push) Successful in 12m18s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / frontend (push) Failing after 7m49s
CI / desktop (ubuntu-latest) (push) Successful in 1h25m30s
CI / mobile (push) Failing after 5m14s
CI / docker (push) Successful in 39m26s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
Databases (ADR-13 follow-ups):
- Relation properties link records to another database, on the same page
  or on any page the reader can open (read live and read-only, like synced
  pages). Cells list the linked titles; clicking one opens the record.
- Rollup properties work out counts, sums, averages, medians, min/max,
  ranges, earliest/latest dates and checked counts over related records.
  Neither is stored: views compute them before drawing (linked.ts), so they
  follow both databases live, and rollups sort and filter as numbers.
- Exports (Markdown, HTML, PDF, Word) resolve them for same-page databases.
- A record opens as a full page at /p/<page>/r/<database>/<record>, with
  "Open as full page" on the side panel and "Back to the page".

Edgeless mode (ADR-14 follow-ups):
- History previews show a version's canvas and count canvas changes.
- Comments can be anchored to canvas elements (anchor {element}); elements
  with open threads show a badge that opens the thread.
- Workspaces choose how new pages open (workspaces.default_page_mode); the
  per-device choice now defaults to following the workspace.
- Phones edit the canvas once a page is opened for editing; the page note
  shows the page title.

Languages:
- The admin panel speaks English, Polish, German, French and Spanish, with
  a picker sharing the web app's setting and a key parity test.
- The phone app speaks the same five, follows the phone's language (and
  Android's per-app language setting), and has its own parity test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 17:11:47 +01:00
tajniak81andClaude Opus 5.5 e927653e4b Add edgeless mode: pages as a canvas with their text as a live note
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / go (Server) (push) Failing after 8m12s
CI / go (Web-App) (push) Successful in 11m16s
CI / frontend (push) Failing after 7m33s
CI / desktop (ubuntu-latest) (push) Successful in 1h25m49s
CI / mobile (push) Failing after 5m48s
CI / docker (push) Successful in 41m19s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
Phase D of docs/AFFINE.md (ADR-14).

The canvas lives in the page's Y.Doc next to its text, in
ydoc.getMap("surface"): one Y.Map per element, each field its own entry so
concurrent edits merge. The page's text is a note on the canvas bound to
the same "default" fragment, so typing on the canvas is typing in the page.
Canvas edits have their own undo history through a Y.UndoManager.

- New package @docwell/canvas: viewport with pan, zoom and pinch;
  selection, marquee, snapping, resize and rotate; notes, text, shapes
  (plain or scribbled), connectors (straight, curve, elbow, with arrowheads
  and labels), pen and eraser, frames, groups, pictures, embeds and link
  cards, and mind maps (right, left or both sides; Tab, Enter, arrows).
  A style bar over the selection; the last style per kind is the default.
- Presentation through frames, stickers and templates, PNG and SVG export.
- Page/Edgeless switch in the header, ?mode= in page and share links, a
  per-page default (pages.default_mode) and a per-device default for new
  pages; share links show the canvas read-only.
- Server: yrs writes the canvas into the document JSON as "surface",
  adds its text to search, and writes it back on restores and templates.
- Phone: the bridge draws the canvas read-only (protocol 3) and the page
  screen has a canvas button.

Strings are translated into all five languages and the user guide covers
edgeless mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 16:20:20 +01:00
tajniak81andClaude Opus 5.5 aede10bd1a Drag database records by touch and format record notes on the phone
CI / go (Server) (push) Failing after 4m16s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / go (Web-App) (push) Successful in 10m49s
CI / frontend (push) Failing after 7m26s
CI / desktop (ubuntu-latest) (push) Successful in 1h43m36s
CI / mobile (push) Failing after 3m46s
CI / docker (push) Successful in 58m32s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
- Touch dragging (database/touchdrag.ts): rows drag by their grip, board
  cards by a grip shown on touch screens, calendar entries by themselves.
  The handle takes the touch from its start, since Android's long press
  cancels a held touch; a tap still clicks and holding still is the long
  press. The phone's editor WebView claims touches at once.
- Editor bridge: toolbar commands and state follow focus into an editor
  inside a panel (a record's notes) and back to the page.
- Phone-App widget tests: fixtures gain the fields the API added since
  (journal, tags, properties, journalDate, createdBy, lastEditedBy).
- Guide: how to drag records on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:13:48 +01:00
tajniak81andClaude Opus 5.5 406779b353 Open record links on public pages and find records in search
- Public pages follow "#b-…" and "#r-…" links like the page view does,
  and their block and record links copy the public address. The retry
  logic is shared as followLink (Packages/editor/src/hashlinks.ts).
- Search indexes each database record as its own document (from the
  page's content_json), returned with a "record" field and opened beside
  its page. Filter-only listings stay pages only; removed records and
  trashed pages drop out. The index mapping version is bumped, so it
  rebuilds once.
- Phone app: search lists records and opens them through a new
  "follow" bridge message.
- Guide updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:50:51 +01:00
tajniak81andClaude Opus 5.5 5e9c61460b Fix databases and live editing in the Android app
- Server: accept the mobile editor's https://app.docwell.docwell_mobile
  origin on /collab (refused since the page moved off file:).
- Android: allow mixed content when signed in to an http:// server, so
  the ws:// collab socket is not blocked from the https page.
- Databases: a touch tap on a cell edits it, since a phone has no
  keyboard to type into a selected cell.
- Back button closes an open record, picker or menu first: the bridge
  reports open overlays and takes a dismiss message.
- Guide: how databases work in the mobile app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:28:30 +01:00
tajniak81andClaude Opus 5.5 d28f1e02db Add tables, to-dos, callouts and the rest of editor parity
The editor gains the blocks and formatting it lacked next to AFFiNE:

- Tables with a header row, resizable columns, a toolbar to add, delete,
  merge and split, and rows that move by a drag grip, toolbar buttons or
  Ctrl+Alt+Up/Down.
- To-do lists (also from "[] "), callouts with an emoji and colour, and
  headings down to level 6 (Ctrl+Shift+0-6 for text and headings).
- Text colour and highlights from a fixed palette that follows the theme,
  and left, centre and right alignment.
- Optional line numbers on code blocks, with a default hosts can set.
- PDF attachments show their pages inline; pdf.js loads only then, and
  the mobile bundle leaves it out.
- The selection toolbar adds underline, colour, align, inline math, make a
  linked page and copy block link. A grip beside each block drags it and
  opens a menu: turn into, move, duplicate, copy, copy link, delete.
- The slash menu adds Today, Tomorrow, Yesterday, Now and New page.

The web app translates the new words and makes linked pages as children
of the open page. The mobile bridge gets underline, to-do, callout and
table commands, so its protocol moves to version 2 and the bundle is
rebuilt.

docwell-server's converters learn the new nodes: Markdown writes task
lists, GitHub alerts and tables and reads them back; HTML keeps colours
and alignment and reads its own output back; PDF draws tables, to-dos,
callouts and coloured text; Word import keeps tables, alignment, H4-H6
and colours; Notion import turns databases into tables and keeps
callouts and to-dos. Imported tables and H4-H6 headings no longer
collapse into paragraphs and H3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 12:20:08 +01:00
tajniak81andClaude Opus 5.5 110839004c Add German, French and Spanish, and page layout in the mobile reader
CI / go (Server) (push) Successful in 12m46s
CI / go (Web-App) (push) Successful in 10m4s
CI / desktop (ubuntu-latest) (push) Failing after 5m33s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / mobile (push) Failing after 36s
CI / docker (push) Successful in 9m13s
CI / frontend (push) Failing after 6m9s
The web and desktop app now ships German, French and Spanish next to
English and Polish. Account settings has a language picker kept per
device like the theme; without a choice the app follows the browser's
languages. The <html lang> follows the chosen language, and a test keeps
every language's keys and placeholders in step with English.

The mobile reader applies each page's width and font through a new
setLayout bridge message, using the web reader's column widths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 15:42:49 +01:00
tajniak81andClaude Opus 5.5 6b6c916825 Load the mobile editor page at an https address so YouTube embeds play
The page was loaded from a file: asset, which sends no Referer, and
YouTube's player refuses to play without one. Both editor screens now
load the same single-file page with loadHtmlString at
https://app.docwell.docwell_mobile/, the https://<application id> form
YouTube asks apps to use. Embedded players may navigate inside their own
frames; the page itself still never navigates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 15:40:36 +01:00
tajniak81andClaude Opus 5.5 1f580ca6f8 Add Mobile 1.0 and UnifiedPush notifications
Mobile app (Android):
- Sign-in to any server, with authenticator codes. The server address and
  token are kept in secure storage; a dropped connection never signs out.
- Workspaces, recent pages, spaces and a foldable page tree; search; the
  inbox with mark-read.
- Pages open read-only in the shared editor from their saved content and
  join the live document to edit (with the native toolbar). Page links in
  the text open in the app (new "navigate" bridge message).
- Comments: threads, replies, resolve.
- "Save to Docwell" in the Android share sheet makes a page from shared
  text, with web addresses as links.
- Offline reading: every answer the app reads is kept on the phone, and
  used when the server can't be reached.
- Push through UnifiedPush (ntfy, NextPush, ...). The app uses the Android
  connector directly; the umbrella package pulls in a native crypto build
  for Linux that breaks `dart run` and tests.

Server:
- /me/devices registers a phone's UnifiedPush endpoint and Web Push keys
  (new push_devices collection). Each notification is also pushed,
  encrypted with RFC 8291 aes128gcm so the distributor can't read it; the
  app drops messages that don't decrypt. Endpoints answering 404/410 are
  forgotten. Endpoints follow the webhook address rules.
- /collab accepts the apps' own origins ("null" for the mobile editor page,
  wails:// for the desktop app). Sign-in is a token in the first message,
  not a cookie, so this opens no cross-site hijacking.

Tried on an Android 15 emulator: sign-in, browsing, reading, live editing,
sharing and offline reading. Not covered: push end to end (no distributor
on the emulator), iOS, and YouTube embeds, which refuse to play from the
app's local editor page (error 153).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 14:52:20 +01:00
tajniak81andClaude Opus 5.5 ba394b8fac Finish Phase 0: lint, codegen, contributor docs and the two remaining spikes
Repository basics:
- CONTRIBUTING.md and CODE_OF_CONDUCT.md (Contributor Covenant 2.1)
- SPDX AGPL-3.0-or-later headers on all hand-written sources, checked in CI
- golangci-lint (shared .golangci.yml), ESLint and Prettier, all run in CI

API codegen from api/openapi.yaml (npm run generate, drift fails CI):
- Go types via oapi-codegen in Server/internal/api
- a contract test that the router and the spec list the same routes
- Dart models via Phone-App/tool/generate_api.dart; the app uses them

Spike: shared Tiptap editor in a Flutter WebView (ADR-4)
- @docwell/editor-bridge builds the editor into one HTML page with a
  versioned JSON protocol; Phone-App hosts it with webview_flutter and a
  native toolbar. Integration test passes on an Android API 35 emulator.
- flutter_inappwebview dropped: its Android plugin fails on AGP 9.

Spike: Wails v3 desktop (ADR-11)
- system tray, docwell:// deep links (page and space only) with
  single-instance hand-off, and the built-in updater with a required
  ed25519 signing key. Verified on Windows.
- regenerated build assets register the scheme and drop template
  placeholders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:11:07 +01:00