Repository navigation
Conversation
- Refactor app-picker, app-utils, and manage-configs components to improve code readability and maintainability. Consolidate action button rendering in app-picker, standardize string formatting in app-utils, and enhance UI elements in manage-configs for better user experience. Ensure consistent formatting and remove unnecessary whitespace across files. - Update CHANGELOG for initial release details, modify package.json to change icon and category, remove deprecated icon file, and enhance ConfigForm with improved UI elements and placeholder text for better user guidance. - Enhance ConfigForm in ManageConfigsViewComponent by introducing a data readiness state to manage UI rendering based on application loading status. Update app item rendering to display a loading message while applications are being fetched, improving user experience during data retrieval. - Enhance ManageConfigsViewComponent by adding keyboard shortcuts for editing configurations and improving validation for configuration names. Introduce helper functions to display app names dynamically in the UI, ensuring better user experience and clarity in app selection. - Enhance README.md to clarify multi-app restart functionality and startup arguments. Refactor app-utils to support restarting multiple applications with optional startup arguments. Update execute-app-restart and manage-configs-view-component to utilize new multi-app restart feature. Implement configuration migration for backward compatibility with previous app configurations. - Update package.json to change icon and command titles for clarity. Enhance README.md with detailed usage instructions and features. Remove deprecated extension icon file. Refactor app-picker and manage-configs-view-component for improved functionality and user experience, including updates to quicklink creation instructions. - Refactor ManageConfigsViewComponent to remove configId handling and streamline the component. Update package.json to simplify command descriptions and rename commands for clarity. Remove unused ManageConfigsView and adjust restart-app component for improved functionality. - Add restart-app command to package.json and implement auto-navigation in restart-app component - Refactor Manage Configurations view to streamline shortcut creation. Replaced the copy ID functionality with a command quick link creation feature, enhancing user interaction and simplifying the process of creating shortcuts. Updated related UI elements and toast notifications for improved feedback. - Enhance Manage Configurations view with configuration ID handling and shortcut creation. Added support for passing a configId to restart specific applications. Implemented functionality to copy configuration IDs and create keyboard shortcuts via quicklink URLs. Improved user feedback with toast notifications for various actions. - Refactor restart functionality to improve user experience and error handling. Removed the standalone restart-app command, integrated smart restart logic into the app-utils, and updated the Manage Configurations view to streamline configuration management. Enhanced toast notifications for better feedback during app restarts. - Refactor app retrieval to use Raycast API and enhance error handling in ConfigForm. Updated getInstalledApps to leverage built-in API for fetching applications, improving performance and reliability. Added error states for loading applications and adjusted form handling for app selection. - Initial commit
|
Congratulations on your new Raycast extension! 🚀 You can expect an initial review within five business days. Once the PR is approved and merged, the extension will be available on our Store. |
…he first app is restarted and improving error handling for missing apps. Modify UI to reflect the selected app\'s bundle ID or indicate if no apps are configured.
|
Is someone ever gonna take a look at this? :) |
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
|
Would anyone please review this? |
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
|
This is still marked as a draft; you need to undraft it before we can take a look. I'm sure we already have something like that in the store. Did you find any? |
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
|
This pull request has been automatically closed due to inactivity. Feel free to comment in the thread when you're ready to continue working on it 🙂 You can also catch us in Slack if you want to discuss this. |
I'm sorry, but I can't understand how to do this. I've looked everywhere on the page but don't find any buttons for this. |
pernielsentikaer
left a comment
There was a problem hiding this comment.
Hi 👋
Thanks for your contribution 💪
I have now tested your extension, and I have some feedback ready for you:
Could you add the missing icon here
I'm looking forward to testing this extension again 🔥
Request a new review when you are ready. Feel free to contact me here or at Slack if you have any questions.
There was a problem hiding this comment.
PR Summary
New 'Restart App' extension allowing users to manage and execute application restart configurations on macOS with custom arguments and multi-app support.
- CHANGELOG.md uses hardcoded date
2025-03-27instead of required{PR_MERGE_DATE}template string - README.md contains duplicate metadata images in both
assetsandmetadatafolders which needs to be cleaned up - Metadata images are present for no-view command in
package.json(execute-app-restart), these should be removed per documentation - Some error handling in
app-utils.tscould be simplified usingshowFailureToastfrom@raycast/utilsinstead of manual error toast creation
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
15 file(s) reviewed, 14 comment(s)
Edit PR Review Bot Settings | Greptile
| - **Configuration Management**: Create, edit, and delete restart configurations for your applications | ||
| - **Quick Restart**: Restart any configured app with a single click | ||
| - **Keyboard Shortcuts**: Create keyboard shortcuts for frequently restarted apps | ||
| - **Smart Exit Detection**: Automatically detect when an app has fully quit before starting it again1 |
There was a problem hiding this comment.
syntax: Typo '...again1' at the end of the line - remove the '1'
| - **Smart Exit Detection**: Automatically detect when an app has fully quit before starting it again1 | |
| - **Smart Exit Detection**: Automatically detect when an app has fully quit before starting it again |
| 4. Run the "Create Quicklink" command from Raycast | ||
| 5. Paste the URL into the "Link" input field | ||
| 6. Assign your preferred keyboard shortcut to the new quicklink | ||
| 7. Now you can restart all app (or apps) in the configuration directly with your keyboard shortcut from anywhere No newline at end of file |
There was a problem hiding this comment.
syntax: Grammar error: 'all app (or apps)' should be 'the app (or apps)'
| 7. Now you can restart all app (or apps) in the configuration directly with your keyboard shortcut from anywhere | |
| 7. Now you can restart the app (or apps) in the configuration directly with your keyboard shortcut from anywhere |
| "commands": [ | ||
| { | ||
| "name": "restart-app", | ||
| "title": "Restart App", |
There was a problem hiding this comment.
style: Command title matches extension title. Consider adding subtitle to differentiate commands using the service name.
| }, | ||
| { | ||
| "name": "execute-app-restart", | ||
| "title": "Restart App by ID", |
There was a problem hiding this comment.
style: Consider a more descriptive title like 'Quick Restart App' or 'Restart Configured App' since this is for predefined configurations.
| "$schema": "https://www.raycast.com/schemas/extension.json", | ||
| "name": "restart-app", | ||
| "title": "Restart App", | ||
| "description": "Simply restart an app.", |
There was a problem hiding this comment.
style: Description is too brief. Add more detail about what the extension does (e.g., 'Quickly restart macOS applications using predefined configurations').
| useEffect(() => { | ||
| async function executeRestart() { | ||
| try { | ||
| // First, migrate configs if needed | ||
| await migrateConfigsIfNeeded(); | ||
|
|
||
| if (!configId) { | ||
| await showToast({ | ||
| style: Toast.Style.Failure, | ||
| title: "Missing configuration ID", | ||
| }); | ||
| setTimeout(() => popToRoot(), 1500); | ||
| return; | ||
| } | ||
|
|
||
| // Get all configs | ||
| const configs = await getAppConfigs(); | ||
|
|
||
| // Find the matching config | ||
| const configToRun = configs.find((config) => config.id === configId); | ||
|
|
||
| if (!configToRun) { | ||
| await showToast({ | ||
| style: Toast.Style.Failure, | ||
| title: "Configuration not found", | ||
| message: `No configuration found with ID: ${configId}`, | ||
| }); | ||
| setTimeout(() => popToRoot(), 1500); | ||
| return; | ||
| } | ||
|
|
||
| // Show the start toast | ||
| await showToast({ | ||
| style: Toast.Style.Animated, | ||
| title: `Restarting apps in ${configToRun.name}`, | ||
| }); | ||
|
|
||
| // Restart all apps in the configuration | ||
| await restartMultipleApps(configToRun.apps); | ||
|
|
||
| // Show success toast | ||
| await showToast({ | ||
| style: Toast.Style.Success, | ||
| title: `Restarted all apps in ${configToRun.name}`, | ||
| }); | ||
|
|
||
| // Return to Raycast root | ||
| setTimeout(() => popToRoot(), 1500); | ||
| } catch (error) { | ||
| await showToast({ | ||
| style: Toast.Style.Failure, | ||
| title: "Failed to restart apps", | ||
| message: String(error), | ||
| }); | ||
| setTimeout(() => popToRoot(), 1500); | ||
| } | ||
| } | ||
|
|
||
| executeRestart(); | ||
| }, [configId]); |
There was a problem hiding this comment.
logic: Effect runs on every configId change but doesn't clean up pending timeouts on unmount
| useEffect(() => { | |
| async function executeRestart() { | |
| try { | |
| // First, migrate configs if needed | |
| await migrateConfigsIfNeeded(); | |
| if (!configId) { | |
| await showToast({ | |
| style: Toast.Style.Failure, | |
| title: "Missing configuration ID", | |
| }); | |
| setTimeout(() => popToRoot(), 1500); | |
| return; | |
| } | |
| // Get all configs | |
| const configs = await getAppConfigs(); | |
| // Find the matching config | |
| const configToRun = configs.find((config) => config.id === configId); | |
| if (!configToRun) { | |
| await showToast({ | |
| style: Toast.Style.Failure, | |
| title: "Configuration not found", | |
| message: `No configuration found with ID: ${configId}`, | |
| }); | |
| setTimeout(() => popToRoot(), 1500); | |
| return; | |
| } | |
| // Show the start toast | |
| await showToast({ | |
| style: Toast.Style.Animated, | |
| title: `Restarting apps in ${configToRun.name}`, | |
| }); | |
| // Restart all apps in the configuration | |
| await restartMultipleApps(configToRun.apps); | |
| // Show success toast | |
| await showToast({ | |
| style: Toast.Style.Success, | |
| title: `Restarted all apps in ${configToRun.name}`, | |
| }); | |
| // Return to Raycast root | |
| setTimeout(() => popToRoot(), 1500); | |
| } catch (error) { | |
| await showToast({ | |
| style: Toast.Style.Failure, | |
| title: "Failed to restart apps", | |
| message: String(error), | |
| }); | |
| setTimeout(() => popToRoot(), 1500); | |
| } | |
| } | |
| executeRestart(); | |
| }, [configId]); | |
| useEffect(() => { | |
| let timeoutId: NodeJS.Timeout; | |
| async function executeRestart() { | |
| try { | |
| // First, migrate configs if needed | |
| await migrateConfigsIfNeeded(); | |
| if (!configId) { | |
| await showToast({ | |
| style: Toast.Style.Failure, | |
| title: "Missing configuration ID", | |
| }); | |
| timeoutId = setTimeout(() => popToRoot(), 1500); | |
| return; | |
| } | |
| // Get all configs | |
| const configs = await getAppConfigs(); | |
| // Find the matching config | |
| const configToRun = configs.find((config) => config.id === configId); | |
| if (!configToRun) { | |
| await showToast({ | |
| style: Toast.Style.Failure, | |
| title: "Configuration not found", | |
| message: `No configuration found with ID: ${configId}`, | |
| }); | |
| timeoutId = setTimeout(() => popToRoot(), 1500); | |
| return; | |
| } | |
| // Show the start toast | |
| await showToast({ | |
| style: Toast.Style.Animated, | |
| title: `Restarting apps in ${configToRun.name}`, | |
| }); | |
| // Restart all apps in the configuration | |
| await restartMultipleApps(configToRun.apps); | |
| // Show success toast | |
| await showToast({ | |
| style: Toast.Style.Success, | |
| title: `Restarted all apps in ${configToRun.name}`, | |
| }); | |
| // Return to Raycast root | |
| timeoutId = setTimeout(() => popToRoot(), 1500); | |
| } catch (error) { | |
| await showToast({ | |
| style: Toast.Style.Failure, | |
| title: "Failed to restart apps", | |
| message: String(error), | |
| }); | |
| timeoutId = setTimeout(() => popToRoot(), 1500); | |
| } | |
| } | |
| executeRestart(); | |
| return () => { | |
| if (timeoutId) { | |
| clearTimeout(timeoutId); | |
| } | |
| }; | |
| }, [configId]); |
| async function handleRestart(config: AppConfig) { | ||
| try { | ||
| await showToast({ | ||
| style: Toast.Style.Animated, | ||
| title: `Restarting apps in ${config.name}`, | ||
| }); | ||
|
|
||
| await restartMultipleApps(config.apps); | ||
|
|
||
| await showToast({ | ||
| style: Toast.Style.Success, | ||
| title: `Restarted apps in ${config.name}`, | ||
| }); | ||
| } catch (error) { | ||
| await showToast({ | ||
| style: Toast.Style.Failure, | ||
| title: "Failed to restart apps", | ||
| message: String(error), | ||
| }); | ||
| } | ||
| } |
There was a problem hiding this comment.
style: Consider using showFailureToast from @raycast/utils for error handling to keep the codebase consistent
| async function handleRestart(config: AppConfig) { | |
| try { | |
| await showToast({ | |
| style: Toast.Style.Animated, | |
| title: `Restarting apps in ${config.name}`, | |
| }); | |
| await restartMultipleApps(config.apps); | |
| await showToast({ | |
| style: Toast.Style.Success, | |
| title: `Restarted apps in ${config.name}`, | |
| }); | |
| } catch (error) { | |
| await showToast({ | |
| style: Toast.Style.Failure, | |
| title: "Failed to restart apps", | |
| message: String(error), | |
| }); | |
| } | |
| } | |
| async function handleRestart(config: AppConfig) { | |
| try { | |
| await showToast({ | |
| style: Toast.Style.Animated, | |
| title: `Restarting apps in ${config.name}`, | |
| }); | |
| await restartMultipleApps(config.apps); | |
| await showToast({ | |
| style: Toast.Style.Success, | |
| title: `Restarted apps in ${config.name}`, | |
| }); | |
| } catch (error) { | |
| showFailureToast(error, { title: "Failed to restart apps" }); | |
| } | |
| } |
|
|
||
| export async function addAppConfig(config: Omit<AppConfig, "id">): Promise<AppConfig> { | ||
| const configs = await getAppConfigs(); | ||
| const newConfig = { ...config, id: Date.now().toString() }; |
There was a problem hiding this comment.
style: Using Date.now() for IDs can cause collisions in rare cases. Consider using a UUID instead for guaranteed uniqueness.
| const newConfig = { ...config, id: Date.now().toString() }; | |
| const newConfig = { ...config, id: crypto.randomUUID() }; |
| async function handleSubmit(values: { name: string; bundleId: string; delay: string }) { | ||
| try { | ||
| const delay = parseInt(values.delay, 10); | ||
|
|
||
| if (isNaN(delay) || delay < 0) { | ||
| throw new Error("Delay must be a positive number"); | ||
| } |
There was a problem hiding this comment.
style: Add validation for maximum delay value (e.g. 10000ms) to prevent excessive delays that could confuse users.
| </ActionPanel> | ||
| } | ||
| > | ||
| <Form.TextField id="name" title="Name" placeholder="App Name" defaultValue={config?.name} autoFocus /> |
There was a problem hiding this comment.
style: Add validation for empty name field - an app config should not be saved without a name.
| <Form.TextField id="name" title="Name" placeholder="App Name" defaultValue={config?.name} autoFocus /> | |
| <Form.TextField id="name" title="Name" placeholder="App Name" defaultValue={config?.name} autoFocus required /> |
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
|
This pull request has been automatically closed due to inactivity. Feel free to comment in the thread when you're ready to continue working on it 🙂 You can also catch us in Slack if you want to discuss this. |

Description
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder