Repository navigation
fix(offline): 手動のオフラインモード中は、誰が timer を持っていても巡回しない (#1350) - #1387
Merged
Merged
Conversation
配布版のデスクトップでは notemaid が別プロセスで HEARTBEAT の timer を 持つが、オフラインをどこも見ていなかった。アプリ側の判定は in-process の ときしか効かず、手動のオフラインでも巡回が AI とサーバーに通信していた。 - 巡回の先頭で手動のオフラインを見て見送る (skip:offline)。連続失敗にも 日次にも数えない。待機の理由を AI 設定に出し、知らせは出さない。 アプリを閉じた常駐でも同じに効く - 「今すぐ巡回」はオフライン中は始めず、理由を返す - 判定を notecore::offline::manual の 1 関数に寄せ、複製していた 3 か所 (timer / 更新確認 / 起動時の main チャンネル) を置き換える 読めないときの倒し方は今のまま (オンライン)。置き場が手で編集する設定 ファイルの間は変えない。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
API surface diff外部アプリ向け API 面 ( Full diffdiff --git a/src/bindings.ts b/src/bindings.ts
index 6743b44..6b78196 100644
--- a/src/bindings.ts
+++ b/src/bindings.ts
@@ -4003,7 +4003,7 @@ nextTickAt: number | null }
*/
export type HeartbeatTickUsage = { inputTokens: number; estimatedInputTokens: number }
/**
- * 待機中 (#1321)。`kind` は `no-provider` | `unreachable`。`message` は英語の正本文、
+ * 待機中 (#1321)。`kind` は `no-provider` | `unreachable` | `offline` (#1350)。`message` は英語の正本文、
* `i18n` は `{ message: { key, params } }` (デバイスは `localizeNative` で描き直す)
*/
export type HeartbeatWaiting = { kind: string; since: number; message: string; i18n: JsonValue }
|
Deploying notedeck with
|
| Latest commit: |
4258346
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://10ab7d47.notedeck-d3a.pages.dev |
| Branch Preview URL: | https://fix-offline-heartbeat-gate-1.notedeck-d3a.pages.dev |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
何を直すか
#1350 の 1 と 3 のうち、実害の本体。設計は issue のコメント にある。
配布版のデスクトップでは AI の本体 (notemaid) が別プロセスで HEARTBEAT の timer を持つが、オフラインをどこも見ていなかった。アプリ側の判定は in-process のときしか効かないので、手動のオフラインでも巡回が AI とサーバーに通信していた。
変更
skip:offline)。timer を誰が持つか (アプリ / 子プロセス / 常駐) に関わらず効き、アプリを閉じた常駐も巡回しないOFFLINE_MODE。再ログインの案内にも、再試行できる通信エラーにも当たらない)notecore::offline::manualを新設し、複製していた 3 か所 (HEARTBEAT の timer / 更新確認 / 起動時の main チャンネル) を置き換える設計との差
設計は「読めないときはオフラインとして扱う」だが、この PR では今のまま (読めないときはオンライン)。その規則は、保存先を Rust だけが書く専用のファイルへ移した後の前提。今の置き場は利用者が手で編集して同期する設定ファイルで、編集途中の誤りでオフラインに倒すと、理由の分からないまま通信が止まる。保存先の移動と一緒に切り替える。
確認
apply_offline) は、テストを先に書いてから実装lint:i18n、lint:docsは通過#1350 に残るもの
state/の専用のファイルへ移し、切替を専用の操作にする (読めないときの倒し方もここ)Refs #1350
🤖 Generated with Claude Code