Commit Graph

4945 Commits

Author SHA1 Message Date
johnnyjoygh bb7114651e chore: upgrade ui lib 2026-11-13 09:13:37 +08:00
johnnyjoygh 9ee06fdc47 chore: bump editor version 2026-11-11 09:10:07 +08:00
Karanvir Khanna 66501e9f75 fix(web): keep the newer state when two changes to a memo overlap (#6526)
Co-authored-by: johnnyjoygh <johnnyjoygg@gmail.com>
2026-11-10 22:41:25 +08:00
Manavagg2003 abdeb8a57c chore(i18n): translate usage limits strings to Spanish (#6541)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 22:16:32 +08:00
Manavagg2003 4ca1d38578 chore(i18n): translate usage limits strings to French (#6542)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 22:14:28 +08:00
Manavagg2003 5b5edc5d5e chore(i18n): translate usage limits strings to German (#6543)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 22:05:25 +08:00
Manavagg2003 84bb7dcec6 chore(i18n): translate usage limits strings to Brazilian Portuguese (#6544)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 22:05:11 +08:00
Manavagg2003 d4d65ab602 chore(i18n): translate usage limits strings to Hindi (#6545)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 22:04:54 +08:00
johnnyjoygh 038c1fef12 feat(web): show attachments, links and place the same way in the composer and the memo
- The composer lays out attachments like the saved memo: pictures and
  videos in one gallery, audio and files as rows, then links and place,
  with no section headers. Editing a memo in place keeps that shape.
- Attachments can be reordered by dragging (long press on touch, the grip
  on rows) or with Alt+arrow keys. The dragged item lifts, the others
  slide aside around a placeholder, and Escape cancels.
- Saved attachments and new files share one order in the draft
  (attachmentOrder), kept through upload retries and applied on save.
  An edited drawing keeps the place of the drawing it replaces.
- Link rows show the linked memo's text and date; back-links show
  read-only while editing.
- Drawings in a collage get the photos' hairline frame.
- Composer polish: Markdown label beside the commit button, quieter
  suggestion pills, a compact recorder row, and kit buttons for upload
  anchors.
2026-11-10 22:02:40 +08:00
johnnyjoygh eb8a04111c feat(web): redesign the auth pages around what each one needs
- Language and theme move from a footer under the card into the card's
  bottom row: a ghost language picker and a System/Light/Dark/Paper
  segmented control, lined up with the content edges.
- Drop the Explore link, the welcome subtitle, the first-run chip and note,
  and the administrator tip.
- /auth/signup sends visitors to sign-in when registration is closed (with a
  one-line notice) or when accounts only come from identity providers.
- Wrong credentials and other sign-in or sign-up failures show inside the
  form instead of a toast; the password field gets a show/hide button.
- The SSO callback uses the same layout for its wait and its error.
- On phones the card frame drops and the language and theme row sits at the
  bottom of the screen.
2026-11-10 08:26:11 +08:00
SwastikTripathi e4f3fb2d2d fix(markdown): keep a space at hard line breaks in snippets and count characters when stopping early (#6534) 2026-11-09 08:37:41 +08:00
Johnny 9a08a7334f feat: add drawings with @usememos/canvas (#6533) 2026-11-09 08:25:09 +08:00
Eminy 88a20fefdb chore(i18n): translate usage limits strings to Turkish (#6523) 2026-11-06 09:33:03 +08:00
Johnny 99a7e33e77 feat(web): adopt @usememos/ui as the design system (#6528) 2026-11-06 08:25:06 +08:00
Daliik 1a496231fe chore(i18n): improve Czech translations (#6522)
Co-authored-by: Daliik <267461465+kojdad-alt@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 09:05:20 +08:00
boojack b40d8a7b57 fix(cmd): warn about legacy-named identity provider files in /etc/secrets
The v0.31 loader read every memos-idp-*.json, warning only when the name was
not lowercase kebab case, so the startup warning now matches identity provider
files by that prefix and suffix. Instance setting files keep the kebab-case
pattern the loader required.
26.11.0
2026-11-01 21:48:49 +08:00
boojack 83920cb3fb chore(cmd): warn at startup about unread /etc/secrets configuration
files

26.10.0 stopped reading the v0.31 deployment configuration files
(memos-idp-*.json, memos-instance-setting-*.json) without a migration,
so an
instance that kept them through the upgrade gave no sign of it beyond
the
settings that had silently reverted. Startup now logs one warning naming
any
such files still present under /etc/secrets, without reading them, and
points
at the configuration directory.
2026-11-01 21:35:34 +08:00
boojack c2f1699e03 chore(web): bump @usememos/editor to 26.11.0
Keeps the caret after a word composed as a block's whole text on
Safari and iOS, where the committed word was selected and the next
keystroke replaced it (#6517).
2026-11-01 16:08:57 +08:00
goingforstudying-ctrl 0cdaeaa1fc fix(store): keep the cache entry count exact and preserve fresh writes under concurrent expiry (#6513)
Co-authored-by: boojack <stevenlgtm@gmail.com>
2026-11-01 12:53:24 +08:00
boojack 3feb08737b fix(server): log file-serving failures and answer missing local files as JSON
WriteError now logs the cause of a server error, which the public JSON
body never carries, unless the client has already gone away. The header
reset and envelope move into a shared writer the panic recoverer uses
too, so one failure logs once. The doc comment states the header contract.

A local attachment whose file is gone from disk answers a JSON 404 like
every other storage failure instead of net/http's plain-text page.

The export handler no longer strips the archive headers itself and logs
only the committed case the wrapper cannot see. The fake S3 and local
storage test setups are shared helpers, and the 416 test pins that
Content-Range survives the header reset.
2026-11-01 12:30:49 +08:00
Santhi Prakash 422afea881 fix(server): answer file-serving errors as JSON, not the media type (#6516) 2026-11-01 12:16:55 +08:00
bluedbird b9a48a70eb docs: close out the 26.10.0 release in the API changelog and design docs 2026-10-31 23:35:42 +08:00
bluedbird 651657e721 docs(api): record the removed /etc/secrets loader under Unreleased 26.10.0 2026-10-31 23:13:57 +08:00
bluedbird ba8087446b chore(web): bump pele to 1.13.0 and @pierre/highlights to 0.3.0 2026-10-31 22:52:44 +08:00
bluedbird 93a25a2e10 fix(web): square the attachment preview and restore arrow-key navigation
The full-screen preview inherited the dialog primitive's rounded corners,
which overflow-hidden clipped so the page showed through at the top.

Arrow keys stopped switching items because Base UI's dialog popup halts
propagation of composite keys and the dialog traps focus, so the
document-level listener never received them. Listen on the popup itself
and exercise that path in the test instead of firing on document.
2026-10-31 22:26:12 +08:00
bluedbird 31a34f34b5 fix(mcp): omit the path-bound parent from the reaction tool body
The reaction upsert binding renamed its memo field from name to parent,
but the body override still stripped name, so the tool exposed a
redundant parent string beside the path argument. Omit parent instead,
and fail at startup when an override omits a property the request body
no longer has, so a binding rename cannot leave a path-bound field
exposed again.

The evals README authenticated with the demo access token the seed no
longer ships. Declare steven in a configuration directory, which the
demo seed attaches its content to, then sign in and mint a personal
access token for the harness.
2026-10-31 22:19:10 +08:00
ABird 3f8f297485 feat(export): serve memo exports as a streamed, admin-only file download (#6514) 2026-10-31 21:12:41 +08:00
bluedbird 3893e3daee chore: welcome guide and quiet empty states for new accounts
A new account's own Home opens a four-page welcome guide once: an intro
with a memo card specimen, then Write, Keep and Share, each headed by a
still life of a real component over icon-and-line rows. It opens while
the
account has no memos and is younger than a week, and a dismissal is kept
in
local storage per account, so nothing is stored on the server. The About
page reopens it.

The timeline's empty states no longer reuse the no-results illustration:
first use shows "No memos yet" with a link to the guide, and a filter
that
finds nothing shows "No matching memos" with a Clear filters action.

The dialog kit gains a borderless "guide" chrome variant; strings ship
in
all locales.
2026-10-31 14:54:52 +08:00
boojack f22b30f5c0 refactor(demo): seed content after the configuration apply
Startup is now migrate, apply the configuration, then seed in demo mode,
the order in which comparable systems bootstrap identity before content.
Seed leaves store.Migrate and becomes a method the server calls after
applyConfigurationAtStartup.

The seed holds content only. The public demo access token and the
MEMO_RELATED row are gone; the reaction list belongs to the configuration.
Users are inserted without fixed ids and only when missing, their profile
fields are filled only where empty, and every memo, membership, reaction,
and attachment references its creator by username. A declared
administrator therefore keeps its row, credentials, and display name, and
the seeded content attaches to it. A bare --demo start without a
configuration seeds the same four users as before.

The seed test covers both starts and asserts the seed writes no instance
or user settings. Two stale lines of copy are fixed.
2026-10-31 13:33:36 +08:00
boojack e52a507924 feat(config): declare linked identities for bootstrap administrators
A configuration file may now declare which identity-provider subject signs
in as a declared user, as a fourth resource kind:

  "linkedIdentities": [
    { "name": "users/admin/linkedIdentities/sso", "externalUid": "subject" }
  ]

An administrator on an SSO-only instance otherwise has no way in before the
first sign-in, which provisions a new account because the sign-in path
matches a provider and subject and nothing else. Matching an email or
username claim was rejected: neither proves ownership on this instance. A
declared subject trusts no claim, and the sign-in path is unchanged.

Rules: the user must be declared in the same configuration, a subject is
declared once, the provider must exist after apply, and a subject already
linked to a different user fails the plan rather than being taken over. A
link made by signing in with the declared subject is adopted; a different
stored subject is replaced. Links are written after users in the apply
transaction. A declared user with a declared link may be created without a
password; it gets an unusable random one, as SSO provisioning does.

The API refuses to create or delete a managed link, and to delete a
provider a declared link names. The account page hides Unlink for a
declared link. LinkedIdentity.external_uid is no longer output only.
2026-10-31 13:33:36 +08:00
boojack b620ae2b5e fix(web): upgrade @usememos/editor to 26.10.30
Keeps the view in place after Enter on an empty line in source mode.
2026-10-31 08:37:49 +08:00
boojack c48897b5c1 feat: save Markdown mode to the account as an EDITOR user setting (#6512) 2026-10-30 07:16:38 +08:00
Brandon Richardson f92bc93262 feat(ui): open attachments in another tab (#6496)
Co-authored-by: bluedbird <dev@usememos.com>
2026-10-29 20:35:40 +08:00
ABird 08acc22f3f feat(web): upgrade @usememos/editor to 26.10.29 (#6508) 2026-10-29 08:32:18 +08:00
Vo Nguyen Thai Hoc 334c758bac fix(web): encode filenames in attachment URLs (#6506) 2026-10-28 21:36:05 +08:00
ABird e216c28863 feat: declarative configuration with plan, apply, and API ownership (#6507) 2026-10-28 21:35:39 +08:00
boojack dcf08b5911 chore(ci): share Go and web setup through composite actions
Add .github/actions/setup-go (Go version from go.mod) and
.github/actions/setup-web (pnpm from web/package.json, Node 24,
frozen install), and use them in every workflow that installed the
toolchains by hand. Drop the per-workflow version env vars and the
redundant pnpm store cache steps that duplicated setup-node's cache.
2026-10-27 20:22:30 +08:00
boojack 5ada3e2a54 docs(api): record the double-click setting removal under Unreleased
The entry for the removed MemoRelatedSetting.enable_double_click_edit
field was added inside the fenced format example at the top of the file,
and the usage limits entry still described the field as present. Move the
entry into the real Unreleased section and state the remaining field.
26.10.0-rc.2
2026-10-26 22:12:18 +08:00
manuaudio e0b336ce0b fix(api): return JSON media type for authorization errors (#6504)
Co-authored-by: manuaudio <manu@freshydeli.com>
2026-10-26 21:13:08 +08:00
Su bb09eb4f28 fix(server): keep well-known 404s out of the frontend cache policy (#6497)
Co-authored-by: suzhiguo7 <suzhiguo7@users.noreply.github.com>
2026-10-26 21:05:32 +08:00
boojack c2bab22460 chore(editor): add a Markdown mode corner label 2026-10-26 20:55:48 +08:00
johnnyjoygh 6387991fdd chore(web): update focus mode
- Bump @usememos/editor to 26.10.27: Markdown mode now highlights syntax
  inside table cells, so a URL anchor in a table-cell link, such as
  [Kappa](/memos/abc#ikebukuro), reads as part of the URL instead of a
  tag.
  Refs usememos/memos#6480 (item 13).
- Focus mode: a narrower sheet (max-w-3xl) with larger text through
  MEMO_FOCUS_EDITOR_THEME; its header shows only the memo's time ("Now"
  before it has one) and the exit button; toggling it runs a view
  transition that grows the frame out of its place on the page and back,
  instant under reduced motion or without view transitions.
- Markdown mode's + menu item uses Lucide's CodeXml instead of the
  pilcrow.
2026-10-26 08:40:24 +08:00
Johnny 0bfa31e89e feat(web): editor 26.10.26 with Markdown mode, checklist chip and plain tags in source mode (#6498) 2026-10-24 19:48:46 +08:00
johnnyjoygh 3eeac84ea2 fix(server): keep hidden paths out of the SPA fallback
The frontend handler served index.html for any extensionless path, so
OAuth Protected Resource Metadata probes under /.well-known/ received
HTML with status 200. MCP clients that run RFC 9728 discovery before
trusting the endpoint failed to parse it, while a 404 would have told
them the server does not advertise OAuth.

Paths with a hidden segment are never app routes: usernames, memo UIDs,
and fixed routes all begin with an alphanumeric character. Return 404
for them, following RFC 8615 for /.well-known/ and the dotfile
convention of common static servers for paths like /.git/.

Fixes #6495
2026-10-24 10:19:03 +08:00
Johnny 28719a925f fix(web): keep blurred memo content out of the detail sidebar (#6494) 2026-10-23 07:43:31 +08:00
tongjin 901bf9f4cc feat(markdown): allow Bilibili player iframes (#6490)
Co-authored-by: johnnyjoygh <johnnyjoygg@gmail.com>
2026-10-23 07:32:36 +08:00
Johnny 9576bd53ac feat: filter memos by attachments and images (#6492) 2026-10-22 18:58:45 +08:00
johnnyjoygh 008dded234 fix(filter): drop the bind arguments of folded operands
The renderer discarded the SQL of an operand that folded to a constant,
such as the left side of `x || true`, but kept the arguments it had already
added. Callers append their own predicates after the filter fragment and
bind positionally, so each leftover argument bound to a later placeholder.

Fold boolean constants out of the condition tree before rendering, so a
subtree either renders with its arguments or not at all, and reject any
rendered fragment whose placeholders and arguments disagree.
2026-10-22 09:17:23 +08:00
Johnny 5cdb9ee399 fix(api): hide the instance admin from anonymous profile requests (#6491) 2026-10-22 08:26:33 +08:00
johnnyjoygh 334925a5f1 chore(web): bump @usememos/editor to 26.10.25
Tables are styled like claude.ai's: the table fills the editor's width
with a round frame, a tinted header row, lines between rows and no
vertical lines, and cells wrap at words instead of mid-word. HTML tables
rendered through the html view look the same.

Footnote definitions render their text as Markdown. In read-only memos
the referenced definitions are collected in a section at the end of the
note, above the attachments, in order of first reference, each with a
backlink per reference; unreferenced definitions are left out and
labels show as written. While editing, definitions stay where they are
written.

Both fix items reported in #6480. Wire the editor's two new labels,
`footnotes` and `backToReference`, to new `editor` keys in every locale.
2026-10-21 23:30:18 +08:00