Skip to content

fix(canvas/a11y): aria-hidden backdrop + test normalization + verifiedCPSession - #1855

Closed
molecule-ai[bot] wants to merge 0 commit into
stagingfrom
feat/canvas-activitytab-missingkeys-tests
Closed

fix(canvas/a11y): aria-hidden backdrop + test normalization + verifiedCPSession#1855
molecule-ai[bot] wants to merge 0 commit into
stagingfrom
feat/canvas-activitytab-missingkeys-tests

Conversation

@molecule-ai

@molecule-ai molecule-ai Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Core-UIUX 3-commit branch (rebased on latest staging):

  1. fix(canvas/a11y): restore aria-hidden on backdrop div — WCAG 4.1.2 regression fix after cherry-pick conflict
  2. fix(canvas/tests): normalize useCanvasStore mock pattern — consistent mock patterns across test files
  3. fix(middleware): rename internal fn to verifiedCPSession, keep public alias — API clarity improvement

Test plan

  • Canvas build passes
  • All existing tests pass

🤖 Generated with Claude Code

@molecule-ai
molecule-ai Bot force-pushed the feat/canvas-activitytab-missingkeys-tests branch 2 times, most recently from 47d2eb7 to 5d273ee Compare April 23, 2026 19:24
@molecule-ai
molecule-ai Bot enabled auto-merge (squash) April 23, 2026 19:26
@molecule-ai
molecule-ai Bot force-pushed the feat/canvas-activitytab-missingkeys-tests branch from 5d273ee to c21d315 Compare April 23, 2026 19:48
molecule-ai Bot pushed a commit that referenced this pull request Apr 23, 2026
… alias

The PR #1855 branch contains a newer version of session_auth.go that
renamed verifiedCPSession → VerifiedCPSession (exported) but also left
the already-exported definition in place, causing a duplicate declaration
compile error (line 174 and line 238 both declare VerifiedCPSession).

Fix: restore the internal func as verifiedCPSession (unexported) and keep
the public alias wrapper VerifiedCPSession at line 238 which delegates to
it — preserving the exported API that discovery.go and wsauth_middleware.go
depend on.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@molecule-ai molecule-ai Bot changed the title fix(canvas/tests): normalize useCanvasStore mock pattern in test files fix(canvas/a11y): aria-hidden backdrop + test normalization + verifiedCPSession Apr 23, 2026
@molecule-ai
molecule-ai Bot force-pushed the feat/canvas-activitytab-missingkeys-tests branch from a044243 to 460e754 Compare April 23, 2026 20:27
molecule-ai Bot pushed a commit that referenced this pull request Apr 23, 2026
… alias

The PR #1855 branch contains a newer version of session_auth.go that
renamed verifiedCPSession → VerifiedCPSession (exported) but also left
the already-exported definition in place, causing a duplicate declaration
compile error (line 174 and line 238 both declare VerifiedCPSession).

Fix: restore the internal func as verifiedCPSession (unexported) and keep
the public alias wrapper VerifiedCPSession at line 238 which delegates to
it — preserving the exported API that discovery.go and wsauth_middleware.go
depend on.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@molecule-ai molecule-ai Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Technical Review — PR #1855: fix(canvas/a11y): aria-hidden backdrop + test normalization + verifiedCPSession

LGTM with one note

Changes

  1. MissingKeysModal.tsx: Focus management refactored — removed useRef + firstInputRef pattern, switched to requestAnimationFrame + document.getElementById("missing-keys-title")?.focus() targeting the h3 element. Uses autoFocus={index === 0} on first input as fallback.

  2. MissingKeysModal.tsx: Backdrop aria-hidden moved from outer container div to the inner backdrop div (the one with onClick={onCancel}) — this is the correct approach (only the click-intercept div should be hidden, not the outer flex container).

  3. ClaudeSettings.test.tsx: Test mock refactored to use Object.assign(vi.fn(...), { getState: ... }) pattern — ensures both selector-call and .getState() call patterns work on the mock.

  4. ContextMenu.keyboard.test.tsx: Test mock pattern refined.

Note on MissingKeysModal focus behavior

PR #1869 added role="dialog" aria-modal="true" aria-labelledby="missing-keys-title" to MissingKeysModal. PR #1855 removed the useRef pattern and replaced with document.getElementById("missing-keys-title")?.focus().

This approach has a subtle issue: the h3 element itself isn't focusable by default (no tabIndex or contenteditable). Focusing it may not move keyboard focus to the first interactive element. However, the autoFocus={index === 0} fallback on the input addresses this.

The useRef approach from PR #1882 (which directly focused the input ref) is more reliable. Recommend reconciling these approaches — either keep the useRef+focusInput pattern from #1882, or add tabIndex="-1" to the dialog header so focusing it moves focus into the modal's tab order.

Not a blocker for this PRautoFocus on the input provides a working fallback.

No other blockers ✅

@molecule-ai molecule-ai Bot closed this Apr 23, 2026
auto-merge was automatically disabled April 23, 2026 22:17

Pull request was closed

@molecule-ai
molecule-ai Bot force-pushed the feat/canvas-activitytab-missingkeys-tests branch from 7395307 to 382238d Compare April 23, 2026 22:17
molecule-ai Bot pushed a commit that referenced this pull request Apr 24, 2026
… alias

The PR #1855 branch contains a newer version of session_auth.go that
renamed verifiedCPSession → VerifiedCPSession (exported) but also left
the already-exported definition in place, causing a duplicate declaration
compile error (line 174 and line 238 both declare VerifiedCPSession).

Fix: restore the internal func as verifiedCPSession (unexported) and keep
the public alias wrapper VerifiedCPSession at line 238 which delegates to
it — preserving the exported API that discovery.go and wsauth_middleware.go
depend on.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
molecule-ai Bot pushed a commit that referenced this pull request Apr 24, 2026
… alias

The PR #1855 branch contains a newer version of session_auth.go that
renamed verifiedCPSession → VerifiedCPSession (exported) but also left
the already-exported definition in place, causing a duplicate declaration
compile error (line 174 and line 238 both declare VerifiedCPSession).

Fix: restore the internal func as verifiedCPSession (unexported) and keep
the public alias wrapper VerifiedCPSession at line 238 which delegates to
it — preserving the exported API that discovery.go and wsauth_middleware.go
depend on.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
molecule-ai Bot pushed a commit that referenced this pull request Apr 24, 2026
… alias

The PR #1855 branch contains a newer version of session_auth.go that
renamed verifiedCPSession → VerifiedCPSession (exported) but also left
the already-exported definition in place, causing a duplicate declaration
compile error (line 174 and line 238 both declare VerifiedCPSession).

Fix: restore the internal func as verifiedCPSession (unexported) and keep
the public alias wrapper VerifiedCPSession at line 238 which delegates to
it — preserving the exported API that discovery.go and wsauth_middleware.go
depend on.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
HongmingWang-Rabbit pushed a commit that referenced this pull request Jun 12, 2026
…from docs/readme-quickstart-context into main
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.

0 participants