Skip to content

feat(planning): ask Claude about the whole session from chat - #8408

Merged
kyle-sexton merged 4 commits into
mainfrom
feat/shared-chat-claude
Oct 19, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
feat/shared-chat-claude

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: PR 5 of the shared interview question-screen spec (follow-up item 4 from the live dogfood rounds); the spec lives in the owner's local working notes.

Summary

People could only ask Claude about one question at a time. Now "@claude" in the session chat, or "About the whole session" in Ask Claude, makes a general ask that is still owner-gated and answered in the chat.

Fix

  • "@claude" in a chat message files a request with no question through the same helper, throttle and pending cap as the Discussion's @claude; a guest's waits on the owner's Run, the owner's own runs at once; a refused request still posts the message. Claude's shared answer replies to the asking message in chat.
  • Ask Claude gets "About the whole session"; the Inbox, toasts and the host's Run card label these asks General.
  • No schema bump: a request's and a result's qid become optional and general results are stored under results.session; Claude's events carry scope: "session", and lane-shared.md says how to answer one.

Verification

  • Shared Python tests: 953 OK (11 new general-ask tests, all failing before the change).
  • ui.test.sh: 1042 passed, 0 failed (new ui_general.js, 21 checks). align.test.sh: PASS 482/482.
  • interview-defenses.test.sh: 172 pass, 0 fail, no re-pin. check-changelog-fragments.sh --check: all valid.
  • Left out: chat has no edit, delete or hide routes, so locking a request's message text and declining on hide have nothing to attach to; the Windows run, which CI's pr-test-windows covers.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits October 19, 2026 03:47
"@claude" as a word in a chat message, or Ask Claude's new pinned
"About the whole session", files a request with no question. It runs
on the host's Claude only and waits for the owner's Run like any guest
request (the owner's own runs at once); a message whose request the
throttle or the waiting cap refuses still posts, with requestRefused.

Data: a request's qid and a result's qid are optional. General results
sit under results.session, a key no question id can take, so old state
files load unchanged: no schema bump, no migration. request-run and the
digest mark a general request or result with scope: "session" (and
from: "chat" when a message asked); the result op accepts no qid when
its request is a general one.

Once shared, a general result is also Claude's chat message (the host's,
marked claude.result), replying to the asking message; reactions and
replies to it tell no one and it cannot become a proposal. The Inbox,
its toasts and the Run cards say General or "about the session"; the
owner shares from Ask Claude on "About the whole session". The chat
composer says "Type @claude to send it to Claude."

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The owner's own chat "@claude" ran before its message was in chat, so
its request-run event lacked from: "chat". The request now records the
asking message as an optional `msg` (no schema bump), which the event
and Claude's reply read instead of scanning chat, so a trimmed chat
does not lose the reply either.

A reply to Claude's chat message stores replyTo.claude, so its quote
reads Claude's even when the quoted message is outside the page's chat
window. With chat off, a shared general answer is not posted to chat;
it stays under results.session, and the page says the answer shows in
Ask Claude, About the whole session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A scope: "session" answer is posted to chat for everyone, so the shared
lane now says it draws only on what every guest already sees, never
hidden comments, unshared results, the owner's terminal conversation or
files outside the data dir; and work stays inside the request's scope,
not the question's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 19, 2026 08:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T08:21:18.683705Z 1eb5416 Draft marked ready
ℹ️ 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.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 2433d91145274581ddf24dde30f1631c7ebf8c29: 0 finding(s), 0 as inline comments.

No security findings in the incremental change since 1eb5416 (plugins/planning/shared/web/app.js and plugins/planning/shared/tests/ui_general.js).

app.js. goMsg takes an optional gone callback. It runs when the chat no longer holds the message, in place of the "no longer in the chat" notice. Both call sites pass () => openGeneral("x:" + xid).

  • The call sites (the Inbox open path and the Sent-to-Claude click handler) pass only a fixed callback.
  • xid comes from the server-provided result list, or from i.id or i.result. It is used only as an in-page lookup key for openGeneral. It is not written into HTML, a URL or a command, so there is no injection or path-traversal surface.
  • The fallback shows a result the user could already open through the existing openGeneral branch. The check that decides whether a shared answer goes to chat, x.published !== false, is unchanged, so an unpublished answer is not newly exposed.
  • No standing instruction, hook or guardrail was removed or softened.

ui_general.js. The test mocks /api/state in the browser through Playwright routing and rewrites msg to M999999. It adds no credentials, secrets or network exposure.

I did not need the instruction exception register, because the diff touches no instruction surface.

@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: 1eb5416d6b

ℹ️ 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 thread plugins/planning/shared/web/app.js Resolved
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 2433d91145274581ddf24dde30f1631c7ebf8c29: 0 finding(s), 0 as inline comments.

Incremental review of 2433d911 (since 1eb5416d): no findings.

What changed. goMsg(id, gone) now takes an optional fallback that runs in place of the "That message is no longer in the chat." notice. The Inbox path (app.js:2575) and the "Sent to Claude" button (app.js:6354) pass () => openGeneral("x:" + id). ui_general.js adds a browser case for the Inbox path.

Checked by reading the code. I did not run the tests.

  • Core.chatAround (core.js:1118) turns a 404 from GET /api/chat?around= into an empty page and resolves false, so gone runs when the server has dropped the message.
  • On the "Sent to Claude" button, x is non-null in the goMsg branch, because !x?.msg sends the other case to openGeneral. "x:" + x.id is therefore safe.
  • The test's until(ann, fn, null, 10000) and until(ann, a => …, ANSWER, 10000) calls match the harness signature until(page, fn, arg, timeout) (browser_harness.js:103).
  • The test routes /api/state? to rewrite msg to M999999, then calls unroute with an equal regex and reloads, so the route should not leak into later checks.

Not reported (noted only). goNote (app.js:2521) still calls goMsg(n.msg) with no fallback. The "Your request … is done" notification carries msg but no result id, so it would show the old notice for a dropped message. A fallback there would need a new notification field, so I left it out of this change's scope.

Opening a shared general answer from the Inbox, or from its asking
message's "Sent to Claude" line, goes to Claude's chat message. Once
chat no longer keeps that message, GET /api/chat?around= answers 404 and
the page only said the message was gone. goMsg now takes an optional
fallback in place of that notice, and both places fall back to the
answer in Ask Claude, About the whole session. Other callers are
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

1 participant