Add shinychat R 0.5.0 and Python 0.7.1 release post - #398
Conversation
Apply a writing-skills pass to the shinychat v0.5.0 (R) and v0.7.0 (Python) release post. Add an early upgrade note for existing apps, retile the post around building complete chat applications, add a toolbar section covering toolbar, toolbar_global, and toolbar_input (verified against the shinychat APIs), settle the dynamic greeting example on the fresh-client pattern with a session-scoped client, and move screenshot TODOs to the tops of their sections.
Link the R and Python package names in the opening sentence to their documentation sites.
Chromote-based capture harness that starts each demo app, drives it through a scripted session, and records the screenshots and videos for the shinychat 0.5.0 release post. Demo apps run on a mock ellmer client so no network calls are made.
Drop four videos and three images that repeated adjacent content, and add captures for thinking (Thought for 4s), the stop button, attachments, and the nav-pages-plus-drawer layout. Clip the history search and actions menu to the drawer, shift the tool-call clips down a few pixels, and anchor the citations popover beside its pill. Fix two capture quirks in the process: captureBeyondViewport re-renders distorted the focused composer and the sidebar while searching, so those clips now capture without it, and union_png's union box under-measured when later elements extended above or left of the first match.
Replace actionButton() with bslib::toolbar_input_button() in the page_chat() toolbar examples and add an example pairing a global toolbar button with an offcanvas panel. Update the toolbars demo app, screenshot script, and regenerate the section screenshots.
The union_png() message crops started 32px above the top message, which caught the bottom border of the page header in the first few pixels. Shift the clip region down (dy = 14) so the border is out of frame, and regenerate the tool-calls, edit-branches, citations, and thinking screenshots.
Split the section into four subsections: Drawer, Toolbars, Offcanvas, and Putting it all together. The drawer leads with a new minimal chat_drawer() example, the toolbar_input paragraph moves under the toolbars heading, and the composed page_chat() example closes the section with its own subsection.
Drive the edit-branches recording with a fake pointer: it enters from the right edge, reveals the edit button via hover, clicks it, deletes "South America?" from the edit box, retypes "Asia?" with natural per-character timing, clicks send, then moves between the branch navigation arrows. The recorder gains an optional screenshot clip so the video shows only the conversation (no header or input) while staying exactly 4:3; the clip's top edge is clamped below the chat header to keep its border out of frame. Cursor placement divides by the root CSS zoom, which otherwise renders fixed elements at a scaled offset.
Add apps/og-header, a page_chat demo that renders the post's open graph image: the shinychat hex sticker, the post title, and version suggestion cards for R and Python on a light tint of the brand blue. The screenshot script captures a 1200x630 viewport and writes images/og-header.png, now used as the post image.
The recording now opens on a blank slate (greeting and suggestions only, sidebar and drawer closed) and a fake pointer drives the whole demo: it picks the season-summary suggestion, watches the tool activity rows stream in ahead of the answer text, retreats while the reader looks over the reply, then opens the history sidebar, starts a new conversation, types the colonies question into the input with natural per-character timing, and submits with Enter. That response opens the artifact drawer with the plot. The pointer returns to the first conversation via the sidebar, closes the drawer, starts another conversation, and hides the sidebar so the video ends where it began. Supporting harness changes: - mock_stream_reply() streams rich replies through chat_append(): tool requests appear as running rows before their results land and text streams word by word; an on_done hook opens the drawer after the last chunk - mock_record() accepts ellmer content lists so restored conversations replay the full reply (tool rows, citations) instead of a plain-text placeholder - _common.R gains press_enter() and rect_of_text() (locate an element matching a selector and containing text, for gliding to a specific history entry) - the complete-app demo adds a second reply with its own tool call, keeps the drawer closed for the first response, and starts with the history sidebar closed; the drawer plot is now the colony comparison
- Give every level-2 section zero or 2+ level-3 subsections - Reorder greeting/suggestions subsection so each topic appears once - Rewrite citations section around provider-supported citations, with R and Python examples for hand-rolled asides - Fix prose/code mismatches (slash command modal, standalone helper, per-user history scope) and assorted line-level issues - Add acknowledgements for 25 contributors since r/v0.3.0
The input was caught half-faded in greeting-suggestions-greeting.png; wait 1s after focusing so the composer entrance animation finishes.
Cross-post links use dated permalinks, matching the convention used elsewhere in the blog; the previous relative index.qmd links 404ed. Also fix those and link shiny-side-of-llms part 3, shinychat tool UI, raghilda, and querychat, plus Shiny bookmarking, Connect persistent storage, ellmer/chatlas tool-calling, and shinychat guide docs.
Stream the replies with longer block and word delays so tool calls are revealed more sequentially, pause between focusing the input and typing the second question, re-show the greeting when a new conversation is created, and close the artifact drawer before switching conversations so the video ends on the blank slate it opened with.
Run oxipng -o max --strip safe over the 20 PNGs in the post; saves 627 KiB (31%) with no visual change.
✅ Deploy Preview for posit-open-source canceled.
|
Publishing checklist
|
There was a problem hiding this comment.
On one hand, I do appreciate that this reads like a end-to-end user guide for building a complete chat application; however, I'm not sure it's the best approach for a release blog post.
As currently written, it's hard for a drive-by viewer to quickly see how many nice new features just come for free now (i.e., history, edit/cancel, attachments, etc), and which things you have to learn about and build with yourself in order to get a "full-blown" chat app.
I think part of this is a result of the decision to dive straight into page_chat() and weave the features though a wholistic linear story. I can see the appeal as a nice getting started example, but by starting toolbars, navbars, etc., it feels like we're burying the lede. It's also hard to separate what's new and what's not.
If it were me, I would approach things this way:
- In the intro section, give the getting started
page_chat()snippet along with the "complete" video. Along with the video, link to a later "deep-dive" intopage_chat(). - After the intro, get into all the stuff you now get for free with
chat_server(). - Highlight a few new "opt-in" things like slash commands, web search, etc.
- Cover "chat-first" applications with
page_chat()- Here you could also get into the specifics of greetings, suggestions, etc.
Blog YAML Checks✅ All 1 posts passed. |
Summary
Adds the shinychat release post for R 0.5.0 and Python 0.7.1, scheduled to publish Tuesday, Sept 15.
Contents:
index.qmdand renderedindex.mdfor the postapps/with the demo apps plus the R harness used to capture the screenshots and videosog-headersocial preview cardVerification
uv run scripts/validate-blog-posts.py content/blog/shinychat-v0.5.0/index.mdpasses. Preview withjust dev allor via the Netlify PR preview.