diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a2a8a1..dac6424 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -216,11 +216,28 @@ jobs: if: github.event_name == 'push' runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: CHANGELOG.md + sparse-checkout-cone-mode: false + # Each artifact lands in dist//. - uses: actions/download-artifact@v3 with: path: dist + # The release text is the tag's section of CHANGELOG.md ("## 0.3.0 — …" + # up to the next "## "), empty when there is none. + - name: Release notes + env: + TAG: ${{ github.ref_name }} + run: | + v="${TAG#v}" + awk -v v="$v" ' + /^## / { on = (index($0, "## " v " ") == 1 || $0 == "## " v); next } + on' CHANGELOG.md > notes.md + echo "$(wc -l < notes.md) lines of release notes for $v" + # Gitea's release API; a release made earlier for this tag (by hand or # by a rerun) gets the files added instead of a second release. - name: Release @@ -234,9 +251,12 @@ jobs: case "$TAG" in *-*) prerelease=true ;; esac id=$(curl -fsS -H "$auth" "$API/releases/tags/$TAG" | jq -r .id) || id="" if [ -z "$id" ]; then - id=$(jq -n --arg tag "$TAG" --argjson pre "$prerelease" \ - '{tag_name: $tag, name: $tag, prerelease: $pre}' | + id=$(jq -n --arg tag "$TAG" --argjson pre "$prerelease" --rawfile body notes.md \ + '{tag_name: $tag, name: $tag, body: $body, prerelease: $pre}' | curl -fsS -X POST -H "$auth" -H "Content-Type: application/json" -d @- "$API/releases" | jq -r .id) + elif [ -s notes.md ]; then + jq -n --rawfile body notes.md '{body: $body}' | + curl -fsS -X PATCH -H "$auth" -H "Content-Type: application/json" -d @- "$API/releases/$id" > /dev/null fi for f in dist/*/*; do name=$(basename "$f") diff --git a/.prettierignore b/.prettierignore index f499aeb..f7ba45a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,6 +5,8 @@ Spikes/ Desktop-App/build/ Desktop-App/frontend/bindings/ Packages/api-client/src/schema.d.ts +# Written by Database/export-schema.sh. +Server/internal/pbschema/schema.json *.md *.yaml *.yml diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f0594b4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,118 @@ +# Changelog + +What changed in each Docwell release. The release workflow copies a version's section into its release on Gitea. + +## 0.3.0 — 2026-11-17 + +The AFFiNE parity work ([docs/AFFINE.md](docs/AFFINE.md), phases A–G), the integrations, and the last v2 rows of +[docs/FEATURES.md](docs/FEATURES.md). 0.2.0 was cut on 2026-11-03, so everything below is new. + +### Upgrading from 0.2.0 + +The database container changed. Take a backup first (*Admin panel → Maintenance → Backups*), then: + +1. **Use the 0.3.0 compose files.** If you copied `docker-compose.yml` (or a `prod` variant) into your own setup, take + the new one from `Docker/` or `Docker-AIO/`. The changes: + - `db` is now a stock PocketBase (`tajniak81/pocketbase-docker-root`). There is no `docwell-db` image anymore. + docwell-server applies Docwell's schema to PocketBase on every start, and keeps the existing data. + - PocketBase listens on **8070** instead of 8090. Change `DOCWELL_PB_URL` if you set it yourself. + - The `pb_data` volume is mounted at `/pb/pb_data` instead of `/pb_data`. Same volume, same contents; only the + path inside the container changed. If you use a host folder instead of a named volume, mount it at the new path. + - A new **`media`** service (docwell-media, ffmpeg for long recordings) sits on an internal network, + `docwell_media`, that only the server joins. + - The `DOCWELL_SMTP_*`, `DOCWELL_MAIL_FROM` and S3 settings go to the **server** now, not to `db`. +2. **Enter the SMTP password again** in *Admin panel → Email* if you set mail up there rather than through + `DOCWELL_SMTP_*`. PocketBase never gives the password back, so docwell-server keeps its own copy, and a password + saved before 0.3.0 isn't in it. +3. `docker compose pull && docker compose up -d`. + +Optional new settings: `DOCWELL_ADMIN_EMAIL` / `DOCWELL_ADMIN_PASSWORD` create the first superadmin on an empty +instance, `PB_ENCRYPTION_KEY` encrypts PocketBase's stored settings, `DOCWELL_MEDIA_URL` / `DOCWELL_MEDIA_TOKEN` point +at docwell-media, and `DOCWELL_GOOGLE_*` / `DOCWELL_MICROSOFT_*` turn on Google Calendar and OneNote. They're all in +the [configuration guide](Docs-Site/guide/configuration.md). + +There are also production compose files for local disk, S3, SeaweedFS and split SeaweedFS (`docker-compose.prod*.yml` +with matching `.env.prod*.example`). + +### Editor + +- Tables, to-dos, callouts, H4–H6, text colour and highlight, alignment, line numbers in code, inline PDF pages. +- Columns (`/columns`, 2–4, drag to resize, stacked on phones). +- Suggesting mode: suggested insertions and deletions that others accept or reject. +- The block grip menu, steadier block handles, and *Turn into* on the text toolbar. +- Date shortcuts, synced pages, editor settings per device, and split view. + +### Organising pages + +- Page properties, tags, *All docs*, collections and journals. +- Page icons set from the sidebar. +- Verified pages: mark a page as checked until a date, with a badge under the title and a notice when it runs out. + +### Databases + +- Table, kanban and calendar views stored in the page, with records that open as full pages. +- Relations and rollups, across pages too, and two-way relations. +- Links to records, records in search, and records on public pages. + +### Edgeless mode + +- Any page as a canvas, with its text as a live note. Mind maps, presentations, and canvas editing on phones. + +### AI + +- Bring your own provider: OpenAI-compatible, Anthropic or Ollama. +- Chat with citations from the workspace, writing actions in the editor, and an MCP server at `POST /mcp`. +- Audio transcripts (long recordings cut by docwell-media), PDFs as sources, scanned PDFs read for search, and monthly + limits per workspace and person. +- AI chat and writing on phones. + +### Search + +- Text inside files attached to pages. +- Scanned PDFs, read by AI where the workspace turns it on. + +### Import, export and integrations + +- Import from Confluence, Obsidian, Bear, OneNote, Readwise and CSV. +- Word and PNG export, and workspace snapshots that can be restored. +- Calendars on journal pages (iCal feeds and Google Calendar). +- The web clipper (Chrome and Firefox). +- A Slack app per workspace: channel news, previews of Docwell links, and `/docwell` search. +- GitHub, Linear and Figma link cards with status and details. + +### Sharing + +- Invite links, with approval when you want it. +- Switches for workspace sharing and link previews. +- Page views. +- Cleanup of files no page uses anymore. + +### Languages + +- German, French and Spanish, alongside English and Polish, in the web app, the admin panel and the phone app. +- The server's error messages, emails and push notifications in the same five languages. + +### Phone app + +- The Docwell icon, page layout in the reader, databases and live editing fixes, and the editor changes above. + +### Fixes and maintenance + +- The server's data folder is made writable on start, so a host bind mount or an older volume no longer stops search. +- Tighter error handling and lint fixes in the AI code; SPDX headers on every script. + +### Known gaps + +Not checked yet: iOS, the desktop app on macOS and Linux, the Android editor and canvas on a physical phone, hosted AI +providers (tested against a stand-in), real Google and Microsoft sign-ins, and link previews inside Slack and Discord. +PocketBase's own emails (address verification, password reset) are still English only. + +## 0.2.0 — 2026-11-03 + +Phase 2, "team ready": page-level permissions and guests, comment threads and reactions, notifications and page +watching, templates, backlinks, table of contents, math, Mermaid, Draw.io and Excalidraw, OAuth, OIDC and two-step +codes, audit log, API tokens and webhooks, Notion and DOCX import, PDF export, the desktop app and the Android app. + +## 0.1.0 — 2026-10-31 + +The first release: the MVP wiki (server, live editing, web app, admin panel) and the Docker images. diff --git a/Database/export-schema.sh b/Database/export-schema.sh index 53d7e66..90611a8 100644 --- a/Database/export-schema.sh +++ b/Database/export-schema.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: AGPL-3.0-or-later # Regenerates Server/internal/pbschema/schema.json from pb_migrations. # # docwell-server applies that snapshot to PocketBase on every start, so after diff --git a/Docs-Site/guide/backups-upgrades.md b/Docs-Site/guide/backups-upgrades.md index 184b7ce..0346dab 100644 --- a/Docs-Site/guide/backups-upgrades.md +++ b/Docs-Site/guide/backups-upgrades.md @@ -26,7 +26,9 @@ curl -fsS -X POST https://wiki.example.com/api/v1/admin/backups -H "Authorizatio ## Upgrades 1. Make a backup and download it. -2. Read the release notes for anything to do by hand. +2. Read the release notes (on the release, and in `CHANGELOG.md` in the repository) for anything to do by hand. + From 0.2.0 to 0.3.0 there is: new compose files (PocketBase as a stock image on port 8070, and a new `media` + service), and the SMTP password to enter once more if it was saved in the admin panel. 3. Pull and restart: ```bash @@ -34,7 +36,7 @@ curl -fsS -X POST https://wiki.example.com/api/v1/admin/backups -H "Authorizatio docker compose up -d ``` - Pin a version with `DOCWELL_VERSION=0.1.0` in `.env` instead of following `latest`. + Pin a version with `DOCWELL_VERSION=0.3.0` in `.env` instead of following `latest`. Database changes run on their own: docwell-server updates PocketBase's collections when it starts. Going back to an older version after a migration is not supported; restore the backup instead. diff --git a/Packages/editor-bridge/dist/index.html b/Packages/editor-bridge/dist/index.html index 7a6596a..f3934fd 100644 --- a/Packages/editor-bridge/dist/index.html +++ b/Packages/editor-bridge/dist/index.html @@ -490,7 +490,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`

An error `)});return}case`insertMarkdown`:this.insertMarkdown(e.markdown,e.mode);return;case`transcribed`:{let t=this.pendingTranscripts.get(e.id);if(!t)return;this.pendingTranscripts.delete(e.id),e.result&&this.words?t.resolve(Qp(e.result,this.words,GZ)):t.reject(Error(e.error||this.labels.blocks.transcribeFailed));return}default:throw Error(`unknown message ${e.type}`)}}requestTranscript(e,t){let n=this.nextTranscript++;return new Promise((r,i)=>{this.pendingTranscripts.set(n,{resolve:r,reject:i}),this.send({type:`transcribe`,id:n,src:e,name:t})})}insertMarkdown(e,t){let n=this.picked,r=n&&!n.editor.isDestroyed?n.editor:this.target,i=GZ(e);if(!i.trim())return;let a=r.state.doc.content.size,o=Math.min(n?.from??r.state.selection.from,a),s=Math.min(n?.to??r.state.selection.to,a);if(t===`replace`)r.chain().focus().insertContentAt({from:o,to:s},i).run();else{let e=r.state.doc.resolve(s);r.chain().focus().insertContentAt(e.depth>=1?e.after(1):s,i).run()}this.picked=null}connect(e){this.provider?.destroy();let t=new BZ({url:e.url,page:e.page,token:()=>e.token});t.onChange(()=>this.send({type:`collab`,status:t.status})),this.provider=t,this.editor.destroy(),this.editor=this.create({collab:{provider:t,user:e.user}}),this.mode===`edgeless`&&this.openCanvas()}openCanvas(){this.closeCanvas();let e=document.createElement(`div`);e.className=`dw-bridge-canvas`,document.body.append(e),this.canvasEl=e,this.el.hidden=!0,this.canvas=xZ(e,{provider:this.provider??void 0,content:this.provider?void 0:this.lastContent??this.editor.getJSON(),editable:this.editable&&!!this.provider,pageTitle:()=>this.title,onNavigate:e=>this.send({type:`navigate`,path:e}),onError:e=>this.send({type:`error`,message:e instanceof Error?e.message:String(e)})})}closeCanvas(){this.canvas?.destroy(),this.canvas=null,this.canvasEl?.remove(),this.canvasEl=null,this.el.hidden=!1}create(e){return this.el.replaceChildren(),new Vp({element:this.el,editable:this.editable,extensions:UY({...e,files:this.files,labels:this.labels,onNavigate:e=>this.send({type:`navigate`,path:e})}),editorProps:{attributes:{class:`dw-prose`}},onUpdate:({editor:e})=>this.send({type:`change`,content:e.getJSON()}),onSelectionUpdate:()=>this.reportState(),onTransaction:()=>this.reportState(),onFocus:()=>this.reportState(),onBlur:()=>this.reportState()})}get target(){return this.inner&&!this.inner.isDestroyed?this.inner:this.editor}track(e){let t=(e instanceof Element?e.closest(`.ProseMirror`):null)?.editor;t&&(this.setInner(t===this.editor?null:t),this.reportState())}innerChanged=()=>this.reportState();innerGone=()=>{this.setInner(null),this.reportState()};setInner(e){if(e!==this.inner){if(this.inner){for(let e of[`selectionUpdate`,`transaction`,`focus`,`blur`])this.inner.off(e,this.innerChanged);this.inner.off(`destroy`,this.innerGone)}if(this.inner=e,e){for(let t of[`selectionUpdate`,`transaction`,`focus`,`blur`])e.on(t,this.innerChanged);e.on(`destroy`,this.innerGone)}}}reportOverlay(){let e=document.querySelector(VZ)!==null;e!==this.overlay&&(this.overlay=e,this.send({type:`overlay`,open:e}))}reportState(){let e=this.target;if(e.isDestroyed)return;let t={active:UZ.filter(([,t])=>t(e)).map(([e])=>e),canUndo:e.can().undo(),canRedo:e.can().redo(),focused:e.isFocused},n=JSON.stringify(t);n!==this.lastState&&(this.lastState=n,this.send({type:`state`,state:t}))}};function GZ(e){return _Z.parse(e.trim(),{async:!1,gfm:!0})}function KZ(e){if(e.isDestroyed)return;let t=e.view.props.nodeViews??{},n=Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)]));e.view.setProps({nodeViews:n})}function qZ(e){let t=JSON.stringify(e);window.DocwellNative?window.DocwellNative.postMessage(t):(window.parent.postMessage(t,`*`),console.debug(`[docwell bridge]`,e))}var JZ=new WZ(document.getElementById(`editor`),qZ);window.docwell={receive:e=>JZ.receive(e)}; diff --git a/Server/cmd/pbschema-export/main.go b/Server/cmd/pbschema-export/main.go index 7e63e80..95a3346 100644 --- a/Server/cmd/pbschema-export/main.go +++ b/Server/cmd/pbschema-export/main.go @@ -67,7 +67,7 @@ func run(url, email, password, out string) error { if err := enc.Encode(cols); err != nil { return err } - if err := os.WriteFile(out, buf.Bytes(), 0o644); err != nil { + if err := os.WriteFile(out, buf.Bytes(), 0o644); err != nil { //nolint:gosec // a checked-in source file, readable like the others return err } fmt.Printf("wrote %d collections to %s\n", len(cols), out) diff --git a/Server/entrypoint.sh b/Server/entrypoint.sh index 8d01d83..97bbd41 100644 --- a/Server/entrypoint.sh +++ b/Server/entrypoint.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: AGPL-3.0-or-later # docwell-server entrypoint. Started as root only to make the data directory # writable for the docwell user: a host bind mount, or a volume created by an # older image, arrives owned by root, and the search index could not be diff --git a/Server/internal/ai/ai_test.go b/Server/internal/ai/ai_test.go index 46b3866..c624e08 100644 --- a/Server/internal/ai/ai_test.go +++ b/Server/internal/ai/ai_test.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "encoding/json" + "errors" "fmt" "io" "log/slog" @@ -164,9 +165,7 @@ func TestOpenAIDriver(t *testing.T) { } func asProviderError(err error, out **ProviderError) bool { - pe, ok := err.(*ProviderError) - *out = pe - return ok + return errors.As(err, out) } func TestOllamaDriver(t *testing.T) { @@ -297,7 +296,7 @@ func TestTranscribeDriver(t *testing.T) { t.Fatalf("text = %q, %v", text, err) } o, _ := NewProvider(KindOllama, srv.URL, "", srv.Client()) - if _, err := o.Transcribe(context.Background(), "m", "a.mp3", nil); err != ErrNoTranscription { + if _, err := o.Transcribe(context.Background(), "m", "a.mp3", nil); !errors.Is(err, ErrNoTranscription) { t.Fatalf("ollama = %v", err) } } @@ -324,7 +323,7 @@ func TestScannedPDFIsDetected(t *testing.T) { if err := doc.Output(&buf); err != nil { t.Fatal(err) } - if _, err := extractText("scan.pdf", buf.Bytes()); err != errNoPDFText { + if _, err := extractText("scan.pdf", buf.Bytes()); !errors.Is(err, errNoPDFText) { t.Fatalf("err = %v", err) } } @@ -352,7 +351,7 @@ func TestPDFGoesWithTheQuestion(t *testing.T) { t.Fatalf("parts = %v", parts) } o, _ := NewProvider(KindOllama, srv.URL, "", srv.Client()) - if _, err := o.Chat(context.Background(), ChatRequest{PDF: []byte("x")}, func(string) {}); err != ErrNoDocuments { + if _, err := o.Chat(context.Background(), ChatRequest{PDF: []byte("x")}, func(string) {}); !errors.Is(err, ErrNoDocuments) { t.Fatalf("ollama = %v", err) } } diff --git a/Server/internal/ai/anthropic.go b/Server/internal/ai/anthropic.go index 63f2769..533ede1 100644 --- a/Server/internal/ai/anthropic.go +++ b/Server/internal/ai/anthropic.go @@ -56,7 +56,7 @@ func (p *anthropicProvider) Chat(ctx context.Context, req ChatRequest, onDelta f maxTokens = 16000 } params := anthropic.BetaMessageNewParams{ - Model: anthropic.Model(req.Model), + Model: req.Model, MaxTokens: maxTokens, } if req.System != "" { diff --git a/Server/internal/ai/audio.go b/Server/internal/ai/audio.go index dc328fb..3d7bc6c 100644 --- a/Server/internal/ai/audio.go +++ b/Server/internal/ai/audio.go @@ -74,7 +74,7 @@ func splitWithFFmpeg(ctx context.Context, ffmpeg, name string, data []byte, max if err := os.WriteFile(in, data, 0o600); err != nil { return nil, err } - cmd := exec.CommandContext(ctx, ffmpeg, "-nostdin", "-hide_banner", "-loglevel", "error", + cmd := exec.CommandContext(ctx, ffmpeg, "-nostdin", "-hide_banner", "-loglevel", "error", //nolint:gosec // ffmpeg is the configured binary; the arguments are fixed and the input is our own temp file "-i", in, "-vn", "-ac", "1", "-ar", "16000", "-c:a", "libmp3lame", "-b:a", "32k", "-f", "segment", "-segment_time", fmt.Sprint(segmentSeconds), "-reset_timestamps", "1", filepath.Join(dir, "part%03d.mp3")) @@ -93,7 +93,7 @@ func splitWithFFmpeg(ctx context.Context, ffmpeg, name string, data []byte, max sort.Strings(files) var parts [][]byte for _, f := range files { - b, err := os.ReadFile(f) + b, err := os.ReadFile(f) //nolint:gosec // f comes from a glob inside our own temp dir if err != nil { return nil, err } @@ -242,12 +242,12 @@ func splitWAV(base string, data []byte, max int) ([]audioPiece, error) { chunk := samples[off:min(off+per, len(samples))] var b bytes.Buffer b.WriteString("RIFF") - _ = binary.Write(&b, binary.LittleEndian, uint32(4+8+len(fmtChunk)+8+len(chunk))) + _ = binary.Write(&b, binary.LittleEndian, uint32(4+8+len(fmtChunk)+8+len(chunk))) //nolint:gosec // pieces are a few MB, far below 4 GB b.WriteString("WAVEfmt ") - _ = binary.Write(&b, binary.LittleEndian, uint32(len(fmtChunk))) + _ = binary.Write(&b, binary.LittleEndian, uint32(len(fmtChunk))) //nolint:gosec // pieces are a few MB, far below 4 GB b.Write(fmtChunk) b.WriteString("data") - _ = binary.Write(&b, binary.LittleEndian, uint32(len(chunk))) + _ = binary.Write(&b, binary.LittleEndian, uint32(len(chunk))) //nolint:gosec // pieces are a few MB, far below 4 GB b.Write(chunk) out = append(out, audioPiece{Name: fmt.Sprintf("%s-%03d.wav", base, len(out)+1), Data: b.Bytes()}) } diff --git a/Server/internal/ai/audio_test.go b/Server/internal/ai/audio_test.go index c3a71b8..fa0e977 100644 --- a/Server/internal/ai/audio_test.go +++ b/Server/internal/ai/audio_test.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "encoding/binary" + "errors" "os/exec" "testing" ) @@ -95,7 +96,7 @@ func TestSplitWAV(t *testing.T) { if got != 10000 { t.Fatalf("samples = %d", got) } - if _, err := splitAudio(context.Background(), "x.m4a", make([]byte, 100), 10); err != errNeedsFFmpeg { + if _, err := splitAudio(context.Background(), "x.m4a", make([]byte, 100), 10); !errors.Is(err, errNeedsFFmpeg) { t.Fatalf("m4a without ffmpeg = %v", err) } } diff --git a/Server/internal/ai/chat.go b/Server/internal/ai/chat.go index ac3b974..6363021 100644 --- a/Server/internal/ai/chat.go +++ b/Server/internal/ai/chat.go @@ -6,6 +6,7 @@ import ( "context" "crypto/rand" "encoding/hex" + "errors" "fmt" "slices" "sort" @@ -532,7 +533,7 @@ func userError(err error) string { return e.Message } switch { - case err == ErrRefused: + case errors.Is(err, ErrRefused): return "The model declined to answer this." case strings.Contains(err.Error(), "context deadline exceeded"), strings.Contains(err.Error(), "context canceled"): return "The answer took too long and was stopped." diff --git a/Server/internal/ai/limits.go b/Server/internal/ai/limits.go index 02bbf82..bee3d60 100644 --- a/Server/internal/ai/limits.go +++ b/Server/internal/ai/limits.go @@ -117,7 +117,7 @@ func (s *Service) SaveInstanceSettings(ctx context.Context, c access.Caller, in return InstanceSettings{}, apperr.Forbidden("superadmin role required") } if in.WorkspaceTokenLimit < 0 { - return InstanceSettings{}, apperr.InvalidFields(map[string]string{"workspaceTokenLimit": "Use 0 for no limit, or a positive number."}) + return InstanceSettings{}, apperr.InvalidFields(map[string]string{"workspaceTokenLimit": "Use 0 for no limit, or a positive number."}) //nolint:gosec // a message, not a credential } _, id, err := s.instanceSettings(ctx) if err != nil { diff --git a/Server/internal/ai/profiles.go b/Server/internal/ai/profiles.go index a3b61d6..8d281ab 100644 --- a/Server/internal/ai/profiles.go +++ b/Server/internal/ai/profiles.go @@ -509,7 +509,7 @@ func (s *Service) SaveSettings(ctx context.Context, c access.Caller, wsID string return Settings{}, err } if in.MonthlyTokenLimit < 0 { - return Settings{}, apperr.InvalidFields(map[string]string{"monthlyTokenLimit": "Use 0 for no limit, or a positive number."}) + return Settings{}, apperr.InvalidFields(map[string]string{"monthlyTokenLimit": "Use 0 for no limit, or a positive number."}) //nolint:gosec // a message, not a credential } ignored := []string{} for _, id := range in.Ignored { diff --git a/Server/internal/ai/store.go b/Server/internal/ai/store.go index 2e94935..45ed5eb 100644 --- a/Server/internal/ai/store.go +++ b/Server/internal/ai/store.go @@ -15,6 +15,7 @@ import ( "time" bolt "go.etcd.io/bbolt" + bolterrors "go.etcd.io/bbolt/errors" ) // Store keeps embedding vectors per workspace in a bbolt file (ADR-15). It @@ -125,7 +126,7 @@ func (s *Store) SetMeta(ws string, m Meta) error { func (s *Store) DropWorkspace(ws string) error { return s.db.Update(func(tx *bolt.Tx) error { err := tx.Bucket(bucketWS).DeleteBucket([]byte(ws)) - if errors.Is(err, bolt.ErrBucketNotFound) { + if errors.Is(err, bolterrors.ErrBucketNotFound) { return nil } return err @@ -258,7 +259,7 @@ func dropChunks(b *bolt.Bucket, source string) error { func encodeChunk(c Chunk) []byte { meta, _ := json.Marshal(c) out := make([]byte, 4+4*len(c.Vector), 4+4*len(c.Vector)+len(meta)) - binary.LittleEndian.PutUint32(out, uint32(len(c.Vector))) + binary.LittleEndian.PutUint32(out, uint32(len(c.Vector))) //nolint:gosec // embedding vectors have a few thousand dimensions for i, f := range c.Vector { binary.LittleEndian.PutUint32(out[4+4*i:], math.Float32bits(f)) } diff --git a/Server/internal/mail/templates/digest.de.html b/Server/internal/mail/templates/digest.de.html index f650cc8..07ecdd4 100644 --- a/Server/internal/mail/templates/digest.de.html +++ b/Server/internal/mail/templates/digest.de.html @@ -6,6 +6,7 @@ {{end}}

- Du bekommst diese E-Mail, weil du ungelesene Benachrichtigungen hast. Schalte diese E-Mails aus + Du bekommst diese E-Mail, weil du ungelesene Benachrichtigungen hast. + Schalte diese E-Mails aus in deinen Benachrichtigungseinstellungen.

diff --git a/Server/internal/oauth/oauth.go b/Server/internal/oauth/oauth.go index 635a20d..5ee98b9 100644 --- a/Server/internal/oauth/oauth.go +++ b/Server/internal/oauth/oauth.go @@ -41,7 +41,7 @@ func (p Provider) Enabled() bool { return p.ClientID != "" && p.ClientSecret != // point them at a stand-in (go build -ldflags "-X …"). var ( GoogleAuthURL = "https://accounts.google.com/o/oauth2/v2/auth" - GoogleTokenURL = "https://oauth2.googleapis.com/token" + GoogleTokenURL = "https://oauth2.googleapis.com/token" //nolint:gosec // an endpoint, not a credential MicrosoftLogin = "https://login.microsoftonline.com" ) diff --git a/Web-App/frontend/src/locales/locales.test.ts b/Web-App/frontend/src/locales/locales.test.ts index c54e19c..7d14fa7 100644 --- a/Web-App/frontend/src/locales/locales.test.ts +++ b/Web-App/frontend/src/locales/locales.test.ts @@ -6,9 +6,7 @@ import { browserLocale, supportedLocales } from "../i18n"; type Messages = { [key: string]: string | Messages }; const files = import.meta.glob("./*.json", { eager: true, import: "default" }); -const messages = Object.fromEntries( - Object.entries(files).map(([path, m]) => [path.replace(/^\.\/|\.json$/g, ""), m]), -); +const messages = Object.fromEntries(Object.entries(files).map(([path, m]) => [path.replace(/^\.\/|\.json$/g, ""), m])); /** Every message as "path.to.key" → text. */ function flatten(m: Messages, prefix = ""): Map {