Commit Graph

153 Commits

Author SHA1 Message Date
Johnny 9576bd53ac feat: filter memos by attachments and images (#6492) 2026-10-22 18:58:45 +08:00
Johnny e0dbf5eeb1 feat(usage): store usage limits as an ordered list of entries (#6472) 2026-10-15 08:01:32 +08:00
boojack 1a5886d7c1 feat: add per-user usage limits (#6456) 2026-10-11 21:25:40 +08:00
johnnyjoygh ea4b2f1136 docs: retire ADRs and freeze implemented designs 2026-09-22 09:10:35 +08:00
Johnny fa12d84606 feat: adopt calendar versioning and reset the migration baseline (#6362) 2026-09-22 09:03:49 +08:00
bluedbird eab07d8081 refactor(export): rename Memo Archive to Memos Export Format
Avoid confusion with archived memos while preserving legacy ZIP imports. Move Export & Import to the end of basic settings.
2026-09-20 00:37:50 +08:00
boojack 619eb8d6b8 chore(mcp): expose spaces, forward the client address, re-pin evals
The MCP catalog survived the recent API changes because it is derived
from OpenAPI, but three things drifted around it, and fixing them
surfaced a fourth.

- mcp: the adapter built each in-process API request with httptest,
  whose fixed peer address (192.0.2.1) overrode the caller's resolved
  address on the client-address middleware's second pass. Every
  anonymous MCP caller shared one rate-limit bucket. The adapter now
  presents the address resolved for the /mcp request as the peer.
- mcp: the full SpaceService is curated as space_* tools. Space and
  member updates drop path-bound fields and rely on the gateway's
  update-mask inference; accepting and declining an invitation no
  longer require an empty body for a body: "*" binding whose only
  field comes from the path.
- mcp/evals: answers re-pinned to the current seed (four users,
  22 top-level memos, 35 reactions, four spaces) and extended with
  space questions.
- store/sqlite: transactions begin IMMEDIATE. Token authentication
  records the token's last-used time asynchronously on every request,
  and the space drivers read before they write in a deferred
  transaction; when the background commit landed in between, SQLite
  refused the upgrade with SQLITE_BUSY without consulting the busy
  timeout. Roughly half of space creates over MCP failed. Taking the
  write lock up front keeps the parent-delete serialization the design
  relies on, so the SQLite stale-snapshot test now asserts that a
  concurrent delete waits for the open transaction instead.
2026-09-18 07:21:38 +08:00
boojack 4f46523758 chore: unify user permissions
An active application ADMIN now passes every memo-local authorization
check on named operations: authorship, audience, Space membership and
participation, attachment and reaction ownership. Structural validity
still applies, an archived admin holds no privilege, and collection
listings keep the audience predicate so feeds never surface other users'
private memos.

- core/access: admin bypass in the read policy; CanManageMemo and
  CanManageAttachment as the shared author-level predicates.
- store: drivers read the actor's role alongside its lifecycle state in
  the mutation transaction; validators accept an admin where they
  required the author or a member; shared attachment binding and
  removal predicates.
- api: handlers use the shared predicates; admins may place memos in
  any existing Space and see a memo's Space by name.
- web: one canManageMemo helper replaces the ad hoc creator checks.
- docs: multi-spaces design revised in place; share RPC comments
  updated.
2026-09-17 23:28:19 +08:00
johnnyjoygh f32d367c7f chore: update database drivers
Drop the D1 store driver, its migrations, emulator, design doc, filter
dialect, and test-harness wiring. Memos supports SQLite, MySQL, and
PostgreSQL only.
2026-09-17 09:31:42 +08:00
bluedbird 9ca12926c7 fix(d1): close guard gaps, chunk-free list bindings, and statement
layout

Review follow-up for the D1 driver.

- LATEST.sql kept two index statements in one paragraph; the bridge
  sends a
  paragraph as one prepared statement, which D1 refuses. Separate them,
  and
  join buffered scripts in the sql adapter with a blank line so several
  migration files commit over the bridge.
- List lookups by id, uid, and username bound one parameter per value
  and
  failed above D1's 100-parameter limit for pages larger than 100 rows.
  Bind
  the whole list as one JSON array through json_each instead, which also
  replaces the uid resolution threshold and the chunk-and-resort paths.
- Write-policy validation now returns the memo state it read, and every
  policy-checked write guards on exactly that state: memo update, memo
  mutation, share creation, and attachment creation, update, and
  deletion,
  including the expected memo content and attachment bindings. Memo,
  user,
  and space deletion guard their pre-read row sets on count plus highest
  id
  so a row swapped for a newer one is caught.
- A 429 is no longer retried; the API rate limit that produces it blocks
  the
  caller for minutes.
- The reference Worker defaults a null result set to an empty array, and
  the
  comments claiming a batch never reads its own writes are corrected.

The emulator now judges statement boundaries with sqlite3_complete: a
bridge
entry or a parameterized REST entry holding two statements is refused
with
D1's message, and a parameter-free REST entry runs as a script. New
tests
interpose on the transport to change the database between a method's
reads
and its batch, apply the real schema over both transports, pin the
one-statement rule, and list by 250-entry id lists on every driver.
2026-09-16 23:09:28 +08:00
ABird 019ca26bd3 feat: export and import memos as a Memo Archive (#6334) 2026-09-16 22:23:38 +08:00
Johnny 5ddf4745a2 feat(d1): add bridge access mode (#6333) 2026-09-16 19:31:51 +08:00
Johnny 2e3db14741 feat(store): add Cloudflare D1 database driver (#6330) 2026-09-16 01:43:17 +08:00
boojack c506f67d22 feat(server): rate limit sign-in, signup, fetches, uploads, and writes (#6315) 2026-09-13 11:58:26 +08:00
boojack 751005bc19 feat(user): make email an optional, canonical, instance-unique attribute (#6314) 2026-09-12 12:21:41 +08:00
Johnny 2d75439ecc feat(memos): support moving memos between spaces (#6285) 2026-09-07 20:45:59 +08:00
Johnny dfa0fda766 feat(filter): support space placement in saved views (#6267) 2026-09-04 09:29:09 +08:00
Johnny 230e3a1d11 feat(spaces): deliver invitations to the inbox (#6266) 2026-09-04 08:58:49 +08:00
boojack 5b6d8f87bf refactor(server): remove RSS feed support (#6243) 2026-08-28 23:06:25 +08:00
amblued 9d2b77ced8 feat(space): add client-defined UIDs and identity cues
- Generate UUID v4 values in the client with validated custom UID
  support.\n- Show immutable UIDs where Space titles need
  disambiguation.\n- Standardize Space surfaces on the Lucide Astroid
  icon.
2026-08-28 00:33:09 +08:00
amblued 040f9ae717 fix(web): make archived independent of space scope 2026-08-26 23:43:05 +08:00
ABird 854d893fc6 feat(spaces): add settings management (#6234) 2026-08-26 22:20:40 +08:00
ABird 05f882e43a feat(spaces): add consent-based member invitations (#6232) 2026-08-25 23:21:19 +08:00
amblued 6da8461e1d feat(spaces): add multi-space memo collaboration (#6228) 2026-08-23 19:36:50 +08:00
amblued 76a7629243 feat(instance): persist access mode independently of URL (#6225) 2026-08-22 14:15:31 +08:00
Johnny d617f652b0 fix(markdown): support word-internal apostrophes in tags (#6135) 2026-08-02 21:08:57 +08:00
Johnny 8648b97b9e feat(user): define username format and mention syntax (#6134) 2026-08-02 19:57:16 +08:00
Johnny c68e3d5bf9 feat(markdown): unify tag syntax and recognition (#6132) 2026-08-02 14:46:04 +08:00
johnnyjoygh 7c78320999 chore: cleanup docs 2026-07-19 23:51:11 +08:00
boojack 0038295bbc feat(config): provision settings from secret files
- Load IdPs and supported instance-setting groups as runtime overlays from /etc/secrets.
- Reject API mutations of deployment-managed resources and serialize authentication safety checks across database drivers.
- Preserve upgrade compatibility, demo SSO policy, stable IdP ordering, and driver-specific transaction retries.
2026-07-13 22:34:24 +08:00
boojack ad6d009767 feat(auth): bootstrap identity providers from secret files
- scan /etc/secrets for memos-idp-*.json after migrations and demo seeding
- reconcile protobuf JSON identity providers by stable UID
- validate all discovered providers before applying updates
2026-07-13 00:08:15 +08:00
boojack f0e4a5624f feat(filter): expand CEL filter surface with startsWith/endsWith, matches(), and all()
Let users write three more CEL constructs in the filter field, each compiled to
SQL across SQLite/MySQL/Postgres:

- Scalar startsWith()/endsWith() on content/filename/mime_type (case-insensitive)
- matches() regex: PG ~, MySQL/SQLite REGEXP (Go-backed SQLite fn), validated at
  compile time via cel.ValidateRegexLiterals()
- all() comprehension over tags via per-element subqueries, non-empty required

Also: contains() now escapes LIKE metacharacters (%, _, \); cross-dialect render
tests plus behavioral tests; cel-go bumped to v0.28.1; new operators surfaced in
the frontend shortcut guide.
2026-06-15 23:22:28 +08:00
boojack 797f1ff15d feat(web): markdown WYSIWYG editor with raw-mode toggle (#6030)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:34:51 +08:00
boojack 777d227eb9 feat: add OpenAPI-driven MCP support (#6026) 2026-06-09 09:16:50 +08:00
boojack 53abb8020e refactor(frontend): remove react-use dependency 2026-05-31 18:32:17 +08:00
boojack 8c16ffa1f1 feat: add <Placeholder> component with ASCII bird states (#5949)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 22:48:37 +08:00
boojack a6024eebf1 perf: lazy load heavy first-screen dependencies (#5947) 2026-05-12 20:11:39 +08:00
boojack 5ccba98adc refactor: split STT and Audio-LLM into separate interfaces (#5928) 2026-05-03 00:21:58 +08:00
boojack 238f27dea1 feat(transcription): explicit STT settings with provider, model, prompt (#5926) 2026-05-02 19:35:18 +08:00
boojack ef55013418 feat(memo): create memos on the selected calendar date (#5925) 2026-05-02 11:53:50 +08:00
Steven 8daef1dc89 feat(activity-calendar): aggregate by ViewContext.timeBasis
Fixes the inconsistency where switching the memo list to update_time
left the activity heatmap aggregating by created_time. The heatmap
now follows the same time basis as the list it sits next to.

Backend
- UserStats gains memo_updated_timestamps (additive proto field, tag 8).
- GetUserStats and ListAllUserStats populate it alongside the existing
  memo_created_timestamps. No DB migration; memo.updated_ts already
  exists on every row.

Frontend
- useFilteredMemoStats reads timeBasis from ViewContext and selects
  the matching timestamp source.
- StatisticsView and MonthNavigator forward timeBasis through to
  MonthCalendar / YearCalendar so tooltip text matches the basis
  ("X memos in DATE" vs "X memos updated on DATE").
- Falls back to memoCreatedTimestamps when an old server returns an
  empty memoUpdatedTimestamps array (detected by length divergence,
  since protobuf-es deserializes missing repeated fields as []).

Tests
- Backend: TestGetUserStats_MemoUpdatedTimestamps verifies the field
  is populated and reflects post-creation updates.
- Frontend: filtered-memo-stats covers create/update source switching
  and the old-server fallback path; activity-calendar-tooltip covers
  basis-aware label selection.

Spec and implementation plan committed under docs/superpowers/.
2026-05-02 00:26:53 +08:00
boojack d688914b28 feat(auth): add SSO user identity linkage (#5883) 2026-04-23 08:51:45 +08:00
boojack ebc0e10f07 docs: refine SSO identity linkage design (#5879) 2026-04-22 09:09:15 +08:00
memoclaw 24fc8ab8ca feat(mentions): add memo mention parsing, notifications, and rendering (#5811)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-04-06 22:16:53 +08:00
memoclaw c0d5854f67 feat(editor): add voice note recording to the memo composer (#5801)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-04-01 09:36:33 +08:00
memoclaw acddef1f3d fix(api): switch user resource names to usernames (#5779)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
2026-03-25 09:11:17 +08:00
memoclaw 6b30579903 feat: add outline navigation to memo detail sidebar (#5771)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 00:20:40 +08:00
memoclaw 45b21530d9 feat: add blur_content attribute to tag metadata settings (#5767)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 19:42:27 +08:00
johnnyjoy cda18a37c0 chore: remove docs 2025-01-19 10:50:49 +08:00
johnnyjoy 3c0d011085 chore(dev): update build guides 2025-01-19 10:46:35 +08:00