Skip to content

🎨 Palette: Replace native confirm dialog with accessible state-based soft confirmation#163

Open
Sczitzo wants to merge 1 commit into
mainfrom
palette/soft-confirm-session-end-11353700967053936361
Open

🎨 Palette: Replace native confirm dialog with accessible state-based soft confirmation#163
Sczitzo wants to merge 1 commit into
mainfrom
palette/soft-confirm-session-end-11353700967053936361

Conversation

@Sczitzo

@Sczitzo Sczitzo commented Jun 30, 2026

Copy link
Copy Markdown
Owner
  • 💡 What: Replaced the native window.confirm() dialog for ending a session with an inline, state-based soft confirmation UI.
  • 🎯 Why: Native confirmation dialogs are unstyled, block the main thread, and provide a jarring user experience. The soft confirmation keeps the user in the flow of the application while still protecting against accidental destructive actions.
  • 📸 Before/After: Before, clicking "End Session" triggered a browser modal. Now, it expands into a side-by-side "Confirm End" and "Cancel" button group with a warning message below.
  • ♿ Accessibility: Added a role="status" to the warning text to ensure screen readers explicitly announce the consequences of the destructive action when the confirmation state is triggered. The side-by-side layout ensures keyboard users are not trapped.

PR created automatically by Jules for task 11353700967053936361 started by @Sczitzo

…mation

Replaced the blocking, unstyled native `window.confirm()` in SessionConsole.tsx with an inline, state-based soft confirmation to improve UX. Added 'Cancel' and 'Confirm End' buttons, along with a `role="status"` warning message to maintain Section 508 compliance and ensure screen readers announce the action's consequences.

Co-authored-by: Sczitzo <46541128+Sczitzo@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8975b3bb9f

ℹ️ 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".

Comment on lines +31 to 35
if (showEndConfirm) {
socket.emit('facilitator', {
type: 'endSession',
payload: { sessionId },
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Disable confirm button after emitting endSession

When the inline Confirm End button is double-clicked before the sessionState.status broadcast changes to ENDED, each click enters this branch and emits another endSession. The server handler creates a SessionSummary for the same session, and prisma/schema.prisma makes SessionSummary.sessionId unique, so the second emit can regenerate the summary work and then throw a duplicate-key error; the previous native dialog required a separate confirmation for each emit. Consider setting a pending/reset state or disabling the button immediately after the first confirmed click.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant