Skip to content

Commit efd991d

Browse files
authored
🎨 Palette: Add explicit visual feedback for error state dismissal (#152)
1 parent 1928186 commit efd991d

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

‎.Jules/palette.md‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
## $(date +%Y-%m-%d) - VS Code Concurrent Loading States
2-
**Learning:** Overlapping background operations (like file saves and chat responses) can prematurely clear loading indicators if a simple boolean flag is used for state tracking. This causes screen readers to announce incorrect idle states while work is still ongoing.
3-
**Action:** Always use a reference counter (`busyCount`) instead of a boolean for shared UI loading states that map to concurrent async operations.
4-
## 2026-04-19 - VS Code Persistent Error States
5-
**Learning:** Persistent error states in VS Code status bars should not be implicitly cleared by concurrent async completion handlers. When overlapping background tasks share UI loading indicators, decoupling the error boolean from the loading counter is necessary to ensure screen readers do not incorrectly announce error resolution when background tasks complete.
6-
**Action:** Always decouple persistent error state booleans from async reference counters, and require explicit user interaction (e.g. clicking the status bar) to dismiss the error.
1+
## 2026-04-26 - VS Code Interactive Status Bar Dismissal
2+
**Learning:** Dismissing a persistent error state from the status bar via the bound command effectively clears the error state visually, but screen readers might not immediately catch the state change unless explicitly decoupled and re-announced or when the state simply clears via explicit action. In our case, clearing error via the output channel explicitly solves this.
3+
**Action:** Always provide explicit user interactions to dismiss persistent error states.

‎pr_body.txt‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
💡 What: Added explicit visual feedback in the Output Channel when the user dismisses a persistent error state via the status bar. Replaced direct assignment of `isError` with the dedicated `setError` state updater for improved state-handling semantics.
2+
3+
🎯 Why: To improve the user experience by providing a reassuring confirmation in the logs that the error has been acknowledged and dismissed. Additionally, utilizing the correct state-handling method avoids relying on side-effect updates.
4+
5+
📸 Before/After: Before, dismissing an error via clicking the status bar silently reset the flag and refreshed the UI. After, clicking the status bar logs a clear visual indication ('✓ Error state cleared by user') if an error state was active.
6+
7+
♿ Accessibility: Ensures that users and screen readers navigating through the interaction logs receive confirmation of error resolution.

‎src/ledgermind/vscode/src/extension.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ export function activate(context: vscode.ExtensionContext) {
6464

6565
context.subscriptions.push(vscode.commands.registerCommand(showOutputCommandId, () => {
6666
outputChannel.show();
67-
isError = false; // Clear error state when logs are opened
68-
updateStatusBar();
67+
if (isError) {
68+
outputChannel.appendLine('✓ Error state cleared by user');
69+
}
70+
setError(false); // Clear error state when logs are opened
6971
}));
7072

7173
// ==========================================

0 commit comments

Comments
 (0)