posit-dev / posit-dev/shinychat

Can't easily append to a `chat_ui()` that is dynamically rendered

Open
#4 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
139
Forks
28
Avg merge
23h 44m
Merged PRs (30d)
50

Description

For example, one might expect this to work, but it doesn't

library(shiny)
library(bslib)

ui <- page_fluid(
  uiOutput("x")
)

server <- function(input, output, session) {

  chat_append("chat", "Hello, how can I help you?")

  output$x <- renderUI({
    chat_ui("chat")
  })

}

shinyApp(ui, server)

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.

Research direction

Start with the supplied R example and trace the chat_append(), chat_ui(), and renderUI() entry points to understand why appending before dynamic rendering fails. Confirm the expected behavior by making the example display the appended greeting after chat_ui() is rendered.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.