Skip to content

Conversation

@thibaultsablon
Copy link

@thibaultsablon thibaultsablon commented Jan 29, 2026

Description

Flips lower and upper cases of a string. eg: from "i WILL SEND YOU THIS asap!" to "I will send you this ASAP!"
Simply copy your text, run the extension, and it will replace the selection with the flipped text or write it at the cursor, and keep it in clipboard.
Useful for those who use the caps key and toggle it wrongly.

Screencast

https://share.cleanshot.com/NZh3K1k6

Checklist

@raycastbot
Copy link
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

@thibaultsablon thibaultsablon marked this pull request as ready for review January 29, 2026 19:06
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 29, 2026

Greptile Overview

Greptile Summary

This PR adds a new CaseFlip extension that toggles uppercase and lowercase letters in text from the clipboard. The extension reads text from clipboard, flips the case of all alphabetic characters, then pastes and copies the result.

Key Changes:

  • Added new no-view command extension with proper configuration
  • Implements simple character case flipping logic
  • Uses Raycast clipboard API for reading and pasting

Issues Found:

  • Missing error handling for empty clipboard (will crash if clipboard is empty)
  • Typo in comment: "punctiation" should be "punctuation"

Confidence Score: 3/5

  • This PR has a critical bug that will crash the extension when clipboard is empty
  • The missing error handling for empty clipboard is a critical issue that will cause runtime failures. Once fixed, the extension is simple and safe.
  • Pay attention to extensions/caseflip/src/caseflip.ts for the missing error handling

Important Files Changed

Filename Overview
extensions/caseflip/src/caseflip.ts Main extension logic with typo and missing error handling for empty clipboard
extensions/caseflip/package.json Properly configured with correct dependencies and metadata

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.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@@ -0,0 +1,24 @@
import { Clipboard, showHUD } from "@raycast/api";

// Function to flip upper/lower cases but keep spaces and punctiation
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: "punctiation" should be "punctuation"

Suggested change
// Function to flip upper/lower cases but keep spaces and punctiation
// Function to flip upper/lower cases but keep spaces and punctuation

}

export default async function Command() {
const originalText: string = await Clipboard.readText(); // read current clipboard
Copy link
Contributor

Choose a reason for hiding this comment

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

Clipboard.readText() can return an empty string or potentially fail. The extension will crash if the clipboard is empty or contains non-text content.

Add error handling:

const originalText = (await Clipboard.readText()) || "";
if (!originalText) {
  await showHUD("No text in clipboard");
  return;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants