Skip to content

Conversation

@janosorcsik
Copy link
Contributor

Description

Replaced the ⁠qs package with ⁠query-string to automatically exclude empty strings and null values. Possible fix for #24256

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: things Issues related to the things extension AI Extension platform: macOS OP is contributor The OP of the PR is a contributor of the extension labels Jan 7, 2026
@raycastbot
Copy link
Collaborator

raycastbot commented Jan 7, 2026

Thank you for your contribution! 🎉

🔔 @loris @andreaselia @jfkisafk @thomaslombart @srikirank @vimtor @samuelkraft @bendrucker @vmrjnvc @dinocosta 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.

📋 Quick checkout commands
BRANCH="skip-empty-string-from-stringify"
FORK_URL="https://github.com/janosorcsik/extensions.git"
EXTENSION_NAME="things"
REPO_NAME="extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

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

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 7, 2026

Greptile Summary

Replaced the qs package with query-string to automatically exclude empty strings and null values from URL query parameters. This fixes issue #24256 where AI-generated to-dos failed to create because the AI was generating JSON with empty string values for unused fields, which were being included in the Things URL scheme (e.g., deadline=&when=). Things 3 does not handle empty values for certain parameters gracefully, causing silent failures.

The implementation adds a stringifyConfig object with skipNull: true and skipEmptyString: true options, ensuring only non-empty values are included in the query string. This is applied to all URL construction functions (addTodo, addProject, updateTodo, updateProject).

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is straightforward, well-targeted, and solves a specific bug. The query-string package is a well-maintained alternative to qs and the configuration properly excludes empty/null values as intended. The implementation is consistent across all URL construction functions and doesn't introduce breaking changes.
  • No files require special attention

Important Files Changed

Filename Overview
extensions/things/src/api.ts Replaced qs with query-string package and configured to skip null/empty values, fixing AI-generated to-do creation bug
extensions/things/package.json Updated dependency from qs to query-string v9.3.1

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 7, 2026

Greptile's behavior is changing!

From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

@raycast-extensions-bot raycast-extensions-bot bot added the Approved Approved by a user label Jan 8, 2026
@0xdhrv
Copy link
Contributor

0xdhrv commented Jan 8, 2026

Hey @janosorcsik 👋

Could you look into the suggestions from @bendrucker ?

I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊

Feel free to contact me here or at Slack if you have any questions.

@0xdhrv 0xdhrv marked this pull request as draft January 8, 2026 03:39
@janosorcsik janosorcsik marked this pull request as ready for review January 8, 2026 07:29
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.

Looks good to me, approved 🔥

@raycastbot raycastbot merged commit 2254464 into raycast:main Jan 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Published to the Raycast Store:
https://raycast.com/loris/things

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

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

@janosorcsik janosorcsik deleted the skip-empty-string-from-stringify branch January 8, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Extension Approved Approved by a user extension fix / improvement Label for PRs with extension's fix improvements extension: things Issues related to the things extension OP is contributor The OP of the PR is a contributor of the extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants