Skip to content

Update miro extension#17727

Merged
raycastbot merged 7 commits intoraycast:mainfrom
Silv-1:ext/miro
Mar 27, 2025
Merged

Update miro extension#17727
raycastbot merged 7 commits intoraycast:mainfrom
Silv-1:ext/miro

Conversation

@Silv-1
Copy link
Contributor

@Silv-1 Silv-1 commented Mar 10, 2025

Description

Screencast

Checklist

- Remove unused MiroApi
- Update package.json publish command
- Remove owner
- Add owner
- Add command to list recent boards
- Initial commit
@Silv-1 Silv-1 requested a review from mathieudutour as a code owner March 10, 2025 13:18
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: miro Issues related to the miro extension labels Mar 10, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Mar 10, 2025

Thank you for your contribution! 🎉

🔔 @felixhaeberle @mathieudutour you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

Due to our current reduced availability, the initial review may take up to 10-15 business days

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds a new "Recent Boards" command to the Miro extension and reorganizes the board listing functionality with improved component structure.

  • The changelog entry for "Add command to show recent boards" should use {PR_MERGE_DATE} instead of "2025-03-10"
  • The command name change from list-boards to list-my-boards in package.json may affect users' saved preferences - consider keeping the old name
  • authorize() calls in list-my-boards.tsx and list-recent-boards.tsx should be wrapped in try-catch blocks
  • Could simplify error toast handling in list-boards.tsx by using showFailureToast from @raycast/utils
  • Since there are multiple commands, consider adding subtitles with "Miro" to differentiate them in the root search

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

6 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +31 to 36
{
"name": "list-recent-boards",
"title": "Recent Boards",
"description": "Search & Open recent Miro boards in seconds",
"mode": "view"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider adding a subtitle with 'Miro' to distinguish commands when multiple extensions are shown together

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I followed the previous structure of descriptions.

toast.style = Toast.Style.Success;
} catch (err) {
console.error(err);
toast.title = "Could not remove member.";
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Error message 'Could not remove member' is incorrect for board deletion operation

Suggested change
toast.title = "Could not remove member.";
toast.title = "Could not delete board.";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did not touch this implementation, only moved it.

Comment on lines +62 to +76
const toast = await showToast({ style: Toast.Style.Animated, title: "Deleting board..." });
try {
await mutate(miro.deleteBoard(item.id), {
optimisticUpdate(data) {
return data.filter((x) => x.id !== item.id);
},
});
toast.title = "🎉 Board deleted!";
toast.style = Toast.Style.Success;
} catch (err) {
console.error(err);
toast.title = "Could not remove member.";
toast.message = String(err);
toast.style = Toast.Style.Failure;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Could be simplified using showFailureToast from @raycast/utils

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did not touch this implementation, only moved it.

Comment on lines +7 to +10
async () => {
await miro.authorize();
return await miro.fetchRecentItems();
},
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: API calls should be wrapped in try-catch to handle potential auth and network errors gracefully

Suggested change
async () => {
await miro.authorize();
return await miro.fetchRecentItems();
},
async () => {
try {
await miro.authorize();
return await miro.fetchRecentItems();
} catch (error) {
showFailureToast(error instanceof Error ? error.message : "Failed to fetch recent boards");
return [];
}
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copied the implementation from list-boards.tsx and adapted it for recent boards. Did not do any refactoring.

Comment on lines +105 to +106
async function fetchItems(url: RequestInfo): Promise<Board[]> {
const response = await fetch(url, {
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: fetchItems should call authorize() first to ensure valid auth token

Suggested change
async function fetchItems(url: RequestInfo): Promise<Board[]> {
const response = await fetch(url, {
async function fetchItems(url: RequestInfo): Promise<Board[]> {
await authorize();
const response = await fetch(url, {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did not touch this implementation, only moved it.

@pernielsentikaer
Copy link
Collaborator

Looks good to me, @felixhaeberle do you want to check this?

@pernielsentikaer pernielsentikaer self-assigned this Mar 14, 2025
@Silv-1
Copy link
Contributor Author

Silv-1 commented Mar 26, 2025

@pernielsentikaer would you consider approving, or do you think we should wait a bit longer?

@felixhaeberle
Copy link
Contributor

THANKS @Silv-1 for taking this over <3

Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

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

Hi 👋

Looks good to me, approved 🔥

@raycastbot raycastbot merged commit 6d4a2e7 into raycast:main Mar 27, 2025
2 checks passed
@github-actions
Copy link
Contributor

Published to the Raycast Store:
https://raycast.com/felixhaeberle/miro

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@Silv-1 Silv-1 deleted the ext/miro branch April 21, 2025 13:43
@Silv-1 Silv-1 mentioned this pull request May 22, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: miro Issues related to the miro extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants