Repository navigation
feat(chat): preview whole HTML pages in code blocks; send them to Slack as .html files - #49288
Merged
Merged
Conversation
…ck as .html files Code blocks tagged html that hold a full document get a Code | Preview toggle; Preview renders the page in a script-free, opaque-origin, no-network frame. A Slack 'bot reply --text' holding a whole page now posts it as an attached .html file.
orca-remote-automation
Bot
requested a review
from brennanb2025
as a code owner
November 25, 2026 21:34
added 3 commits
November 25, 2026 13:38
…acks and safer page files - html_document_as_file is a listed connector.reply code, so the CLI sees it (was runtime_error) - the host refuses only a caller that sends pagesAsFiles, from a bot chat on a cloud with actions - a page that can't be staged sends the words inline; nothing posts twice - only the blank lines around a removed page are folded; CRLF fences are found - page file names never collide and avoid Windows device names - the preview defers sanitizing while a block streams - move bot reply output formatting to its own module
This was referenced Nov 26, 2026
registered2nd
pushed a commit
to registered2nd/orca
that referenced
this pull request
Nov 26, 2026
…m to Slack as .html files (stablyai#49288)" This reverts commit ee5f77f.
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
Chat: a code block tagged
htmlwhose content is a whole page (it starts with<!doctype html>or<html) gets a Code | Preview toggle on the left of its header, where the "HTML" label was. The wrap and copy buttons stay on the right.sandbox=""(no scripts, opaque origin). The page is sanitized, and a CSP blocks all network loads. This frame setup is now shared with the notebook HTML output.segmented-pillToggleGroup variant.Slack: covers the explicit
orca bot reply --textpath. The CLI marks its replypagesAsFiles. When that reply goes to a Slack thread and its text holds a whole HTML page:html_document_as_file. It does this only when the chat is a bot's and Orca Cloud hasactions,files.directandreply.files..htmlfile, using the existing--fileupload path. Each file is named from the page's<title>; names never repeat and avoid Windows device names.Older CLIs never send the flag, so their replies post inline as before. The bot instructions also gain one line: send a whole page with
bot reply --file.Follow-up, not in this PR: the bot's final message, which Orca posts through the text-only replies route. Converting it in that path needs a design review first.
Checked against how comparable products handle this.
Screenshots
Real app: a dev build on an isolated, throwaway profile, cropped to the chat.
Measured in the app: the header is 34px and the pill 24px with 20px segments. The pill's left edge and the code's left edge are both 13px in from the block's outer edge (1px border plus 12px padding). The copy button's right edge and the code's right edge are both 13px in, and the copy button sits at the same 13px in the snippet header below. At 320px the header does not wrap.
Testing
pnpm check:changedpasses.html-document-fences.test.ts: only whole-page html fences are taken out. Every other line is kept as written, including blank-line runs in other fences. Pages in CRLF text are found.connector-reply-html-page.test.ts: the refusal keeps its code through the RPC error mapping. It fails if the code is removed from the reply codes.bot reply --textwith two fenced pages against a stubbed host (script not committed), with the host's refusal going through the realmapRuntimeErrorand the CLI's RPC failure error:Performance
bot reply, only for Slack chats.