Skip to content

fix: remote-ahead push dialog, PR cache invalidation, tool registry, …#20

Merged
aletc1 merged 1 commit intodevfrom
claude/objective-shockley-5738cd
Apr 18, 2026
Merged

fix: remote-ahead push dialog, PR cache invalidation, tool registry, …#20
aletc1 merged 1 commit intodevfrom
claude/objective-shockley-5738cd

Conversation

@aletc1
Copy link
Copy Markdown
Owner

@aletc1 aletc1 commented Apr 18, 2026

Summary

Addresses four bugs from the "happy hippo" stability pass that weren't yet applied on dev. Two of the six originally reported fixes (changelog URL, PostHog SDK) were already in the codebase; this PR ships the remaining four.

1. Pull & Push dialog for remote-ahead errors

When git push fails because the remote branch has new commits, the user now sees a dialog offering a one-click Pull & Push (auto-stash + rebase, then retry push) instead of a raw [rejected] non-fast-forward toast.

  • Backend detects the error via a new isNonFastForwardPushError helper and re-throws it with a REMOTE_AHEAD: prefix so the renderer can distinguish it from generic push failures.
  • usePushAction routes REMOTE_AHEAD: errors to a new PullPushDialog and keeps the toast path for every other error.
  • Dialog is rendered in both push consumers: DiffSidebarHeader and ActiveChat.

2. PR status cache invalidation on branch switch

Switching branches via the branch selector in ChangesPanelHeader now invalidates both changes.getGitHubStatus and chats.getPrStatus, so the PR chip reflects the new branch immediately instead of waiting for the 30s polling interval.

3. Missing tool-type registrations

Added 14 tool types to AgentToolRegistry that were falling through to the plain-text fallback: Skill, ScheduleWakeup, EnterPlanMode, CronCreate/CronDelete/CronList, Monitor, PushNotification, TaskOutput/TaskStop, EnterWorktree/ExitWorktree, RemoteTrigger, ToolSearch. Each renders with a proper icon, pending/completed title, and a compact subtitle derived from the tool input. AskUserQuestion is intentionally left out since it still uses its dedicated rich renderer.

4. Archive popover eager fetches

archive-popover.tsx no longer fires trpc.projects.list or useRemoteArchivedChats until the popover opens. useRemoteArchivedChats accepts a new enabled argument (defaults to true to keep existing callers unchanged).

Test plan

  • Create a diverging commit on origin/<branch>, commit locally, press Push → dialog appears; Pull & Push completes in one click, auto-stashes/restores any local changes.
  • Disconnect network and push → plain toast (no dialog regression for unrelated errors).
  • Open a chat with an open PR, switch branches via the branch dropdown → PR chip refreshes immediately.
  • Trigger a Claude session that uses a Skill and/or a ScheduleWakeup → both render with icons and labels instead of plain text.
  • Cold app start → confirm neither projects.list nor the remote archived-chats query fires until the archive popover is opened.
  • Verify bun run build still passes (no new type errors in touched files).

🤖 Generated with Claude Code

…archive popover

- Push rejected with non-fast-forward now surfaces a dialog offering one-click pull (auto-stash + rebase) and push, instead of a raw toast
- Branch checkout now invalidates changes.getGitHubStatus and chats.getPrStatus so the PR chip refreshes immediately
- Register 14 missing tool types in AgentToolRegistry (Skill, ScheduleWakeup, EnterPlanMode, Cron*, Monitor, PushNotification, Task(Output/Stop), Enter/ExitWorktree, RemoteTrigger, ToolSearch) so they render with icons instead of plain text
- Archive popover no longer eagerly fetches projects.list or useRemoteArchivedChats; both gated on popover open

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aletc1 aletc1 merged commit 822cbf4 into dev Apr 18, 2026
@aletc1 aletc1 deleted the claude/objective-shockley-5738cd branch April 18, 2026 12:01
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