4977 Commits

Author SHA1 Message Date
beemines 68db65243a feat(editor): transcribe existing audio attachments (#6375)
Co-authored-by: Bee mines <Beemines82@gmail.com>
Co-authored-by: boojack <stevenlgtm@gmail.com>
2026-09-26 19:04:58 +08:00
boojack 88f13675d8 chore: tweak user default avatar display 2026-09-26 18:49:05 +08:00
boojack 10919ab498 chore(views): remove built-in Tasks and improve empty states 2026-09-26 18:29:05 +08:00
boojack 153625210b chore: open calendar and map to guests, simplify navigation
Calendar and Map are reading views like Timeline, so signed-out visitors
can now open them and see the memos readable to them. Their Space
variants still require sign-in, and composing stays signed-in only.

Navigation:
- Guests get Timeline, Calendar, Map; Attachments stays signed-in only.
  The About pill is gone; About lives in the scope menu and the common
  sidebar for everyone.
- One NavPill renders every nav control, from a single destination list.
- A memo list without a creator is Explore, so Timeline sends guests
  there directly instead of through the Home redirect.

Scope menu:
- One UserMenu for both cases: preferences, then account pages when
  signed in. Guests sign in from the sidebar footer only.
- Guests no longer see a Browse control whose only option is Explore.
- Theme and Language are submenus instead of dialogs; a choice applies
  at once, saved to the account or kept locally for guests.
- The system theme listener reads the latest preference, so local guest
  choices follow OS changes correctly.
2026-09-26 17:09:15 +08:00
boojack c5e7d65c12 chore: make individual memos easier to open
Timestamp: the card timestamp was a button that navigated in script, so
it
had no URL preview and could not be opened in a new tab. It is now a
real
link that keeps the origin page and underlines on hover. On the memo's
own
page it renders as plain text, since the link would point at itself.

Action menu: ordered by how often each action is used, showing only what
applies:

- Owner: Open, Edit, Pin | Archive, one task action, Copy > (link,
  content),
  then More > (Move, Delete) when the memo can move, otherwise Delete.
- Archived: Restore | Delete.
- Comment: Edit | task action, Copy | Delete.
- Viewer: Open, Copy.

Open is a real link (new DropdownMenuLinkItem kit wrapper), hidden on
the
memo's own page. Check all / Uncheck all collapse into one item chosen
by
whether tasks are still open. Move only appears when there is a Space to
move to or leave, and a comment's copied link lands on the comment
inside
its parent memo.

Detail sidebar: remove the back-to-origin row. It duplicated browser
back
and the navigation above it, pushed a new history entry instead of going
back, sat inside the mobile drawer, and labelled most origins as Home.
Returning to the origin after archive or delete is unchanged.

Refs #6359
2026-09-26 13:05:58 +08:00
boojack 26be2a9663 feat(navigation): unify creator and space browsing scopes (#6378) 2026-09-26 11:36:31 +08:00
tandyleo110 6ff88e36a2 fix(web): adapt react-hot-toast to dark mode (#6377) 2026-09-25 19:58:48 +08:00
johnnyjoygh 05a2c6db7a chore: replace bird sprites with ink empty states
Use one SVG composition with scene-specific marks for memo, search, and
inbox empty states. Remove the sprite pool and unused placeholder
variants so callers supply the scene and localized message directly.
2026-09-23 08:19:08 +08:00
Johnny c2b8399574 fix(memo): make pinned memos easier to identify (#6369) 2026-09-23 07:28:18 +08:00
johnnyjoygh 61ea0711f8 fix(markdown): align disclosure spacing and weight with body text 2026-09-22 23:54:09 +08:00
Johnny 80bab62c72 feat(editor): add contextual tag, checklist, and visibility suggestions (#6367) 2026-09-22 23:17:52 +08:00
Johnny 4340103c3d feat(markdown): style collapsible sections (#6364) 2026-09-22 19:06:26 +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
boojack e3d25e18dc fix(i18n): use neutral Korean label for hidden content 2026-09-21 22:11:07 +08:00
boojack 989aad73ca test: use an unregistered extension in MIME sniffing test (#6353) 2026-09-20 21:19:48 +08:00
Bobby John a1c3061c6c chore: minor code refactor (#6348) 2026-09-20 19:09:41 +08:00
boojack 2b2192d4e1 chore(main): release 0.31.0 (#6331)
Co-authored-by: bluedbird <dev@usememos.com>
v0.31.0
2026-09-20 00:50:44 +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
bluedbird 78b510fb65 chore(release): promote 0.31.0 to stable 2026-09-20 00:15:52 +08:00
bluedbird 2204eceeef fix(i18n): sync translations and remove unused locale keys 2026-09-20 00:09:27 +08:00
bluedbird 7a0586af0d test(store): expand cross-database edge case coverage
Cover transaction rollback, stale state, permissions, cache invalidation, batch deletion, and concurrent writes across all three database drivers.

Reject nil attachment bindings and enforce effective lifecycle policies before memo mutations reach the driver.
2026-09-19 23:59:09 +08:00
bluedbird f4d97fafcd fix: block CGNAT SSRF and restore cross-database CI coverage 2026-09-19 22:54:43 +08:00
bluedbird 7e3d3c6315 fix(web): limit comment menus to relevant actions 2026-09-19 00:33:01 +08:00
Anand Hegde 38584e8d6f feat(cli): accept -V and --version alongside the version subcommand (#6321) 2026-09-19 00:28:14 +08:00
kalelovic fa5e55dfc1 fix(web): toggle numbered task list items correctly (#6346)
Co-authored-by: kalelooz <212041863+kalelooz@users.noreply.github.com>
2026-09-19 00:22:27 +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
Johnny 289ca1ec3d fix(web): render tel: and sms: markdown links (#6341) 2026-09-17 23:01:09 +08:00
johnnyjoygh 6f310ba21b chore: fix broken logo url 2026-09-17 22:06:05 +08:00
qwist1233-cpu f3bec7c735 chore(i18n): complete Turkish translations (#6339)
Co-authored-by: qwist1233-cpu <qwist1233-cpu@users.noreply.github.com>
2026-09-17 19:34:12 +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 471745b431 fix: harden attachment, auth, and import paths for public deployment
Bound work an anonymous or low-privilege caller can force:

- Bound thumbnail decoding by declared pixel count before decoding and
  remember images that cannot be thumbnailed (over the bound or not
  decodable), so a small image declaring billions of pixels is served
  as-is instead of decoded on every request. Transient storage read
  errors are not remembered. The bound lives in internal/imagelimit and
  is shared with EXIF stripping.
- Cap request bodies at 16 MiB for procedures that carry no file bytes;
  only inline attachment creation, transcription, and chunked uploads
  keep their larger caps.
- Digest over-long submitted usernames before using them as sign-in
  limiter keys, add header and idle timeouts to the HTTP server, limit
  filter expression size, and cap the SQLite regexp cache.

Close correctness gaps:

- Delete the thumbnail the file server actually writes (.v2.jpeg), its
  failure marker, and the legacy name when an attachment is removed.
- Decide EXIF stripping from the sniffed content as well as the declared
  type, so a mislabeled JPEG keeps no metadata.
- Revoke every other session when a password changes; an admin reset
  revokes all of the target's sessions. Prune expired refresh tokens.
- Enforce the 2 MiB avatar limit the web client already applies.
- Keep S3 object keys unique when the path template has no {uuid}.
- Reject negative attachment page tokens.
- Charge memo archive imports against the write and upload budgets,
  charge repeated validate-only plans, discard only attachments an
  import actually stored, and refuse archives that declare far more
  bytes than they hold.
- Load database-stored attachment bytes only after authorization.
- Remove the unused, unguarded linkmeta.GetImage fetcher.

Frontend: send no referrer when loading external images in memos and
link previews, and drop picture/source from the sanitizer so every
remote image goes through the https-only src rule.

Dependencies: grpc 1.83.1 and x/crypto 0.56.0 for reported advisories.
2026-09-17 08:47:44 +08:00
ABird 14d3c689dd feat(web): highlight search matches in memo content (#6335) 2026-09-16 23:48:00 +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
johnnyjoygh 305310cdd1 fix(map): clean up failed WebGL layers before leaving map 2026-09-16 08:51:41 +08:00
Johnny 2e3db14741 feat(store): add Cloudflare D1 database driver (#6330) 2026-09-16 01:43:17 +08:00
boojack 80c0c3b46e chore(main): release 0.31.0-rc.2 (#6249)
Co-authored-by: bluedbird <dev@usememos.com>
v0.31.0-rc.2
2026-09-15 09:11:47 +08:00
周耕毅(Ryan Chou) 143f224cdd fix(web): keep blurred memo header interactive (#6269) 2026-09-15 09:05:32 +08:00
ABird 2148bf7a21 fix(editor): expand tag autocomplete beyond heading markers (#6327) 2026-09-14 22:39:42 +08:00
ABird ba44a66911 feat: show attachment storage usage in account settings (#6326) 2026-09-14 21:49:48 +08:00
Anand Hegde a69d286735 fix(web): reveal metadata row controls on hover (#6324) 2026-09-14 19:46:50 +08:00
ocfox 49b7ecc583 fix(web): add dark mode theme-color meta tag for PWA status bar (#6320) 2026-09-14 19:43:32 +08:00
Johnny 2e33e7a561 fix(web): normalize memo header author spacing 2026-09-13 23:03:37 +08:00
ABird 45519accd3 refactor: name packages by role and enforce import direction (#6317) 2026-09-13 18:22:54 +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
bluedbird 73306272f9 chore: tweak heatmap calendar cells
Calendar day cells drop the printed count and carry activity as a
GitHub-style background instead: four primary-tinted levels keyed to the
same all-time ceiling the sidebar heatmap uses, so a day reads alike in
both. Today and the open day share one 22px rounded badge on the
numeral,
primary for today and a quiet foreground wash for the open day, nested
in
a halo when both coincide. The cell type follows the sidebar row
grammar:
13px on 18px lines from the column axis, weight only for the open day,
and a strip of 36px photo marks under the excerpt.

The floating memo panel gets a popover surface and a new float shadow
token in every theme, and its resize trigger becomes a grip pill that
appears only while the pointer is over the edge strip.
2026-09-12 00:51:06 +08:00