Skip to content

Reader side of a shared session (#525): Can message says so, prompts name their author, a refused send says why - #530

Merged
SSFSKIM merged 7 commits into
masterfrom
fix/reader-side
Nov 8, 2026
Merged

SSFSKIM merged 7 commits into
masterfrom
fix/reader-side

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

How a shared session looks to a reader who isn't its owner: the three defects the M6b real-member sitting found on staging (#525). Spec: docs/doperpowers/plans/2026-10-28-p5-o8-org-interface.md, §M6b and §Q.

How the reader's grade is known. A listing never says what a reader holds on a session. The machine says it only by refusing with grade: a read below View, and a send below Converse. So the app learns the grade from those refusals, for a listed session the member doesn't own. On a session the member owns, a grade means the machine isn't holding the record yet, which is retried as before. There is no wire change, and nothing under src/endpoint or src/shared/ipc moves.

1. Can message no longer loads forever.

  • Lane A: the page's watch, once refused at the reader's grade, is released and not reopened. Main can't tell an owner from a reader, so the renderer makes the call, and main keeps its backoff. Main now also re-announces a pause when its reason changes.
  • Lane B: main reports the grade refusal of session.get at once, as READ_REFUSED. It keeps its existing 0.5/1/2/4 s retry ladder only for the window where a just-started session isn't placed yet, since the endpoint answers grade for that too. If the record arrives, the transcript replaces the pane. Nothing polls after the ladder.
  • On both lanes the pane then says "Your agents can message this session. You can't read it." and "Ask for View to read it.", with no transcript and no composer.
  • The app asks again when the session is reopened, when its listing's revision or policyRev changes, or when another member signs in.

2. A prompt is labelled with its author.

  • On lane A and lane B transcripts alike, a prompt in a session another member owns is named by its owners: a muted name line above the bubble, and the region is named "'s message".
  • The reader's own prompts read "Your message". The app knows them by the message UUID of each prompt it sent: from the composer, from quick replies and cards, from lane A deliveries, and from queued lane B sends once they're submitted. This record is kept for the run and scoped to the signed-in member.

3. View: Send no longer fails silently.

  • A send refused at the reader's grade says so: "Not sent: you can read this session but not talk to its agent. Ask for Converse."
  • From then on the composer is disabled. Its line reads "You can read this session but not talk to its agent. Ask for Converse.", the editor is read-only, and every control except a subagent's rows is closed.
  • Only plain words teach this. A slash command needs Manage, so its refusal says nothing about Converse.
  • Any refused send to another machine's terminal session is now shown. It used to be dropped because such a session has no record.

What's left, since the wire carries neither the reader's rank nor a prompt's author (designed together on board #526, after M4b):

  • Below Converse, the composer is enabled until the first refused send. After it, the composer is disabled and names Converse and the owner.
  • A Converse sharee's prompts read as the owner's to a reader, because no prompt records who sent it.
  • After a reload, the reader's own earlier sends read as the owner's, because the record of this app's sends lasts only for the run.
  • The owner reading their own session sees a Converse sharee's prompts as "you", for the same reason.
  • Three timing edges in the local own-prompt record (a member switch within a minute of a send; a queued send's uuid lost when its pane is closed, or when the queue event beats the send's reply): see A reader's grade reaches the app: the endpoint tells a reader their rank, so the composer is disabled below Converse before the first send #526.
  • There's no reader-pane e2e scene. The share fixture has a reader row (a private session shared with you), but nothing fakes that row's pane reads (laneA.watch/laneA.plane or remote.session). The pane, the composer, the controls and the labels are proven by renderer component tests over fake clients.

Tests

  • Main: remote-session.test.ts covers lane B's READ_REFUSED at once, the retry ladder opening a session placed within it, the refusal kept through a transient answer and past the ladder, and no poll after the ladder.
  • Renderer:
    • reader.test.tsx: the store and its re-ask triggers.
    • SessionPane.test.tsx: the Can message pane on both lanes; an owner's pane keeps reading; re-reading on a listing change and on a reopen.
    • controls-for.test.ts: the refused send's words, the closed port, slash commands, and own-prompt notes.
    • submit-state.test.ts and Composer.test.tsx: the disabled composer and its line.
    • submit.test.ts: a refused remote lane A send is shown.
    • TranscriptSlot.test.tsx: author labels on lane A and lane B.

Review. The first reviewer-medium found four P2s, all fixed in 9a53e04 (test typing in 1c68eb1). A second review of the fix wave found three timing edges, now on #526 (listed above). The four P2s:

  • View was learnt from a slash command's refusal.
  • Quick-reply and card sends weren't recorded as the reader's own.
  • Queued sends weren't attributed to the reader.
  • The own-prompt record wasn't scoped to the signed-in member.

Fixes #525

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

…r may do there

The machine says a reader's grade only by refusing, so the app learns it from those refusals, for a listed session the member doesn't own:
- Can message: lane A's watch refused 'grade' is let go and none opens; lane B's record read refused 'grade' is said at once as READ_REFUSED while main's existing ladder asks on. The pane then says the reader's agents can message the session, that they can't read it, and whom to ask for View.
- View: a send refused 'grade' says so with whom to ask for Converse, and the composer closes, its line naming Converse and the owner.
- Any refused send to another machine's terminal session is said; it was dropped for having no record.
- What was learnt is asked afresh at a listing change (revision, policyRev), a sign-in or a reopen; nothing polls.
- A prompt in another member's session is named by its owners, unless this app sent it.

Fixes #525

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…'s CallResult (the static gate's typecheck)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Slash text no longer teaches View; authorship is noted at the controls port (any caller), covers queued sends by queue id until their uuid exists, and is cleared when the member changes.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ate's typecheck)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T06:41:14.990959Z 1c68eb1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c68eb1243

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +41 to +46
const offQueue = useQueueStore.subscribe((s, before) => {
if (s.bySession === before.bySession) return;
for (const [appSessionId, queued] of useReader.getState().queued) {
const queue = s.bySession.get(appSessionId);
if (queue === undefined || queue === before.bySession.get(appSessionId)) continue;
for (const entry of queue.entries) if (queued.has(entry.queueId)) noteOwnPrompt(appSessionId, entry.messageUuid);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep tracking queued prompt UUIDs while their pane is unmounted

If a reader queues a message in another member's session, switches tabs before it submits, and returns after its turn finishes, their message is labelled as the owner's. This listener only observes useQueueStore, whose session.queue subscription is released when the last composer/transcript unmounts (stores/queue.ts). main/Pane.tsx mounts only the active tab, so the submission's UUID can arrive while nobody updates that store; by the next snapshot, the completed entry has left the queue. Keep a queue attachment while remembered queue IDs are outstanding, or recover their UUIDs from a durable event source.

Useful? React with 👍 / 👎.

Comment on lines +62 to +65
...controls,
capability: (key) => (key === 'subagent-rows' ? controls.capability(key) : closed),
answerCapability: () => closed,
send: async () => ({ disposition: 'refused', started: false, reason }),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply the reader restriction to composer bindings too

After a View reader's send is refused, this wrapper closes capability() but leaves bindings() unchanged. The composer obtains its model/mode controls through controls.bindings(), and the driven model selector likewise uses bindings().model.disabled and .set without consulting capability('model'). Consequently those controls remain enabled and continue issuing requests after the composer says the reader cannot talk to the agent, rather than closing with the new Converse explanation. Overlay the binding disabled states and setters as well as the capability methods.

Useful? React with 👍 / 👎.

… rows list as another member's

The full gate's unit 1/4 (remote.test.ts:518) caught it: a session this app spawned, not placed yet, is its spawner's, and its `grade` is the machine not placing it, so it read "You can't read this session" where "can't place" is the truth. Main now asks the org rows (`othersOf`, as `laneOf` does) and keeps the old placing words for an owner's or an unlisted session.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…board 525", since the tokens guard reads "#525" as a hex colour

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
), #535, #536 and #524's channel reach

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM merged commit 3527b72 into master Nov 8, 2026
SSFSKIM added a commit that referenced this pull request Nov 8, 2026
…the prompt's author and a refused send's reason; the second-member precondition's board item met; all three swap fixes in; the reader-pane e2e row

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM deleted the fix/reader-side branch November 8, 2026 14:27
SSFSKIM added a commit that referenced this pull request Nov 8, 2026
…6b, #524, #527 and #530 live, every welcome carries record, the second-member precondition's machine item met; the render series closed and its row closed; the pressure rule's row; the four-kept note

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Nov 8, 2026
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared sessions as a reader sees them: Can message loads forever, the owner's prompts read "Your message", View's Send fails silently

1 participant