Skip to content

fix(scan-266d): recover remote notification reads, scope Antigravity key restarts, retire failed note owners, and sync hidden start-failure facts - #51624

Merged
nwparker merged 1 commit into
mainfrom
fix/release-scan-266d
Nov 28, 2026
Merged

nwparker merged 1 commit into
mainfrom
fix/release-scan-266d

Conversation

@nwparker

@nwparker nwparker commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Addresses four confirmed issues from the 1.4.266 release scan (Slice D):

  • STA-16424 (remote notification switches): useServerSettingValue now surfaces a 'error' state on failed settings.get reads, exposes a retry() callback, and automatically retries when the server's host connection transitions back to connected. ServerNotificationsPane renders an inline retry prompt instead of leaving all switches permanently disabled.
  • STA-16421 (Antigravity Gemini API key restarts): accounts.antigravityChatApiKeySave and accounts.antigravityChatApiKeyClear now only restart running Antigravity chats when the host's configured auth method is gemini-api-key, avoiding interrupting unrelated Google/Enterprise/Agent Platform chats.
  • STA-16418 (review-note failure-owner retention): Extracted ownNoteIdsAfterFailure into diff-comment-failure-owners.ts with forgetDiffCommentFailureOwners wired into worktree and folder-workspace teardown (remove-worktree-store-cleanup.ts and worktree-purge-state.ts), skips inserting gone copies, avoids storing note IDs for folder owners, and prunes dead owners on subsequent failures.
  • STA-16436 (hidden start-failure rows on resend): Added structuredAgentSessionReplacedStartFailureRowIds and passed hidden row IDs into agentSessionVisibleFailureFacts across useStructuredAgentSessionStartFailureFacts, NativeChatStructuredSession, useStructuredAgentSessionDeliveryNotices, and structuredConversationCommandRunner, so hidden start-failure rows no longer suppress sign-in/setup notices on resent messages.

(STA-16410 was already fixed on main by PR #51603 / d37173f17114.)

Performance

  • useServerSettingValue subscribes to the single environmentId entry via useRuntimeHostStatusSelector(environmentId, ...) rather than the full host-status map.
  • ownNoteIdsAfterFailure is now retired on worktree/folder removal and pruned of stale owners, eliminating unbounded retention of removed workspace owners and attempted note IDs.
  • structuredAgentSessionReplacedStartFailureRowIds short-circuits immediately when there are no rejected submissions, adding zero work during normal chat streaming.

Verification

  • pnpm check:changed — 41/41 checks passed (format, oxlint, typecheck, unit tests, localization catalogs/extraction, and all ratchets).
Files Added Deleted Net
Test 0 0 0 0
Prod 15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​229 $\color{#cf222e}{\Huge{\mathbf{−}}}$​61 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​168

…key restarts, retire failed note owners, and sync hidden start-failure facts (STA-16424, STA-16421, STA-16418, STA-16436)
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The changes update when Antigravity API-key operations restart live chats, which agent-session failure rows appear, how server notification settings handle load errors, and how diff-comment persistence tracks failed writes.

Estimated code review effort

Merge Risk: Low · up to 68be2

The changes behave as intended in the main paths. Two small gaps remain: a command reply could briefly show a duplicate failure notice or hide one when a resend changes during the send, and removing a folder workspace leaves a small leftover diff-comment tracking entry. Neither is likely to disrupt normal use, so merging is low risk after these are addressed or accepted.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title lists four unrelated fixes (remote notification reads, Antigravity key restarts, failed note owner retention, hidden start-failure facts) in one line. Each part matches a real change in the …
Description check Passed The description follows the repository template. It has a Summary, a Performance section, and a Verification section, and it describes the four linked issues in detail. It omits several required templ…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title lists four unrelated fixes (remote notification reads, Antigravity key restarts, failed note owner retention, hidden start-failure facts) in one line. Each part matches a real change in the changeset, so the title is not off-topic. It is overly broad and does not name a single primary change, and it is long at 145 characters.

Full details: Description check

Explanation

The description follows the repository template. It has a Summary, a Performance section, and a Verification section, and it describes the four linked issues in detail. It omits several required template sections: ELI5, a clear Linked Issue (it uses 'Fixes #' with no number and no issue link), Visual Proof for the UI change in STA-16424, a Risk level, the Testing checklist, and the Performance line is incomplete. The Notes and Checklist sections are also not addressed. Because the core content is present but several required sections are missing or incomplete, the check is marked as a pass with noted gaps.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b8a09495-6e3b-4551-aba6-521f857ce5c2
Commits

Reviewing files that changed from the base of the PR and between 2eccacb and 68be250.

Files selected for processing: 15

  • src/main/antigravity/antigravity-chat-route.ts
  • src/main/runtime/rpc/methods/accounts/antigravity-accounts.ts
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/messages/notices/use-structured-agent-session-start-failure-facts.ts
  • src/renderer/src/components/native-chat/session/structured/delivery/use-structured-agent-session-delivery-notices.ts
  • src/renderer/src/components/native-chat/session/structured/writes/structured-conversation-command-send.ts
  • src/renderer/src/components/settings/host-scope/use-host-setting.ts
  • src/renderer/src/components/settings/notifications/ServerNotificationsPane.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/store/slices/diff-comments/diff-comment-failure-owners.ts
  • src/renderer/src/store/slices/diff-comments/diff-comment-persistence.ts
  • src/renderer/src/store/slices/worktrees/teardown/remove-worktree-store-cleanup.ts
  • src/renderer/src/store/slices/worktrees/teardown/worktree-purge-state.ts
  • src/shared/agent-session/failures/agent-session-visible-failures.ts
  • src/shared/agent-session/view/structured-agent-session-message-projection.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

const items = args.items()
return agentSessionVisibleFailureFacts(
items,
structuredAgentSessionReplacedStartFailureRowIds(items, args.chat.submissions)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Read reply-time submissions at the same moment as the items.

structuredAgentSessionReplacedStartFailureRowIds receives args.chat.submissions. That value comes from the render that created the run closure, so it does not change during the send await. args.items() reads the live items at reply time. A resend or withdrawal during the await can therefore make the two inputs disagree.

When they disagree, conversationCommandReply can make the wrong choice. If a pending resend was withdrawn, a start failure that is visible again in the rows can be left out of startFailures. A reply that repeats that failure then shows it twice. If a resend was added during the await, the failure can be left in startFailures while its row is hidden. The reply then suppresses the text, and the user sees no failure notice.

The reply-time replacement check should use the submissions read at the same moment as the items, so both observations come from one state.

}

/** Retires failed-write note tracking for removed worktrees and folder workspaces. */
export function forgetDiffCommentFailureOwners(worktreeIds: Iterable<string>): void {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Stability & Availability · Quick win

Retire failure-owner tracking when a folder workspace is removed.

STA-16418 requires failure-owner retirement during folder-workspace teardown. The only calls to forgetDiffCommentFailureOwners pass worktree IDs: worktree teardown in remove-worktree-store-cleanup.ts and the bulk purge in worktree-purge-state.ts. The renderer folder-removal path in folder-workspace-removal.ts clears unread state and filters folderWorkspaces, but it does not call the helper. A failed folder write that is followed by folder removal keeps its failure-owner entry and note IDs in the module map.

After a successful folder removal, call forgetDiffCommentFailureOwners with the removed folder's workspace key. Use the same key that the existing removeWorkspaceUnreadState call uses in that path.

@nwparker
nwparker merged commit 47d79e7 into main Nov 28, 2026
56 checks passed
@nwparker
nwparker deleted the fix/release-scan-266d branch November 28, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant