upstream 取り込み PR #10: delete dialog checkbox (#3681) + hook 補完#413
upstream 取り込み PR #10: delete dialog checkbox (#3681) + hook 補完#413
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 28 minutes and 25 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03afeecd41
ℹ️ 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".
| // and hiding the row were swallowing the nav otherwise. | ||
| // State (deleteBranch) preserved in case we re-open on a | ||
| // decision-required error. | ||
| navigateAway(workspaceId); |
There was a problem hiding this comment.
Delay route jump until delete is committed
Calling navigateAway(workspaceId) before destroy(...) means users are redirected even when deletion fails in preflight/teardown (for example, dirty worktree conflict). In those cases the workspace still exists, but the current view has already been switched away, so canceling or retrying now happens from the wrong context and the user loses their place unexpectedly. The navigation should happen only after the delete has actually passed the commit point or succeeded.
Useful? React with 👍 / 👎.
…e dialog (superset-sh#3681) * fix(desktop): persist "also delete local branch" checkbox in v2 delete dialog Wire the v2 delete-workspace dialog into the existing `settings.getDeleteLocalBranch` / `setDeleteLocalBranch` tRPC pair (already used by v1 and the Settings → Git page) so the user's last choice is remembered across deletes instead of always defaulting to unchecked. * fix(desktop): persist v2 delete-branch choice via v2UserPreferences; always force - Move the v2 delete dialog's "Also delete local branch" opt-in off the v1 tRPC settings singleton and onto `v2UserPreferences` — the same collection used for rightSidebar/link-tier prefs. The choice is now persisted the instant the checkbox toggles (optimistic update via @tanstack/db) and shared across every workspace's delete dialog, not per-instance. - Drop the per-hook `deleteBranchOverride` state; read straight from the singleton preferences row. - In host-service workspace-cleanup, always use `git branch -D` when `deleteBranch` is on — the checkbox is the user's consent, so silently refusing unmerged branches (the old `-d`/`-D` gate on `force`) just dropped the opt-in and produced confusing warnings. * chore(desktop): drop redundant setDeleteBranch wrapper in destroy hook Rename destructured `setDeleteLocalBranch` → `setDeleteBranch` at the call site instead of wrapping it in a useCallback that did nothing. Also trim a docstring line that's trivially true now that the opt-in is a global singleton.
…orkspace + RightSidebarTab type cherry-pick 時に不足していた部分を補完: - apps/desktop/.../useNavigateAwayFromWorkspace/ hook を upstream から追加 (PR #2b 取り込み時の取りこぼし) - useV2UserPreferences に RightSidebarTab type export を復元 - useDestroyDialogState で hook を使って navigateAway を呼ぶ typecheck / lint 全 pass。
03afeec to
eed1756
Compare
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
PR #9 マージ後の残差分:
#3681 persist 'also delete local branch' checkbox in v2 delete dialogを取り込み。もう 1 件候補の
#3697 split workspace-creation routerは 大規模 refactor (workspace-creation.ts を 24 ファイルに split) で fork 独自拡張 (baseBranchSource, PR checkout, fork note 等) と全面衝突するため、本 PR から除外。別 refactor PR で対応予定。取り込み内容
3f2bba985fix(desktop): persist "also delete local branch" checkbox in v2 delete dialog (fix(desktop): persist "also delete local branch" checkbox in v2 delete dialog superset-sh/superset#3681)Conflict 解消
dashboardSidebarLocal/schema.ts: upstream のrightSidebarOpen,rightSidebarTab,deleteLocalBranchpreferences を schema に追加useV2UserPreferences.ts: setter 3 種類 +RightSidebarTabtype export 追加 (fork で欠落していた)useDestroyDialogState.ts:useNavigateAwayFromWorkspacehook を導入し、delete 開始時に現 workspace からナビ脱出。fork の UX (toast なし・楽観削除) と共存追加補完
useNavigateAwayFromWorkspacehook は PR #2b で取り込んだ0bc1d0a0e (#3661)で新規追加されたが、ファイル取りこぼしがあった。upstream から以下を補完:apps/desktop/.../DashboardSidebar/hooks/useNavigateAwayFromWorkspace/useNavigateAwayFromWorkspace.tsapps/desktop/.../DashboardSidebar/hooks/useNavigateAwayFromWorkspace/index.ts除外した commit
167542eb4([codex] refactor(host-service): split workspace-creation router superset-sh/superset#3697 split workspace-creation router) — workspace-creation.ts を 24 ファイルに split する大規模 refactor。fork 独自拡張 (baseBranchSource, PR checkout, fork note, GitHub link command) と全面衝突。別 refactor PR で対応Fork 固有機能ヘルスチェック
baseline 一致:
ansi_up,@vscode/ripgrep,@xyflow/reactTERMINAL_OPTIONS,SUPERSET_WORKSPACE_NAME,moonshot-ai.kimi-codeTest plan
bun run typecheckpass (27/27)bun run lintpass残差分
本 PR マージ後:
#3697 split workspace-creation router— 別 refactor PR で (最大のタスク)