Commit Graph
92 Commits
Author SHA1 Message Date
tajniak81andClaude Opus 5.5 e4baa6d7c8 Get the web clipper ready for store review
- Firefox: declare data collection in the manifest (websiteContent and
  browsingActivity, required), which addons.mozilla.org has demanded of
  new extensions since November 2025, and require Firefox 140, which
  shows that consent itself. The Chrome/Edge package leaves both out.
- Publish the clipper's privacy policy on the docs site, included from
  Web-Clipper/store/PRIVACY.md so there is one text.
- STORE.md: a checklist before submitting (publisher and add-on id,
  public policy address, screenshots, reviewer access) and the same data
  answers for every store, including Chrome's privacy practices form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:46:43 +01:00
tajniak81andClaude Opus 5.5 8e34c071cc Index formula results for search
Search records now carry each formula's result, worked out like the
exports do (relations and rollups included); yes/no results are left
out like checkboxes. The search index version goes to 5, so existing
indexes are rebuilt once and older records get their formula text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:41:45 +01:00
tajniak81andClaude Opus 5.5 34ba3774a6 Fit the page header on phones
At 375 px the header's buttons ran past the screen and the page
scrolled sideways. Below the sm breakpoint, favourite, attach, history
and info now sit at the top of the More menu instead; comments, share
and the menu stay in the header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:38:24 +01:00
tajniak81andClaude Opus 5.5 8814293988 Add formula properties to databases
CI / frontend (push) Successful in 14m34s
CI / desktop (ubuntu-latest) (push) Successful in 1h16m25s
CI / mobile (push) Failing after 4m3s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / go (Server) (push) Failing after 20m28s
CI / desktop (windows-latest) (push) Canceled after 0s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / go (Web-App) (push) Canceled after 0s
CI / docker (push) Successful in 31m59s
CI / go (Media) (push) Successful in 14m9s
A formula column keeps an expression and works it out for each record
when the database is read, after relations and rollups, like rollups;
nothing is stored per record. The language is small and hand-parsed:
prop("Name"), numbers, text, yes/no and days, arithmetic, comparisons,
and/or/not, if(), rounding, min/max, text functions and date arithmetic
(today, dateAdd, dateBetween, year/month/day). Errors, loops between
formulas included, stay in their cells with the reason as a tooltip.

The column's editor shows the first record's result or the error as
you type and inserts properties by name. Formulas sort, filter and chart
like numbers when they are numbers. The server evaluates the same
language for exports (convert/formula.go), with the same test cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:34:04 +01:00
tajniak81andClaude Opus 5.5 3ef7fe3fe6 Let page columns grow on wide screens
CI / desktop (ubuntu-latest) (push) Failing after 1h8m54s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / go (Media) (push) Successful in 14m30s
CI / mobile (push) Failing after 5m55s
CI / docker (push) Successful in 35m57s
CI / go (Web-App) (push) Successful in 13m41s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / frontend (push) Failing after 18m0s
CI / go (Server) (push) Failing after 15m17s
Full width pages now fill the window instead of stopping at 1040px,
on the web and in the native editor. The standard and wide columns
widen on very large windows (up to 960px and 1440px) and are
unchanged below 1800px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:29:23 +01:00
tajniak81andClaude Opus 5.5 fa17016456 Add a chart view to databases
Bars, a line or a donut of the view's records, counted or with a
number property summed or averaged, per choice, checkbox, person or
month of a date. Drawn as SVG in the theme's colours; bars and slices
take a choice's colour. The view's filters apply. The chart settings
redraw themselves, so the number property appears for sums and
averages and a change keeps the others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 13:25:26 +01:00
tajniak81andClaude Opus 5.5 d3c4d1f57a Undo unrelated reformatting in the database editor files
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / docker (push) Successful in 1h28m38s
CI / go (Media) (push) Successful in 17m4s
CI / go (Server) (push) Successful in 37m31s
CI / go (Web-App) (push) Successful in 15m14s
CI / frontend (push) Successful in 17m25s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / desktop (ubuntu-latest) (push) Failing after 3h14m9s
CI / mobile (push) Failing after 2m42s
The list, gallery and timeline commits ran Prettier from
Packages/editor, which wrapped lines at 80 columns and reformatted
code those changes did not touch. Restore the files they did not mean
to change, and keep only the intended edits in the others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:39:20 +01:00
tajniak81andClaude Opus 5.5 ff75ecd04c Add a timeline view to databases
Records are bars from the view's date property to an end date property
(chosen in the view's settings; without one a bar lasts a day), by
days, weeks or months. Dragging a bar moves both dates; its right edge
changes the end. Records without a start are listed below, like on the
calendar. Bars stop the browser's own drag of the surrounding block.

Also fixes the view settings panel: the properties list cleared the
whole panel when it drew, so a calendar never showed its date property.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:36:37 +01:00
tajniak81andClaude Opus 5.5 ab73a7d0d7 Add list and gallery views to databases
List shows one line per record with its visible properties; gallery
shows cards in a grid, covered with the first image of an attachment
property chosen in the view's settings. Both filter, sort and group
like tables, and a click opens the record. Older clients show the new
layouts as tables (normalize already falls back for unknown types).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:27:43 +01:00
tajniak81andClaude Opus 5.5 29465e4617 Add, change and delete calendar events from journal pages
CalDAV and Google calendars can now be written to from the journal on
the web and in the phone app. Each change goes to the source at once
with If-Match set to the ETag the last sync read, so a change made
elsewhere is refused (409) instead of overwritten; the account is then
read again. Repeating events, iCal feeds and read-only Google calendars
stay read-only.

- calendar_events keep each event's calendar, object/event id, ETag and
  whether it repeats; accounts keep their writable calendars and the
  one new events go to (migration 1764800000_calendar_writes).
- Google sign-in asks for calendar.events; older read-only accounts are
  offered "Connect again".
- New API: POST /calendar/events, PATCH and DELETE /calendar/events/{id}.
- Translations, Docs-Site guides and changelog updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:17:28 +01:00
tajniak81andClaude Opus 5.5 7f09338b60 Send PocketBase's auth emails in the recipient's language
PocketBase keeps one set of email templates on the users collection, so
before docwell-server asks it for a verification, password-reset or
magic-link email, the new authmail package writes the templates in the
recipient's language (stored locale, else the request's), one send at a
time. Adds Polish, German, French and Spanish templates; English stays in
the schema snapshot. New-login alerts use the language written last.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:39:58 +01:00
tajniak81andClaude Opus 5.5 cad42fbe89 Prepare the 0.3.0 release
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / docker (push) Successful in 53m34s
Docs / deploy (push) Canceled after 0s
CI / go (Media) (push) Successful in 13m0s
CI / go (Server) (push) Successful in 24m4s
CI / frontend (push) Failing after 11m51s
CI / desktop (ubuntu-latest) (push) Successful in 2h34m54s
CI / mobile (push) Failing after 4m52s
Docs / build (push) Canceled after 0s
CI / go (Web-App) (push) Successful in 12m35s
CHANGELOG.md gets the 0.3.0 notes: everything since 0.2.0 by area, and
the steps for upgrading a 0.2.0 install (new compose files with a stock
PocketBase on 8070, pb_data at /pb/pb_data, the media service, and the
SMTP password to enter once more). The release workflow now uses the
tag's CHANGELOG section as the Gitea release text. A v0.2.0 compose stack
with data was upgraded in place to this commit and kept its data.

Also fixes what CI would have failed on:
- Server lint (golangci-lint v2.14): errors.Is/As for sentinel errors,
  the bbolt/errors package instead of the deprecated bolt error, one
  needless conversion, and commented nolints for gosec false positives.
- SPDX headers on Database/export-schema.sh and Server/entrypoint.sh.
- Prettier on two files; the generated pbschema/schema.json is ignored.
- The editor-bridge dist page rebuilt to match the phone app's copy.

PLAN.md and the upgrade guide point to the release notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:21:57 +01:00
tajniak81andClaude Opus 5.5 e5da208974 Rebuild the phone editor page and fix the comment test fixture
The editor-bridge bundle now includes the editor changes up to Turn into.
The comment test's page lacked the verification field pages gained with
verified pages, so Page.fromJson threw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:46:12 +01:00
tajniak81andClaude Opus 5.5 f310073725 Add dev launch configs for a remote server and a local stack
CI / go (Media) (push) Successful in 13m28s
CI / go (Server) (push) Failing after 24m56s
CI / go (Web-App) (push) Canceled after 0s
CI / frontend (push) Failing after 10m11s
CI / desktop (ubuntu-latest) (push) Failing after 2h23m32s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / mobile (push) Failing after 6m39s
CI / docker (push) Successful in 42m10s
web-remote runs the web app's dev server against the docwell-server at
10.2.1.10:4086 through its /api proxy, so the in-app browser makes no
cross-origin calls. server-local and web-local run docwell-server on
127.0.0.1:18081 with dev credentials and a web dev server on 5176
pointed at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:01:55 +01:00
tajniak81andClaude Opus 5.5 2a063a51be Add Turn into to the text toolbar, page icons from the sidebar, and steadier block handles
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / desktop (ubuntu-latest) (push) Successful in 1h36m55s
CI / go (Media) (push) Successful in 19m45s
CI / go (Server) (push) Failing after 26m1s
CI / go (Web-App) (push) Canceled after 0s
CI / frontend (push) Failing after 8m49s
CI / mobile (push) Failing after 1m47s
CI / docker (push) Failing after 37m4s
Turn into: the selection toolbar starts with the block's kind ("Heading 1")
and opens the list of kinds it can become, with a tick on the current
one. In a list it turns the whole list, as the block menu did; the grip
menu no longer has it.

Page icons: an editor clicks a page's icon in the sidebar tree to pick an
emoji from groups, recent picks or a search by name (any pasted emoji
works too), or to remove it. The emoji now stands in for the page glyph
rather than sitting before the title. Strings in all five languages.

Block handles: the link and grip buttons stay on the block the cursor is
in, which is highlighted while the editor has focus, sit centred on the
block's height, and no longer vanish crossing the gap from the text.

The sidebar shows the Docwell logo above the workspace switcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:47:47 +01:00
tajniak81andClaude Opus 5.5 c98b127f1e Add columns, suggesting mode, verified pages, scanned PDF search and server translations
CI / go (Media) (push) Successful in 13m40s
CI / go (Server) (push) Failing after 23m20s
CI / frontend (push) Failing after 10m35s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / desktop (ubuntu-latest) (push) Failing after 3h4m42s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / docker (push) Successful in 2h2m57s
CI / go (Web-App) (push) Canceled after 0s
CI / mobile (push) Failing after 9m19s
- Columns: /columns puts 2 to 4 columns side by side, with widths dragged
  between them; they stack on phones. HTML export and import keep them
  (also Notion column lists and Confluence page layouts).
- Suggesting mode: edits become suggested insertions and deletions that
  editors accept or reject one by one or all at once. Text only.
- Verified pages: editors verify a page for a while or without end; the
  verifier is notified when it runs out (migration 1764700000).
- Scanned PDFs attached to pages are read by AI for search where a
  workspace turns it on.
- The server writes error messages, emails, digests and phone
  notifications in English, Polish, German, French and Spanish; the apps
  send their language with each request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:38:08 +01:00
tajniak81andClaude Opus 5.5 1696f2e77e Search the text of files attached to pages
CI / go (Server) (push) Failing after 22m44s
CI / go (Media) (push) Canceled after 0s
CI / go (Web-App) (push) Canceled after 0s
CI / frontend (push) Failing after 10m17s
CI / desktop (ubuntu-latest) (push) Failing after 1h44m2s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / mobile (push) Failing after 5m11s
CI / docker (push) Successful in 1h29m50s
Docs / build (push) Successful in 14m34s
Docs / deploy (push) Skipped
The search index now reads the files pages link to: PDF text layers,
Word (.docx), HTML and text files such as Markdown or CSV, up to 25 MB,
and their names. Each file is read once, a few seconds after upload,
and its text is kept in the index; each linked file is indexed as its
own document under its page, like database records, so a file taken
off its page, or a trashed page, drops out. Scanned PDFs are not read.

Hits carry a new file field (id and name). The web search palette and
the phone's search show the file with an attachment icon and the page it
is on; /docwell in Slack names the file too.

PDF, Word and HTML reading moved from the AI package into
internal/textract, which AI's extra files now use as well. The index
mapping version is bumped, so existing indexes rebuild on start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 20:50:27 +01:00
tajniak81andClaude Opus 5.5 f1963f1391 Add Confluence import, a Slack app per workspace, and GitHub, Linear and Figma link previews
Link previews: link cards for GitHub issues, pull requests and
repositories, Linear issues and Figma files are read through the
services' APIs and show a status pill (Open, Merged, In Progress…) and a
line of details. Public items need nothing; a workspace's tokens, set by
its admins under Workspace settings → Integrations and checked with each
service before being sealed, reach private ones and Linear.
GET /link-preview takes the workspace; the link card stores kind,
status, state and meta.

Slack: each workspace connects its own Slack app, made from a manifest
the settings page fills in. Docwell posts chosen page and comment events
to a channel (edits at most every 30 minutes per page), previews links
to Docwell pages posted in Slack, and answers /docwell with a search as
the member whose email matches the Slack user, shown only to them. Only
pages every member can open are posted or previewed. Requests from Slack
are signature-checked; the webhook dispatcher gained listeners so Slack
follows the same events.

Confluence: a space's HTML export imports with its page tree (from
index.html, else breadcrumbs), links between pages, pictures and
attachments. Panels become callouts, code macros code blocks with their
language, expand macros toggles, task lists to-dos.

New collection workspace_integrations (schema snapshot regenerated),
OpenAPI and generated Go, TypeScript and Dart types, strings in all five
languages, the user guide, and a rebuilt mobile editor bundle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 20:42:11 +01:00
tajniak81andClaude Opus 5.5 7fa5df53e5 Move "Show on … too" to the foot of the relation menu
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
CI / go (Web-App) (push) Successful in 14m26s
CI / frontend (push) Failing after 7m47s
CI / desktop (ubuntu-latest) (push) Failing after 1h24m30s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / docker (push) Successful in 1h11m11s
CI / go (Media) (push) Successful in 10m29s
CI / go (Server) (push) Failing after 18m53s
CI / mobile (push) Failing after 5m42s
It sat between the lists of databases and read like one of them. It is
now a "+" action below the page search, like other add buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 20:11:40 +01:00
tajniak81andClaude Opus 5.5 68c14e116d Add two-way relations between databases
A relation column can now mirror a relation of the related database
(relation.back). The mirror stores no links: it lists the records whose
relation links to each row, so both sides always agree.

- "Show on … too" in a relation's Related database menu adds the mirror
  to a database on the same page in one step.
- Pointing a relation at a database whose relation already links back
  offers to mirror it, across pages too.
- Editing a mirror cell changes the stored side when it is on the same
  page; a mirror of another page's relation is read-only and says where
  to change the links.
- Filters, sorts and rollups read mirrors like other relations; paste
  and delete skip them.
- docwell-server's exports work out same-page mirrors.

Strings are translated into all five languages, the user guide covers
the feature, and the mobile editor bundle is rebuilt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 18:34:10 +01:00
tajniak81andClaude Opus 5.5 af99dbdcc3 Show the media image override in the split SeaweedFS env example
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 18:34:08 +01:00
tajniak81andClaude Opus 5.5 e5b7b980a5 Rename the media network to docwell_media in the other compose stacks
CI / go (Media) (push) Successful in 11m16s
CI / go (Server) (push) Failing after 18m30s
CI / go (Web-App) (push) Successful in 10m21s
CI / frontend (push) Failing after 7m44s
CI / desktop (ubuntu-latest) (push) Successful in 1h3m51s
CI / docker (push) Successful in 13m19s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / mobile (push) Failing after 2m5s
The dev, prod, prod.s3 and prod.seaweedfs stacks now match the split
SeaweedFS stack: the server and docwell-media services share an internal
network named docwell_media. The media service keeps its name, so the
server still reaches it at http://media:8090.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:45:08 +01:00
tajniak81andClaude Opus 5.5 1c74f26617 Rename the media network in the split SeaweedFS stack to docwell_media
The server and docwell-media services and the network definition now all
use docwell_media, so the name says which stack the network belongs to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:42:44 +01:00
tajniak81andClaude Opus 5.5 185af54aeb Give the phone app the Docwell icon
CI / go (Media) (push) Successful in 13m31s
CI / go (Server) (push) Failing after 32m20s
CI / go (Web-App) (push) Successful in 11m15s
CI / desktop (ubuntu-latest) (push) Successful in 1h28m2s
CI / mobile (push) Failing after 2m53s
CI / frontend (push) Failing after 7m19s
CI / docker (push) Successful in 19m39s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
The Android and iOS builds still showed Flutter's default icon. They now
use the app icon from Design/docwell-all/2-logo-kit: an adaptive Android
icon (Ink Well background, the symbol inside the safe zone, and a
monochrome layer for Android 13 themed icons) and the full iOS set.

The art lives in Phone-App/assets/icon (SVG sources and their 1024 px
renders); `dart run flutter_launcher_icons` regenerates the platform
icons from it, configured in pubspec.yaml. The tool's change to
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS in the iOS
project was left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:39:20 +01:00
tajniak81andClaude Opus 5.5 9d674e9699 Add invite links with approval, sharing switches, page views and unused-file cleanup
CI / go (Web-App) (push) Canceled after 0s
CI / frontend (push) Failing after 9m30s
CI / desktop (ubuntu-latest) (push) Successful in 1h21m24s
CI / mobile (push) Failing after 4m16s
Docs / build (push) Successful in 14m59s
Docs / deploy (push) Skipped
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / go (Media) (push) Successful in 14m33s
CI / go (Server) (push) Failing after 23m30s
CI / docker (push) Successful in 1h1m25s
Phase G of docs/AFFINE.md (ADR-17):

- Invite links: one per workspace (member or guest, optional end date,
  optional admin approval) on a new /join page. Requests are approved
  (optionally as another role) or declined from workspace settings;
  join_request, join_approved and join_declined notifications reach the
  inbox, phones and the email digest. Workspace admins decide, else the
  organization's admins, else superadmins. Signup honours ?redirect=.
- Workspace switches: allowSharing (off makes every share link answer 404
  until it is back on) and urlPreview (chat apps may show private pages'
  titles). docwell-web writes title and Open Graph tags for known
  link-preview bots, asking docwell-server via DOCWELL_PREVIEW_API_URL;
  search engines are left out.
- Page analytics: page_views counts opens per page, person and day from
  the existing visit call and share-link reads; editors see totals, a
  daily chart and recent viewers in the Info panel. analytics.prune
  drops rows after 400 days.
- Unused files: attachments whose id appears in no page's Yjs state,
  page icon or comment (older than a day) are listed and deleted from
  workspace settings.
- Migration, schema snapshot, OpenAPI, generated clients, translations
  in five languages, phone inbox, compose files and user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:59:55 +01:00
tajniak81andClaude Opus 5.5 6984c7d162 Connect Google Calendar, import OneNote notebooks, sync Readwise, and package the clipper
Phase F follow-ups (ADR-16):

- Calendars: events are now stored in calendar_events by a
  calendars.sync job (every 15 minutes per account, 90 days back and
  400 ahead), so journals open at once and keep showing events while a
  source is down. Google accounts connect with OAuth (calendar.readonly)
  through DOCWELL_GOOGLE_CLIENT_ID/SECRET; reconnecting renews access.
- OneNote: whole notebooks import through Microsoft Graph (Notes.Read,
  DOCWELL_MICROSOFT_CLIENT_ID/SECRET/TENANT) in the background, with
  section groups, sections, subpages, pictures and attached files. The
  Microsoft sign-in lives in memory for an hour and is never stored.
- Readwise: an hourly sync with the person's sealed access token; new
  books get a page under "Readwise", new highlights are appended once.
  New readwise_syncs collection.
- internal/oauth: signed states and one callback route per provider,
  routed by purpose. directory gains ImportConverted and CallerOf.
- Phone app: "Today's journal" on the home screen and calendar events
  on journal pages.
- Web clipper: `npm run package` builds Chrome/Edge, Firefox and source
  zips; store/ holds listing texts, permission notes and a privacy
  policy.
- OpenAPI, generated clients, translations, compose and .env examples,
  and user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:59:34 +01:00
tajniak81andClaude Opus 5.5 3d1cf362d7 Add calendars, a web clipper, more importers and workspace snapshots
Phase F of the AFFiNE plan (ADR-16):

- Calendars: people subscribe to iCal feeds (webcal, Google's secret
  address, Outlook) or CalDAV accounts in account settings; their
  events show at the top of journal pages in the reader's time zone.
  Repeats, moved and cancelled occurrences, IANA and Windows zones
  are handled. Events are read on demand and kept in memory for 15
  minutes; passwords are sealed with DOCWELL_SECRET_KEY; sources
  follow the webhook address rules. New calendar_accounts collection.
- Importers: zips of Markdown (Obsidian vaults, Bear TextBundles and
  .bear2bk, Readwise's Markdown, Docwell's own space export) keep
  folders as pages, resolve [[wikilinks]] and embeds by name, and turn
  front matter and #tags into properties and tags. OneNote .mht
  exports, Readwise CSV, and any other CSV as a database page.
- Exports: PNG of a page drawn in the browser, print styles that print
  only the page in the light theme, and workspace snapshots (records,
  Yjs states, JSON and files in one zip) that restore as a new
  workspace. Old ids are swapped byte for byte inside the Yjs updates,
  so links point at the restored pages and comments stay anchored.
- Web-Clipper/: a Manifest V3 extension for Chrome, Edge and Firefox
  that saves the article or the selection as Markdown through the
  import API with a personal API token.
- OpenAPI, generated clients, translations and user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 11:56:03 +01:00
tajniak81andClaude Opus 5.5 8c39b0aacb Run ffmpeg in its own docwell-media service
CI / go (Media) (push) Successful in 11m59s
CI / go (Server) (push) Failing after 18m26s
CI / frontend (push) Failing after 8m35s
CI / docker (push) Successful in 1h2m44s
Docs / build (push) Successful in 11m58s
Docs / deploy (push) Skipped
CI / go (Web-App) (push) Canceled after 0s
CI / desktop (ubuntu-latest) (push) Successful in 1h10m6s
CI / mobile (push) Failing after 3m43s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
ffmpeg parses untrusted uploads, so it moves out of the server image
into a container of its own (ADR-15):

- Media/: docwell-media, a small Go wrapper around ffmpeg.
  POST /v1/split takes a recording and returns the 16 kHz mono MP3
  pieces as multipart/mixed. ffmpeg may only open local files and
  common audio/video demuxers (no playlists); optional shared token,
  a job limit, a timeout and a 1 GB cap.
- Server: DOCWELL_MEDIA_URL and DOCWELL_MEDIA_TOKEN send recordings
  over 25 MB to the service. When it is blank or unreachable, the
  server uses a local ffmpeg if it has one, else cuts MP3 and WAV in
  Go. The server image no longer installs ffmpeg; the all-in-one
  image keeps it to stay one container.
- Compose: a media service in every stack, read-only, no
  capabilities, on an internal network only docwell-server joins.
- CI tests the new module and checks that only the server reaches
  media; the release workflow publishes docwell-media.
- Docs, ADR-15 and the .env examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:52:34 +01:00
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 0ebf064173 Add audio transcripts, monthly AI limits, PDF sources and AI chat on phones
CI / go (Server) (push) Failing after 25m5s
CI / go (Web-App) (push) Canceled after 0s
CI / frontend (push) Failing after 8m38s
CI / desktop (ubuntu-latest) (push) Successful in 1h41m20s
CI / mobile (push) Failing after 4m19s
CI / docker (push) Failing after 44m8s
Docs / build (push) Successful in 17m11s
Docs / deploy (push) Skipped
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
Follow-ups to Phase E (ADR-15):

- Transcription (E2): OpenAI-compatible profiles can name a speech-to-text
  model; POST /files/{id}/transcribe turns an audio or video attachment
  (up to 25 MB) into text and a summary with key points and action items.
  The editor gets a Transcribe button on media files that inserts the
  summary and the transcript in a toggle.
- Monthly token limits: ai_usage counts requests and tokens per workspace
  and month. Workspace admins can cap their workspace; superadmins can cap
  what each workspace uses through the server's providers, after which
  the workspace's own providers keep working. The admin panel lists usage.
- PDF text for extra retrieval files (ledongthuc/pdf, pure Go).
- Phone app: an AI chat screen for the workspace or a page, with streamed
  answers and sources that open the cited block.
- OpenAPI, generated clients, migration, translations and docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 22:26:27 +01:00
tajniak81andClaude Opus 5.5 78b7710090 Add AI chat, writing actions, workspace embeddings and an MCP server
Phase E of the AFFiNE parity plan (ADR-15):

- internal/ai: OpenAI-compatible, Anthropic (official Go SDK) and Ollama
  drivers; BYOK profiles per workspace and for the instance, with keys
  encrypted by DOCWELL_SECRET_KEY, failover order, a test call and usage
  counters.
- Embeddings: an indexer that follows PocketBase like the search index,
  chunks pages along their blocks and keeps vectors in a bbolt file in
  the data dir (no cgo); progress, ignored pages and extra files.
- Chat sessions scoped to a page, space or workspace, streamed as
  server-sent events, with citations to pages and blocks, fork and
  history; retrieval only from pages the asker can read.
- Writing actions (rewrite, fix, shorter, longer, summarise, translate,
  continue, custom) in the editor's selection toolbar.
- POST /mcp: MCP over Streamable HTTP with personal API tokens; read
  tokens search and read pages, write tokens also create and update them.
- Web app chat panel (Ctrl+J), workspace AI settings, an admin AI page,
  OpenAPI, generated clients, migration and translations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 21:58:22 +01:00
tajniak81andClaude Opus 5.5 05a6334f26 Keep the CI compose smoke test off a production stack on the same host
CI / go (Server) (push) Failing after 6m0s
CI / go (Web-App) (push) Successful in 10m45s
CI / frontend (push) Failing after 8m37s
CI / desktop (ubuntu-latest) (push) Successful in 1h51m46s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / mobile (push) Failing after 19m41s
CI / docker (push) Successful in 49m29s
The docker job ran under the compose project "docwell", the same name a
real install uses. On a runner sharing the Docker host it took over the
install's db/server/web containers, and `down -v` then deleted them
along with their volumes. Give the job its own project name and drop the
host ports so it cannot collide with a running install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 17:22:05 +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 / docker (push) Successful in 39m26s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / mobile (push) Failing after 5m14s
CI / desktop (macos-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
CI / go (Web-App) (push) Successful in 10m49s
CI / desktop (ubuntu-latest) (push) Successful in 1h43m36s
CI / docker (push) Successful in 58m32s
Docs / deploy (push) Canceled after 0s
CI / frontend (push) Failing after 7m26s
CI / mobile (push) Failing after 3m46s
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 db6f2caa4a Add links to database records
CI / go (Server) (push) Failing after 20m11s
CI / mobile (push) Failing after 7m33s
CI / docker (push) Successful in 49m7s
Docs / build (push) Successful in 12m55s
CI / frontend (push) Failing after 8m8s
CI / desktop (ubuntu-latest) (push) Successful in 1h41m4s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / go (Web-App) (push) Canceled after 4s
Docs / deploy (push) Skipped
A record can be linked like a block: the page's address plus
"#r-<database>-<record>". Opening the link loads the page, scrolls to
the database and opens the record beside it; a link to a deleted record
just shows the page. Records stay part of their page, so the link needs
nothing beyond the page's own access.

"Copy link to record" is in the record's panel header and in the row's
right-click menu, which readers now get too (Open and Copy link only).
The page view opens record links the way it scrolls to block links,
retrying while the shared document loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 11:18:03 +01:00
tajniak81andClaude Opus 5.5 f7b7022958 Rebind a database when its records are replaced
A restore, import or template replaces the page through yrs, which
writes a new map for each database under the same id. An open editor
kept watching and editing the old, detached map: it showed the records
from before the restore, its edits went nowhere, and its records could
not open their bodies. The block now follows its entry in the blocks map
and rebinds (and reopens an open record) when the entry is replaced.

Found by testing databases in the web app against a running server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 10:37:14 +01:00
tajniak81andClaude Opus 5.5 3102a476a6 Add databases: table, kanban and calendar views with rows as pages
CI / go (Server) (push) Failing after 4m1s
CI / go (Web-App) (push) Successful in 10m50s
CI / frontend (push) Failing after 6m46s
CI / desktop (ubuntu-latest) (push) Successful in 1h10m39s
CI / mobile (push) Failing after 3m2s
CI / docker (push) Successful in 35m59s
Docs / build (push) Successful in 13m26s
Docs / deploy (push) Skipped
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
Phase C of docs/AFFINE.md (ADR-13).

A database is a block whose records live in the page's Y.Doc, in
ydoc.getMap("blocks") under the block's id: columns, rows (each cell its
own map entry, so concurrent edits to one row merge) and views. Order is
a fractional position per item, so moving a row keeps edits made to it at
the same time. Database edits share the page's undo history.

- Thirteen property types: title, text, number, checkbox, select,
  multi-select, date, progress, link, attachment, member, created time
  and created by. The column menu renames, changes type (converting the
  values), sorts, filters, hides, inserts, moves, duplicates and deletes;
  columns resize and drag.
- Table view: keyboard navigation, range selection, typing to edit,
  copy and paste with spreadsheets (pasting adds rows as needed), row
  dragging, bulk delete, grouping.
- Views in tabs, each with its own filters (all/any), sorts, grouping
  and visible properties; kanban grouped by select, multi-select,
  checkbox or member with cards dragged between columns; calendar by a
  date property with records dragged between days.
- A record opens beside the page with its properties and a body of its
  own (a Y.XmlFragment in the row, edited by a second editor).
- /database, Ctrl+G or "Group as database" turns a list into a database;
  CSV export and import; a copied, pasted or duplicated database gets
  its own copy of the records.

Server: yrs writes each database's records into its node as attrs.data
when it turns a document into JSON, adds them to the search text, and
writes them back on imports, restores and templates. Markdown, HTML,
PDF and Word exports show a database as a table of its first view's
columns. Notion database CSVs import as database blocks with guessed
types. Share links and history previews show databases read-only.

Strings are translated into all five languages, the user guide covers
databases, and the mobile editor bundle is rebuilt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 20:06:18 +01:00
tajniak81andClaude Opus 5.5 53dd43cc2e Add synced pages, editor settings and split view
Phase B items 7-9 of docs/AFFINE.md.

Synced pages: "![[" or /Synced page shows another page inside this one,
read-only and live. The copy follows the page over a read-only collab
connection (CollabProvider readOnly: no edits, no presence) in a nested
read-only editor; it folds to its title and opens the page. The node
keeps the page's title, so exports (Markdown, HTML, PDF, Word) and
readers without a host show it as a link to the page.

Settings: Account -> Editor sets, per device, the text size, full width
or a date title for new pages, showing properties and backlinks, and
code line numbers. The inbox settings choose which notification types
the email digest includes (users.notify_email_off, new migration).

Split view: Alt+click a page link, or Open beside in the page menu,
shows that page in a side pane on wide screens; it survives navigation
and reloads of the tab. The page menu opens pages in a new tab on the
web, and Ctrl+[ / Ctrl+] go back and forward.

Strings are translated into all five languages, the user guide covers
the new features, and the mobile editor bundle is rebuilt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:23:30 +01:00
tajniak81andClaude Opus 5.5 ec11abd8b8 Add page properties, tags, All docs, collections and journals
Phase B (items 1-6) of docs/AFFINE.md.

Properties: workspaces define custom page properties (text, number,
checkbox, date, select, multi-select, person, link) in the new
workspace_properties collection; pages keep their values in
pages.properties, checked against each property's type. The Info panel
under the title shows tags, custom and built-in properties, following
each property's visibility; the Info side panel shows them all, with the
page's collections and the journal. Settings gains Page properties and
Tags sections.

Tags: coloured, per workspace (tags collection, pages.tags); create from
the picker, rename, recolour, merge and delete. Search filters by tag.

All docs: GET /workspaces/{id}/docs lists the pages the caller can open
with their properties, narrowed by space, tag, collection or filter
rules evaluated on the server. The view shows a list, grid or cards,
groups and orders by any property, picks the properties shown, and acts
on several pages at once (tag, move, trash, collect).

Collections (page_collections): saved rules plus pages added or taken
out by hand, private to their creator until shared with the workspace,
listed in the sidebar.

Journals: one page per person and day in a private journal space
(spaces.journal_owner) that workspace admins do not see into, made on
first use. A week strip marks days with pages, new days can start from
a template, and dates in read mode open that day's journal.

The migration and schema snapshot, OpenAPI spec and generated Go, TS and
Dart types are updated (the Dart generator learns untyped values), the
mobile editor bundle is rebuilt, the new strings are translated into all
five languages, and the user guide covers the new features.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 16:35:42 +01:00
tajniak81andClaude Opus 5.5 3dea2bb2f4 Add Word export, column dragging and the rest of editor parity
CI / mobile (push) Failing after 3m44s
CI / docker (push) Successful in 54m15s
Docs / build (push) Successful in 12m28s
Docs / deploy (push) Skipped
CI / frontend (push) Failing after 7m47s
CI / desktop (ubuntu-latest) (push) Successful in 1h27m22s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / go (Server) (push) Failing after 8m51s
CI / go (Web-App) (push) Successful in 11m46s
Word export: pages download as .docx from the page menu and from
GET /pages/{id}/export?format=docx. The file keeps headings, alignment,
lists, to-dos, quotes, callouts, code, tables with a repeating header
row, text formatting, colours, highlights, links and the page's images.
Word import now reads callouts, to-dos and shaded highlights, so a page
exported to Word imports back as it was. The user guide says how to move
pages to Notion, whose Import reads Word and Markdown files.

Editor:
- Columns move like rows: a grip on the column's top edge drags it, and
  the table toolbar and Ctrl+Alt+Left/Right move it from the keyboard.
  Row and column moving share tablemove.ts.
- Ctrl+Shift+C copies a link to the block the cursor is in.
- Headings 4 to 6 sit under "Other headings" in the slash menu; a search
  still finds them directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:01:06 +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 3c7403ddf9 Create the first superadmin from DOCWELL_ADMIN_EMAIL on start
When DOCWELL_ADMIN_EMAIL and DOCWELL_ADMIN_PASSWORD are set (and
optionally DOCWELL_ADMIN_NAME), docwell-server creates that account as
superadmin on start while the instance has no accounts. Once any account
exists it changes nothing, so restarts never reset the password or a role
changed in the admin panel. Without them, the first sign-up still wins.

Pass the variables through every compose file, document them in the
.env examples and the configuration, access and quick-start guides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 22:32:29 +01:00
tajniak81andClaude Opus 5.5 b9be8be156 Run docwell-db as a stock PocketBase and let the server set it up
CI / go (Server) (push) Failing after 22m50s
CI / go (Web-App) (push) Canceled after 0s
CI / desktop (ubuntu-latest) (push) Successful in 2h56m50s
CI / mobile (push) Failing after 5m33s
CI / docker (push) Successful in 1h43m8s
Docs / build (push) Successful in 16m2s
Docs / deploy (push) Skipped
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / frontend (push) Failing after 8m47s
docwell-db no longer needs a Docwell image: the stack runs
tajniak81/pocketbase-docker-root as it is, and docwell-server does what
the migrations and pb_hooks used to do inside PocketBase.

On start, docwell-server now:
- waits for PocketBase and imports Docwell's collections from an
  embedded snapshot (internal/pbschema). Existing collections and
  fields are matched by name, so their data is kept; the admin-managed
  users options (OAuth2 providers, magic link) are left untouched.
- writes the DOCWELL_APP_NAME, DOCWELL_WEB_URL, DOCWELL_MAIL_FROM,
  DOCWELL_SMTP_* and DOCWELL_S3_* settings into PocketBase, as the
  boot hook did.

It also replaces the hook's two routes: token checks use PocketBase's
auth-refresh (the organization name is read as the superuser), and
Docwell's own emails go out over SMTP from the server. PocketBase never
returns the SMTP password, so the server keeps a copy in the
superuser-only instance_settings collection; a password saved before
this change has to be entered once more in the admin panel.

Database/ keeps pb_migrations as the source of the schema;
export-schema.sh regenerates the snapshot from them. Database/Dockerfile
and pb_hooks are removed, the release no longer builds docwell-db, the
AIO image runs PocketBase without migrations or hooks, and the compose
files default DB_IMAGE to the stock image and pass the settings to the
server instead of the database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:09:38 +01:00
tajniak81andClaude Opus 5.5 24a2d275a0 Fix docwell-server data dir ownership on start
The server runs as docwell (uid 10001), but a host bind mount for
SERVER_DATA, or a volume created by an older image, arrives owned by
root, so the search index failed with "mkdir /data/search.bleve:
permission denied".

The image now starts as root through a small entrypoint that chowns
DOCWELL_DATA_DIR to docwell when needed, then runs docwell-server as
docwell via su-exec. A container already started with a non-root
user: skips the fix and runs the server directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 18:35:08 +01:00
tajniak81andClaude Opus 5.5 ef2c81d062 Move PocketBase to port 8070
CI / go (Server) (push) Successful in 23m34s
CI / go (Web-App) (push) Successful in 12m21s
CI / desktop (ubuntu-latest) (push) Successful in 1h57m19s
CI / mobile (push) Failing after 5m8s
CI / docker (push) Failing after 41m19s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / frontend (push) Failing after 10m55s
Docs / build (push) Canceled after 0s
Docs / deploy (push) Canceled after 0s
docwell-db's base image (tajniak81/pocketbase-docker-root) listens on
8070 by default. Use that port everywhere instead of overriding it to
8090: the Database image, every Docker compose file and .env example,
the AIO start script, docwell-server's DOCWELL_PB_URL default, and the
docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 18:23:55 +01:00
tajniak81andClaude Opus 5.5 ad26727521 Add production compose variants and base docwell-db on the PocketBase image
CI / go (Server) (push) Successful in 16m33s
CI / go (Web-App) (push) Successful in 12m1s
CI / frontend (push) Failing after 6m32s
CI / desktop (ubuntu-latest) (push) Failing after 21m52s
CI / desktop (macos-latest) (push) Canceled after 0s
CI / desktop (windows-latest) (push) Canceled after 0s
CI / mobile (push) Failing after 5m2s
CI / docker (push) Successful in 18m56s
Docs / deploy (push) Skipped
Docs / build (push) Successful in 10m45s
Docker/ and Docker-AIO/ each get docker-compose.prod.yml plus S3,
SeaweedFS and SeaweedFS-split variants, with matching .env.prod*.example
templates and a README.

docwell-db is now built FROM tajniak81/pocketbase-docker-root, which
creates the superuser and serves PocketBase on 8090; data moves to
/pb/pb_data. The boot hook applies DOCWELL_S3_* settings when set.
The AIO start script accepts PB_ENCRYPTION_KEY. The base image is
amd64-only, so the docwell-db release builds amd64 only for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 11:39:01 +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 / 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 / go (Web-App) (push) Successful in 10m4s
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