Repository navigation
feat: add .page()/$page() methods wrapping shinychat's page_chat() - #291
Merged
Merged
Conversation
cpsievert
force-pushed
the
page-method
branch
from
September 10, 2026 00:00
ade401a to
9a27b1a
Compare
cpsievert
commented
Sep 10, 2026
cpsievert
added a commit
that referenced
this pull request
Sep 10, 2026
…class assertions Addresses Copilot review feedback on #291.
This was referenced Sep 10, 2026
cpsievert
force-pushed
the
page-method
branch
from
September 10, 2026 16:54
7b107e0 to
104303e
Compare
Full-window, chat-first app layouts for R, Python Core, and Python Express, with examples, docs, and tests. Extras (dependencies, handoff panel) ride in page_chat()'s footer slot via the helpers from the chat-footer-extras branch.
…class assertions Addresses Copilot review feedback on #291.
shiny>=1.7.0 (the current floor) exports it publicly, so no private-API fallback is needed.
shiny.module re-exports namespace_context at runtime (>= 1.7.0) but omits it from __all__, so pyright flags the import. Suppress per-line until shiny adds it to __all__.
cpsievert
force-pushed
the
page-method
branch
from
September 10, 2026 18:34
104303e to
72290b7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
.page()method (Python, Core + Express) and$page()method (R) toQueryChat, wrapping shinychat's newpage_chat()for full-window, chat-first apps. It complements.sidebar()/.ui()and is now presented as an option for "custom apps".Design notes:
mod_page()module UI;page_chat()resolves the chat id against the module namespace, so.server()works unchanged.shinychat.express.page_chat(), which owns the entire page — querychat's dependencies are injected viafooter=(merged with any user footer), and the pre-namespaced chat id is passed as aResolvedIdto survivepage_chat()'s internalresolve_id().$page()factorsquerychat_dependency()out ofmod_ui(); on both sides a user-suppliedclassis merged with the requiredquerychatclass.03-page-core-app.py/03-page-express-app.pyput the reactive data view on a secondarychat_nav_panel()(Express usesui.hold()); the R10-viz-appexample is converted to$page()for a chat-first layout.build.qmdandbuild.Rmd; changelog entries in both packages.Verification
pkg-py/tests/test_page.py(8 tests) and aQueryChat$page()block inpkg-r/tests/testthat/test-QueryChat.R(7 tests).test_03_page_apps.py, 6 tests) run both new example apps in a real browser — no API key needed.shiny run pkg-py/examples/03-page-express-app.py, or in R:qc <- QueryChat$new(palmerpenguins::penguins); shinyApp(qc$page("Penguins"), \(...) qc$server()).