Skip to content

UX improvement: surface user file issues - #742

Merged
lukhnos merged 1 commit into
openvanilla:masterfrom
lukhnos:surface-user-file-issues
Nov 18, 2025
Merged

UX improvement: surface user file issues#742
lukhnos merged 1 commit into
openvanilla:masterfrom
lukhnos:surface-user-file-issues

Conversation

@lukhnos

@lukhnos lukhnos commented Nov 15, 2025

Copy link
Copy Markdown
Contributor

A long-staying (5 seconds) notification is shown upon any user file issues found when activateServer is called or when the user reloads the files manually from the menu.

A menu item is added to allow the user to inspect those issues—when there are such issues. I tried to set an SF Symbol to the NSMenuItem but it doesn't work, and so the alert emoji is used in the menu (it is not supposed to be shown often, and so I'm fine with making this glaring).

screenshot

@lukhnos
lukhnos requested review from Copilot and zonble and removed request for Copilot November 15, 2025 19:06
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @lukhnos, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the user experience by introducing robust mechanisms for detecting and reporting issues within user-defined phrase files. It provides immediate feedback through temporary notifications and offers a dedicated menu option to inspect a comprehensive list of problems, thereby empowering users to maintain accurate and functional custom dictionaries with greater ease.

Highlights

  • Proactive Issue Notification: A 5-second notification now appears when issues are detected in user phrase files, either upon server activation or manual file reload.
  • Dedicated Issue Inspection Menu: A new menu item, "Show Issues in User Files ⚠️", is added to the input method menu, allowing users to view a detailed report of any detected issues.
  • Detailed Issue Reporting: Clicking the menu item generates a temporary text file containing a list of all identified issues, including file type, path, line number, and specific problem description (e.g., missing columns, illegal NULL characters).
  • Localization Support: New strings have been added to Localizable.strings files for English, Traditional Chinese, and the base localization, ensuring the new UI elements and messages are properly translated.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a great user experience improvement by surfacing issues found in user-provided phrase files. A notification is shown, and a new menu item allows users to inspect the details. The implementation spans both Swift and Objective-C++ and is generally well-executed. My review includes a few suggestions to enhance code clarity, maintainability, and robustness. These include using modern Swift syntax for string construction, improving variable naming for better readability, using a more direct API for path manipulation in Objective-C++, and ensuring that non-issues are not erroneously reported to the user.

Comment thread Source/KeyHandler.mm
Comment thread Source/InputMethodController.swift
Comment thread Source/InputMethodController.swift
Comment thread Source/KeyHandler.mm Outdated
Copilot AI review requested due to automatic review settings November 15, 2025 20:12
@lukhnos
lukhnos force-pushed the surface-user-file-issues branch from 5e030c2 to 5500a55 Compare November 15, 2025 20:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves UX by surfacing user file parsing issues to the user. When user phrase files contain errors (missing columns, NULL characters), the input method now shows a 5-second notification and adds a menu item that allows users to inspect the issues by writing them to a temporary file and opening it.

  • Added collectUserFileIssues() bridge method in KeyHandler to translate C++ UserFileIssue objects to localized NSString messages
  • Added static property to track latest issues and prevent duplicate notifications
  • Implemented showUserFileIssues() to write issue report to temporary file and open it
  • Added menu item (with alert emoji) that appears only when issues exist
  • Added localized strings in English, Traditional Chinese, and Base localizations

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Source/KeyHandler.h Declares new collectUserFileIssues method to retrieve user file parsing issues
Source/KeyHandler.mm Implements issue collection, translating C++ UserFileIssue structs to localized NSString messages
Source/InputMethodController.swift Adds static property for tracking issues, menu item with emoji, notification logic, and file writing/opening functionality
Source/Base.lproj/Localizable.strings Adds base localized strings for file types, issue descriptions, and UI text (including emoji)
Source/en.lproj/Localizable.strings Adds English localized strings for file types, issue descriptions, and UI text (including emoji)
Source/zh-Hant.lproj/Localizable.strings Adds Traditional Chinese localized strings for file types, issue descriptions, and UI text (including emoji)

Comment thread Source/zh-Hant.lproj/Localizable.strings
Comment thread Source/InputMethodController.swift
Comment thread Source/InputMethodController.swift
Comment thread Source/KeyHandler.mm
Comment thread Source/Base.lproj/Localizable.strings
Comment thread Source/en.lproj/Localizable.strings
@lukhnos
lukhnos force-pushed the surface-user-file-issues branch from 5500a55 to 7e24da6 Compare November 18, 2025 22:31
A long-staying (5 seconds) notification is shown upon any user file
issues. A menu item is added to allow the user to inspect those issues.
@lukhnos
lukhnos merged commit a6c9ede into openvanilla:master Nov 18, 2025
6 checks passed
@lukhnos
lukhnos deleted the surface-user-file-issues branch January 11, 2026 00:51
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