• keppo-bot[bot]'s avatar
    fix: persist GitHub sync state across Publish tab navigation (#3151) · 7ca7b0c1
    keppo-bot[bot] 提交于
    Fixes #3139 
    
    ## Summary
    - Fixes the bug where clicking **Sync to GitHub** on the Publish tab and
    navigating away before the push finishes dropped the in-flight state —
    the push actually continued in the main process, but on return the UI
    showed neither success nor failure.
    - Moves sync state (`isSyncing`, `syncError`, `syncSuccess`,
    `conflicts`, rebase status, etc.) out of local `useState` in
    `ConnectedGitHubConnector` and into a Jotai atom keyed by `appId`
    (`src/atoms/githubSyncAtoms.ts`), so it survives unmount/remount.
    - Adds success/error toasts on completion so users get feedback even
    when they're viewing a different preview tab.
    
    ## Test plan
    - [x] New unit tests in `src/atoms/githubSyncAtoms.test.tsx` verify
    state is preserved across unmount/remount, that a "completion" happening
    while unmounted is visible on remount, that state is isolated per
    `appId`, and that `null` appId is a no-op.
    - [x] `npm run ts` — clean
    - [x] `npm run fmt` / `npm run lint:fix` — clean (only the pre-existing
    unrelated warning in `local_agent_handler.test.ts`)
    - [x] `npm test` — 1003/1003 passing
    - [ ] Manual: click Sync to GitHub, immediately switch to Code tab,
    switch back — spinner should still show (if still running) or the
    success message should be visible (if finished); a toast should appear
    on completion regardless of tab.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/3151"
    target="_blank">
      <picture>
    <source media="(prefers-color-scheme: dark)"
    srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img
    src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
    alt="Open with Devin">
      </picture>
    </a>
    <!-- devin-review-badge-end -->
    
    ---------
    Co-authored-by: 's avatarWill Chen <7344640+wwwillchen@users.noreply.github.com>
    Co-authored-by: 's avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
    7ca7b0c1
名称
最后提交
最后更新
..
chat 正在载入提交数据...
home 正在载入提交数据...
media-library 正在载入提交数据...
preview_panel 正在载入提交数据...
settings 正在载入提交数据...
ui 正在载入提交数据...
AIGeneratorTab.tsx 正在载入提交数据...
AppList.tsx 正在载入提交数据...
AppSearchDialog.tsx 正在载入提交数据...
AppSearchSelect.tsx 正在载入提交数据...
AppUpgrades.tsx 正在载入提交数据...
AutoApproveSwitch.tsx 正在载入提交数据...
AutoExpandPreviewSwitch.tsx 正在载入提交数据...
AutoFixProblemsSwitch.tsx 正在载入提交数据...
AutoUpdateSwitch.tsx 正在载入提交数据...
BlockUnsafeNpmPackagesSwitch.tsx 正在载入提交数据...
BugScreenshotDialog.tsx 正在载入提交数据...
CapacitorControls.tsx 正在载入提交数据...
ChatEventNotificationSwitch.tsx 正在载入提交数据...
ChatInputControls.tsx 正在载入提交数据...
ChatList.tsx 正在载入提交数据...
ChatModeSelector.tsx 正在载入提交数据...
ChatPanel.tsx 正在载入提交数据...
ChatSearchDialog.tsx 正在载入提交数据...
CommunityCodeConsentDialog.tsx 正在载入提交数据...
ConfirmationDialog.tsx 正在载入提交数据...
ContextCompactionSwitch.tsx 正在载入提交数据...
ContextFilesPicker.tsx 正在载入提交数据...
CopyErrorMessage.tsx 正在载入提交数据...
CreateAppDialog.tsx 正在载入提交数据...
CreateCustomModelDialog.tsx 正在载入提交数据...
CreateCustomProviderDialog.tsx 正在载入提交数据...
CreatePromptDialog.tsx 正在载入提交数据...
CustomAppsFolderSelector.tsx 正在载入提交数据...
CustomErrorToast.tsx 正在载入提交数据...
CustomThemeDialog.tsx 正在载入提交数据...
DefaultChatModeSelector.tsx 正在载入提交数据...
DeleteConfirmationDialog.tsx 正在载入提交数据...
DyadAppMediaFolder.tsx 正在载入提交数据...
DyadProSuccessDialog.tsx 正在载入提交数据...
DyadProTrialDialog.tsx 正在载入提交数据...
EditCustomModelDialog.tsx 正在载入提交数据...
EditThemeDialog.tsx 正在载入提交数据...
ErrorBoundary.tsx 正在载入提交数据...
ForceCloseDialog.tsx 正在载入提交数据...
GitHubConnector.tsx 正在载入提交数据...
GitHubIntegration.tsx 正在载入提交数据...
GithubBranchManager.tsx 正在载入提交数据...
GithubCollaboratorManager.tsx 正在载入提交数据...
HelpBotDialog.tsx 正在载入提交数据...
HelpDialog.tsx 正在载入提交数据...
ImageGenerationProgressButton.tsx 正在载入提交数据...
ImageGenerationProgressDialog.tsx 正在载入提交数据...
ImageGenerationToast.tsx 正在载入提交数据...
ImageGeneratorDialog.tsx 正在载入提交数据...
ImportAppButton.tsx 正在载入提交数据...
ImportAppDialog.tsx 正在载入提交数据...
InputRequestToast.tsx 正在载入提交数据...
LanguageSelector.tsx 正在载入提交数据...
LibraryCard.tsx 正在载入提交数据...
LibraryFilterTabs.tsx 正在载入提交数据...
LibraryList.tsx 正在载入提交数据...
LibrarySearchBar.tsx 正在载入提交数据...
LoadingBlock.tsx 正在载入提交数据...
LocalAgentNewChatToast.tsx 正在载入提交数据...
MacNotificationGuideDialog.tsx 正在载入提交数据...
MaxChatTurnsSelector.tsx 正在载入提交数据...
MaxToolCallStepsSelector.tsx 正在载入提交数据...
McpConsentToast.tsx 正在载入提交数据...
McpToolsPicker.tsx 正在载入提交数据...
ModelPicker.tsx 正在载入提交数据...
NeonConnector.tsx 正在载入提交数据...
NeonDisconnectButton.tsx 正在载入提交数据...
NeonIntegration.tsx 正在载入提交数据...
NewLibraryItemMenu.tsx 正在载入提交数据...
NodePathSelector.tsx 正在载入提交数据...
PortalMigrate.tsx 正在载入提交数据...
PriceBadge.tsx 正在载入提交数据...
ProBanner.tsx 正在载入提交数据...
ProModeSelector.tsx 正在载入提交数据...
ProviderSettings.tsx 正在载入提交数据...
ReleaseChannelSelector.tsx 正在载入提交数据...
RightActionSidebar.tsx 正在载入提交数据...
RuntimeModeSelector.tsx 正在载入提交数据...
ScreenshotSuccessDialog.tsx 正在载入提交数据...
SettingsList.tsx 正在载入提交数据...
SetupBanner.tsx 正在载入提交数据...
SetupProviderCard.tsx 正在载入提交数据...
SupabaseConnector.tsx 正在载入提交数据...
SupabaseIntegration.tsx 正在载入提交数据...
TelemetryBanner.tsx 正在载入提交数据...
TelemetrySwitch.tsx 正在载入提交数据...
TemplateCard.tsx 正在载入提交数据...
ThinkingBudgetSelector.tsx 正在载入提交数据...
VercelConnector.tsx 正在载入提交数据...
VercelIntegration.tsx 正在载入提交数据...
ZoomSelector.tsx 正在载入提交数据...
app-sidebar.tsx 正在载入提交数据...
appItem.tsx 正在载入提交数据...