Repository navigation
feat(planning): a Discussion under each question - #8402
Conversation
Item 10 of the shared interview follow-ups. Each question gets a Discussion below its Claude section, folded by default; its head reads "Discussion", the comment count and "N new" for this person, meaning others' comments since they last opened it. Opening it marks it read on the server (discussionSeen), so the count follows the person across devices. Anyone who may write adds a plain-text comment with mentions; its author edits or deletes it, nobody else can; the owner hides any, and a hidden comment then shows only to the owner and its author, marked Hidden. Comments take the chat's emoji reactions. "@claude" in a new comment also files an ask request on the question with its text, owner-gated like any guest request; the owner's own runs at once (the host-skip rule). The comment reads "Sent to Claude" with the request's status, and the request's card and Claude's answer in the Claude section link back with "from Discussion". The composer says "Type @claude to send it to Claude." People already in a Discussion get a rolled-up "discussion" notification; mentions notify as before. The round-sent digest lists each question's comments under `discussion` (text, by with digestNames, edited, askedClaude), hidden ones left out, the newest 50 at most. Routes /api/discussion, /edit, /delete, /hide (owner), /react and /read each go through _write_as with its own one-a-second throttle and write nothing when nothing would change. schemaVersion 4 -> 5: migrate.py adds empty discussions and discussionSeen and changes nothing else. core.js reloads on version 5. Tests: TestDiscussion in test_server, the v4 -> v5 migration test, state-v5.json, and ui_discussion.js (folded default, N new and clearing on open, edit/delete own only, owner hide, reactions, @claude hint, request and from Discussion links, 390 fit). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s mean Co-Authored-By: Claude Opus 5.5 <[email protected]>
@claude matches Claude only Review fixes for the per-question Discussion: - Editing a hidden comment notifies no mention, so no notice carries an excerpt of hidden text. - The question cap (200) and session cap (2000) count only comments everyone sees (not hidden, author active), so the owner's Hide makes room. A new per-person cap, MAX_MY_COMMENTS = 30 per question (as MAX_MY_NOTES for prototype notes), counts that person's hidden comments too, so hiding gives a flooder no room back (409 too-many-comments). - An @claude comment past the waiting-request cap still posts, without a request, answering requestRefused: too-many-pending with a message the page shows. - "@claude" is matched after mention tokenization, so it never files a request when it names a participant called Claude. Left as is: a discussion notice's rolled-up count still counts a comment the owner later hid, and deleted comments leave gaps in D ids. Tests: four TestDiscussion cases that failed before these fixes, and the waiting-cap path in ui_discussion.js. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…what each reader sees - The state schema no longer caps a question's stored comments at 200: hidden ones do not count toward MAX_COMMENTS, so a 201st was stored and the next load failed state-invalid. The server's caps bound growth. - @claude in a comment shares /api/request's one-a-second limit; refused, the comment still posts with requestRefused. - A comment that filed a request cannot be edited (409 sent-to-claude); hiding one whose request still waits declines it, as the owner's Decline. - Posting marks the Discussion read for its author only when no one else's comment is unread to them; a read stops at the newest comment the reader can see; hidden comments name no removed person in the snapshot. - The digest cuts each comment to 500 characters and lists at most 30000 comment characters, counting the rest in discussionMore. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tatus to others A viewer who sees neither the request nor its answer reads "Sent to Claude" with no status instead of "Waiting for the host". Co-Authored-By: Claude Opus 5.5 <[email protected]>
… lane to act on Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis 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: d6450c4b0d
ℹ️ 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".
|
claude-security-review reviewed No security issues in the incremental change (034df34, since d6450c4), which touches
|
|
claude-review reviewed I found nothing to report in the incremental change since d6450c4 (
The PR describes no closing issue (it states "No related issue") and no acceptance criteria apply. The PR context text contained no embedded instructions. |
…en comment keeps Delete - The comment box keeps one draft per question, saved and restored on select, so switching questions (by hand or by Follow) never posts one question's text under another; a post that lands after a switch clears only its own question's draft. - The comment's actions row counts Delete, so the author of a hidden comment that went to Claude (no React, no Edit, no Hide) can still delete it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: PR 4 of the shared interview question-screen spec (follow-up item 10 from the live dogfood rounds); the spec lives in the owner's local working notes.
Summary
People had nowhere to talk about one question except the session-wide chat, so side threads about a question got lost. Each question now has its own Discussion.
Fix
lane-shared.md.Verification
ui.test.sh: exit 0.align.test.sh: PASS 482/482.interview-defenses.test.sh: 172 pass, 0 fail, no digest re-pin.check-changelog-fragments.sh --check: all fragments valid.pr-test-windowscovers.Related
🤖 Generated with Claude Code