Commit Graph
614 Commits
Author SHA1 Message Date
tianma-if a2a0f37377 Merge remote-tracking branch 'origin/main' 2026-10-16 22:41:16 +08:00
tianma-if 20a3851958 feat(share): add cached fonts and font picker previews 2026-10-16 22:40:12 +08:00
Dariusz Koryto 50e4a1a7f2 fix(i18n): localize the suspicious overwrite save rejection (#593)
The API rejects a save that changes the title while most of the note
content disappears with an English message, and clients showed it
verbatim in every locale.

- shared: add editor.saveState.errorReason.suspiciousOverwrite in all
  four catalogs and getMemoSaveErrorReasonKey(), matching the error code
  or the server message; the API reuses the exported code and message.
- desktop sync details: translate the item by lastErrorCode.
- Android: map the stored message to its zh-CN source text so the
  localized components translate it.
- web editor: show the reason in the save status tooltip and label
  instead of the bare "Could not save".
2026-10-16 22:09:26 +08:00
Dariusz Korytoandtianma-if ee5e9621d5 fix(mobile): keep automatic sync alive when settling a pass fails (#597)
The automatic sync runner reset runningRef inside a finally block, after
awaiting refreshSyncQueueItems(). If reading the queue threw there,
runningRef stayed true and every later call returned early as if a pass
were still running, so automatic sync stopped until the app restarted.
A failing getMobileSyncRetryDelay() also surfaced as an unhandled
rejection from the void-ed run.

Move the settle step into settleMobileSyncPass(), where refreshing the
visible queue and reading the retry delay each handle their own errors
and the runner is always marked idle. Ordering is unchanged: refresh,
mark idle, run a pass requested meanwhile, otherwise schedule the retry.
This also removes the return inside finally reported by
no-unsafe-finally.

Co-authored-by: tianma-if <yingwaizhiying@gmail.com>
2026-10-16 22:07:23 +08:00
tianma-if 29ff4d14e0 Merge remote-tracking branch 'origin/main' 2026-10-16 21:58:11 +08:00
tianma-if 776fc3b566 feat(share): refine image themes and persist settings across clients 2026-10-16 21:57:49 +08:00
Dariusz Koryto bec688b91a ci: add oxlint correctness check and resolve its findings (#592)
* refactor: resolve oxlint correctness findings without behavior changes

- Snapshot iterations that mutate their collection with Array.from()
  instead of a spread (live childNodes, self-removing disposers, a Set
  extended inside its own loop).
- Drop empty spread fallbacks, redundant regex escapes, Boolean() casts
  inside negations, a rethrow-only try/catch and statement ternaries.
- Use startsWith/endsWith for anchored literal checks in the extension.
- List U+FE0F explicitly in the mobile attachment emoji class; the
  matched set is unchanged.
- Fix the WeChat copy fixture, where \oint in a template literal lost its
  backslash and the block formula never exercised \oint.
- Document the intentional control-character regexes (filename
  sanitizing and input validation), the throwing provider stream test,
  Astro's generated type reference and the mobile auto-sync finally
  block with narrow inline exceptions.

* ci: run oxlint correctness rules on pull requests

Pin oxlint 1.88.0 and enable only its correctness category across apps/
and packages/, excluding build output, vendored code and the iOS app.
Findings are errors and the script passes --deny-warnings, so CI fails
on any finding. no-unused-vars stays off until unused code is removed
in a dedicated pass.
2026-10-16 21:57:36 +08:00
tianma-if 1d6cc281e2 chore: release v1.120.0 [skip ci] 2026-10-16 01:51:16 +08:00
tianma-if 80038dd2d1 feat(editor): refine note image share themes with typography affinity and curated layout 2026-10-16 00:10:18 +08:00
Dariusz Koryto 3e54226110 chore(ts): enable noFallthroughCasesInSwitch and noImplicitOverride (#577)
Turn on both compiler checks in the root TypeScript configuration, which
apps/web, apps/api, apps/extension, packages/shared and packages/plugin-api
extend, and in the separate Expo configuration of apps/mobile.

No switch statement falls through today. The 19 members that override a
base class member (React error boundaries, the local database recovery
error and the vendored poster badge) now declare `override`; this only
changes type checking and is erased from the emitted JavaScript.
2026-10-15 21:54:59 +08:00
tianma-if 544a6e8e8c chore: release v1.119.0 [skip ci] 2026-10-15 12:46:48 +08:00
Dariusz Koryto 9bb3218c03 feat(templates): show unedited default templates in the current UI language (#563)
* feat(templates): show unedited default templates in the current UI language

Default templates are stored in the language of the workspace's first
sign-in, so switching the UI language left them in that language. While a
default template still equals one of its seeded translations, the web
template center and the Android template picker now show it in the current
UI language, and using it creates the note in that language. Templates the
user created or edited are shown and used exactly as stored.

POST /api/v1/templates/:id/use accepts an optional `locale`; without it the
stored template is used as before, so MCP, agents and older clients are
unaffected.

* fix(templates): edit the stored template and stop localizing retagged defaults

- The template center now keeps each card's stored template next to its
  display translation. Editing starts from the stored fields, so saving a
  name-only change in another UI language no longer writes the translated
  title, description and Markdown.
- A default template whose tags differ from its seeded tags is treated as
  edited and is no longer localized.
- Add regression tests for the name-only edit and changed tags.
2026-10-15 09:10:38 +08:00
Dariusz Koryto b3f4dfda2b feat(workspace): localize default notebooks and welcome note at first sign-in (#562)
* feat(workspace): localize default notebooks and welcome note at first sign-in

A new installation always created its five default notebooks, welcome
note and note templates in Chinese, whatever the interface language.
Members added by the owner got notebooks and templates in the owner's
language instead of their own.

The seed data is now localized once, at the first sign-in of the
workspace's user, using the UI locale the client sends with the login
request (Web and Android send it; other clients fall back to
Accept-Language, and unsupported languages to English).

Migration 0070 marks the default workspace as waiting for this only on
an installation nobody has used yet: no users, no notes beyond the
welcome note, no edits to it, no extra notebooks, revisions or
resources. Existing installations keep their data unchanged. Member
workspaces created by the owner are marked when created.

The sign-in localizes notebook names, templates, the welcome note and
its search document in one transaction that also clears the mark, and
replaces only values that still equal a seeded translation. A failed
attempt leaves the mark for the next sign-in to retry, and a second
sign-in changes nothing. The demo clears the mark so its bilingual seed
stays as it is.

Refs #483

* fix(workspace): guard seed inserts and title-only welcome edits during localization

- Default template and AI prompt inserts in the first-sign-in batch now
  require the pending marker, so a delayed concurrent sign-in cannot
  recreate seeds removed after the faster sign-in finished.
- The welcome note is treated as untouched only while it keeps the seeded
  title, the system actor, the seed content hash, and revision 0, so a
  title-only edit is no longer overwritten.
- Add regression tests for both cases.

Refs #483
2026-10-14 20:45:42 +08:00
tianma-if 2ba1e8e70e chore: release v1.118.0 [skip ci] 2026-10-14 11:03:01 +08:00
tianma-if 8127802f32 chore: release v1.117.0 [skip ci] 2026-10-14 10:56:01 +08:00
tianma-if c6a5eeef5d chore: release v1.116.0 [skip ci] 2026-10-14 10:51:28 +08:00
tianma-if 30a4ab08ca chore: release v1.115.0 [skip ci] 2026-10-13 18:04:02 +08:00
tianma-if ccc8a57129 chore: release v1.114.0 [skip ci] 2026-10-13 17:55:08 +08:00
tianma-if c7c4a5e329 chore: release v1.113.0 [skip ci] 2026-10-13 14:15:15 +08:00
tianma-if 16e8f1a8f3 chore: release v1.112.0 [skip ci] 2026-10-12 23:54:04 +08:00
tianma-if 566d65fde0 chore: release v1.111.1 [skip ci] 2026-10-12 14:06:05 +08:00
tianma-if 59d6548abd fix: harden remaining dependency paths and desktop npm
Remove the unused React Native Markdown renderer. Pin safe YAML, shell quoting, tar, and cache dependencies; upgrade npm within the 11 series and apply upstream fixes to its hidden bundled Undici and cache copies.

Add actual-consumer security regressions and an opt-in real npm/ACP upgrade verifier. Typechecks, Web build, Android APK/signature checks, and 2,997 tests passed (23 skipped). Real old-to-new npm installs, ACP initialize, rollback, restart, and fallback retention passed under the desktop Electron runtime.

Android USB-device validation and full desktop automatic-update release gates remain pending. Dependency audit is reduced from 85 to 74 unique advisories; this is not a complete security clearance.
2026-10-12 12:48:47 +08:00
tianma-if 0e958b4944 chore: upgrade core dependencies and migrate site to Astro 7
Align editor, AI SDK, query, and Expo SDK 57 dependencies; pin floating versions and rebase the Mermaid and Android sharing patches. Refresh the standalone iOS editor bundle and migrate site content collections while preserving routes.

Validation: typechecks for Web/API, Android, and iOS editor; Web, site, iOS editor, Worker, Docker server, extension, and Android APK builds; 2,994 tests passed, 23 skipped. Built-in browser verified rich-text paste/undo and bilingual site navigation.

USB-device upgrade/data/share verification and desktop cross-version release gates remain pending. Remaining dependency audit advisories are not all resolved.
2026-10-12 12:22:42 +08:00
tianma-if 1b0bbf6ed6 chore: release v1.111.0 [skip ci] 2026-10-11 23:42:12 +08:00
tianma-if 12874df3de chore: release v1.110.0 [skip ci] 2026-10-11 18:31:06 +08:00
tianma-if 615a99b230 chore: release v1.109.0 [skip ci] 2026-10-11 15:34:52 +08:00
tianma-if eba142d634 feat: refine image share themes and follow-theme typography 2026-10-11 15:13:22 +08:00
tianma-if 948a56884f feat(share): refresh note image card themes with editorial, terminal and film styles 2026-10-11 12:26:41 +08:00
tianma-if f2f12628d1 feat(share): polish note image cards with polaroid theme, monogram avatar and streamlined preview 2026-10-11 12:12:05 +08:00
tianma-if c380268da8 feat(android): support zooming fullscreen note images (#520) 2026-10-11 12:03:08 +08:00
tianma-if 57e47a9d12 chore: release v1.108.0 [skip ci] 2026-10-11 00:54:26 +08:00
tianma-if 0da78f6ce8 feat: add native poster notes and unified AI editing 2026-10-11 00:38:44 +08:00
tianma-if 2d604b8fac chore: release v1.107.0 [skip ci] 2026-10-10 19:47:46 +08:00
tianma-if 58bb4b4fee chore: release v1.106.0 [skip ci] 2026-10-10 12:24:56 +08:00
tianma-if 97e3a87f28 chore: release v1.105.0 [skip ci] 2026-10-10 00:05:25 +08:00
tianma-if 31e11c1bc9 chore: release v1.104.0 [skip ci] 2026-10-09 22:12:34 +08:00
tianma-if 8883bc25d1 chore: release v1.103.0 [skip ci] 2026-10-09 10:32:27 +08:00
tianma-if 89193d3986 feat(mobile): compact note metadata and unify title typography 2026-10-09 10:07:18 +08:00
tianma-if 120074b3c3 fix(mobile): settle reader scroll before toggling title 2026-10-09 09:21:40 +08:00
tianma-if dc8f51460f chore: release v1.102.0 [skip ci] 2026-10-08 22:51:47 +08:00
tianma-if 0588a552c8 fix(ios): align note reading and image export with Android 2026-10-08 22:43:17 +08:00
tianma-if 6ec180cad6 fix(mobile): use neutral note list tag colors 2026-10-08 22:32:52 +08:00
tianma-if d63f17a1dc fix(app): reduce Mermaid diagram footprint in notes 2026-10-08 22:31:15 +08:00
tianma-if 58904d6f7b Default shared note image cards to wide width 2026-10-08 22:08:59 +08:00
tianma-if 5397a1ff56 Default note image sharing to Aurora across platforms 2026-10-08 22:05:34 +08:00
tianma-if c2869bf0dc Keep Android image preview action visible in share sheet 2026-10-08 21:25:07 +08:00
tianma-if eb6fa12189 Adapt mobile note list to tablet widths 2026-10-08 19:34:27 +08:00
tianma-if 997352caf5 Show transient saved image path in Android preview 2026-10-08 19:33:17 +08:00
tianma-if 2ea6934fa7 Fix Android note image saving and simplify preview actions 2026-10-08 19:14:26 +08:00
tianma-if 63daf4660a Speed up Android note image preview export 2026-10-08 17:36:09 +08:00