Skip to content

maxVisible is not working for task.group inside another task #60

Description

@vladshcherbin

Bug description

Root task.group with maxVisible works correctly. When used inside another task, maxVisible is ignored:

Screen.Recording.2026-06-27.at.18.14.35.mov

Reproduction

import { setTimeout } from 'node:timers/promises'
import task from 'tasuku'

await task('Root task', async () => {
  await task.group(
    (t) => Array.from({ length: 10 }, (_, i) => (
      t(`Task ${i + 1}`, () => setTimeout(500 + Math.random() * 1200))
    )),
    {
      concurrency: 1,
      maxVisible: 4
    }
  )
})

Environment

  • tasuku version: 3.0.0-beta.5
  • Operating System: macOS 15.7.7
  • Node version: 26.1.0
  • Package manager (npm/yarn/pnpm) and version: pnpm 11.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions