Skip to content

fix(web): keep nested task states out of parent bullets - #11477

Merged
shivamhwp merged 3 commits into
pingdotgg:mainfrom
d5cr:t3code/fix-nested-checklist-copy
Sep 25, 2026
Merged

shivamhwp merged 3 commits into
pingdotgg:mainfrom
d5cr:t3code/fix-nested-checklist-copy

Conversation

@dominic-r

@dominic-r dominic-r commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Limit task checkbox lookup to a list item's direct input or the input in its direct paragraph. Copying a plain parent with a checked child now keeps - Parent and its nested - [x] Child.

Why

The descendant query found checkboxes belonging to nested items. The scoped selector matches the renderer's tight and loose list markup while preserving each item's own task state and indentation.

Validation

  • Clipboard suite: 23 tests pass, including 12 new cases covering plain parents, opposite parent/child task states, and all tight/loose combinations. The four plain-parent regressions fail before the fix.
  • Targeted lint, formatting, web typecheck, and git diff --check pass.
  • Chromium recording verifies real Ctrl+C/Ctrl+V in an isolated T3 chat containing the reported Markdown. The plain-text textarea is a recording aid; the chat copy handler is unchanged except for this selector.

UI Changes

Before/after video

Before After
Parent incorrectly inherits child's task state Parent stays a plain bullet with a checked child

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Model: GPT-6. Harness: Codex.

Summary by CodeRabbit

  • Bug Fixes

    • Improved Markdown copying for nested task-list items across tight and loose parent-child layouts.
    • Checkboxes are recognized as task markers only when directly associated with a list item or its paragraph.
    • Nested checkboxes elsewhere in an item’s content no longer incorrectly appear as [x] or [ ] task markers.
  • Tests

    • Added coverage for nested task lists with checked and unchecked states across different layouts.

@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 Sep 12, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 0ab0cd6

Macroscope's review found this PR approvable — This is a small, self-contained clipboard serialization fix that scopes task-checkbox lookup to the current list item and includes comprehensive regression coverage for nested tight and loose lists. Its runtime impact is limited to copied Markdown output, with no changes to rendering, task updates, defaults, or production infrastructure.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c611d530-372a-4e19-8b8b-a965c293c499

📥 Commits

Reviewing files that changed from the base of the PR and between ff11a0e and 589e43b.

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e25fa6d1-e0ff-4681-89b6-4f67ca3f261b

📥 Commits

Reviewing files that changed from the base of the PR and between 0ab0cd6 and c887211.

📒 Files selected for processing (1)
  • apps/web/src/markdown-clipboard.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change restricts task-list checkbox detection to direct children of list items or their paragraphs. Tests add checkbox state support, recursive selector matching, and coverage for nested tight and loose list layouts.

Changes

Task-list serialization

Layer / File(s) Summary
Checkbox serialization and coverage
apps/web/src/markdown-clipboard.ts, apps/web/src/markdown-clipboard.test.ts
serializeListItem recognizes only direct task-list checkboxes. The test double supports checkbox state and nested selector matching. Parameterized tests cover nested tight and loose layouts with checked and unchecked items.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: ipanasenko

Merge Risk: ⚪ Minimal · up to c8872

Task-list copy behavior preserves parent and nested checkbox formatting across the covered layouts, with no remaining merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main fix: nested task states no longer affect parent bullets.
Description check ✅ Passed The description includes What Changed, Why, UI Changes, validation details, evidence, and a completed checklist. It clearly explains the problem, scope, solution, and verification.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@dominic-r

Copy link
Copy Markdown
Contributor Author

@coderabbitai The docstring-coverage warning does not require a code change here. FakeElement.querySelector already documents its limited selector support, and serializeListItem is an existing private serializer whose API is unchanged. The repository asks comments to explain non-obvious usage or constraints and discourages narrating behavior already clear from code. Adding docstrings solely to satisfy a coverage percentage would expand this focused selector fix without helping readers. Please acknowledge this advisory as non-blocking under those repository instructions.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@dominic-r Acknowledged. This docstring-coverage advisory is non-blocking.

FakeElement.querySelector already documents the relevant selector constraint. serializeListItem remains a private serializer with no API change. Additional docstrings would repeat behavior that is clear from the code and expand the scope of this focused fix.


✏️ Learnings added
Learnt from: dominic-r
URL: https://github.com/pingdotgg/t3code/pull/11477

Timestamp: 2026-09-12T23:11:33.386Z
Learning: For the Markdown clipboard code in `apps/web/src/markdown-clipboard.test.ts` and `apps/web/src/markdown-clipboard.ts`, do not request docstrings solely to increase docstring-coverage metrics when `FakeElement.querySelector` already documents its limited selector support and `serializeListItem` is a private serializer with an unchanged API. Repository guidance prefers comments for non-obvious usage or constraints and discourages narration of behavior that is clear from code.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

@dominic-r
dominic-r force-pushed the t3code/fix-nested-checklist-copy branch 2 times, most recently from e5a10d7 to c68fa20 Compare September 15, 2026 23:12
@dominic-r
dominic-r force-pushed the t3code/fix-nested-checklist-copy branch from c68fa20 to 748373c Compare September 15, 2026 23:15
@shivamhwp
shivamhwp merged commit 20f0ff1 into pingdotgg:main Sep 25, 2026
20 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 25, 2026
## What's Changed
* feat(web): control Android foldables in the Device panel by @juliusmarminge in pingdotgg/t3code#13534
* fix(mcp): preview snapshots fit in the agent's tool output again by @t3dotgg in pingdotgg/t3code#13558
* fix(web): paste after clicking away from the composer lands in it again by @t3dotgg in pingdotgg/t3code#13553
* feat(desktop): keep running threads synced in the background by @t3dotgg in pingdotgg/t3code#13554
* fix(mcp): preview errors tell agents what to do instead by @t3dotgg in pingdotgg/t3code#13559
* feat(web): agents working banner links to the Agents panel by @t3dotgg in pingdotgg/t3code#13572
* fix(web): size the Android fold model from the inner display by @juliusmarminge in pingdotgg/t3code#13574
* fix(clients): a preview app no longer knocks the desktop's own server offline by @t3dotgg in pingdotgg/t3code#13577
* fix(web): keep nested task states out of parent bullets by @dominic-r in pingdotgg/t3code#11477
* feat(release): ship a Linux .deb that updates itself by @t3dotgg in pingdotgg/t3code#13575
* perf(desktop): cache compiled JavaScript between launches by @t3dotgg in pingdotgg/t3code#13501
* fix(dev): one t3.json setup action that works on every OS by @t3dotgg in pingdotgg/t3code#13589
* fix(web): new worktree threads no longer say "checkout" during setup by @t3dotgg in pingdotgg/t3code#13590
* fix(desktop): `t3 app` keeps working after a second desktop app quits by @t3dotgg in pingdotgg/t3code#13585
* fix(usage): price Claude fast-mode requests at the fast rate by @t3dotgg in pingdotgg/t3code#13599
* fix: update OpenAI logo to current brand asset by @aaditagrawal in pingdotgg/t3code#13611
* fix(mobile): render assigned project icons in chat list by @SunkenInTime in pingdotgg/t3code#12810

## New Contributors
* @aaditagrawal made their first contribution in pingdotgg/t3code#13611

**Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260925.2237...v0.0.43-nightly.20260925.2251

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260925.2251
@dominic-r
dominic-r deleted the t3code/fix-nested-checklist-copy branch September 25, 2026 19:55
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