Ticktick full rewrite
Summary
This PR is a major update to the existing TickTick extension. I originally built a separate extension (ticktick-plus) with significantly expanded functionality, but after discussing with the Raycast team, we agreed the right approach was to bring all of these improvements into the existing extension rather than publishing a competing one.
What's Changed
Authentication — complete rewrite
- Replaced the AppleScript bridge (required TickTick desktop app to be installed) with a direct OAuth 2.0 connection to the TickTick API via the Raycast PKCE proxy
- Users no longer need to install the TickTick macOS app or enter any credentials — they just click "Sign in with TickTick"
- All commands are wrapped with
withAccessTokenfrom@raycast/utilsusingOAuthService— single native Raycast overlay, no multiple browser tabs - Token storage handled by Raycast's secure keychain via
OAuth.PKCEClient
16 New Commands
| Command | Description |
|---|---|
| Overdue | Tasks past their due date |
| Projects | Browse tasks by project |
| Tags | Browse tasks by tag |
| Smart Lists | Execute TickTick smart list filters |
| Eisenhower Matrix | Tasks organized by urgency × importance quadrants |
| Completed | Recently completed tasks (last 30 days) |
| Habits | Track and check in habits with 7-day history and streaks |
| Pomodoro | Focus timer synced bidirectionally with TickTick API |
| Focus Stats | Pomodoro and focus session statistics |
| Templates | Create tasks from TickTick templates |
| Trash | View and restore deleted tasks |
| Manage Projects | Create, rename, archive, or delete projects |
| Manage Tags | Create, rename, and delete tags |
| Menu Bar | Live timer, overdue count, quick actions — updates every 10s |
| Background Alerts | Checks overdue/urgent tasks and Pomodoro completion every 5 min |
| Disconnect Account | Remove stored tokens and re-authenticate |
Existing Commands — improved
- Today / Inbox / Next 7 Days / Search — now use direct API instead of AppleScript, faster and more reliable
- Add Task / Quick Add — now support tags, priority, due date, and project selection
New Features
- Dual API support — prefers V2 API (
/api/v2/*), gracefully falls back to V1 (/open/v1/*) for all endpoints - Smart inbox detection — 7-step fallback strategy to reliably identify the Inbox project across different account types
- Pomodoro sync — work sessions synced to TickTick's focus API; pause/resume/finish operations tracked; timer persists across Raycast restarts via LocalStorage
- Background alerts — queued in LocalStorage, displayed as toasts when Raycast opens; menu bar caches counts for lightweight reads
- Task detail view — full task info including subtasks with toggle actions, comments, move between projects
- Raycast AI tools preserved —
get-tasks,add-task,get-listsupdated to use the new API
Code Quality
- Full TypeScript with strict types for all API responses
- Removed
run-applescriptdependency entirely - Added
date-fnsfor date handling
Breaking Changes
- Requires re-authentication — existing users will see the "Sign in with TickTick" overlay once after updating; all previous AppleScript-based tokens are no longer used
- TickTick desktop app no longer required
Test Plan
- [ ] Fresh install → "Sign in with TickTick" appears → one click → authenticated
- [ ] Today / Inbox / Next 7 Days show correct tasks
- [ ] Quick Add creates a task visible in TickTick web/app
- [ ] Pomodoro starts, ticks, completes, and appears in TickTick Focus Stats
- [ ] Habits shows active habits and allows check-in for today
- [ ] Menu Bar shows live timer and overdue count
- [ ] Background Alerts fires after 5 min and shows toast notifications
- [ ] Disconnect Account clears tokens and re-prompts on next command
- [ ] Raycast AI:
@ticktick get tasks in todayreturns task list - [ ] Existing users: after update, re-auth works and data loads correctly
Thank you for your contribution! :tada:
🔔 @viduycheung @Alireza29675 @Yakitrak @ridemountainpig 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="ticktick-full-rewrite"
FORK_URL="https://github.com/ysrazsingh/extensions.git"
EXTENSION_NAME="ticktick"
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
We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.
Greptile Summary
This is a major rewrite of the TickTick extension that replaces the AppleScript bridge with a native Raycast OAuth 2.0 flow, adds 16 new commands (Pomodoro, Habits, Eisenhower Matrix, Menu Bar, etc.), and preserves a dual-mode design so existing AppleScript users are not broken.
- Previous bugs flagged in review (duplicate
isDueDateOverdue, discarded Pomodoro session IDs, overdue-date boundary errors) are all resolved in this revision. - The
defaultValueforintegrationModeis\"applescript\", which means every fresh install and every existing user upgrade starts in AppleScript mode — the OAuth overlay the test plan describes will never appear under this default. - Every command file (22 total) calls
getPreferenceValues<{ integrationMode: string }>()with a manual inline type instead of the auto-generatedPreferencestype fromraycast-env.d.ts, violating the repo rule against hand-written preference types.
Confidence Score: 3/5
Functionally correct in AppleScript mode; the OAuth path works once users opt in, but the default leaves the extension's headline new feature invisible to all fresh installs.
The core logic improvements (date comparisons, Pomodoro lifecycle, dual-API sync) are solid and previously reported bugs are fixed. The integrationMode default hard-wires every install into AppleScript mode, making the OAuth flow the primary motivation for this PR entirely opt-in with no nudge. The test plan's first step will fail as written.
package.json (the integrationMode default) and quick-add.tsx (dead Arguments interface without a matching arguments entry in the command definition).
Important Files Changed
| Filename | Overview |
|---|---|
| extensions/ticktick/package.json | Major restructure adding 16+ commands and OAuth preference; default mode set to "applescript" contradicts the PR's stated OAuth-first goal and will break the documented test plan |
| extensions/ticktick/src/api/client.ts | New HTTP client with token refresh on 401; clean and correct |
| extensions/ticktick/src/api/oauth.ts | PKCE OAuth setup via Raycast proxy with sensible 30-day default expiry fallback; correct pattern |
| extensions/ticktick/src/api/pomodoro.ts | Lifecycle functions now accept and use the sessionId returned by startTickTickPomodoro; prior session-ID bug is resolved |
| extensions/ticktick/src/components/TaskItem.tsx | Single correct isDueDateOverdue using isBefore/startOfToday; prior duplicate-function compilation error is resolved |
| extensions/ticktick/src/background-check.tsx | Correctly uses isBefore/startOfToday for overdue check; no-ops in AppleScript mode; throttles API calls to every 15 minutes |
| extensions/ticktick/src/quick-add.tsx | Dead Arguments interface — command has no arguments in package.json so props.arguments.title is always undefined; remove or wire up |
| extensions/ticktick/src/today.tsx | Correct isToday filter for API mode; getPreferenceValues typed manually instead of using auto-generated Preferences type (pattern repeated across 22 files) |
| extensions/ticktick/src/lib/pomodoro-engine.ts | Properly persists and reuses ticktickSessionId across pause/resume/finish/drop; prior discard-and-regenerate bug is fixed |
| extensions/ticktick/src/api/sync.ts | Dual V2/V1 sync with inbox fallback chain; clean merging logic |
Reviews (11): Last reviewed commit: "Merge branch 'raycast:main' into ticktic..." | Re-trigger Greptile
Thanks for all the work on this, @ysrazsingh — I appreciate the effort.
I don't plan to merge a full rewrite to OAuth / the TickTick REST API. As I noted in #22551, that approach requires a separate login flow, can't match all current extension features, and is a better fit for a new extension rather than replacing this one.
This extension is intentionally built around local integration with the TickTick macOS app via AppleScript. I'm open to smaller PRs that improve that path, but not an auth/architecture swap.
If you want to pursue the API-based version, publishing it separately (e.g. as ticktick-plus) is the right direction.
Thanks again.
Hi @viduycheung, @0xdhrv, and @pernielsentikaer
I'd appreciate some clarification so I can move forward in the direction that best aligns with the Raycast extension guidelines.
A little context:
- I first built a separate OAuth/API-based extension (
ticktick-plus): #28941. - During the review of that PR, I was asked to contribute to the existing TickTick extension instead to avoid having two extensions with overlapping functionality.
- Based on that feedback, I shifted my effort toward updating the existing extension rather than maintaining a separate one.
- Now, after opening the PR against the existing extension (#29135), I'm seeing feedback that a full OAuth/API rewrite isn't something that will be merged because the current extension is intentionally designed around AppleScript and local integration.
From my perspective, these two directions seem to conflict:
- One review suggested not creating a separate extension and instead enhancing the existing one.
- The current maintainer prefers keeping the existing architecture and suggests publishing the OAuth/API implementation separately.
Before I continue investing more time, could you help clarify which path the Raycast team would actually prefer?
- Continue improving the existing AppleScript-based extension.
- Continue the OAuth/API implementation as a separate extension.
- Some other approach that better aligns with the project goals.
I'm happy to contribute in whichever direction the maintainers agree is best. I just want to avoid duplicating work or implementing something that ultimately won't fit the intended roadmap.
For reference, my previous PR is: #28941.
Thanks everyone for taking the time to review my work and help clarify the preferred direction.
T-Rex pricing update — T-Rex was free through June 2026. Effective July 1, 2026, T-Rex adds 2 credits on top of the standard 1-credit review (3 total). T-Rex settings
that approach requires a separate login flow, can't match all current extension features,
Hey @viduycheung 👋
Thanks for taking time to reply ❤️
Can you elaborate on what features won't be covered with this approach?
Also, since TickTick is cross-platform, it should support Windows on Raycast too, especially because the community is asking for it.
Thanks @ysrazsingh for all the amazing contributions 🔥
We'll let you know shortly about the best course forward.
There’s also an important account/ecosystem difference. The TickTick macOS app supports DIDA (滴答清单) accounts, but your implementation is built on the TickTick Open API, which is separate from the DIDA365 Open API. In practice, that means an OAuth/API-based extension would not work for DIDA users, while the current AppleScript-based integration works with whichever account the user is already signed into in the desktop app.
The AppleScript approach also has a few practical advantages for this extension:
- No extra login — users don’t need a separate Raycast authentication flow; the extension simply talks to the TickTick app they’re already using.
- Official sync model — task data follows TickTick’s own sync pipeline, rather than relying on a parallel API integration.
- Works offline — as long as the desktop app has local data available, the extension continues to work when the user is offline.
that approach requires a separate login flow, can't match all current extension features,
Hey @viduycheung 👋
Thanks for taking time to reply ❤️
Can you elaborate on what features won't be covered with this approach?
Also, since TickTick is cross-platform, it should support Windows on Raycast too, especially because the community is asking for it.
Thanks @ysrazsingh for all the amazing contributions 🔥
We'll let you know shortly about the best course forward.
Wouldn't it be possible to have a preference in settings that can toggle between API/AppleScript?
That's a great suggestion, thanks for the idea. I'd be happy to add a settings preference to toggle between AppleScript and API/OAuth implementations, defaulting to AppleScript so existing behavior (offline support, DIDA accounts, no separate login) stays unchanged for current users.
The API/OAuth path would then be an opt-in for users who don't have the desktop app installed or want the additional features (Habits, Pomodoro, Eisenhower Matrix, menu bar).
I can put this together - let me know if this approach sounds good. Looking forward to any suggestions or a reply from @viduycheung on this before I start implementation.
If this isn't the right path forward, we're also happy to publish this as ticktick-plus separately, whichever works best for you all.
Thanks @ysrazsingh — I see the value in the toggle idea, but maintaining both AppleScript and API paths in one extension feels like unnecessary overhead.
I'm fine with migrating the TickTick extension to the Open API. My main concern is DIDA (滴答清单) users: the TickTick Open API doesn't cover DIDA accounts, so they'd lose a working integration.
If we go ahead with the API rewrite for TickTick, can we publish a separate DIDA extension to serve those users? Happy to hear what @0xdhrv and the Raycast team think.
Thanks @ysrazsingh — I see the value in the toggle idea, but maintaining both AppleScript and API paths in one extension feels like unnecessary overhead.
I'm fine with migrating the TickTick extension to the Open API. My main concern is DIDA (滴答清单) users: the TickTick Open API doesn't cover DIDA accounts, so they'd lose a working integration.
If we go ahead with the API rewrite for TickTick, can we publish a separate DIDA extension to serve those users? Happy to hear what @0xdhrv and the Raycast team think.
We do have a separate Windows only extension for DIDA
But, I will check with Per and share what's the best way forward, thanks for the time and feedback
Hey @0xdhrv, & @pernielsentikaer, following up on this PR.
Based on the feedback about the OAuth architecture swap conflicting with DIDA365 compatibility, I've implemented the preference-toggle solution we discussed instead. This should resolve the compatibility concern while still addressing the original issue.
I've also fixed the two bugs that were flagged:
- Filename casing mismatch
- Alert throttle issue
Would appreciate a review whenever you get a chance. Let me know if anything else needs adjusting.
Hi @0xdhrv @pernielsentikaer, following up here since it's been a few days without a response. The preference-toggle approach is implemented and the flagged bugs are fixed - let me know if a review is possible soon, or if there's anything blocking it on your end. Thanks!
Hey @viduycheung 👋
Thoughts on the updates made by @ysrazsingh ?
@0xdhrv @ysrazsingh
I’ve carefully tried the current implementation, and I don’t think it’s appropriate to merge this rewrite back into the official TickTick extension.
Our own roadmap We also plan to rewrite the extension to support more features and platforms. With our own OAuth developer account, we’ll be able to offer stronger capabilities—we’re just constrained by limited engineering bandwidth right now and haven’t started that work yet.
Brand / product boundary For our team, we don’t want any Dida-related wording or positioning to appear in the TickTick extension. That’s a hard line for us. Our current direction is to split out a separate Dida extension, and have our Mac client guide users who are on the Dida service toward that new extension—rather than explicitly presenting two different services to users inside the TickTick plugin.
Quality & ownership This rewrite still has quite a few bugs. As the official extension with a meaningful user base, we have a responsibility to protect the experience for those users, so any features we ship ourselves go through careful manual testing. Smaller, incremental community improvements are something we’re happy to consider merging. A full rewrite, however, is better pursued as a separate extension rather than replacing the official one.
Thanks for checking, @0xdhrv. Given @viduycheung's response, it sounds like a full rewrite won't be merged here regardless of the toggle/bug fixes. Is that the final call from the Raycast team, or is there still room to discuss? If not, I'll go ahead and publish this as a separate ticktick-plus extension as originally suggested in #28941 just want to confirm that's fine to move forward with rather than continuing to wait.
Thanks for checking, @0xdhrv. Given @viduycheung's response, it sounds like a full rewrite won't be merged here regardless of the toggle/bug fixes. Is that the final call from the Raycast team, or is there still room to discuss? If not, I'll go ahead and publish this as a separate ticktick-plus extension as originally suggested in #28941 just want to confirm that's fine to move forward with rather than continuing to wait.
Yes, go ahead with the TickTick Plus extension. Thanks for your patience 🤝
Please share the PR link here and I’ll prioritize reviewing it. Also add a note in the PR explaining the differences from the current extension so it's clearer. Thanks
Also, worth noting: https://github.com/raycast/extensions/pull/26002
@DanielLankry if you want you can collaborate with @ysrazsingh on the new API PR he will share, and I can add you as a contributor too
For anyone following this thread: As per the discussion above, I've opened a new PR for the separate ticktick-plus extension: #29576. @DanielLankry, looping you in there too per @0xdhrv's note about collaborating. Closing out further discussion on this thread since it's specific to the official extension.