<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+label%3A%22Category%3A+Documentation%22+">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues in this issue<br>
(If there are none, check this box anyway).</li>
</ul>
<h1 dir="auto">Description</h1>
<p dir="auto">Looking over the docs around <code class="notranslate">shared_task</code> I found the section intended for a sidebar didn't really work in the current layout of the docs.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1461191/162766403-a7650966-7ade-4b56-ba19-9888d045396f.png"><img src="https://user-images.githubusercontent.com/1461191/162766403-a7650966-7ade-4b56-ba19-9888d045396f.png" alt="Screenshot 2022-04-11 at 11 38 39" style="max-width: 100%;"></a></p>
<p dir="auto">This displays as though it's a note or sidebar related to "bound tasks" when in fact it's part of the previous section. The layout of the page is essentially a single column, so these sidebar sections should really display as part of the main body</p>
<h1 dir="auto">Suggestions</h1>
<p dir="auto">I'd suggest a layout something like this;<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1461191/162769841-6ff09c42-c1b3-425e-a06b-5deba87d4d22.png"><img width="733" alt="Screenshot 2022-04-11 at 16 08 27" src="https://user-images.githubusercontent.com/1461191/162769841-6ff09c42-c1b3-425e-a06b-5deba87d4d22.png" style="max-width: 100%;"></a></p>
<p dir="auto">This includes a tweak to the first title because it doesn't actually detail what an app is.</p>
<p dir="auto">Happy to raise a PR for this, and fix some of, if not all the errors coming out of the docs build.</p>
<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>Celery version</strong>: 4.3.0</p>

<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.3.0 (rhubarb) kombu:4.5.0 py:3.7.3
            billiard:3.6.0.0 redis:3.2.1
platform -&gt; system:Linux arch:64bit
            kernel version:4.15.0-45-generic imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:redis results:redis://localhost/

broker_url: 'redis://localhost:6379//'
result_backend: 'redis://localhost/'"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.3.0 (rhubarb) kombu:4.5.0 py:3.7.3
            billiard:3.6.0.0 redis:3.2.1
platform -&gt; system:Linux arch:64bit
            kernel version:4.15.0-45-generic imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:redis results:redis://localhost/

broker_url: 'redis://localhost:6379//'
result_backend: 'redis://localhost/'
</code></pre></div>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from celery import Celery

app = Celery('tq-test', broker='redis://localhost', backend='redis://localhost')


@app.task(bind=True)
def ttt(self, test_str):
    self.update_state(meta={'message': test_str})

def on_raw_message(body):
    try:
        msg = body['result']['message']
    except:
        msg = body
    print(msg)


if __name__ == '__main__':
    chain = app.signature('ttt', args=tuple(&quot;a&quot;))
    chain |= app.signature('ttt', args=tuple(&quot;b&quot;), immutable=True)
    print(chain.apply_async().get(on_message=on_raw_message))"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-v">Celery</span>

<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(<span class="pl-s">'tq-test'</span>, <span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">'redis://localhost'</span>, <span class="pl-s1">backend</span><span class="pl-c1">=</span><span class="pl-s">'redis://localhost'</span>)


<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">task</span>(<span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">ttt</span>(<span class="pl-s1">self</span>, <span class="pl-s1">test_str</span>):
    <span class="pl-s1">self</span>.<span class="pl-en">update_state</span>(<span class="pl-s1">meta</span><span class="pl-c1">=</span>{<span class="pl-s">'message'</span>: <span class="pl-s1">test_str</span>})

<span class="pl-k">def</span> <span class="pl-en">on_raw_message</span>(<span class="pl-s1">body</span>):
    <span class="pl-k">try</span>:
        <span class="pl-s1">msg</span> <span class="pl-c1">=</span> <span class="pl-s1">body</span>[<span class="pl-s">'result'</span>][<span class="pl-s">'message'</span>]
    <span class="pl-k">except</span>:
        <span class="pl-s1">msg</span> <span class="pl-c1">=</span> <span class="pl-s1">body</span>
    <span class="pl-en">print</span>(<span class="pl-s1">msg</span>)


<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
    <span class="pl-s1">chain</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span>.<span class="pl-en">signature</span>(<span class="pl-s">'ttt'</span>, <span class="pl-s1">args</span><span class="pl-c1">=</span><span class="pl-en">tuple</span>(<span class="pl-s">"a"</span>))
    <span class="pl-s1">chain</span> |= <span class="pl-s1">app</span>.<span class="pl-en">signature</span>(<span class="pl-s">'ttt'</span>, <span class="pl-s1">args</span><span class="pl-c1">=</span><span class="pl-en">tuple</span>(<span class="pl-s">"b"</span>), <span class="pl-s1">immutable</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
    <span class="pl-en">print</span>(<span class="pl-s1">chain</span>.<span class="pl-en">apply_async</span>().<span class="pl-en">get</span>(<span class="pl-s1">on_message</span><span class="pl-c1">=</span><span class="pl-s1">on_raw_message</span>))</pre></div>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">In Celery 4.2.2, update_state in both tasks are shown, as below.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a
b"><pre class="notranslate"><code class="notranslate">a
b
</code></pre></div>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">In Celery 4.3.0, only update_state in the task of the end of the chain is shown, as below.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="b"><pre class="notranslate"><code class="notranslate">b
</code></pre></div>