Cloud integrations rework (NATS/CloudKit/Telegram)#138
Cloud integrations rework (NATS/CloudKit/Telegram)#138RaistlinMuc wants to merge 5 commits intoDimillian:mainfrom
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f588b4332a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export async function updateAppSettings(settings: AppSettings): Promise<AppSettings> { | ||
| return invoke<AppSettings>("update_app_settings", { settings }); | ||
| const updated = await invoke<AppSettings>("update_app_settings", { settings }); | ||
| cachedAppSettings = updated; | ||
| cachedRunnerId = null; | ||
| cachedRunnerIdAt = 0; |
There was a problem hiding this comment.
Resubscribe runner events after cloud setting changes
After settings updates, cachedRunnerId is cleared but subscribedRunnerId is not. Because getRunnerId() only calls cloud_subscribe_runner_events when the discovered runner id differs, changing NATS URL/auth while keeping the same runner id will leave the event listener attached to the old connection. In that scenario, live events/streaming updates stop or keep hitting the wrong server until a restart. Consider resetting subscribedRunnerId (or forcing a resubscribe) when settings change.
Useful? React with 👍 / 👎.
| if (item.kind === "message" && item.role === "assistant") { | ||
| const key = messageDedupKey(item); | ||
| const count = key ? remoteTailMessageCounts.get(key) ?? 0 : 0; | ||
| if (count > 0) { | ||
| remoteTailMessageCounts.set(key as string, count - 1); |
There was a problem hiding this comment.
Do not drop legitimate assistant repeats in merge
The new tail de‑duplication drops any local assistant message whose text matches a recent remote assistant message, regardless of id. If the assistant legitimately sends the same reply text in consecutive turns (e.g., "OK" or repeated acknowledgments) and the newer message is only in localItems, it will be filtered out here and the UI loses a real message until a fresh snapshot arrives (or permanently if it never does). This makes thread history inaccurate.
Useful? React with 👍 / 👎.
|
@Dimillian |
|
I think it's fine to keep as a fork right now. |
|
🫡 |
Summary
This PR is a cleaned-up, rebased rework of our cloud integrations with the goal of staying as close to upstream as possible.
.creds).thread/resumesnapshots.Theme = System.Behavior / Defaults
local.Implementation Notes
Testing
npm run lintnpm run testnpm run typechecknpm run tauri devon macOS, iPad build/install/launch viatauri ios build.Supersedes
Closes previous WIP PRs (now closed): #31 and #45.