Repository navigation
Reader side of a shared session (#525): Can message says so, prompts name their author, a refused send says why - #530
Conversation
…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)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| 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); |
There was a problem hiding this comment.
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 👍 / 👎.
| ...controls, | ||
| capability: (key) => (key === 'subagent-rows' ? controls.capability(key) : closed), | ||
| answerCapability: () => closed, | ||
| send: async () => ({ disposition: 'refused', started: false, reason }), |
There was a problem hiding this comment.
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)
…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)
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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, agrademeans the machine isn't holding the record yet, which is retried as before. There is no wire change, and nothing undersrc/endpointorsrc/shared/ipcmoves.1. Can message no longer loads forever.
graderefusal ofsession.getat once, asREAD_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 answersgradefor that too. If the record arrives, the transcript replaces the pane. Nothing polls after the ladder.2. A prompt is labelled with its author.
3. View: Send no longer fails silently.
What's left, since the wire carries neither the reader's rank nor a prompt's author (designed together on board #526, after M4b):
laneA.watch/laneA.planeorremote.session). The pane, the composer, the controls and the labels are proven by renderer component tests over fake clients.Tests
remote-session.test.tscovers lane B'sREAD_REFUSEDat 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.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.tsandComposer.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:
Fixes #525
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)