SHOWBOAT_REMOTE_URL feature#18
Merged
Merged
Conversation
Each document now receives a unique identifier (DocumentID) stored in the TitleBlock and emitted as an HTML comment after the timestamp line. When SHOWBOAT_REMOTE_URL is set, init/note/exec/image/pop commands POST their content to the remote endpoint, enabling real-time document streaming to external viewers. https://claude.ai/code/session_01Qs1QQwD6Zj3mMRDW8N5c4H
Documents the SHOWBOAT_REMOTE_URL environment variable, authentication via query string, and the POST body format for each command type. https://claude.ai/code/session_01Qs1QQwD6Zj3mMRDW8N5c4H
Owner
Author
|
Manually tested as part of this and it works great: |
The receiver of a command=image POST gets the file upload and needs the generated filename to store/display it. The raw user input (e.g. a path or markdown reference) is less useful than the actual filename. https://claude.ai/code/session_01Qs1QQwD6Zj3mMRDW8N5c4H
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.
Refs:
Earlier planning transcript: https://claude.ai/code/session_01D71x3zZWgSA11WEe791PXV
Summary
This PR adds webhook integration to Showboat, allowing document events (initialization, notes, code execution, images, and deletions) to be posted to a remote server via the
SHOWBOAT_REMOTE_URLenvironment variable.Key Changes
New remote module (
cmd/remote.go): Implements webhook posting functionality with three main functions:postSection(): POSTs document sections (init, note, exec commands) as form-encoded datapostImage(): POSTs image blocks as multipart/form-datapostPop(): POSTs document deletion eventsdocumentID(): Extracts the document ID from title blocksDocument ID tracking:
DocumentIDfield toTitleBlockstruct to uniquely identify documentsInit()now generates a UUID for each new document<!-- showboat-id: ... -->)Event posting integration:
Note()posts note events to remote serverExec()posts code execution events with language and outputImage()posts image events with multipart form dataPop()posts document deletion eventsComprehensive test coverage:
cmd/remote_test.gowith 11 tests covering all webhook scenarioscmd/build_test.goverify event posting from high-level commandsImplementation Details
SHOWBOAT_REMOTE_URLis unsetgithub.com/google/uuid) is now a direct dependency (was indirect)https://claude.ai/code/session_01Qs1QQwD6Zj3mMRDW8N5c4H