diff --git a/.ai/contexts/ipc-bridge.md b/.ai/contexts/ipc-bridge.md
index 88bbe83d2..ed935f383 100644
--- a/.ai/contexts/ipc-bridge.md
+++ b/.ai/contexts/ipc-bridge.md
@@ -33,10 +33,12 @@ answers still match. Changed answers require a fresh preview. Other callers keep
their existing flow. If a remembered choice is unavailable (shared settings), the
dialog unchecks it and obtains the matching plan; the refused initial plan has no
token. A refusal disables Delete and writes its reason into the row;
-`aria-describedby` uses an entry-derived stable ID. Transient refusals (timeout,
-NOT_READY or unavailable discovery) explain how to reopen the menu and click
-Delete again; reopening only re-enables that explicit action. Detached rows ignore
-refusal updates.
+`aria-describedby` uses an entry-derived stable ID on both Delete and the row's
+summary. Every refusal except the grouped-worktree hint, including thrown IPC
+errors, explains how to reopen the menu and click Delete again; reopening only
+re-enables that explicit action, with no preview. Detached rows ignore refusal
+updates. The shared flow's `onDialogOpen` callback clears the row's checking
+message when the dialog opens.
The real inventory groups a local worktree only when its repository exists, so
orphaned entries can be deleted. Only the local worktree hints-conflict refusal
explains in user wording that the entry is grouped under its repository and
@@ -46,8 +48,11 @@ Parsing uses the shared `parseFolderKey` and `isValidAlias` in
means `/`, matching the writer. Accepted entries call the existing
`confirmAndDeleteProjectFolder`, retaining preview tokens, options,
refusal handling and committed-result semantics. After cancellation or refusal,
-the manager unlocks the controls before returning focus to an enabled Delete button;
-unlocking keeps refused actions disabled. It never calls
+the manager unlocks the controls before returning focus to an enabled Delete button
+or, after refusal, the row's summary with its reason. Passing `onUnavailable`
+leaves fallback focus to that caller; sidebar and project-settings callers retain
+their existing project-header/sidebar fallback. Unlocking keeps refused actions
+disabled until the menu reopens. It never calls
Unarchive before Delete. The overflow also copies the full path through
`writeClipboard`. No new IPC or launch code is introduced.
diff --git a/eslint.config.js b/eslint.config.js
index 3ccd6c9e9..97011c0cf 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -884,7 +884,5 @@ module.exports = [
globals: { ...globals.node },
},
},
- { files: ['public/archived-manager.js'], languageOptions: { globals: { module: 'writable', renderArchivedProjects: 'off',
- PROJECT_DELETE_DIALOG_TIMEOUT_MS: 'readonly', projectDeletionPreviewWait: 'readonly',
- projectDeletionCall: 'readonly', projectDeletionPlanReason: 'readonly' } } },
+ { files: ['public/archived-manager.js'], languageOptions: { globals: { module: 'writable', renderArchivedProjects: 'off' } } },
];
diff --git a/public/archived-manager.js b/public/archived-manager.js
index ecdba9f94..f8e92bedb 100644
--- a/public/archived-manager.js
+++ b/public/archived-manager.js
@@ -97,12 +97,12 @@ function renderArchivedProjects(container, { entries, kinds = {}, dates = {}, ho
const reason = row.querySelector('.archived-delete-reason');
reason.textContent = 'Checking deletion availability…';
try {
- if (await confirmAndDeleteProjectFolder(project, button, { reuseInitialPreview: true, onUnavailable: (reply, message) => {
+ if (await confirmAndDeleteProjectFolder(project, button, { reuseInitialPreview: true,
+ onDialogOpen: () => { reason.textContent = ''; }, onUnavailable: (reply, message) => {
if (!row.isConnected) return;
const grouped = reply?.code === 'IDENTITY_UNAVAILABLE' && reply.error === 'Folder and path hints conflict.'
&& project.remoteAlias === null && worktreeGroupingPath(project.projectPath) !== project.projectPath;
- const retryable = reply?.code === 'NOT_READY' || reply?.code === 'DISCOVERY_TIMEOUT' || reply?.code === 'DISCOVERY_UNAVAILABLE'
- || (!reply?.code && /unavailable|timed out/i.test(message));
+ const retryable = !grouped;
reason.textContent = grouped ? 'This worktree is grouped under its repository. To remove it from Switchboard, delete its repository instead.'
: message.replace(/\s*(?:Close and reopen Delete to retry\.|Retry preview, or cancel\.)/g, '')
+ (retryable ? ' Reopen the menu and click Delete project to try again.' : '');
@@ -114,7 +114,7 @@ function renderArchivedProjects(container, { entries, kinds = {}, dates = {}, ho
finally {
if (reason.textContent === 'Checking deletion availability…') reason.textContent = '';
lock(false);
- if (button.isConnected && !button.disabled) button.focus();
+ if (button.isConnected) (button.disabled ? row.querySelector('summary') : button).focus();
}
}
function render() {
@@ -147,7 +147,7 @@ function renderArchivedProjects(container, { entries, kinds = {}, dates = {}, ho