Skip to content

feat(settings): add maxNestingDepth and autoFlattenOnLimit settings round-trip - #1264

Closed
easonLiangWorldedtech wants to merge 2 commits into
Zoo-Code-Org:mainfrom
easonLiangWorldedtech:up-2
Closed

feat(settings): add maxNestingDepth and autoFlattenOnLimit settings round-trip#1264
easonLiangWorldedtech wants to merge 2 commits into
Zoo-Code-Org:mainfrom
easonLiangWorldedtech:up-2

Conversation

@easonLiangWorldedtech

Copy link
Copy Markdown
Contributor

Part 2/8 of the task-tree series (builds on part 1). Adds two global settings: maxNestingDepth (default 2, range 0-5) and autoFlattenOnLimit (default true), with full round trip through schema, ExtensionState, SettingsView cachedState binding, webviewMessageHandler persistence, ClineProvider getState/getStateToPostToWebview, and runtime consumers. Also completes the taskTree translation keys in all 17 non-English locales so check-translations passes standalone.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a93973f-6986-42ef-9852-fa03b8d72e72

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.

easonliang28 and others added 2 commits August 17, 2026 09:29
Part 1/8 of the task-tree series (upstream-ready recomposition).

Adds `depth` to HistoryItem and a cycle-safe `backfillTaskDepth()` that
propagates parent depth through the delegation tree, so every task knows its
nesting level. Depth is surfaced for later use by settings validation,
environment details, and history-tree display.

Includes the single-open-invariant spec mock for backfillTaskDepth (folded in
from the series' CI fix) so this PR passes unit tests standalone.
…ound-trip

Part 2/8 of the task-tree series (upstream-ready recomposition).

Adds two global settings that control subtask delegation:

- `maxNestingDepth` (default 2, range 0-5): how many levels a subtask may
  nest. A value of 0 disables delegation entirely — every new_task runs inline.
- `autoFlattenOnLimit` (default true): when the limit is reached, flatten the
  subtask into the current conversation instead of opening a new tab; when
  disabled such requests are rejected so you can continue directly.

Full round trip: global-settings schema + defaults, ExtensionState,
SettingsView control bound to cachedState with save payload, webviewMessageHandler
persistence through ContextProxy, ClineProvider getState/getStateToPostToWebview,
runtime consumers using the shared defaults. Includes focused tests for UI
binding/save, persistence, and the saved value returned to the webview.

Also completes the taskTree translation keys in all 17 non-English locales so
check-translations passes standalone (folded in from the series' CI fix).
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.41176% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/core/webview/ClineProvider.ts 38.88% 8 Missing and 3 partials ⚠️
src/core/task-persistence/taskMetadata.ts 0.00% 0 Missing and 1 partial ⚠️
src/core/task/Task.ts 92.30% 0 Missing and 1 partial ⚠️
src/core/task/taskDepth.ts 95.45% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@easonLiangWorldedtech

Copy link
Copy Markdown
Contributor Author

Closing per the author: this stacked series is being re-verified in a fork sandbox before upstream submission. Will be re-opened as individually reviewed PRs once each branch's CI is confirmed green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants