Skip to content

fix(server): use a Cursor todo's title when its content is blank - #5073

Merged
maria-rcks merged 1 commit into
pingdotgg:mainfrom
arhxam:fix/cursor-todo-blank-content-fallback
Aug 4, 2026
Merged

fix(server): use a Cursor todo's title when its content is blank#5073
maria-rcks merged 1 commit into
pingdotgg:mainfrom
arhxam:fix/cursor-todo-blank-content-fallback

Conversation

@arhxam

@arhxam arhxam commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

What Changed

extractTodosAsPlan (apps/server/src/provider/acp/CursorAcpExtension.ts) now uses || instead of ?? when falling back from a todo's content to its title. Added a regression test.

Why

The step was derived with todo.content?.trim() ?? todo.title?.trim() ?? "". ?? only falls back on null/undefined, so a todo whose content is present but empty or whitespace ("" / " ") keeps the empty string and never falls back to title — and is then dropped by the if (step === "") return [] guard. Both content and title are optional in CursorTodo, so a blank-content-with-title todo is a valid payload that silently loses a real plan step.

Using || makes a blank content fall back to the title (matching the trailing || "" default's intent); a missing/blank content with no title still yields "" and is dropped as before. The added test fails before and passes after.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes

Open in Devin Review

Note

Low Risk
Small parsing fix in Cursor ACP todo-to-plan mapping with a targeted test; no auth, security, or broad behavioral surface beyond plan UI updates from cursor/update_todos.

Overview
extractTodosAsPlan now picks plan step text with || instead of ?? when combining content and title. Empty or whitespace-only content no longer blocks fallback to title, so those todos are not dropped by the empty-step guard.

A regression test covers blank content with a real title, whitespace content, and both fields empty.

Reviewed by Cursor Bugbot for commit bc08c18. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix extractTodosAsPlan to use a Cursor todo's title when content is blank

In CursorAcpExtension.ts, the fallback from content to title used ?? (nullish coalescing), so whitespace-only content suppressed a valid title. Switching to || (logical OR) ensures blank or whitespace-only content falls back to the title, preventing those todos from being silently dropped from the plan.

Macroscope summarized bc08c18.

…lank

`extractTodosAsPlan` derives each plan step with
`todo.content?.trim() ?? todo.title?.trim() ?? ""`. Because `??` only falls
back on null/undefined, a todo whose `content` is present but empty or
whitespace (`""` / `"   "`) keeps the empty string and never falls back to the
`title`, so a real step is dropped by the `if (step === "") return []` guard
below. Both `content` and `title` are optional in `CursorTodo`, so a
blank-content-with-title todo is a valid payload.

Use `||` so a blank content falls back to the title, matching the evident
intent (and the trailing `|| ""` default). A missing/blank content with no
title still yields "" and is dropped as before. Added a regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: afb29bad-d2f4-4f5f-a0d5-80a9e655237e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jul 31, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved bc08c18

Straightforward bug fix changing nullish coalescing (??) to logical OR (||) so that blank content correctly falls back to the title field. The change is well-tested and self-contained.

You can customize Macroscope's approvability policy. Learn more.

@maria-rcks
maria-rcks merged commit 82b76e2 into pingdotgg:main Aug 4, 2026
17 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 4, 2026
## What's Changed
* fix(web): increase tooltip z-index to overlay popovers and menus by @naMqe-h in pingdotgg/t3code#5326
* fix(server): use a Cursor todo's title when its content is blank by @arhxam in pingdotgg/t3code#5073
* fix(ssh): isolate managed tunnel processes by @nateEc in pingdotgg/t3code#4347
* fix(server): scrub AppImage XDG_DATA_DIRS and GSETTINGS_SCHEMA_DIR from terminals by @arhxam in pingdotgg/t3code#5075

## New Contributors
* @naMqe-h made their first contribution in pingdotgg/t3code#5326

**Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260804.997...v0.0.32-nightly.20260804.998

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260804.998
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants