Skip to content

fix: PATCH memo update_mask query param + v0.28 alignment#12

Merged
stacklix merged 9 commits into
masterfrom
fix/memo-update-mask-grpc-gateway
May 16, 2026
Merged

fix: PATCH memo update_mask query param + v0.28 alignment#12
stacklix merged 9 commits into
masterfrom
fix/memo-update-mask-grpc-gateway

Conversation

@stacklix
Copy link
Copy Markdown
Owner

Summary

  • Fix PATCH /api/v1/memos/{id} for grpc-gateway clients: parse update_mask / updateMask from the query string (comma-separated), not only from the JSON body. Matches golang proto (body: "memo" leaves FieldMask on the query). Also applies attachments when included in the mask.
  • Worker version: bump MEMOS_VERSION in wrangler.jsonc to 0.28.0 (was stale 0.26.2).
  • Docs: simplify Cloudflare Worker deploy steps (full vs two-step promote).
  • Includes prior commits aligning frontend/API with golang v0.28.0 (MemoEditor, sign-in, instance settings, diff docs, etc.).

Test plan

  • npm run test:integration (includes new case: ?update_mask=content,visibility)
  • Deploy Worker and verify third-party client PATCH memo succeeds on production
  • GET /api/v1/instance/profile reports version: 0.28.0 after deploy

Made with Cursor

stacklix and others added 7 commits May 9, 2026 00:04
…date diff docs

Drop deprecated server/routes/mcp.ts and routes/v1/ai.ts endpoints.
Update DIFF-VS-GOLANG documentation to reflect current state.
…udio recording, add share image

- Refactor voice recording to audio recording (VoiceRecorderPanel → AudioRecorderPanel)
- Reorganize MemoEditor services (cache, error, memo, upload, validation, transcription)
- Add MemoShareImageDialog and related components for memo sharing
- Add MemoMentionMessage for inbox mentions
- Update tsconfig.build.json for test configuration
… input, i18n

Backend:
- Add user avatar data-uri handler at /users/:username/avatar
- Add AI action routes (POST /ai:transcribe)
- Add user action routes (linkedIdentities, PAT, settings)
- Add attachment action routes (batchDelete)
- Align memo GET with relations/reactions, update create with attachments/relations
- Fix attachment filter (filenameContains, mimeTypeIn) with in-memory fallback
- Add commit field to instance profile

Frontend:
- Add SsoSignInForm component with OAuth2 flow
- Add share image dialog and preview (MemoShareImageDialog, MemoShareImagePreview)
- Add voice recorder hook (useVoiceRecorder)
- Refactor MemoEditor with services/state layers
- Update ActivityCalendar, Navigation, PagedMemoList components
- Add Settings/AISection, LinkedIdentitySection, InfoChip
- Update all 20+ locale files with new i18n keys

Tests:
- Add attachments.test.ts, errors-unimplemented.test.ts
- Expand memos.test.ts, instance.test.ts, attachments-file-route.test.ts

Version bump: 0.26.2 → 0.28.0

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Flatten credentials object: use direct ssoCredentials/passwordCredentials instead of nested case/value
- Delete SsoSignInForm (now uses inline form on SignIn page)
- Delete MemoAttachment and MemoResource (consolidated into golang's approach)
- Add identity provider list fetch to InstanceSection settings
- Update transcriptionService to use plain REST shape
- Adjust dark theme primary/ring colors (oklch 0.65→0.42, 0.65→0.34)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Remove redundant `setting` wrapper from instance PATCH body. The golang
API expects top-level fields (generalSetting, memoRelatedSetting, etc.)
directly in the request body, not nested under a `setting` key.

Affected files:
- server/routes/v1/instance.ts: flatten request body parsing
- web/src/connect.ts: remove { setting: body } wrapping on PATCH
- tests/integration/instance.test.ts: update request body shape
- tests/integration/users-extras.test.ts: update request body shape

Also update DIFF-VS-GOLANG docs to reflect current state.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
grpc-gateway sends FieldMask as ?update_mask=... when the HTTP body is
memo-only; third-party clients were getting 400. Also apply attachments
when masked, sync Worker MEMOS_VERSION to 0.28.0, and simplify deploy docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

stacklix added 2 commits May 16, 2026 13:38
- Accept gRPC-Gateway flat JSON body + query updateMask for PATCH /users/:id
- Support both snake_case and camelCase field aliases in update paths
- Use mdast for markdown title extraction (first H1 block only)
- Add integration tests for user patch update mask variants
Align test with golang behavior where unknown user update paths
return INVALID_ARGUMENT (webhook paths are still ignored for compat).
@stacklix stacklix merged commit 9fdc81e into master May 16, 2026
2 checks passed
@stacklix stacklix deleted the fix/memo-update-mask-grpc-gateway branch May 16, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant