Repository navigation
test: use public chat$new_chat() in restore-reminder test - #325
Merged
Merged
Conversation
shinychat's clear() now aborts when conversation history is enabled (the only configuration commons_server() creates), which broke this test. Drop the clear() assertion since new_chat() covers the same commons behavior, and replace controller$new_chat() with the public chat$new_chat() added in posit-dev/shinychat#399. Closes #324
Contributor
|
Preview deployed to Connect ( Deployed from commit aac5a3d. |
cpsievert
marked this pull request as ready for review
September 9, 2026 00:44
Contributor
|
Preview deployed to Connect ( Deployed from commit aac5a3d. |
Collaborator
|
LGTM, but I'd wait for @simonpcouch |
jat255
added this pull request to stack #326
September 9, 2026 03:22
simonpcouch
approved these changes
Sep 9, 2026
Contributor
|
Cleaned up 1 preview bundle(s) on https://dogfood.team.pct.posit.it: 368971 |
Contributor
|
Cleaned up 1 preview bundle(s) on https://connect.staging.pct.posit.it: 2722 |
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.
Closes #324
Summary
shinychat (posit-dev/shinychat#399) made
clear()abort when conversation history is enabled, which is the only configurationcommons_server()creates — so the restore-reminder test'schat$clear()assertion had no reachable behavior left to exercise. This drops that assertion (the reset path is identical tonew_chat()'s, and the agent-level lifecycle is already covered by unit tests in test-commons.R) and replaces the internalcontroller$new_chat()call with the publicchat$new_chat()on the objectchat_server()returns. One internal reach remains: firing a restore undertestServerrequires the history controller (shinychat:::get_session_chat_bookmark_info), since shinychat exposes no public restore trigger; a comment in the test says so.Verification
testthat::test_file("tests/testthat/test-chat.R")passes against shinychat main (0.5.0, local install from ../shinychat/pkg-r, which includes theclear()guard).