[Bug]: Busy indicator is not shown for `ui.output_ui`/`render.ui`

Open
#2,194 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
frontend

Research direction

Run the provided minimal reproducible example and compare the busy-indicator behavior of output_ui/render.ui with output_data_frame. Start from the ui.busy_indicators configuration and the @render.ui and ui.value_box entry points; done means the spinner appears while the dynamic UI render is pending, with an opt-in path if required.

Written by the indexing model from the issue text.

Description

ai-triage:needs-review bug needs-triage Priority: Medium wrong location
Component

UI (ui.*)

Severity

P1 - High (major feature broken)

Shiny Version

1.5.1

Python Version

3.13.9

Minimal Reproducible Example
from time import sleep

import pandas as pd
from shiny import App, reactive, render, ui

WAIT_TIME = 3


def server(input, output, session):

    @render.data_frame
    @reactive.event(input.run)
    def get_df():
        sleep(WAIT_TIME)
        df = pd.DataFrame({"A": range(5), "B": range(5, 10)})
        return render.DataGrid(df)

    @render.ui
    @reactive.event(input.run)
    def box():
        sleep(WAIT_TIME)
        return ui.value_box("Title", "Value")


app_ui = ui.page_fluid(
    ui.busy_indicators.options(spinner_type="bars"),
    ui.input_action_button("run", "Run"),
    ui.layout_column_wrap(
        ui.output_ui("box"),
        ui.output_data_frame("get_df"),
        width=1 / 2,
    ),
)

app = App(app_ui, server)
Behavior

Current: when "Run" button is clicked, the busy indicator is shown for output_data_frame but not for output_ui.
Expected: The busy indicator should be shown for all dynamic UI elements, including those rendered with @render.ui. This is especially relevant when using ui.value_box. In some cases, this might not be desirable, but there should be a way to opt in for this behaviour.

Here is a shinylive app containing an MRE.

Error Messages (if any)
None
Environment
OS: macOS 26.3.1
Browser: Safari, Firefox and Chrome
Dominant language
Python
Stars
1.8k
Forks
135
Avg merge
2d 18h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/py-shiny

All issues in posit-dev/py-shiny

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.