Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 11, 2025

This PR addresses two high-priority user experience issues from RFC 2.0 version requirements with minimal code changes.

Issues Fixed

P3-01: Recent files display with URL escapes

The recent files menu and keyboard shortcut window were displaying URL-encoded file paths instead of human-readable names, particularly affecting users with Chinese characters in file paths.

Before:

file:///Users/littlefean/Documents/project-graph%E6%96%87%E4%BB%B6/2vTest.prg

After:

/Users/littlefean/Documents/project-graph文件/2vTest.prg

Fix: Changed from file.uri.toString() to file.uri.fsPath in both GlobalMenu.tsx and KeyboardRecentFilesWindow.tsx to properly decode file paths.

P3-02: Keyboard shortcut conflicts during text editing

Users experienced unwanted shortcut activation when typing in input dialogs. For example, typing the letter 'f' while editing connection text would trigger the "reset view" shortcut (F key), interrupting the editing process.

Fix: Implemented proper keyboard shortcut state management by:

  • Disabling keyboard shortcuts when text editing starts (keyboardOnlyEngine.setOpenning(false))
  • Re-enabling them when text editing finishes (keyboardOnlyEngine.setOpenning(true))
  • Applied to all text editing functions: editTextNode, editEdgeText, editMultiTargetEdgeText, editUrlNodeTitle, and editSectionTitle

Impact

  • ✅ Chinese and international users can now see properly decoded filenames in the UI
  • ✅ Users can type freely in input dialogs without keyboard shortcut interference
  • ✅ Improved overall user experience with minimal code changes

Fixes #487.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@zty012 zty012 closed this Aug 11, 2025
Copilot AI changed the title [WIP] RFC: 2.0 版本 🐛 Fix RFC 2.0 priority issues: Recent files display and keyboard shortcuts Aug 11, 2025
Copilot AI requested a review from zty012 August 11, 2025 09:35
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.

RFC: 2.0 版本

2 participants