diff --git a/docs/STYLEGUIDE.md b/docs/STYLEGUIDE.md index 034d5cb23c1..d948ab90781 100644 --- a/docs/STYLEGUIDE.md +++ b/docs/STYLEGUIDE.md @@ -231,6 +231,8 @@ Apply one of these to overflow containers; don't write a fourth style. These are the rules a contributor will most often get wrong if they're working in isolation. They apply to every UI change. +**UI copy must not overclaim.** Never imply the app has taken an action, made a decision, or observed a fact unless the code has real state or result data to support it. Use neutral process language while work is pending, and reserve result verbs like "skipped", "protected", "found", "verified", or "deleted" for actual results. + ### 1. Match in-flight feedback to perceived duration The right question isn't *"should this control change while it's working?"* — it's *"how long does the action take, and what does the user need to know during that time?"* diff --git a/src/renderer/src/components/workspace-cleanup/WorkspaceCleanupDialog.tsx b/src/renderer/src/components/workspace-cleanup/WorkspaceCleanupDialog.tsx index 7032f6bbafa..fdec01e5f31 100644 --- a/src/renderer/src/components/workspace-cleanup/WorkspaceCleanupDialog.tsx +++ b/src/renderer/src/components/workspace-cleanup/WorkspaceCleanupDialog.tsx @@ -44,21 +44,6 @@ const TIER_LABELS: Record = { type CleanupView = WorkspaceCleanupTier | 'hidden' -const SCAN_LOADING_STEPS = [ - { - title: 'Finding inactive workspaces', - detail: 'Listing old worktrees before any cleanup decision is made.' - }, - { - title: 'Checking git safety', - detail: 'Looking for changed files and commits that only exist locally.' - }, - { - title: 'Protecting active work', - detail: 'Skipping workspaces with open tabs, terminals, live agents, or unavailable remotes.' - } -] as const - const BLOCKER_LABELS: Record = { 'main-worktree': 'Main workspace', 'folder-repo': 'Folder project', @@ -202,7 +187,6 @@ export default function WorkspaceCleanupDialog(): React.JSX.Element { const [removing, setRemoving] = useState(false) const [rowFailures, setRowFailures] = useState>({}) const [repoSelection, setRepoSelection] = useState>(() => new Set()) - const [loadingStepIndex, setLoadingStepIndex] = useState(0) const eligibleRepos = useMemo(() => repos.filter((repo) => isGitRepoKind(repo)), [repos]) const eligibleRepoIds = useMemo(() => eligibleRepos.map((repo) => repo.id), [eligibleRepos]) @@ -225,19 +209,6 @@ export default function WorkspaceCleanupDialog(): React.JSX.Element { setRepoSelection(new Set(eligibleRepoIds)) }, [eligibleRepoIds, open]) - useEffect(() => { - if (!open || !loading) { - setLoadingStepIndex(0) - return - } - - const timer = window.setInterval(() => { - setLoadingStepIndex((index) => (index + 1) % SCAN_LOADING_STEPS.length) - }, 2600) - - return () => window.clearInterval(timer) - }, [loading, open]) - const candidates = useMemo(() => scan?.candidates ?? [], [scan?.candidates]) const effectiveRepoSelection = useMemo>(() => { if (repoSelection.size > 0 || eligibleRepoIds.length === 0) { @@ -318,7 +289,6 @@ export default function WorkspaceCleanupDialog(): React.JSX.Element { const inactiveCount = filteredCandidates.length const hasAnyCandidates = candidates.length > 0 const initialLoading = loading && !scan - const loadingStep = SCAN_LOADING_STEPS[loadingStepIndex] const activeRows = activeView === 'hidden' ? hiddenCandidates : groups[activeView] const activeQueueableRows = useMemo( () => activeRows.filter(canQueueWorkspaceCleanupCandidate), @@ -511,8 +481,13 @@ export default function WorkspaceCleanupDialog(): React.JSX.Element {
-
{loadingStep.title}
-
{loadingStep.detail}
+
+ Checking workspace safety +
+
+ Scanning worktrees and git state, then combining open tab, terminal, live agent, + and remote availability signals before suggesting deletions. +
) : hasAnyCandidates ? (