Skip to content

Conversation

@MarkShawn2020
Copy link
Contributor

@MarkShawn2020 MarkShawn2020 commented Oct 9, 2025

Summary

Adds ability to toggle inspector activation mode via keyboard shortcuts without restarting the dev server.

Users can now switch between always-on and hotkey-triggered modes dynamically during runtime.

New Option

  • autoToggle (default: true): Enable mode switching via keyboard shortcut

Use Case

Developers can toggle inspection modes on-the-fly:

  • Always-on mode: Inspector is constantly active for rapid element inspection
  • Hotkey-triggered mode: Inspector only activates when holding configured hotkeys (e.g., Shift+Alt)

Implementation

  • Added mode toggle logic to client component (packages/core/src/client/index.ts)
  • Updated type definitions for new option
  • Comprehensive test coverage for mode switching functionality

Testing

  • ✅ All existing tests pass
  • ✅ New test file added: test/core/client/index/mode-shortcut.test.ts
  • ✅ Updated existing test files to accommodate new behavior
  • ✅ Tested in browser with keyboard shortcuts

Changes

  • 9 files changed
  • +365 insertions, -33 deletions
  • Full backward compatibility maintained (autoToggle defaults to true)

@SamuelXiao
Copy link

This PR is very important for vibe coding. Please merge it.

Add ability to toggle inspector activation mode via keyboard shortcuts.
Users can now switch between always-on and hotkey-triggered modes without
restarting the dev server.

New option:
- autoToggle (default: true): Enable mode switching via shortcut

Changes:
- Add mode toggle logic to client component
- Add comprehensive tests for mode switching
- Update type definitions
@MarkShawn2020 MarkShawn2020 force-pushed the pr/mode-switching-clean branch from 2966451 to 24625fa Compare November 6, 2025 03:32
@MarkShawn2020 MarkShawn2020 changed the title feat: Add Shift+Alt+C mode switching between IDE and copy modes feat: mode switching & fix: pnpm link compatibility Nov 6, 2025
@MarkShawn2020 MarkShawn2020 force-pushed the pr/mode-switching-clean branch from 24625fa to e54252d Compare November 6, 2025 03:35
@MarkShawn2020 MarkShawn2020 changed the title feat: mode switching & fix: pnpm link compatibility feat: support mode switching with autoToggle option Nov 6, 2025
Copy link
Owner

@zh-lx zh-lx left a comment

Choose a reason for hiding this comment

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

LGTM!

@zh-lx zh-lx merged commit 7ac5ff6 into zh-lx:main Nov 6, 2025
1 check passed
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.

3 participants