You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(clickup): ClickUp task source with rate limiting, Sprint / List and status filters, and Gantt view - #29175
Orca can show tasks from GitHub, GitLab, Linear and Jira. This PR adds ClickUp as a task source. You connect ClickUp with a personal API token. Then you can see your ClickUp tasks in Orca, filter them by Sprint, List and status, and see them on a Gantt chart. Orca also stays under the ClickUp API rate limit.
What Changed
This PR builds on the ClickUp integration in #9495 by @luizeof and the rebase and fixes in #15788 by @heyramzi. Their work is the base of this PR. Both authors are credited as co-authors on the commit. I am happy to close this PR or to move these changes onto #15788 if the maintainers prefer that.
This PR adds these changes on top of that work:
Rate limiter. All ClickUp requests go through one limiter in the main process. It sends about 80 requests per minute. It reads the X-RateLimit-* headers and pauses before the budget runs out. It retries HTTP 429 with backoff, up to 3 times. It sends at most 3 requests at the same time. It shares one request when the same read is already in flight. The List hierarchy is cached for 5 minutes per Workspace. The task page shows a notice while requests wait for the rate limit.
Search. Search finds tasks by name, task ID, custom task ID or task URL. An ID or URL takes one request. Name search reads pages newest first and ranks exact ID, then name prefix, then substring.
Filters. The ClickUp task page has Space, Sprint / List and status filters. The filters are saved per Space.
Sprint / List picker. One dropdown has Current sprint, All lists, the Sprints of one sprint Folder, and all other Lists grouped by Folder. It has a search field. The default is the current Sprint of the newest sprint Folder that has a Sprint for today.
Tasks added to a Sprint. When one List is selected, Orca reads /list/{id}/task?include_timl=true. Before, /team/{id}/task?list_ids[] showed only tasks whose home List was the Sprint. Most Sprint tasks are added from other Lists, so they did not show.
Gantt view. A Gantt view shows tasks by start and due date. You can group by List or status, and use a day or week scale.
The hierarchy walk uses the Folder Lists that GET /space/{id}/folder already returns. This removes one request per Folder.
Known limits:
Name search reads at most 20 pages of tasks.
A scoped task list shows at most 500 tasks.
The new filter, picker and Gantt strings are not localized yet. They are in English only.
ClickUp workspaces often have many Spaces, Folders and Sprints. The first version loaded too many tasks and made many requests. With a personal token, users hit HTTP 429 quickly. Search also missed tasks, because it read pages oldest first and stopped after ten pages. These changes make the ClickUp source usable on a large workspace.
I will add screenshots of the filter bar, the Sprint / List picker and the Gantt view by drag and drop. Before this PR, Orca has no ClickUp task page.
Testing
I ran this work with pnpm dev on macOS against a real ClickUp workspace. I checked the Sprint / List picker, the status filter, search, the Gantt view and the rate limit notice.
pnpm lint passes.
Typecheck passes for the node, web and cli projects. I ran each project alone because the parallel run ran out of memory on my machine.
The 31 test files that this PR adds or changes pass (433 tests).
New tests cover the rate limiter, task search, task scope, the List hierarchy, the Sprint / List picker model and the scope filter model.
The full pnpm test run had failures outside ClickUp. The SSH relay, Electron browser, live shell and AppImage suites also fail on main on my machine. The cross-version e2e unit tests fail because of a stale local checkout folder. The palette performance, Codex hook and daemon repro tests pass when I run them again. session-scanner-cursor-chat-meta failed once in the full run and passes when I run it alone.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
An AI coding agent (Grok Bot) wrote most of the new code and tests. I reviewed the changes and tested them on my ClickUp workspace.
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Security: the API token stays in the existing connection storage. No token is in the code, tests or commits. The tests use made-up IDs and names.
Cross-platform: the changes are in TypeScript in the main process and renderer. There is no platform-specific code.
Performance: fewer ClickUp requests than before, because of the shared limiter, the dedupe and the cache.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
…ters and Gantt view
Adds ClickUp as a task source. This builds on the integration from stablyai#9495
by @luizeof and the rebase and fixes in stablyai#15788 by @heyramzi.
On top of that work:
- One shared main-process limiter for ClickUp requests: about 80 per
minute, adapts to the X-RateLimit headers, retries HTTP 429 with
backoff, caps concurrency at 3 and dedupes identical in-flight reads.
The List hierarchy is cached per Workspace for 5 minutes.
- Search finds tasks by name, task id, custom id or task URL.
- Space, Sprint / List and status filters on the ClickUp task page.
- A searchable Sprint / List picker. It defaults to the current Sprint
of the newest sprint Folder that has a Sprint covering today.
- A single selected List reads /list/{id}/task?include_timl=true, so
tasks added to a Sprint from other Lists are shown.
- A Gantt view grouped by List or status, with day and week scales.
Co-authored-by: Luiz Eduardo Oliveira Fonseca <[email protected]>
Co-authored-by: ramzi <[email protected]>
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Adds ClickUp as a task source across shared contracts, API operations, runtime and CLI access, and renderer workflows. The change includes task search, listing, creation, updates, comments, and connection management. It adds task browsing, detail and Gantt views, workspace task selection and linking, and board-status synchronization. It also adds provider settings, visibility migration, documentation, and agent guidance.
Severity of issue fixed: Medium
Merge Risk: Low · previous review ddc31
Comment drafts can be lost or duplicated, and scoped search and sprint filtering have edge cases. These issues should be fixed or accepted before merging.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly summarizes the primary change: adding ClickUp task-source support with rate limiting, filters, and a Gantt view.
Description check
The description is complete and relevant. It covers the user impact, implementation, rationale, linked issue, testing, AI disclosure, security, compatibility, performance, and known limits. Visual pro…
Linked Issues check
Active issue [#14622] requires ClickUp credentials and scope selection, task listing/search, core task details, workspace linking, agent reads/comments/status updates, runtime and CLI coverage, pagina…
Out of Scope Changes check
The changes remain connected to [#14622]. The UI task source, filters, Sprint/List picker, Gantt view, rate limiter, cache handling, provider settings, runtime routing, worktree metadata, status synch…
Docstring Coverage
Docstring coverage is inconclusive: files from earlier reviews still need to be rechecked within the check's analysis limits. Not blocking.
Full details: Description check
Explanation
The description is complete and relevant. It covers the user impact, implementation, rationale, linked issue, testing, AI disclosure, security, compatibility, performance, and known limits. Visual proof for the UI changes is still pending, and the full test and build status is transparently documented.
Full details: Linked Issues check
Explanation
Active issue [#14622] requires ClickUp credentials and scope selection, task listing/search, core task details, workspace linking, agent reads/comments/status updates, runtime and CLI coverage, pagination/error handling tests, and untrusted-content guidance. The reviewed changes implement token storage and connection flows, workspace/Space/Folder/List selection, task mapping and search, task details and comments, worktree linking, ClickUp runtime RPC and CLI commands, pagination/rate-limit/error handling, and automated tests across these boundaries. The bundled ClickUp guidance treats task content as untrusted and requires authorization and success checks for writes. The changes do not implement the issue's excluded OAuth, custom-field editing, time tracking, webhooks, or deep automation work.
Full details: Out of Scope Changes check
Explanation
The changes remain connected to [#14622]. The UI task source, filters, Sprint/List picker, Gantt view, rate limiter, cache handling, provider settings, runtime routing, worktree metadata, status synchronization, CLI surface, guidance, and tests support a first-class ClickUp task workflow. The shared-provider and localization changes enable that workflow. No demonstrated unrelated product feature or excluded first-pass feature appears in the reviewed changes.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
I tested this ClickUp branch on macOS in an isolated Orca profile and found two additional issues. I also addressed the existing review finding about saving unchanged fields.
I have three focused commits available on my contribution branch, based directly on this PR's current head (a7b5b90327b4). No rebase or unrelated feature work is included:
Fix the empty task Status picker. A task's single-List lookup could reuse a hierarchy summary whose statuses were empty. Full List details now use a separate five-minute cache, scoped to the token and Workspace. Added coverage for a cached summary followed by concurrent detail reads, and for switching tokens.
Allow notification dismissal over modal panels. While viewing a task, the persistent “Local develop is behind origin/develop” notification was visible but its close button could not be clicked. The fix enables only visible close controls and prevents that pointer interaction from dismissing the modal or moving its focus. Other toast actions remain blocked by the modal. This is application-wide, so I can submit it separately if preferred.
Verification: the status-cache regression and name-only save regression reproduced before their fixes. Targeted ClickUp/editor/cache tests pass; 24 related notification/modal unit tests and both light/dark notification end-to-end tests pass. Node and renderer typechecks, targeted lint, and formatting checks passed. Hidden Electron checks exercised status selection, notification dismissal with unsaved input preserved, and the actual editor/backend update conversion against fixture API data; a rename preserved server-side Markdown and the exact due timestamp. No real ClickUp tasks were modified by those automated checks.
The desktop, CLI, web, and mobile bundles built, and the compiled desktop rendered in a hidden isolated launch. The full pnpm build is not green locally: the universal macOS native-helper link is blocked because the installed Command Line Tools lack x86_64 Swift compatibility libraries. Windows, Linux, and SSH were not exercised, and I am not claiming a full-suite pass.
These commits do not address the remaining review threads or this PR's merge conflicts. Would you prefer cherry-picking the ClickUp commits into this branch and handling the generic notification fix separately?
AI assistance was used to investigate, implement, and test these fixes; I exercised the basic integration manually in my ClickUp workspace.
@degisftw Thank you for testing this and for the detailed write-up. I merged main into the branch, so the conflicts are resolved, and I fixed all the open CodeRabbit threads. That includes the save of unchanged fields (ebeb999), so your third commit may now overlap. Your Status picker cache fix is useful, and I will look at cherry-picking it. Please submit the notification dismissal fix as a separate PR, because it affects the whole application.
Split the application-wide notification dismissal fix into #32065 as requested. It is based on current main and contains no ClickUp integration changes. The issue and PR include before/after visual evidence; both light/dark paired-runtime end-to-end tests, renderer typecheck, and the changed-code quality gate passed. The ClickUp contribution branch is unchanged.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for requesting the review, and for incorporating the Status picker fix. I reviewed df675887 and the earlier Status picker/save regressions pass.
I have three remaining correctness findings below that I would fix before merging: composer-created workspaces lose the dedicated ClickUp task link, a late save can discard another task's draft, and ambiguous board ownership falls back to the local ClickUp account. These are fixes to the existing ClickUp behavior, not requests for additional features or unrelated refactoring.
Verification: 25 targeted test files / 183 tests passed at this revision. I exercised the creation/payload and board-routing paths with synthetic boundaries, and reproduced the late-save task swap using the production detail sheet and matching page selection callback in hidden Electron through CDP. The window remained hidden and unfocused. These are fixture-based reproductions, not live ClickUp-account or real SSH-host validation; no real tasks were modified. I am not claiming a full build or full-suite pass.
I can provide small, focused commits for these three issues if useful. I will leave unrelated cleanup and new functionality out, and we can agree separately on any explicitly deferred edge cases.
AI assistance was used for code inspection, the fixture checks, and drafting this review.
The reason will be displayed to describe this comment to others. Learn more.
[P1] Carry the ClickUp IDs through the final composer create call.
The quick-create request contains linkedClickUpTaskId and linkedClickUpWorkspaceId, but executeWorktreeCreation never copies them into the options bag passed to createWorktree (worktree-creation-flow-execute.ts:104-129). This builder reads them only from options, so both local IPC and runtime RPC payloads omit them. linkedWorkItem survives, but mergeWorktree reads the dedicated ClickUp fields from metadata without deriving them from that attachment, and board sync skips rows without linkedClickUpTaskId.
Trigger: select a ClickUp task in the composer and create a git workspace. It retains the generic attachment but loses the dedicated link used by board status sync and CLI current-task resolution. In a fixture run through the actual executor and payload builder, input task ID 86fixturea became absent in the backend payload while the generic ClickUp attachment remained.
Please forward the prepared request's two ClickUp fields into the final create options, so the link survives the complete creation path, including retries.
executeWorktreeCreation now forwards linkedClickUpTaskId / linkedClickUpWorkspaceId from the prepared request into the create options bag via optionalCreateWorktreeLinkOptions, so local IPC and runtime RPC payloads keep the dedicated ClickUp link (not only linkedWorkItem).
The reason will be displayed to describe this comment to others. Learn more.
Thanks, verified at f43fd13c77a. I reran the fixture through the actual creation executor and both payload builders: linkedClickUpTaskId and linkedClickUpWorkspaceId now reach both the local IPC and runtime RPC payloads, with the generic attachment retained. This addresses the reported dropped-link path. GitHub does not permit my account to resolve this thread; please mark it resolved.
The reason will be displayed to describe this comment to others. Learn more.
[P2] Do not let a late save replace the editor's current task or newer draft.
After the update and refresh finish, this unconditionally calls onTaskChanged(refreshed). The page callback unconditionally calls setSelectedTask(task) (ClickUpTaskPageSurface.tsx:375-378), so an older save can reopen a closed sheet or replace a different task's active editor.
Reproduction with deferred fixture API writes and the production sheet in hidden Electron: rename task A and click Save; close the sheet while the save is pending; open task B and type an unsaved name; resolve A's write. The sheet switches from B back to A, and B's draft disappears. The same reseeding effect can discard new edits typed into A while its save is pending, since the fields remain editable.
Keep cache/list updates independent of the active editor, and only apply save completion to the still-current task/source and applicable draft. Closing or switching the editor must not be undone by a completed request.
After a successful update/refresh, the sheet still always patchTasks the cache. onTaskChanged only runs when the sheet is still open on the same saved task and the local draft matches what was sent, so a late save cannot reopen a closed sheet, swap to another task, or wipe newer edits.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update. I verified that closing the sheet or switching from task A to task B while A's save is pending is now safe: the cache refresh still runs, and B's draft stays intact.
One part of the original finding remains at f43fd13c77a: newer edits to the same task are still discarded. draftUnchanged (lines 163-168) reads name, description, status, priority, and dueDate from the same render closure that created savedDraft. Those captured values do not change after an await, so the comparison cannot observe later typing. taskRef correctly tracks the latest task, but the draft comparison needs the latest draft too.
Reproduced using the production sheet in hidden Electron with a deferred synthetic write:
Enter Saved rename and click Save.
While the write is pending, change Name to Newer unsaved draft without closing the sheet.
Complete the write/refresh.
The input reverts to Saved rename; onTaskChanged still fires and the task effect reseeds the form. No real ClickUp tasks were changed.
The three changed regression files pass (11 tests), but the new late-save test covers only a closed sheet. Please compare against current draft state (for example, a current-draft ref or edit revision) and add a regression that edits the same task while Save is pending. Keeping this thread open for that remaining case; no additional feature scope requested.
The reason will be displayed to describe this comment to others. Learn more.
Verified at af683a77. The new draftRef tracks the latest draft, so the completion check now compares current state against the saved snapshot.
I reran the original reproduction against the production sheet in hidden Electron with a deferred synthetic write: enter Saved rename, Save, type Newer unsaved draft while pending, complete the write/refresh. The input keeps Newer unsaved draft, onTaskChanged does not fire, and the cache refresh still runs. The closed-sheet and switched-to-task-B cases also still behave correctly. All 12 tests in the three changed regression files pass. No real ClickUp tasks were modified.
This closes out the draft-loss finding; the two other findings from my review were verified earlier. Please mark this thread resolved (my account cannot resolve review threads), and thank you for the responsive fixes.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in ce7d12d. The save path reads the latest draft from a ref, so edits typed while a save is pending are no longer discarded (test: keeps edits typed while a save is pending). 12e768b also keeps the comment draft on a same-task refresh.
The reason will be displayed to describe this comment to others. Learn more.
[P2] Treat a null owner result as a refusal, not the local runtime.
The real caller supplies linearSettingsForBoardWorktree, whose contract is to return null when workspace ownership is ambiguous. The Linear sync path explicitly skips that result. Here it is passed directly to getClickUpTask, and getClickUpRuntimeTarget(null) resolves to { kind: 'local' }. If the linked task can be read locally and the column has a matching status, the subsequent update uses the local ClickUp connection as well.
Trigger: a workspace ID has local/runtime twin rows, so the owner resolver refuses to choose a host; move its board column. With the resolver returning its real refusal sentinel in a fixture run, this path performed both a local read and a local update and reported updated: 1, instead of skipping.
Please preserve the explicit null boundary and return an owner-ambiguous skip before contacting ClickUp, matching the existing Linear behavior. An omitted/default source and an explicitly refused owner must remain distinct.
syncClickUpWorktreeStatus now treats getSettingsForWorktree() === null as an owner-ambiguous skip before any ClickUp read/update, matching the Linear path. Omitted/default settings still mean local; an explicit null refusal does not.
The reason will be displayed to describe this comment to others. Learn more.
Thanks, verified at f43fd13c77a. The ambiguous-owner fixture now returns owner-ambiguous without calling any ClickUp read, List lookup, or update. The omitted-settings case still performs local sync as intended. This addresses the owner-refusal finding. GitHub does not permit my account to resolve this thread; please mark it resolved.
The reason will be displayed to describe this comment to others. Learn more.
Failed writes happen later
ClickUp writes time out after 30 seconds, but the shared limiter can wait up to 65 seconds before sending them. withLocalTimeout rejects the waiting promise without canceling the queued write. During a rate-limit pause, creating a task or posting a comment can report failure and then succeed later. Retrying can create duplicates.
Give the queue and retries a shared deadline, and cancel unsent work when that deadline expires.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in f70046c. ClickUp write RPCs now use a client timeout of the max rate-limit wait plus the request budget (65s + 30s), so a queued write no longer reports failure while still waiting on the limiter. I did not add cancel-on-timeout to the shared limiter here since that touches every caller; happy to follow up separately.
The reason will be displayed to describe this comment to others. Learn more.
Follow-up: this is now fully handled in 407a8eb. Each write gets a queue deadline (the max rate-limit wait). If it is still waiting in the request pool or the shared limiter when that passes, it is dropped unsent with a clear error, including retries after a 429. Since the client timeout is that wait plus one request timeout, a timed-out write can no longer fire later. Regression tests are in rate-limit.test.ts and request-write-deadline.test.ts.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
If a ClickUp-linked workspace has more than one possible host, ClickUp sync emits owner-ambiguous. This branch then tells the user that a Linear issue was skipped. Carry the provider on that message variant and format the ClickUp warning accordingly. (raw.githubusercontent.com)
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 9b7d0297-0018-4ef8-a70c-1c0c046222bb
Commits
Reviewing files that changed from the base of the PR and between 49c69ef and af683a7.
Files ignored due to path filters: 2
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
Files skipped from review as they are similar to previous changes: 2
src/cli/flag-help-text.ts
src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Shared constants keep mutation RPC timeouts above the limiter’s max wait so queued writes are less likely to fail while still in the queue.
Co-authored-by: Cursor <[email protected]>
Exact ID and URL matches respect task scope, search supersede tokens include the query string, and forced refresh bypasses the main-process page cache.
Co-authored-by: Cursor <[email protected]>
Thanks for the reviews. All inline comments are addressed, with replies on each thread (head 12e768b).
CodeRabbit outside-diff note on use-workspace-board-task-status-sync.ts (ambiguous owner warning said "Linear issue" for ClickUp): fixed in a7c360b. Board sync tags that message with provider ClickUp, and it now uses a ClickUp-specific string (clickUpOwnerAmbiguous).
A write waiting in the request pool or the rate limiter past the queue
budget (CLICKUP_MAX_RATE_LIMIT_WAIT_MS) is now rejected unsent, so it can
never fire after the renderer RPC timeout reported failure.
@degisftw thanks again for the testing and the commits. Status on each:
Empty Status picker: already on this branch as 78aa291 (your commit cherry-picked, with your list-hierarchy tests). getListForWorkspace uses the separate listDetailCache scoped to token and Workspace.
Toast dismissal over modals: I left it out of this PR since it is application-wide. Please send it as a separate PR and I will review it there.
Saving unedited fields: covered in ebeb999 (only changed fields are sent, no update without edits), with tests in ClickUpTaskDetailSheet.test.tsx.
Files skipped from review as they are similar to previous changes: 1
src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
… tasks
A late add-comment result from the previous task no longer clears or
re-enables the newer task's submission. Comment timestamps also use the
UI locale.
Task, search and list reads share one isCurrentRead check, which drops
the slice to 8 focus reads. Also drops the stale editor-slice-test-harness
baseline entry that upstream already removed.
Preserve ClickUp’s date-only flag before extending sprint deadlines.
findCurrentClickUpSprint compares the exact parsed deadline. A date-only ClickUp deadline at midnight therefore stops matching during the rest of its final calendar day. The "current" selection then returns no listIds, so the task scope is no longer narrowed to the current sprint.
Carry ClickUp’s due_date_time flag through ClickUpList and ClickUpSprint, and extend only deadlines where that flag is false. Do not extend every UTC-midnight deadline, because an explicitly timed midnight deadline must remain exact. Name-derived ranges already use an explicit 23:59:59 deadline and must retain that behavior.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 9ea29024-9d78-45c1-bd15-2fbb5feafd5c
Commits
Reviewing files that changed from the base of the PR and between 407a8eb and ddc3144.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Match pasted task URLs during the scoped fallback.
If a pasted task URL resolves to a task added from another home List, scopedExact is empty and this branch scans the selected List. The scan ranks tasks against the full URL, so it rejects the task even when include_timl=true returns it. Rank against the parsed task ID in this case, and cover the URL form in the fallback test. (raw.githubusercontent.com)
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Keep edits made during a pending comment submission.
If the user submits a comment and starts typing the next one before the reload finishes, isCurrent() remains true. setComment('') then deletes the newer draft. Track the comment’s edit revision at submission time. Clear the textarea only if that revision is unchanged; still update the comment list. (raw.githubusercontent.com)
Minor · Data Integrity & Integration · Quick win
Supported by static analysis
Script executed:
set -eu
sed -n '1,270p' src/renderer/src/components/ClickUpTaskDetailSheet.tsx
printf'\n--- comment UI and focused tests ---\n'
sed -n '300,390p' src/renderer/src/components/ClickUpTaskDetailSheet.tsx
sed -n '150,240p' src/renderer/src/components/ClickUpTaskDetailSheet.test.tsx
Repository: stablyai/orca
Length of output: 16518
Clear the submitted draft after a successful write, not after the reload.
clickUpAddTaskComment can succeed while clickUpTaskComments fails, so the current placement leaves the submitted draft available for duplicate submission. An unconditional clear after the write would erase edits made while the request is pending. Capture the submitted task and draft, then clear only when the write succeeds, the submission is still current, and the current task and draft still match. Perform that check before reloading comments. Keep the reload responsible only for updating the comment list.
Empty Status picker (78aa291) and 3. Save of unchanged fields (ebeb999): confirmed on my side too; verified both at the earlier head (f43fd13) and the draft-refresh behavior at af683a7.
My three review threads are also resolved on my side at af683a7 (the draft-loss finding was the last one; verification note is on the thread). The remaining PR blockers I see are the current merge conflicts and the pending CI approvals on the newest commits.
A pasted URL for a task added from another home List skipped the exact match and fell back to the scoped List scan, which ranked against the full URL and dropped the task. Rank against the parsed task ID instead and cover both URL forms in the fallback test.
Clear the comment box right after the write succeeds, and only when the submission is still current, the task is the same, and the draft is unchanged since submit. The reload now only updates the comment list, so a failed reload no longer leaves the posted text ready to resubmit.
Replace new type assertions with annotations and typed queries, extend the task page summary model without widening upstream's cast, and remove an unused settings-update-notify.ts left behind by an earlier merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Orca can show tasks from GitHub, GitLab, Linear and Jira. This PR adds ClickUp as a task source. You connect ClickUp with a personal API token. Then you can see your ClickUp tasks in Orca, filter them by Sprint, List and status, and see them on a Gantt chart. Orca also stays under the ClickUp API rate limit.
What Changed
This PR builds on the ClickUp integration in #9495 by @luizeof and the rebase and fixes in #15788 by @heyramzi. Their work is the base of this PR. Both authors are credited as co-authors on the commit. I am happy to close this PR or to move these changes onto #15788 if the maintainers prefer that.
This PR adds these changes on top of that work:
X-RateLimit-*headers and pauses before the budget runs out. It retries HTTP 429 with backoff, up to 3 times. It sends at most 3 requests at the same time. It shares one request when the same read is already in flight. The List hierarchy is cached for 5 minutes per Workspace. The task page shows a notice while requests wait for the rate limit./list/{id}/task?include_timl=true. Before,/team/{id}/task?list_ids[]showed only tasks whose home List was the Sprint. Most Sprint tasks are added from other Lists, so they did not show.GET /space/{id}/folderalready returns. This removes one request per Folder.Known limits:
Why
ClickUp workspaces often have many Spaces, Folders and Sprints. The first version loaded too many tasks and made many requests. With a personal token, users hit HTTP 429 quickly. Search also missed tasks, because it read pages oldest first and stopped after ten pages. These changes make the ClickUp source usable on a large workspace.
Linked Issue
Fixes #14622
Visual Proof
I will add screenshots of the filter bar, the Sprint / List picker and the Gantt view by drag and drop. Before this PR, Orca has no ClickUp task page.
Testing
I ran this work with
pnpm devon macOS against a real ClickUp workspace. I checked the Sprint / List picker, the status filter, search, the Gantt view and the rate limit notice.pnpm lintpasses.Typecheck passes for the node, web and cli projects. I ran each project alone because the parallel run ran out of memory on my machine.
The 31 test files that this PR adds or changes pass (433 tests).
New tests cover the rate limiter, task search, task scope, the List hierarchy, the Sprint / List picker model and the scope filter model.
The full
pnpm testrun had failures outside ClickUp. The SSH relay, Electron browser, live shell and AppImage suites also fail onmainon my machine. The cross-version e2e unit tests fail because of a stale local checkout folder. The palette performance, Codex hook and daemon repro tests pass when I run them again.session-scanner-cursor-chat-metafailed once in the full run and passes when I run it alone.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
An AI coding agent (Grok Bot) wrote most of the new code and tests. I reviewed the changes and tested them on my ClickUp workspace.
Review
Agent skill upstream boundary
Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)