Skip to content

fix: add missing tabs.getActive frontend handler#470

Merged
xiaolai merged 1 commit intomainfrom
fix/467-tabs-getActive-handler
Mar 19, 2026
Merged

fix: add missing tabs.getActive frontend handler#470
xiaolai merged 1 commit intomainfrom
fix/467-tabs-getActive-handler

Conversation

@claude
Copy link
Contributor

@claude claude bot commented Mar 19, 2026

Summary

  • Add handleTabsGetActive handler in src/hooks/mcpBridge/tabHandlers.ts that returns active tab info (id, title, filePath, isDirty, isActive)
  • Wire up tabs.getActive case in the MCP bridge dispatcher (index.ts)
  • Add tests covering success path, no active tab, stale active tab ID, and error handling

Closes #467

Test plan

  • All existing tab handler tests pass
  • New handleTabsGetActive tests cover: active tab found, no active tab (returns null), active tab ID not in tabs array (returns null), error path
  • pnpm check:all passes (lint + tests + build)

🤖 Generated with Claude Code

The tabs.getActive operation was defined in the Rust read-only whitelist
and sidecar types but had no frontend handler, causing it to fall through
to the default "unknown request type" error.

Closes #467

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude claude bot enabled auto-merge (squash) March 19, 2026 09:38
@xiaolai xiaolai merged commit d97aa29 into main Mar 19, 2026
3 checks passed
@xiaolai xiaolai deleted the fix/467-tabs-getActive-handler branch March 20, 2026 22:13
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.

[audit] mcp-bridge: tabs.getActive has no frontend handler despite being in Rust read-only whitelist

1 participant