diff --git a/.docs/wiki/Home.md b/.docs/wiki/Home.md index bf9201d..c58c19c 100644 --- a/.docs/wiki/Home.md +++ b/.docs/wiki/Home.md @@ -6,7 +6,7 @@ This wiki is for the people who install and run an instance and for the people w ## At a glance -**Current version:** v0.61.1 · every version is on [[Releases]] +**Current version:** v0.62.0 · every version is on [[Releases]] | | | |---|---| @@ -53,6 +53,7 @@ This wiki is for the people who install and run an instance and for the people w ## What's new +- **v0.62.0** makes uploads work in the Windows desktop app, where every upload, a picture into a gallery's Files and media property among them, answered "Internal error."; lets a Files and media property take several files at once and every PNG, JPEG, GIF and WebP image inside a zip; gives an error toast a ? that opens what went wrong, with the request id and, in the desktop app, the cause; and keeps the desktop server's warnings and errors in `form-md.log` in the data folder. - **v0.61.1** lets an account that has no password, such as the desktop app's owner, set its first one without being asked for a current one, and adds [[Self-hosting]], [[Auth0]] and the `deploy/gcp` scripts. - **v0.61.0** brought a desktop app whose window signs in with a key the server makes at each start and accepts only once, so a sign-in from outside the app's window is refused, and third-party notices that a build writes exactly as they are kept, the demo media and the extension kit included. diff --git a/.docs/wiki/Install.md b/.docs/wiki/Install.md index 7208901..856d81a 100644 --- a/.docs/wiki/Install.md +++ b/.docs/wiki/Install.md @@ -8,6 +8,8 @@ Since v0.43.0 each release also carries the desktop app: `form.md_X.Y.Z_aarch64. The app is a window around the same `form-md` binary. It starts the server on this computer when it opens and stops it when you quit, signs you in as the owner without a password screen, and keeps your data in `~/form.md` (start the app with `FORMMD_DATA` set to use another folder). The server listens on `127.0.0.1:8750` so agents and `form-md mcp` find it at the usual address, or on another free port when 8750 is taken. It never listens beyond this computer; to share a workspace with other people, run the server on its own as below ([[Self-hosting]] walks through a hosted instance on your own domain). +Since v0.62.0 the app's server also writes its warnings and errors to `form-md.log` in the data folder (`~/form.md/form-md.log`), with the run before it in `form-md.log.1`. When a request answers "Internal error.", the ? on its toast opens the request id and the cause, and its line in the log names the request id, the path and the cause. + ### Opening the app's workspace in a browser The owner the app creates has the name of your operating system account, the email `owner@localhost` and no password: the window is signed in by the app itself. A browser opened at `http://127.0.0.1:8750` is not signed in and asks for an email and password, and there is no initial password to type. diff --git a/.docs/wiki/Releases.md b/.docs/wiki/Releases.md index b32f19f..2a0a442 100644 --- a/.docs/wiki/Releases.md +++ b/.docs/wiki/Releases.md @@ -2,7 +2,7 @@ What each version of form.md brought, newest first. One row per version; the wording is the project's own record of that release. -- **Current version:** v0.61.1 +- **Current version:** v0.62.0 - **Where releases come from:** Releases built by formcompiler and the update check and installer reading its form.md-updates release. - **Downloads:** the README's Download section, and [[Install]] for servers. - **How a release is cut:** `BRANCHING.md` at the repo root. @@ -11,6 +11,7 @@ What each version of form.md brought, newest first. One row per version; the wor | Version | What it brought | |---|---| +| v0.62.0 | Uploads that work in the Windows desktop app, where every upload, a picture into a gallery's Files and media property among them, answered "Internal error."; several files at once and every PNG, JPEG, GIF and WebP image inside a zip in a Files and media property; a ? on an error toast that opens what went wrong, with the request id and, in the desktop app, the cause; and the desktop server's warnings and errors kept in `form-md.log` in the data folder | | v0.61.1 | Lets an account that has no password, such as the desktop app's owner, set its first one without being asked for a current one, and adds [[Self-hosting]], [[Auth0]] and the `deploy/gcp` scripts | | v0.61.0 | A desktop app whose window signs in with a key the server makes at each start and accepts only once, so a sign-in from outside the app's window is refused, and third-party notices that a build writes exactly as they are kept, the demo media and the extension kit included | | v0.60.0 | A desktop app on Windows in which nothing the server starts (Claude Code and the other agents, the tunnel, the server's own clean-up) opens a console window, with `FORMMD_ENGINE_WINDOWED=0` to open one with the server's output for a single start, and the views and publish demos rebuilt with the app's current styles | diff --git a/Makefile b/Makefile index dceaab1..4e480a7 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION := v0.61.1 +VERSION := v0.62.0 LDFLAGS := -s -w -X github.com/nodemode-ai/form.md/internal/app.Version=$(VERSION) GO_BUILD := CGO_ENABLED=0 go build -trimpath -ldflags "$(LDFLAGS)" TARGETS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 diff --git a/README.md b/README.md index 3151a31..ffb2d3f 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@
-
+
diff --git a/cmd/form-md/desktoplog.go b/cmd/form-md/desktoplog.go
new file mode 100644
index 0000000..26dc04d
--- /dev/null
+++ b/cmd/form-md/desktoplog.go
@@ -0,0 +1,23 @@
+package main
+
+import (
+ "io"
+ "log/slog"
+ "os"
+ "path/filepath"
+)
+
+const desktopLogName = "form-md.log"
+
+func desktopLog(dataDir string, base *slog.Logger) (*slog.Logger, io.Closer, string, error) {
+ path := filepath.Join(dataDir, desktopLogName)
+ if _, err := os.Stat(path); err == nil {
+ _ = os.Rename(path, path+".1")
+ }
+ f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_TRUNC|os.O_APPEND, 0o600)
+ if err != nil {
+ return base, nil, "", err
+ }
+ file := slog.NewTextHandler(f, &slog.HandlerOptions{Level: slog.LevelWarn})
+ return slog.New(slog.NewMultiHandler(base.Handler(), file)), f, path, nil
+}
diff --git a/cmd/form-md/main.go b/cmd/form-md/main.go
index 9caf11f..407ce3b 100644
--- a/cmd/form-md/main.go
+++ b/cmd/form-md/main.go
@@ -15,6 +15,7 @@ import (
"github.com/nodemode-ai/form.md/internal/app"
"github.com/nodemode-ai/form.md/internal/config"
"github.com/nodemode-ai/form.md/internal/crypt"
+ "github.com/nodemode-ai/form.md/internal/httpx"
"github.com/nodemode-ai/form.md/internal/i18n"
"github.com/nodemode-ai/form.md/internal/nowindow"
"github.com/nodemode-ai/form.md/internal/ops"
@@ -115,6 +116,16 @@ func serve() int {
return 1
}
defer unlock()
+ if cfg.Desktop() {
+ httpx.ShowCauses(true)
+ if kept, closer, path, err := desktopLog(cfg.DataDir, log); err != nil {
+ log.Warn("the desktop log file could not be opened; warnings and errors go to standard error only", "err", err)
+ } else {
+ log = kept
+ defer closer.Close()
+ log.Info("warnings and errors are also written to the desktop log", "path", path)
+ }
+ }
st, err := store.Open(ctx, cfg.DataDir, key)
if err != nil {
log.Error("storage", "err", err)
diff --git a/docs/EXTENSIONS.md b/docs/EXTENSIONS.md
index 49c374d..4568f07 100644
--- a/docs/EXTENSIONS.md
+++ b/docs/EXTENSIONS.md
@@ -124,6 +124,6 @@ These are refused for an agent, an API token or a script: extension commands sta
## Limits
-- `minimum_app` is compared with form.md's version (0.61.1 in this release; extensions need 0.50.0 or newer).
+- `minimum_app` is compared with form.md's version (0.62.0 in this release; extensions need 0.50.0 or newer).
- A headless command has 120 s; through MCP the call returns an error after 60 s even if the command is still running in the window.
- Consent is stored in the browser per extension id, version and permission set; another browser or the desktop app asks again.
diff --git a/internal/HASHOUT_LOG.md b/internal/HASHOUT_LOG.md
index 71bd735..1758caf 100644
--- a/internal/HASHOUT_LOG.md
+++ b/internal/HASHOUT_LOG.md
@@ -2,8 +2,8 @@
Living log of all comment content, explainers, rationale, TODOs and removed code for the Go side of the repo (`cmd/`, `embed.go`, `internal/`, `tools/`). Source files stay comment-free per dev-rules `hashout-log`; everything they would have said lives here, indexed. Read this first, then edit code surgically. Paths are relative to the repo root.
-Current build version: v0.61.1
-Last updated: 2026-11-22 · v0.61.1: an account without a password sets its first one (issue #21), and deploy/gcp for any domain (#p33-first-password); 2026-11-20 · v0.61.0: the server makes the desktop window's key and accepts it once, and make build writes the committed NOTICES.md (#p32-leftovers); 2026-11-20 · v0.60.0: nothing the server starts opens a console window on Windows, `FORMMD_ENGINE_WINDOWED=0` to see it (#p31-no-console); 2026-11-20 · v0.59.0 no server change (the version only; see web/HASHOUT_LOG.md #family-names); 2026-11-20 · v0.58.0: an ended process not yet collected counts as gone where there is no /proc; `form-md where`; Antigravity in `agents install` (#p30-sprint-finish); 2026-11-19 · v0.57.0: a folder per Antigravity tab; a lock record, a server left behind replaced, a live one refused with a sentence, and the server stopping when the app that started it is gone (#p29-windows-start); 2026-11-19 · v0.56.0: one finder for the four agent programs, an Antigravity tab, tests that can find only stand-in programs (#p28-agent-finder); 2026-11-19 · v0.55.0: no engine change; a test that checks the copied terminal panel files in web/src/dock against their manifest (see web/HASHOUT_LOG.md #family-dock); 2026-11-19 · v0.54.0: the window command tools announced as able to change the workspace, `agents install` without the token on a command line, a terminal attached only from the server's own page (#p25-batch3); `agents/manifest.json` and its check (#p26-batch5); a token per agent tab, Codex and Cursor tab kinds, `GET /api/dock` and `GET /api/dock/agents` (#p27-dock-contract); 2026-11-13 · v0.53.0: `date_range` on the query and chart routes, ANDed with the view filter and validated strictly; `today`, `past_7_days` and `past_30_days` within options (#p24-date-range); 2026-11-09 · v0.52.2: the Dockerfile's web stage copies the three demo builds the interface build packs, so the container image builds again; 2026-11-09 · v0.52.1: no engine change (the version only); 2026-11-09 · v0.52.0: pagestyle's sixth key, header (left by default, center, right), cleaned, merged and written as data-style-header in the first frame (#p23-header); 2026-11-09 · v0.51.0: static serves /demo/* and /demos/* (the in-app demos embedded from web/dist) with demoCSP, a sandboxed policy with no connect-src, and X-Frame-Options SAMEORIGIN so the window can frame them; the reasoning is in web/HASHOUT_LOG.md #src-ui-demos-ts; 2026-10-30 · v0.47.7: public hardening (automatic HTTPS order, terminal only for direct requests, MCP config file, desktop Host guard and no setup, AI key dropped on a new address, downloads from dl.formai.studio); v0.46.1: the update check reads formcompiler's form.md-updates release (update.go); v0.46.0: version only (Home's Templates side panel); v0.45.3: version only (the icon's tag); v0.45.2: version only (the icon's edge); v0.45.1: version only (the new app icon); v0.45.0: the recursive template builder (sub-pages, related databases, placeholders, relative dates, relation values by title), Data & charts and Example projects, project previews, the code block view in Markdown; v0.44.0: the template library and previews, search shared-space filter and direction, the appearance preference, /desktop/enter to /home?start=1; v0.43.0: desktop mode (FORMMD_DESKTOP_KEY, /desktop/enter, stdin stop, port fallback), desktop notices; v0.42.1: the notices tool finds the Go licence outside GOROOT; v0.42.0: Claude Code launched like formlit's, chat events for every window, form-md mcp autostart, the sparkle retired; v0.41.0: import sources by file format, PDF text in search, webhook page records, the web as an answer source, published boards and galleries, the grouped-offset fix; Phase 14: terminals, Claude Code and its chat, window commands, form-md cli, 26 languages
+Current build version: v0.62.0
+Last updated: 2026-11-29 · v0.62.0: an upload is closed before it is renamed, so uploads work on Windows; the desktop server keeps its warnings and errors in form-md.log and a 500 carries its request id, with the cause in the desktop app; POST /api/files/unzip (#p34-upload-log); with the person-only window commands of #window-person-only; 2026-11-22 · v0.61.1: an account without a password sets its first one (issue #21), and deploy/gcp for any domain (#p33-first-password); 2026-11-20 · v0.61.0: the server makes the desktop window's key and accepts it once, and make build writes the committed NOTICES.md (#p32-leftovers); 2026-11-20 · v0.60.0: nothing the server starts opens a console window on Windows, `FORMMD_ENGINE_WINDOWED=0` to see it (#p31-no-console); 2026-11-20 · v0.59.0 no server change (the version only; see web/HASHOUT_LOG.md #family-names); 2026-11-20 · v0.58.0: an ended process not yet collected counts as gone where there is no /proc; `form-md where`; Antigravity in `agents install` (#p30-sprint-finish); 2026-11-19 · v0.57.0: a folder per Antigravity tab; a lock record, a server left behind replaced, a live one refused with a sentence, and the server stopping when the app that started it is gone (#p29-windows-start); 2026-11-19 · v0.56.0: one finder for the four agent programs, an Antigravity tab, tests that can find only stand-in programs (#p28-agent-finder); 2026-11-19 · v0.55.0: no engine change; a test that checks the copied terminal panel files in web/src/dock against their manifest (see web/HASHOUT_LOG.md #family-dock); 2026-11-19 · v0.54.0: the window command tools announced as able to change the workspace, `agents install` without the token on a command line, a terminal attached only from the server's own page (#p25-batch3); `agents/manifest.json` and its check (#p26-batch5); a token per agent tab, Codex and Cursor tab kinds, `GET /api/dock` and `GET /api/dock/agents` (#p27-dock-contract); 2026-11-13 · v0.53.0: `date_range` on the query and chart routes, ANDed with the view filter and validated strictly; `today`, `past_7_days` and `past_30_days` within options (#p24-date-range); 2026-11-09 · v0.52.2: the Dockerfile's web stage copies the three demo builds the interface build packs, so the container image builds again; 2026-11-09 · v0.52.1: no engine change (the version only); 2026-11-09 · v0.52.0: pagestyle's sixth key, header (left by default, center, right), cleaned, merged and written as data-style-header in the first frame (#p23-header); 2026-11-09 · v0.51.0: static serves /demo/* and /demos/* (the in-app demos embedded from web/dist) with demoCSP, a sandboxed policy with no connect-src, and X-Frame-Options SAMEORIGIN so the window can frame them; the reasoning is in web/HASHOUT_LOG.md #src-ui-demos-ts; 2026-10-30 · v0.47.7: public hardening (automatic HTTPS order, terminal only for direct requests, MCP config file, desktop Host guard and no setup, AI key dropped on a new address, downloads from dl.formai.studio); v0.46.1: the update check reads formcompiler's form.md-updates release (update.go); v0.46.0: version only (Home's Templates side panel); v0.45.3: version only (the icon's tag); v0.45.2: version only (the icon's edge); v0.45.1: version only (the new app icon); v0.45.0: the recursive template builder (sub-pages, related databases, placeholders, relative dates, relation values by title), Data & charts and Example projects, project previews, the code block view in Markdown; v0.44.0: the template library and previews, search shared-space filter and direction, the appearance preference, /desktop/enter to /home?start=1; v0.43.0: desktop mode (FORMMD_DESKTOP_KEY, /desktop/enter, stdin stop, port fallback), desktop notices; v0.42.1: the notices tool finds the Go licence outside GOROOT; v0.42.0: Claude Code launched like formlit's, chat events for every window, form-md mcp autostart, the sparkle retired; v0.41.0: import sources by file format, PDF text in search, webhook page records, the web as an answer source, published boards and galleries, the grouped-offset fix; Phase 14: terminals, Claude Code and its chat, window commands, form-md cli, 26 languages
---
@@ -2673,3 +2673,48 @@ Consequence: MCP never runs as a session, so `extensions_list` and `extension_co
Ran: the new test failed on the code before the change (`extensions.list` ran for a token credential) and passes after it; `go test ./internal/claudecode` passes. The `ext.` case (`ext.sample.render` ran for a token credential) and the trash routes (a token deleted a page for good, 204) each failed before their change and pass after it.
Open: an extension in the window can still run window commands that are not `extensions.`, `ext.` or marked risky, which includes the other person-only families; the window does not check the person-only list. Import and export over REST and MCP are unchanged; the decision covered the window's `transfer.` commands.
+
+## Phase 34 · uploads on Windows, and a log the desktop app keeps {#p34-upload-log}
+
+### internal/files/files.go · the upload is closed before it is renamed
+- refers-to: internal/files/files.go :: `store`
+- kind: fix
+- logged: v0.62.0 · 2026-11-29
+- report: a person on Reddit, a "Files and media" property shown on a Gallery view: uploading a .png answered "Internal error." and there was no log to read
+
+`store` wrote the upload to `.upload-*` with `os.CreateTemp`, synced it and renamed it to its id while the file was still open; it was closed only by the deferred clean-up. On Linux and macOS a file can be renamed while it is open, so every check here passed. On Windows Go opens files without `FILE_SHARE_DELETE`, so `MoveFileEx` fails with a sharing violation; that raw `*os.LinkError` reached `httpx.Problem`, which answers 500 `internal`. It was not about PNG, the gallery or the files property: every upload through `store` (attachments, covers, icons, avatars, workspace pictures, fonts, `StoreBytes`) failed the same way in the Windows desktop app. The gallery's files property is simply where a person uploads most. `store` now closes the file after `Sync` and before the rename, as `ops.Backup`, `ops.encrypt`, `transfer` and `claudecode` already did. The deferred `tmp.Close()` stays for the early returns; a second `Close` returns an error that is ignored.
+
+Ran on Linux: an upload through a gallery row's files property answers 201 before and after; `GOOS=windows go build ./cmd/form-md` builds. Not run: an upload on Windows itself; the cause is read from the code and from how Go opens files there.
+
+### cmd/form-md/desktoplog.go · warnings and errors kept in the data folder
+- refers-to: cmd/form-md/desktoplog.go :: `desktopLog`; cmd/form-md/main.go :: `serve`
+- kind: feature
+- logged: v0.62.0 · 2026-11-29
+
+The server logs to its standard error only. The desktop app reads that stream, keeps lines only until its window opens (src-tauri/src/main.rs, the `Tail`), and writes `form-md-server.log` only when a start fails, so a 500 after the window opened, with its `request failed` line and request id, was lost. In desktop mode `serve` now also writes warnings and errors to `form-md.log` in the data folder (`~/form.md` for the app), through `slog.NewMultiHandler` beside the standard-error handler, which keeps INFO. It is opened after `ops.Lock`, so a second start on the same folder, which is refused, never truncates the log of the one that runs. Each start moves the earlier run's log to `form-md.log.1`, so one run back is kept and the file never grows past one run. The file is 0600 in a 0700 folder. Its path is logged once at INFO at the start. `log` is replaced in `serve` after the stdin and shell watchers start; they read it only when they stop the server.
+
+Ran: in desktop mode with `files` made a plain file, an upload answered 500 and `form-md.log` held `level=ERROR msg="request failed" rid=... path=/api/files err="open .../files/.upload-...: not a directory"`.
+
+### internal/httpx/respond.go · a 500 carries its request id, and in the desktop app its cause
+- refers-to: internal/httpx/respond.go :: `Internal`, `ShowCauses`; internal/httpx/request.go :: `Problem`; internal/httpx/middleware.go :: `Recover`; cmd/form-md/main.go :: `serve`
+- kind: feature
+- logged: v0.62.0 · 2026-11-29
+
+`Problem` and `Recover` answer a 500 through `Internal`, which puts `request_id` in the error's `data` on every server, so the window's error details can name the line to look for in the log. `ShowCauses(true)` is set only in desktop mode, where the server listens on loopback and serves its owner alone; then `data.detail` also carries the error text (or `panic: ...`). A server for other people never sends the cause, since it can name paths and internals. The message and code stay `internal error` / `internal`, so existing clients read the same thing.
+
+Ran: in desktop mode an upload forced to fail answered 500 with `data.request_id` and `data.detail`; in server mode the same answered with `data.request_id` only.
+
+### internal/files/unzip.go · images from a zip
+- refers-to: internal/files/unzip.go :: `Unzip`, `unzip`, `unzipEntry`; internal/files/files.go :: `Mount`; internal/apidoc/apidoc.go :: `overrides`
+- kind: feature
+- logged: v0.62.0 · 2026-11-29
+
+`POST /api/files/unzip` takes the same multipart form as `POST /api/files` (purpose, workspace_id, page_id, then the file part) with a zip as the file, and stores every PNG, JPEG, GIF or WebP inside as its own attachment through `store`, so authorization, at-rest encryption, the files row and the `file.upload` audit entry are the ones an upload gets. It answers 201 `{"files": [...], "skipped": [{"name", "reason"}]}` in the zip's entry order. Only purpose attachment is allowed (absent means attachment); anything else is 400 `bad_purpose`. `authorize` runs before the zip is read, so a forbidden request fails at once with its own error. A file that is not a zip is 400 `not_a_zip`; a zip that yields no image is 400 `no_images` with the skipped list under `data.skipped`; a zip over `files.max_upload_mb` is 413 `too_large`, as an upload is.
+
+The zip needs random access, so the part is first written to `.unzip-*` in the files folder through `Key.Writer` and read back through `Key.Open`, as `transfer` does for an uploaded zip; on an encrypted instance the archive never sits on disk in plain text. The temp file is closed before it is opened again and the handle is closed before the temp is removed (Windows refuses to delete an open file); the temp is always removed, and `Sweep` would take a leftover after an hour. An entry is an image by its content: `sniff` with no extension, so a text file named .png is skipped and a binary file is not taken for an image by its name. Directories are passed over without a mention; `__MACOSX/` entries, names starting with a dot, nested .zip files, anything not an image, and entries over the limit are listed as skipped with a plain sentence. The stored name is the entry's base name through `cleanName`, never its folder path.
+
+Limits, all against a zip bomb: an entry is read at most `files.max_upload_mb` plus one byte whatever its header says (an entry that lies about its size is skipped, not trusted), the images stored from one zip add up to at most 4 times that limit, and at most 500 images are stored; past either cap the rest are skipped with a reason. The skipped list shows at most 200 entries and then one line counting the others. An entry that cannot be read from a damaged zip is skipped; a failure of the database or the disk still fails the request, and images stored before it stay attached to the page.
+
+`POST /api/files/unzip` has a summary in `internal/apidoc/apidoc.go`; the generated name for `unzip` would have read badly. `go run ./tools/wikicheck` does not list routes and passes either way.
+
+Ran: `gofmt -l internal cmd` (nothing), `go vet ./internal/files/ ./internal/apidoc/`, `GOOS=windows go build -o /dev/null ./cmd/form-md`, `CGO_ENABLED=0 go build` of `cmd/form-md`, `go run ./tools/wikicheck` (23 pages agree). Against a server on a throwaway data folder: a zip of two PNGs (one in a folder, one named .PNG), a GIF, a .txt, a text file named .png, a `__MACOSX/` entry, a dot file, a nested .zip and a folder answered 201 with 3 files and 5 skipped; a plain text file answered 400 `not_a_zip`; a zip of two text files answered 400 `no_images` with both in `data.skipped`; purpose cover answered 400 `bad_purpose`; no session answered 401; the files folder held no `.unzip-*` afterwards. Not run: an encrypted instance, a zip over a cap, a zip over the upload limit, Windows itself.
diff --git a/internal/apidoc/apidoc.go b/internal/apidoc/apidoc.go
index f951758..675e30e 100644
--- a/internal/apidoc/apidoc.go
+++ b/internal/apidoc/apidoc.go
@@ -281,6 +281,7 @@ func init() {
"POST /api/collections/{id}/feed": "Read a feed view's posts with reactions and comment counts",
"POST /api/admin/stranded/{id}/adopt": "Adopt a workspace left without an admin",
"POST /api/me/email": "Change the account's email address",
+ "POST /api/files/unzip": "Store every image inside an uploaded zip as an attachment",
} {
overrides[k] = override{summary: v}
}
diff --git a/internal/app/version.go b/internal/app/version.go
index 4bbf0d5..be70fe8 100644
--- a/internal/app/version.go
+++ b/internal/app/version.go
@@ -1,5 +1,5 @@
package app
-var Version = "v0.61.1"
+var Version = "v0.62.0"
const Product = "form.md"
diff --git a/internal/files/files.go b/internal/files/files.go
index c9335c5..0bf76af 100644
--- a/internal/files/files.go
+++ b/internal/files/files.go
@@ -281,6 +281,9 @@ func (s *Service) store(ctx context.Context, p *policy.Principal, part io.Reader
if err := tmp.Sync(); err != nil {
return nil, err
}
+ if err := tmp.Close(); err != nil {
+ return nil, err
+ }
if err := os.Rename(tmp.Name(), s.path(id, ext)); err != nil {
return nil, err
}
@@ -552,6 +555,7 @@ func (module) ID() string { return "files" }
func (m module) Mount(r *httpx.Router, _ *app.Deps) error {
s, a := m.s, m.auth
r.HandleFunc("POST /api/files", a.Require(s.Upload))
+ r.HandleFunc("POST /api/files/unzip", a.Require(s.Unzip))
r.HandleFunc("POST /api/files/import", a.Require(s.importHandler))
r.HandleFunc("GET /files/{id}", a.Require(s.Serve))
r.HandleFunc("GET /api/workspaces/{id}/files", a.Require(func(w http.ResponseWriter, r *http.Request, p *policy.Principal) error {
diff --git a/internal/files/unzip.go b/internal/files/unzip.go
new file mode 100644
index 0000000..ea43329
--- /dev/null
+++ b/internal/files/unzip.go
@@ -0,0 +1,231 @@
+package files
+
+import (
+ "archive/zip"
+ "bytes"
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "os"
+ "path"
+ "strings"
+ "unicode/utf8"
+
+ "github.com/nodemode-ai/form.md/internal/httpx"
+ "github.com/nodemode-ai/form.md/internal/policy"
+)
+
+const (
+ maxZipImages = 500
+ zipTotalTimes = 4
+ maxSkipListed = 200
+ maxSkipName = 200
+)
+
+const (
+ reasonNotImage = "not a PNG, JPEG, GIF or WebP image"
+ reasonHiddenDir = "inside a folder the archive marks as hidden"
+ reasonHiddenFile = "a hidden file"
+ reasonNestedZip = "a zip inside the zip"
+ reasonUnreadable = "could not be read from the zip"
+)
+
+type skippedEntry struct {
+ Name string `json:"name"`
+ Reason string `json:"reason"`
+}
+
+type skipList struct {
+ items []skippedEntry
+ extra int
+}
+
+func (l *skipList) add(name, reason string) {
+ if len(l.items) >= maxSkipListed {
+ l.extra++
+ return
+ }
+ if utf8.RuneCountInString(name) > maxSkipName {
+ name = string([]rune(name)[:maxSkipName])
+ }
+ l.items = append(l.items, skippedEntry{Name: name, Reason: reason})
+}
+
+func (l *skipList) list() []skippedEntry {
+ out := append([]skippedEntry{}, l.items...)
+ if l.extra > 0 {
+ out = append(out, skippedEntry{Name: fmt.Sprintf("%d more entries", l.extra), Reason: "skipped for the reasons above"})
+ }
+ return out
+}
+
+func (s *Service) Unzip(w http.ResponseWriter, r *http.Request, p *policy.Principal) error {
+ limit := int64(s.settings.Int("files.max_upload_mb")) << 20
+ r.Body = http.MaxBytesReader(w, r.Body, limit+(1<<20))
+ mr, err := r.MultipartReader()
+ if err != nil {
+ return httpx.Fail(http.StatusBadRequest, "bad_upload", "send the file as multipart form data")
+ }
+ fields := map[string]string{}
+ for {
+ part, err := mr.NextPart()
+ if errors.Is(err, io.EOF) {
+ return httpx.Fail(http.StatusBadRequest, "bad_upload", "the file part is missing")
+ }
+ if err != nil {
+ return uploadError(err, limit)
+ }
+ if part.FormName() != "file" {
+ b, _ := io.ReadAll(io.LimitReader(part, 200))
+ fields[part.FormName()] = strings.TrimSpace(string(b))
+ continue
+ }
+ files, skipped, err := s.unzip(r.Context(), p, part, fields, limit)
+ part.Close()
+ if err != nil {
+ return err
+ }
+ httpx.JSON(w, http.StatusCreated, map[string]any{"files": files, "skipped": skipped})
+ return nil
+ }
+}
+
+func (s *Service) unzip(ctx context.Context, p *policy.Principal, part io.Reader, fields map[string]string, limit int64) ([]*File, []skippedEntry, error) {
+ if purpose := fields["purpose"]; purpose != "" && purpose != "attachment" {
+ return nil, nil, httpx.Fail(http.StatusBadRequest, "bad_purpose", "images from a zip are stored as attachments")
+ }
+ if _, err := s.authorize(ctx, p, "attachment", fields["workspace_id"], fields["page_id"]); err != nil {
+ return nil, nil, err
+ }
+ tmp, err := os.CreateTemp(s.dir, ".unzip-*")
+ if err != nil {
+ return nil, nil, err
+ }
+ name := tmp.Name()
+ defer func() {
+ tmp.Close()
+ os.Remove(name)
+ }()
+ enc := s.st.Key.Writer(tmp)
+ n, err := io.Copy(enc, io.LimitReader(part, limit+1))
+ if cerr := enc.Close(); err == nil {
+ err = cerr
+ }
+ if err != nil {
+ return nil, nil, uploadError(err, limit)
+ }
+ if n > limit {
+ return nil, nil, uploadError(&http.MaxBytesError{Limit: limit}, limit)
+ }
+ if err := tmp.Close(); err != nil {
+ return nil, nil, err
+ }
+ fh, err := s.st.Key.Open(name)
+ if err != nil {
+ return nil, nil, err
+ }
+ defer fh.Close()
+ zr, err := zip.NewReader(fh, fh.Size())
+ if err != nil {
+ return nil, nil, httpx.Fail(http.StatusBadRequest, "not_a_zip", "the file is not a zip archive")
+ }
+ files := []*File{}
+ skipped := &skipList{}
+ total := int64(0)
+ totalCap := limit * zipTotalTimes
+ for _, e := range zr.File {
+ entry := strings.ReplaceAll(e.Name, "\\", "/")
+ if e.FileInfo().IsDir() || strings.HasSuffix(entry, "/") {
+ continue
+ }
+ base := path.Base(entry)
+ declared := int64(e.UncompressedSize64)
+ if e.UncompressedSize64 > uint64(totalCap) {
+ declared = totalCap + 1
+ }
+ switch {
+ case hasSegment(entry, "__MACOSX"):
+ skipped.add(entry, reasonHiddenDir)
+ case strings.HasPrefix(base, "."):
+ skipped.add(entry, reasonHiddenFile)
+ case strings.EqualFold(path.Ext(base), ".zip"):
+ skipped.add(entry, reasonNestedZip)
+ case len(files) >= maxZipImages:
+ skipped.add(entry, fmt.Sprintf("past the %d images stored from one zip", maxZipImages))
+ case declared > limit:
+ skipped.add(entry, fmt.Sprintf("larger than %d MB", limit>>20))
+ case totalCap-total <= 0 || declared > totalCap-total:
+ skipped.add(entry, totalReason(totalCap))
+ default:
+ f, reason, err := s.unzipEntry(ctx, p, e, fields, cleanName(base), limit, totalCap-total)
+ if err != nil {
+ return nil, nil, err
+ }
+ if f == nil {
+ skipped.add(entry, reason)
+ continue
+ }
+ total += f.Size
+ files = append(files, f)
+ }
+ }
+ if len(files) == 0 {
+ return nil, nil, httpx.Fail(http.StatusBadRequest, "no_images", "the zip holds no PNG, JPEG, GIF or WebP image").With("skipped", skipped.list())
+ }
+ return files, skipped.list(), nil
+}
+
+func (s *Service) unzipEntry(ctx context.Context, p *policy.Principal, e *zip.File, fields map[string]string, name string, limit, room int64) (*File, string, error) {
+ rc, err := e.Open()
+ if err != nil {
+ return nil, reasonUnreadable, nil
+ }
+ defer rc.Close()
+ head := make([]byte, 512)
+ n, err := io.ReadFull(rc, head)
+ if err != nil && !errors.Is(err, io.EOF) && !errors.Is(err, io.ErrUnexpectedEOF) {
+ return nil, reasonUnreadable, nil
+ }
+ head = head[:n]
+ if _, ok := imageTypes[sniff(head, "")]; !ok {
+ return nil, reasonNotImage, nil
+ }
+ eff := min(limit, room)
+ f, err := s.store(ctx, p, io.MultiReader(bytes.NewReader(head), rc), map[string]string{
+ "purpose": "attachment",
+ "workspace_id": fields["workspace_id"],
+ "page_id": fields["page_id"],
+ "name": name,
+ }, eff)
+ if err != nil {
+ var ae *httpx.APIError
+ if errors.As(err, &ae) {
+ switch ae.Code {
+ case "too_large":
+ if eff < limit {
+ return nil, totalReason(limit * zipTotalTimes), nil
+ }
+ return nil, fmt.Sprintf("larger than %d MB", limit>>20), nil
+ case "bad_upload":
+ return nil, reasonUnreadable, nil
+ }
+ }
+ return nil, "", err
+ }
+ return f, "", nil
+}
+
+func totalReason(totalCap int64) string {
+ return fmt.Sprintf("past the %d MB stored from one zip", totalCap>>20)
+}
+
+func hasSegment(p, seg string) bool {
+ for _, s := range strings.Split(p, "/") {
+ if s == seg {
+ return true
+ }
+ }
+ return false
+}
diff --git a/internal/httpx/middleware.go b/internal/httpx/middleware.go
index a316138..d5cb300 100644
--- a/internal/httpx/middleware.go
+++ b/internal/httpx/middleware.go
@@ -4,6 +4,7 @@ import (
"context"
"crypto/rand"
"encoding/hex"
+ "fmt"
"log/slog"
"net/http"
"runtime/debug"
@@ -40,7 +41,7 @@ func Recover(log *slog.Logger) Middleware {
panic(v)
}
log.Error("panic", "rid", RequestIDFrom(r.Context()), "path", r.URL.Path, "panic", v, "stack", string(debug.Stack()))
- Error(w, http.StatusInternalServerError, "internal", "internal error")
+ Internal(w, r, fmt.Sprint("panic: ", v))
}
}()
next.ServeHTTP(w, r)
diff --git a/internal/httpx/request.go b/internal/httpx/request.go
index 305422b..b75d7a2 100644
--- a/internal/httpx/request.go
+++ b/internal/httpx/request.go
@@ -65,7 +65,7 @@ func Problem(w http.ResponseWriter, r *http.Request, log *slog.Logger, err error
return
}
log.Error("request failed", "rid", RequestIDFrom(r.Context()), "path", r.URL.Path, "err", err)
- Error(w, http.StatusInternalServerError, "internal", "internal error")
+ Internal(w, r, err.Error())
}
func ClientIP(r *http.Request, trustProxy bool) string {
diff --git a/internal/httpx/respond.go b/internal/httpx/respond.go
index 4eb7017..7eb5261 100644
--- a/internal/httpx/respond.go
+++ b/internal/httpx/respond.go
@@ -8,6 +8,7 @@ import (
"strconv"
"strings"
"sync"
+ "sync/atomic"
)
var gzPool = sync.Pool{New: func() any {
@@ -73,3 +74,15 @@ func JSON(w http.ResponseWriter, status int, v any) {
func Error(w http.ResponseWriter, status int, code, message string) {
JSON(w, status, errorBody{Error: errorDetail{Code: code, Message: message}})
}
+
+var showCauses atomic.Bool
+
+func ShowCauses(on bool) { showCauses.Store(on) }
+
+func Internal(w http.ResponseWriter, r *http.Request, cause string) {
+ data := map[string]any{"request_id": RequestIDFrom(r.Context())}
+ if showCauses.Load() && cause != "" {
+ data["detail"] = cause
+ }
+ JSON(w, http.StatusInternalServerError, errorBody{Error: errorDetail{Code: "internal", Message: "internal error", Data: data}})
+}
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 4d0a637..6e83b18 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -1044,7 +1044,7 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
[[package]]
name = "form-md-desktop"
-version = "0.61.1"
+version = "0.62.0"
dependencies = [
"getrandom 0.3.4",
"objc2",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 26409bb..1b92c2a 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "form-md-desktop"
-version = "0.61.1"
+version = "0.62.0"
description = "form.md desktop app"
authors = ["NodeAgentc, Inc."]
license = "Apache-2.0"
diff --git a/src-tauri/HASHOUT_LOG.md b/src-tauri/HASHOUT_LOG.md
index 46d90d4..645afba 100644
--- a/src-tauri/HASHOUT_LOG.md
+++ b/src-tauri/HASHOUT_LOG.md
@@ -2,8 +2,8 @@
Living log of explainers, rationale and removed code for the desktop app in `src-tauri/` and its build scripts (`build_app`, `build_app.bat`, `tools/build_desktop`; `.github/workflows/desktop.yml` until v0.46.0). Source files stay comment-free per dev-rules `hashout-log`; what they would have said lives here. Paths are relative to the repo root.
-Current build version: v0.61.1
-Last updated: 2026-11-22 · v0.61.1 no shell change (the version only; the first password of the desktop owner is in internal/HASHOUT_LOG.md #p33-first-password); 2026-11-20 · v0.61.0 the window's key comes from the server's own output (#window-key); 2026-11-20 · v0.60.0 no shell change (the version only; the server is still started through tauri-plugin-shell, whose CREATE_NO_WINDOW keeps its console window away, see internal/HASHOUT_LOG.md #p31-no-console); 2026-11-20 · v0.59.0 no shell change (the version only); 2026-11-20 · v0.58.0 the server held in a job object on Windows, a failed start shown in a dialog with the server's last lines, its exit code and the log's path, the wait for the address limited to 90 seconds (#engine-start); 2026-11-19 · v0.57.0 a failed start shows its dialog before the loading window closes, and the server is given the app's process id (#windows-start); 2026-11-19 · v0.56.0 no shell change (the version only); 2026-11-19 · v0.55.0 no shell change (the version only); 2026-11-19 · v0.54.0 no shell change (the version only); 2026-11-13 · v0.53.0 no shell change (the version only); 2026-11-09 · v0.52.2 no shell change (the version only); 2026-11-09 · v0.52.1 no shell change (the version only); 2026-11-09 · v0.52.0 no shell change (the version only); 2026-11-09 · v0.51.0 the native Help menu lists the three demos (cmd:demo.editor, cmd:demo.views, cmd:demo.publish through __formmdRun; see web/HASHOUT_LOG.md #src-ui-demos-ts); 2026-11-03 · v0.47.8 the bundle names the publisher and the licence; 2026-10-22 · v0.46.1: desktop.yml and release.yml removed, formcompiler builds the app; v0.46.0: version only (Home's Templates side panel); v0.45.3: icons/* and the splash icon from the approved icon with the clean edge; v0.45.2: icons/* and the splash icon rebuilt without the light rim; v0.45.1: the owner's app icon in icons/* and on the splash; v0.45.0: version only; v0.44.0: version only (the menubar's route.home, templates.open and transfer.import commands now exist in the client); Phase 18: the desktop app
+Current build version: v0.62.0
+Last updated: 2026-11-29 · v0.62.0 no shell change (the version only; the server now keeps its own warnings and errors in form-md.log in the data folder, see internal/HASHOUT_LOG.md #p34-upload-log); 2026-11-22 · v0.61.1 no shell change (the version only; the first password of the desktop owner is in internal/HASHOUT_LOG.md #p33-first-password); 2026-11-20 · v0.61.0 the window's key comes from the server's own output (#window-key); 2026-11-20 · v0.60.0 no shell change (the version only; the server is still started through tauri-plugin-shell, whose CREATE_NO_WINDOW keeps its console window away, see internal/HASHOUT_LOG.md #p31-no-console); 2026-11-20 · v0.59.0 no shell change (the version only); 2026-11-20 · v0.58.0 the server held in a job object on Windows, a failed start shown in a dialog with the server's last lines, its exit code and the log's path, the wait for the address limited to 90 seconds (#engine-start); 2026-11-19 · v0.57.0 a failed start shows its dialog before the loading window closes, and the server is given the app's process id (#windows-start); 2026-11-19 · v0.56.0 no shell change (the version only); 2026-11-19 · v0.55.0 no shell change (the version only); 2026-11-19 · v0.54.0 no shell change (the version only); 2026-11-13 · v0.53.0 no shell change (the version only); 2026-11-09 · v0.52.2 no shell change (the version only); 2026-11-09 · v0.52.1 no shell change (the version only); 2026-11-09 · v0.52.0 no shell change (the version only); 2026-11-09 · v0.51.0 the native Help menu lists the three demos (cmd:demo.editor, cmd:demo.views, cmd:demo.publish through __formmdRun; see web/HASHOUT_LOG.md #src-ui-demos-ts); 2026-11-03 · v0.47.8 the bundle names the publisher and the licence; 2026-10-22 · v0.46.1: desktop.yml and release.yml removed, formcompiler builds the app; v0.46.0: version only (Home's Templates side panel); v0.45.3: icons/* and the splash icon from the approved icon with the clean edge; v0.45.2: icons/* and the splash icon rebuilt without the light rim; v0.45.1: the owner's app icon in icons/* and on the splash; v0.45.0: version only; v0.44.0: version only (the menubar's route.home, templates.open and transfer.import commands now exist in the client); Phase 18: the desktop app
---
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index c17fb05..6ea4a09 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -2,7 +2,7 @@
"$schema": "https://schema.tauri.app/config/2",
"productName": "form.md",
"mainBinaryName": "form-md-desktop",
- "version": "0.61.1",
+ "version": "0.62.0",
"identifier": "ai.nodemode.formmd",
"build": { "frontendDist": "splash" },
"app": {
diff --git a/web/HASHOUT_LOG.md b/web/HASHOUT_LOG.md
index 7a44b42..1066203 100644
--- a/web/HASHOUT_LOG.md
+++ b/web/HASHOUT_LOG.md
@@ -2,8 +2,8 @@
Living log of all comment content, explainers, rationale, TODOs and removed code for the web client in `web/`. Source files stay comment-free per dev-rules `hashout-log`; everything they would have said lives here, indexed. Read this first, then edit code surgically. Paths are relative to `web/`.
-Current build version: v0.61.1
-Last updated: 2026-11-22 · v0.61.1 Profile says when there is no password and the desktop sign-in page says where to set it (#first-password); 2026-11-20 · v0.61.0 no web change (the version only; the window check reads the key from the server's output, see internal/HASHOUT_LOG.md #p32-leftovers); 2026-11-20 · v0.60.0 no web change (the version only; demos/views and demos/publish rebuilt, see their own logs); 2026-11-20 · v0.59.0 every FormVis token name resolves, no value changed (#family-names); 2026-11-20 · v0.58.0 the shared terminal panel at module 2.2.1, its guide naming Codex, Cursor and Antigravity, and Antigravity in Connected apps (see internal/HASHOUT_LOG.md #p30-sprint-finish); 2026-11-19 · v0.57.0 no window change (the version only; see internal/HASHOUT_LOG.md #p29-windows-start); 2026-11-19 · v0.56.0 the shared terminal panel at module 2.2.0 with Antigravity as the fourth agent tab (#family-dock-2-2); 2026-11-19 · v0.55.0 the terminal panel is the Form family's shared one, at the bottom or the right, in a row or column of its own (#family-dock); 2026-11-19 · v0.54.0 AMOLED Black as a dark theme profile (#amoled) and the dev server's `/sync` proxy (#dev-sync-origin); the terminal panel itself is unchanged; 2026-11-13 · v0.53.0 the Date range control in the database toolbar and the view tab strip kept inside the database with a more-views button (#p24-date-range, #p24-tab-overflow), 30.json in 25 languages; 2026-11-09 · v0.52.2 no window change (the container image's build, see internal/HASHOUT_LOG.md); 2026-11-09 · v0.52.1 a cached page is ready only once its write flag is known, so the mode button and the editor open as Editing (#doc-ready-write); 2026-11-09 · v0.52.0 header alignment in the page style menu and the workspace default, the header spanning a database page's views; the Edited label painted by the top bar in the start bundle, so the mode button no longer moves when the lazy shell-extras chunk arrives late; 2026-11-09 · v0.51.0 the three demos open inside the window from Home, the Help menu and Find a command, in a sandboxed frame (#src-ui-demos-ts), 29.json in 25 languages, the workspace cookie write tolerated where cookies are blocked; 2026-11-03 · v0.47.8 the About tab names NodeAgentc, Inc. and links the licence; 2026-10-22 · v0.46.1: version only (releases through formcompiler); v0.46.0: Home's Templates side panel, dropdowns without scrolling, hidden scrollbars; v0.45.3: the approved icon's white .MD tag kept, approved1024.png; v0.45.2: the icon's edge without the light rim, make_icons.py; v0.45.1: the owner's app icon in favicon.svg; v0.45.0: Phase 19: Home's Data & charts and Example projects, the building state, project counts, chart number formats, KPI and gauge fitting, radial centre values, graph colours, palette order, Mermaid colours, 28.json in 25 languages; v0.44.0: Phase 18 interface: page-first shell and Home at /home, template gallery, search filters, Find a command, find and replace, rebindable keys, Preferences with theme profiles, 27.json in 25 languages; v0.41.0: per-card meters, the library Graph tab, Include the web, dark Mermaid, synced-block chrome, long-press tree drag; v0.26.0: offline row creates; v0.25.0: offline row deletes, saved styles; v0.24.0: list loading on scroll, marks in copied Markdown; v0.23.0: picking single marks, timeline windowing; v0.22.0: offline row outbox, Writing settings; v0.21.0: phone block toolbar, block presence, font rename and remove; v0.20.0: alignment on public pages, align.css; v0.19.0: offline by default, phone width, command metadata; v0.18.0: the board block; v0.17.0: custom fonts, typewriter scrolling; v0.16.0: image annotations, block alignment; v0.15.0: page styles, focus mode, word counts; v0.14.1: the vector canvas engine removed; Phase 14: the terminal and Claude Code dock, the command catalogue, 26 languages
+Current build version: v0.62.0
+Last updated: 2026-11-29 · v0.62.0 several files and zips in Files and media, and a ? on error toasts that opens What went wrong (#files-batch); 2026-11-22 · v0.61.1 Profile says when there is no password and the desktop sign-in page says where to set it (#first-password); 2026-11-20 · v0.61.0 no web change (the version only; the window check reads the key from the server's output, see internal/HASHOUT_LOG.md #p32-leftovers); 2026-11-20 · v0.60.0 no web change (the version only; demos/views and demos/publish rebuilt, see their own logs); 2026-11-20 · v0.59.0 every FormVis token name resolves, no value changed (#family-names); 2026-11-20 · v0.58.0 the shared terminal panel at module 2.2.1, its guide naming Codex, Cursor and Antigravity, and Antigravity in Connected apps (see internal/HASHOUT_LOG.md #p30-sprint-finish); 2026-11-19 · v0.57.0 no window change (the version only; see internal/HASHOUT_LOG.md #p29-windows-start); 2026-11-19 · v0.56.0 the shared terminal panel at module 2.2.0 with Antigravity as the fourth agent tab (#family-dock-2-2); 2026-11-19 · v0.55.0 the terminal panel is the Form family's shared one, at the bottom or the right, in a row or column of its own (#family-dock); 2026-11-19 · v0.54.0 AMOLED Black as a dark theme profile (#amoled) and the dev server's `/sync` proxy (#dev-sync-origin); the terminal panel itself is unchanged; 2026-11-13 · v0.53.0 the Date range control in the database toolbar and the view tab strip kept inside the database with a more-views button (#p24-date-range, #p24-tab-overflow), 30.json in 25 languages; 2026-11-09 · v0.52.2 no window change (the container image's build, see internal/HASHOUT_LOG.md); 2026-11-09 · v0.52.1 a cached page is ready only once its write flag is known, so the mode button and the editor open as Editing (#doc-ready-write); 2026-11-09 · v0.52.0 header alignment in the page style menu and the workspace default, the header spanning a database page's views; the Edited label painted by the top bar in the start bundle, so the mode button no longer moves when the lazy shell-extras chunk arrives late; 2026-11-09 · v0.51.0 the three demos open inside the window from Home, the Help menu and Find a command, in a sandboxed frame (#src-ui-demos-ts), 29.json in 25 languages, the workspace cookie write tolerated where cookies are blocked; 2026-11-03 · v0.47.8 the About tab names NodeAgentc, Inc. and links the licence; 2026-10-22 · v0.46.1: version only (releases through formcompiler); v0.46.0: Home's Templates side panel, dropdowns without scrolling, hidden scrollbars; v0.45.3: the approved icon's white .MD tag kept, approved1024.png; v0.45.2: the icon's edge without the light rim, make_icons.py; v0.45.1: the owner's app icon in favicon.svg; v0.45.0: Phase 19: Home's Data & charts and Example projects, the building state, project counts, chart number formats, KPI and gauge fitting, radial centre values, graph colours, palette order, Mermaid colours, 28.json in 25 languages; v0.44.0: Phase 18 interface: page-first shell and Home at /home, template gallery, search filters, Find a command, find and replace, rebindable keys, Preferences with theme profiles, 27.json in 25 languages; v0.41.0: per-card meters, the library Graph tab, Include the web, dark Mermaid, synced-block chrome, long-press tree drag; v0.26.0: offline row creates; v0.25.0: offline row deletes, saved styles; v0.24.0: list loading on scroll, marks in copied Markdown; v0.23.0: picking single marks, timeline windowing; v0.22.0: offline row outbox, Writing settings; v0.21.0: phone block toolbar, block presence, font rename and remove; v0.20.0: alignment on public pages, align.css; v0.19.0: offline by default, phone width, command metadata; v0.18.0: the board block; v0.17.0: custom fonts, typewriter scrolling; v0.16.0: image annotations, block alignment; v0.15.0: page styles, focus mode, word counts; v0.14.1: the vector canvas engine removed; Phase 14: the terminal and Claude Code dock, the command catalogue, 26 languages
---
@@ -2423,3 +2423,33 @@ No flash, no shift: the boxes are disabled in place, never hidden or added, so n
Two new strings ("No password set yet", "Set a password below first") and the sign-in sentence are English in every language until the catalogues gain them.
Checked: `npm run build` (typecheck and bundle) clean, start-up bundle 267.4 KB of 268 KB. Not looked at in a browser, so not verified under throttling.
+
+## v0.62.0 · several files, zips and error details {#files-batch}
+
+### src/extensions/database/editors.ts, src/ui/pickers.ts, src/engine/client.ts · Files and media takes many files, drops and zips
+- refers-to: src/extensions/database/editors.ts :: `filesEditor` (`addFiles`, `enqueue`, drag and drop on the panel); src/ui/pickers.ts :: `pickFiles`, `uploadPicture`; src/engine/client.ts :: `files.unzip`
+- kind: feat
+- logged: v0.62.0 · 2026-11-29
+
+The Upload button opens the OS dialog with multiple selection (`pickFiles(accept, multiple = true)`, beside the unchanged `pickFile`), and the panel accepts dropped files: `dragover` and `drop` call `preventDefault` only when `dataTransfer.types` has `Files`, so text and link drags are left alone. A name ending in `.zip` (any case) or a type of `application/zip` or `application/x-zip-compressed` goes to `files.unzip` (`POST /api/files/unzip`, same form as `upload`: purpose `attachment`, workspace_id, page_id, then the file) and every image it returns is added; everything else goes to the plain upload.
+
+Files are sent one after another, never in parallel, and chained on a promise so a second pick or drop while a batch runs waits its turn instead of racing it. One toast with the id `upload-