feat(components): add an opt-in readOnly mode to the session surface - #12
Draft
pythonlearner1025 wants to merge 1 commit into
Draft
feat(components): add an opt-in readOnly mode to the session surface#12pythonlearner1025 wants to merge 1 commit into
pythonlearner1025 wants to merge 1 commit into
Conversation
A host may embed a session that the current viewer is allowed to read but not drive. There is no such mode today: every member of a workspace may drive every session they can see, so `SessionChatInterface` has no notion of a viewer. Add `readOnly` to `SessionChatInterface`, defaulting to false. With it on the composer is not rendered, and neither is `FloatingPermissionRequest` — its options are answers, and an answer this viewer cannot write is a button that does nothing. The request still appears in the transcript. `SessionDetail` declares and forwards the same prop to every chat surface it mounts. The two suppressions the component already has, `isArchivedSession` and `isMachineRemoved`, were considered and are not reusable: both put a statement on the screen that would be false here, and both change the header copy as well as the composer. The prop is presentation only — enforcement belongs wherever the writes are applied — but a control that cannot work should not be offered. With the prop absent every call site renders exactly what it rendered before, and no existing call site passes it. The header's "…" menu still offers archive, delete, rename and fork; widening the prop to the menu is a larger change through `headerVariant="toolbar"` and is a follow-up rather than part of this one. Model: claude-opus-5[1m]
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.
A host may embed a session that the current viewer is allowed to read but not
drive. There is no such mode today: every member of a workspace may drive every
session they can see, so
SessionChatInterfacehas no notion of a viewer.Add
readOnlytoSessionChatInterface, defaulting to false. With it on thecomposer is not rendered, and neither is
FloatingPermissionRequest— itsoptions are answers, and an answer this viewer cannot write is a button that
does nothing. The request still appears in the transcript.
SessionDetaildeclares and forwards the same prop to every chat surface it mounts.
The two suppressions the component already has,
isArchivedSessionandisMachineRemoved, were considered and are not reusable: both put a statementon the screen that would be false here, and both change the header copy as well
as the composer.
The prop is presentation only — enforcement belongs wherever the writes are
applied — but a control that cannot work should not be offered. With the prop
absent every call site renders exactly what it rendered before, and no existing
call site passes it.
The header's "…" menu still offers archive, delete, rename and fork; widening
the prop to the menu is a larger change through
headerVariant="toolbar"and isa follow-up rather than part of this one.
Compatibility
Every change is additive at its default. With the new prop, parameter or flag
absent, the touched components render and behave exactly as they do today, and
no existing call site in this repository passes one.
Testing
packages/componentstypecheck and the full vitest suite pass. No new test:SessionChatInterfaceneeds a workspace runtime and a daemon.Notes for the reviewer
The prop suppresses two controls and no more. The header's "…" menu still offers archive, delete, rename and fork to a viewer; widening it there is a larger change through the
headerVariant="toolbar"call site and belongs in a follow-up. ThehideMessageAreainstance is deliberately not passed the prop — it renders no composer and no permission card, so passing it would suggest it selected something.Review metadata
BlitzOS fork only. Delete this section before sending the PR to
LodyAI/Lody.blitz/seam-4-session-readonly-propf3474894 (the pinned upstream commit)