Commit Graph

132 Commits

Author SHA1 Message Date
DIYgod dd2c933936 chore(ci): format integration URL scheme test 2026-07-28 13:52:45 +08:00
Sebastion bd91b015ee
fix(desktop/ipc): allowlist URL scheme protocols in openURLScheme (#5056)
The 'integration.openURLScheme' IPC method invokes 'shell.openExternal'
with a renderer-supplied string after only checking that it contains
'://'. Electron's documentation explicitly warns that passing untrusted
URLs to 'shell.openExternal' is unsafe: schemes such as 'file://',
'smb://', 'ms-msdt:', 'search-ms:', 'jar:', 'res:', 'javascript:',
'data:' and 'vbscript:' have well-known abuse chains (local file
disclosure, NTLM credential theft over SMB on Windows, MSDT/Follina-style
RCE, etc.). Because the renderer process can also reach this IPC via any
XSS sink in untrusted RSS feed content, the previous validation was not
sufficient.

Replace the substring check with strict URL parsing plus an allowlist of
protocols that match the integration use-cases documented in the UI
(Obsidian, Bear, Drafts, Things, Notion, DEVONthink) plus generic
http/https/mailto. All other protocols are rejected with a clear error.

Adds vitest cases for representative dangerous schemes (verifying that
'shell.openExternal' is never invoked) and for every scheme shipped as a
built-in example, so future regressions on either side are caught.
2026-07-28 13:40:13 +08:00
DIYgod 1158281f59
chore(deps): update frontend dependencies (#5038)
* chore(deps): update frontend dependencies

* fix(ci): format OTA verification commands
2026-07-10 22:36:12 +08:00
DIYgod 431ab0e0be fix(desktop): preserve native image context menu 2026-05-14 18:55:17 +08:00
DIYgod 9bfcfc805b fix(desktop): sanitize Obsidian file path separators 2026-05-14 14:45:50 +08:00
DIYgod a48123476d fix(desktop): improve Obsidian integration metadata 2026-05-14 13:58:30 +08:00
DIYgod 4be035d37e fix(desktop): keep tray instance when refreshing menu 2026-05-12 16:43:44 +08:00
DIYgod 98fcb71734 fix(desktop): persist auth cookies with max age 2026-05-12 16:12:34 +08:00
DIYgod 88ad11a2ae fix(desktop): dedupe auth session cookies 2026-04-26 09:57:42 +08:00
DIYgod acfb054bdc fix(desktop): ignore stale cached renderer bundles 2026-04-15 10:10:00 +08:00
DIYgod 51efb5d5a5 fix(release): repair ota and desktop update flows 2026-04-12 16:04:15 +08:00
DIYgod 33c8bb98b6 feat(ota): unify desktop updates with ota service 2026-04-12 15:39:13 +08:00
DIYgod 096422e034 feat(desktop): migrate tts to folo service 2026-04-10 14:38:20 +08:00
DIYgod aea74f80a7 chore(sync): merge main into dev
# Conflicts:
#	apps/desktop/layer/renderer/src/modules/settings/tabs/integration/index.tsx
2026-04-03 13:28:15 +08:00
wait 20cc43cf16 fix: resolve Obsidian EPERM on macOS by using native folder picker (#4242) (#4924)
- Replace text input with native dialog.showOpenDialog for vault path selection
- Add path validity detection with three-state UI (unselected/valid/invalid)
- Fix YAML frontmatter parsing failure with Chinese/special characters
- Fix ENOENT error when vault subdirectory doesn't exist
- Add AI summary (description) to Obsidian frontmatter export
- Add author fallback to feed title when entry author is empty
- Increase filename truncation limit from 20 to 80 characters for CJK titles

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 12:41:59 +08:00
DIYgod b7ccf7b872 fix(desktop): repair auth and cli sync 2026-04-03 12:38:01 +08:00
DIYgod 4cb761a501 fix(desktop): persist two-factor challenge cookies 2026-04-03 11:24:49 +08:00
DIYgod 43b5052b06 fix(desktop): persist session token after 2fa 2026-04-02 22:19:36 +08:00
DIYgod 8b3a1b8965 fix(desktop): use one-time token for cli sync 2026-04-02 21:02:46 +08:00
wait bd879d5f9e
fix: resolve Obsidian EPERM on macOS by using native folder picker (#4242) (#4924)
- Replace text input with native dialog.showOpenDialog for vault path selection
- Add path validity detection with three-state UI (unselected/valid/invalid)
- Fix YAML frontmatter parsing failure with Chinese/special characters
- Fix ENOENT error when vault subdirectory doesn't exist
- Add AI summary (description) to Obsidian frontmatter export
- Add author fallback to feed title when entry author is empty
- Increase filename truncation limit from 20 to 80 characters for CJK titles

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 20:57:21 +08:00
DIYgod c799152a1e fix(desktop): repair cli settings sync 2026-04-02 19:43:05 +08:00
DIYgod a9eaae8c88
fix(desktop): export pdf via electron ipc (#4943) 2026-04-02 12:37:03 +08:00
DIYgod 99081f8e7f fix(desktop): support two-factor auth in electron 2026-03-24 13:03:18 +08:00
DIYgod 2c1c978b0e fix(desktop): add auth origin headers for electron 2026-03-24 11:49:39 +08:00
DIYgod 338164b68c fix(web): remove openpanel and fix ssr manifest 2026-03-17 18:17:39 +08:00
DIYgod fa7ce0f011 fix(cli): use npx latest and restore login flow 2026-03-17 12:18:24 +08:00
DIYgod 9a8280ded4 feat(cli): switch desktop sync to folocli 2026-03-17 11:18:48 +08:00
DIYgod 3f31f505f8 fix: restore frontend ci for better-auth upgrade 2026-03-16 21:35:14 +08:00
DIYgod 397049014f fix: upgrade better-auth client compatibility 2026-03-16 21:14:41 +08:00
John Li b55e2f0eb7
fix(electron): persist theme settings (#4900) 2026-03-16 17:18:52 +08:00
DIYgod aea75fe57b fix(desktop): improve self-test coverage and ui polish 2026-03-13 10:20:01 +08:00
DIYgod 94f90873d5 fix(desktop): restore renderer api requests 2026-03-12 20:35:26 +08:00
DIYgod b1ed3828d4
feat: add store review prompts for desktop and mobile (#4909) 2026-03-11 22:54:04 +08:00
DIYgod c9eac7812c
fix: harden desktop e2e auth and user flows (#4904)
* fix: harden desktop e2e auth and user flows

* fix: stabilize desktop e2e in ci

* fix: stabilize ci desktop e2e flows

* fix: make ci desktop e2e more robust

* fix: avoid media interception in desktop e2e

* fix: increase desktop e2e timeouts for ci

* fix: use keyboard navigation for web e2e entries

* fix: stabilize desktop e2e navigation in ci

* fix: simplify desktop e2e navigation paths

* fix: narrow desktop e2e action selectors

* fix: add desktop e2e read-action fallbacks

* fix: reduce desktop e2e flakiness in ci

* fix: harden desktop e2e route transitions

* fix: relax desktop e2e ci assertions

* fix: prefer keyboard read toggle in desktop e2e

* fix: tolerate settings modal close races in e2e

* fix: tighten desktop e2e flows and remove gha e2e
2026-03-10 21:37:48 +08:00
DIYgod 93e4a3b48f
feat: add cross-platform e2e coverage (#4901)
* feat: add cross-platform e2e coverage

* fix: stabilize desktop e2e navigation

* fix: harden desktop e2e read flow

* fix: harden desktop e2e auth and follow flows

* fix: stabilize desktop e2e discover entry flows

* fix: run android e2e in a single shell

* fix: speed up mobile e2e builds in ci

* fix: build android e2e app from mobile workspace

* fix: invoke android gradle build from repo root

* fix: use absolute path for android ci build

* fix: restore android eas build in ci

* fix: target iOS simulator by udid in ci

* fix: align desktop e2e with discover card flow

* fix: reorder web e2e after relogin

* fix: navigate web e2e via real hash url

* fix: close stale settings modal before reopening

* fix: track android maestro flows

* fix: wait for settings router in web e2e

* fix: wait for web settings sync propagation

* fix: stabilize desktop e2e settings flows

* fix: harden desktop e2e regressions

* fix: stabilize desktop e2e selectors

* fix: read desktop entry state from locators

* fix: relax desktop e2e entry assertions

* fix: avoid waiting on missing desktop feed ids
2026-03-10 11:32:00 +08:00
DIYgod df748a5f6a
feat(cli): deep integration with desktop client (#4896)
* feat(cli): deep integration with desktop client

- Package CLI binary with desktop app via extraResource in Electron Forge
- Sync desktop login session to ~/.folo/config.json automatically on login/logout
- Add CliService IPC with install/uninstall methods supporting macOS (osascript), Linux (pkexec), Windows (.cmd wrapper)
- Add CLI settings tab in desktop app for install status and management
- Create prepare-cli build script to compile and bundle CLI before packaging
- Add i18n strings for CLI UI (English and Chinese)

The CLI now shares the desktop app's authentication session without requiring separate login.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* fix(cli): fix CI failures in auth service and forge config

- Pass `undefined` explicitly to syncSessionToCliConfig() to satisfy TS arity check
- Make resources/cli conditional in extraResource so packaging doesn't fail when CLI bundle is absent

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cli): make syncSessionToCliConfig token param optional

Avoids TS2554 when called without arguments on signOut, while also
satisfying the lint rule that strips explicit `undefined` arguments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cli): address PR review feedback

- Fix $@ shell expansion in privileged install path by writing to a
  temp file first, then using admin cp (Comment #1)
- Check .cmd extension on Windows for install status and uninstall
  guard so the CLI is correctly detected and removed (Comment #2)
- Wire prepare:cli into build:electron-vite instead of build:electron
  so all CI packaging paths (vite + forge) include CLI (Comment #3)
- Add CLI i18n strings for ja, fr-FR, zh-TW locales (Comment #4)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-08 10:02:11 +08:00
DIYgod b465ec1463
fix: harden external protocol handling and unblock dev:electron (#4863)
* fix(desktop): harden external protocol handling

* fix(build): avoid optional peer resolution in dev
2026-02-20 21:36:23 +08:00
DIYgod b548f5a39c Merge remote-tracking branch 'origin/mobile-main' into release/mobile/0.3.0
# Conflicts:
#	apps/desktop/layer/main/src/updater/custom-github-provider.ts
#	apps/desktop/layer/renderer/src/modules/achievement/AchievementModalContent.tsx
#	apps/desktop/layer/renderer/src/modules/entry-column/EntrySubscriptionItem.tsx
#	apps/desktop/layer/renderer/src/modules/entry-column/components/EntryPlaneToolbar.tsx
#	apps/desktop/layer/renderer/src/modules/entry-column/components/EntrySubscriptionSkeleton.tsx
#	apps/desktop/layer/renderer/src/modules/entry-content/EntryContent.legacy.tsx
#	apps/desktop/layer/renderer/src/modules/new-user-guide/guide-modal-content.tsx
#	apps/desktop/layer/renderer/src/modules/settings/tabs/invitations.tsx
#	apps/desktop/layer/renderer/src/modules/settings/tabs/referral.tsx
#	apps/desktop/layer/renderer/src/modules/wallet/level.tsx
#	apps/mobile/src/modules/login/referral.tsx
#	apps/mobile/src/modules/settings/routes/Invitations.tsx
#	apps/mobile/src/modules/settings/routes/Referral.tsx
#	apps/mobile/src/screens/(modal)/InvitationScreen.tsx
2026-02-18 23:53:40 +08:00
DIYgod 0da9f2098e
feat: migrate desktop/mobile error tracking to posthog (#4858)
* feat: migrate desktop and mobile error tracking to PostHog

* fix(mobile): remove unsupported tab bar minimize API

* Revert "fix(mobile): remove unsupported tab bar minimize API"

This reverts commit e234dda51257dc6810f0f78e06ee918adf2214b0.
2026-02-18 23:16:00 +08:00
DIYgod 0859f56ad4
chore: update workspace dependencies and lockfile (#4838)
* chore: update workspace dependencies

- bump dependencies across desktop, mobile, ssr, and internal packages

- refresh pnpm lockfile

- apply type compatibility fixes required by upgraded packages

* fix(ssr): prevent tsdown CI warning from failing build

- set inlineOnly to false in tsdown config

* style: format files for CI prettier check

- apply prettier formatting to files reported by format:check

* fix(mobile): downgrade reanimated for rn 0.79 ios build
2026-02-13 16:04:13 +08:00
DIYgod 2290ec7f3c
fix: preserve session when switching API domain (#4833)
* feat(auth): migrate session across API domain switch

* fix(auth): address PR review on migration flow

* fix(ci): avoid package.json mutation during renderer build
2026-02-12 20:58:03 +08:00
DIYgod 8970d4d1d9
fix: mainHash 2026-01-02 19:23:03 +08:00
DIYgod 211bd6e67e
Revert "feat: apple iap in electron (#4757)"
This reverts commit edf417fe81.
2026-01-01 14:52:34 +08:00
DIYgod 7d7723f04f
chore: update license 2025-12-28 18:27:30 +08:00
DIYgod c9b0e65182
Revert "fix(headers): set app origin for OPTIONS requests"
This reverts commit dbff42baca.
2025-12-24 16:22:31 +08:00
DIYgod dbff42baca
fix(headers): set app origin for OPTIONS requests 2025-12-24 12:18:38 +08:00
Stephen Zhou edf417fe81
feat: apple iap in electron (#4757)
* feat: apple iap in electron

* update
2025-12-24 10:26:49 +08:00
DIYgod 7735d03579
feat: revert layer main changes 2025-11-19 09:10:02 +08:00
Stephen Zhou 0b806fcf07
fix: increase timeout for now 2025-11-17 11:18:24 +08:00
Innei 1565d616dc
Sync main branch to dev branch (#4692)
* fix: update logic

Signed-off-by: Innei <tukon479@gmail.com>

* fix(locales): update error messages for subscription limits in multiple languages

Signed-off-by: Innei <tukon479@gmail.com>

* fix(ai): reduce ai indicator interection position, closed 4677

Signed-off-by: Innei <tukon479@gmail.com>

* fix(style): rounded style based on article item container

Signed-off-by: Innei <tukon479@gmail.com>

* fix: scope pictureViewImageOnly to picture feeds (#4680)

* release(desktop): hotfix to release v1.1.2

* refactor(updater): streamline update decision handling by introducing handleDirectAppDecision method

- Consolidated update decision logic into a new method for better readability and maintainability.
- Updated fallback logic to utilize the new method when distribution update info is unavailable.

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: Innei <tukon479@gmail.com>
Co-authored-by: Chrys <53332481+ChrAlpha@users.noreply.github.com>
2025-11-11 16:11:25 +08:00