Skip to content

set Ctrl+V as a paste accelerator by default on windows#2640

Merged
sawka merged 1 commit intomainfrom
sawka/ctrlv
Dec 6, 2025
Merged

set Ctrl+V as a paste accelerator by default on windows#2640
sawka merged 1 commit intomainfrom
sawka/ctrlv

Conversation

@sawka
Copy link
Member

@sawka sawka commented Dec 5, 2025

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 5, 2025

Walkthrough

This pull request introduces a new configuration option app:ctrlvpaste to control paste accelerator behavior across the application, alongside modifications to AI configuration settings. The new setting is added to documentation, TypeScript and Go type definitions, JSON schemas, and a constant definition. The Electron menu's makeEditMenu function is updated to accept a config parameter and apply conditional paste accelerator logic based on the new setting. Additionally, the AI mode configuration replaces ai:apiversion with ai:azureapiversion and updates the AI API type enum to include "google-gemini" while removing "anthropic-messages".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

  • emain/emain-menu.ts: The paste accelerator logic requires careful verification—ensure the conditional logic correctly handles null/undefined states and platform-specific behavior (Windows, macOS, Linux). Confirm that makeFullAppMenu properly fetches and passes the config parameter.
  • Schema consistency: Verify that app:ctrlvpaste is consistently defined across schema/settings.json, frontend/types/gotypes.d.ts, pkg/wconfig/metaconsts.go, and pkg/wconfig/settingsconfig.go with matching types and JSON tags.
  • AI config changes: Check that all references to ai:apiversion have been updated to ai:azureapiversion throughout the codebase, and verify that the enum change for ai:apitype in schema/waveai.json does not break existing configurations or runtime handling.
  • Type signature changes: Ensure the updated makeEditMenu signature is properly utilized at all call sites and that the optional parameter handling is correct.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the purpose and scope of these configuration and UI changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding app:ctrlvpaste configuration to enable Ctrl+V as paste accelerator on Windows by default.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sawka/ctrlv

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4449895 and becca75.

📒 Files selected for processing (7)
  • docs/docs/config.mdx (1 hunks)
  • emain/emain-menu.ts (3 hunks)
  • frontend/types/gotypes.d.ts (2 hunks)
  • pkg/wconfig/metaconsts.go (1 hunks)
  • pkg/wconfig/settingsconfig.go (1 hunks)
  • schema/settings.json (1 hunks)
  • schema/waveai.json (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build for TestDriver.ai
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
docs/docs/config.mdx (1)

40-40: LGTM! Clear documentation of the new config key.

The documentation accurately describes the platform-specific paste accelerator behavior and aligns with the implementation in emain/emain-menu.ts.

schema/waveai.json (1)

33-33: LGTM! AI configuration schema updates.

The addition of "google-gemini" to the API type enum and the rename from ai:apiversion to ai:azureapiversion clarify the configuration's purpose. Note that this is for AIModeConfigType (new AI panel system), while the legacy SettingsType retains the original ai:apiversion field.

Also applies to: 52-54

pkg/wconfig/metaconsts.go (1)

14-14: LGTM! Constant definition follows existing conventions.

The new configuration key constant is properly defined and positioned with other App* keys.

pkg/wconfig/settingsconfig.go (1)

61-61: LGTM! Proper use of pointer type for tri-state boolean.

Using *bool correctly allows distinguishing between unset (nil), explicitly true, and explicitly false, which is essential for the default behavior logic.

schema/settings.json (1)

23-25: LGTM! Schema definition is consistent.

The new boolean property is correctly defined and positioned with other app:* configuration keys.

frontend/types/gotypes.d.ts (1)

27-27: LGTM! Type definitions are consistent with backend changes.

Both type updates correctly reflect the schema and Go struct definitions. The optional field markers are appropriate for the tri-state boolean logic.

Also applies to: 1054-1054

emain/emain-menu.ts (2)

76-89: LGTM! Paste accelerator logic correctly implements the configuration behavior.

The logic correctly handles:

  • macOS: Always uses Command+V regardless of config
  • Other platforms: Respects the tri-state app:ctrlvpaste setting (null/true/false)
  • Graceful fallback when config is unavailable via optional chaining

The implementation matches the documented behavior precisely.


338-338: LGTM! Config properly passed to menu builder.

The fullConfig is correctly passed to makeEditMenu, enabling the paste accelerator logic to access the configuration setting.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sawka sawka merged commit 0c60f2c into main Dec 6, 2025
9 checks passed
@sawka sawka deleted the sawka/ctrlv branch December 6, 2025 00:00
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