Skip to content

Private NodeAgent acts in the shared room (public edits + public chat), subtly attributed - #4

Merged
HomenShum merged 1 commit into
mainfrom
audit/optimistic-ux-wave1
Jun 9, 2026
Merged

HomenShum merged 1 commit into
mainfrom
audit/optimistic-ux-wave1

Conversation

@HomenShum

Copy link
Copy Markdown
Owner

Reimagines the private agent into a personal copilot that can act in the shared room — safely and subtly. Spec: docs/PRIVATE_AGENT_V2.md.

What's new

  • Public lane (reuses the whole runRoomAgent spine via a new asOwner arg): a public-scoped agent_priv actor (carrying ownerId) edits the shared sheet through the existing CAS / lock / proposal path (per room auto-allow) and posts to public chat — all attributed by ownerId. collab.ensurePersonalPublicSession upserts the member's public agent session.
  • Lane control: store.askPrivateAgent(goal, { publish }) + a 🔒 Private / 🌐 Room toggle on the private composer. Private = advise-only (v2.0); Room = act in the shared room.
  • Subtle visual identity (chosen with the user): personal agent wears the owner's color (Room agent stays orange ◆), a quiet via {name} chip on its public bubbles, and a small owner-colored provenance dot on cells it edited. No banners.

Verified

  • Extended 3-user eval green: { sameCellWinner, agent: visible-to-all-views, privateAgent: replied-privately, personalPublic: acted-in-room-visible-to-all }.
  • Prod smoke on https://noderoom.live: the personal agent filled the Revenue variance cell and posted a via Maya public summary (chip + owner-tinted avatar render).
  • typecheck (app + convex) clean. Deployed: convex dev --once + vercel --prod.

🤖 Generated with Claude Code

…ts + public chat), subtly attributed

Public lane reuses the entire runRoomAgent spine via a new asOwner arg: a public-scoped agent_priv actor (ownerId) edits the shared sheet through CAS/lock/proposal (per room auto-allow) and says to public chat — all attributed by ownerId. collab.ensurePersonalPublicSession upserts the member's public agent session. store.askPrivateAgent(goal,{publish}) + a 🔒/🌐 composer toggle pick the lane.

Subtle visual identity: personal agent wears the owner's color (Room agent stays orange), a quiet 'via {name}' chip on its public bubbles, and a small owner-colored provenance dot on cells it edited. No banners. docs/PRIVATE_AGENT_V2.md is the product spec.

Verified: extended 3-user eval green (personalPublic: acted-in-room-visible-to-all); prod smoke on noderoom.live — personal agent filled the Revenue variance cell AND posted a 'via Maya' public reply. typecheck app+convex clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@vercel

vercel Bot commented Jun 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
noderoom Ready Ready Preview, Comment Jun 9, 2026 9:10pm

Request Review

@HomenShum
HomenShum merged commit da1167d into main Jun 9, 2026
5 checks passed
@HomenShum
HomenShum deleted the audit/optimistic-ux-wave1 branch June 25, 2026 22:58
HomenShum added a commit that referenced this pull request Jun 28, 2026
…lies + memoized markdown

Web-design audit batch 2 (chat surface, 5.5/10) - the brief's #1 anti-pattern.
- Desktop: cap .r-chat / .r-agent-unified-stream .r-md at 68ch (line-height 1.6) so long
  replies read as a column, not full-panel sprawl (Perplexity/ChatGPT/Claude).
- Mobile: agent replies render full-width (drop messenger bubble radius/border/bg); the
  gradient bubble stays only for the user's own messages.
- Perf: memoize MarkdownBody parse ([text]) so the transcript doesn't re-parse every token.

Verified live: .r-chat .r-md max-width 579px (=68ch), line-height 21.6px, no console errors.
Typecheck clean, build OK.

Deferred to the next chat pass: Stop/Regenerate during streaming (#4), jump-to-latest +
inline citations (#15), code-fence buffering + copy button (#8 remainder).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
HomenShum added a commit that referenced this pull request Jun 28, 2026
… (audit #4)

The last web-design P0. The send button never swapped to Stop and there was no re-run.
- While a public agent run is in flight (longJobActive), the composer send slot becomes a
  Stop button wired to the existing cancelJob (same abort as the job chrome) - the
  ChatGPT/Claude pattern, no separate hunt for a cancel control.
- After a run ends (longJobTerminal), a Regenerate chip re-runs the last @NodeAgent request.

Typecheck/build clean; chat e2e 8/9 pass (the 1 fail is the pre-existing @nodeagent-chip
:192, unrelated). Completes all 7 audit P0s.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
HomenShum added a commit that referenced this pull request Jun 28, 2026
feat(chat): Stop while generating + Regenerate (audit #4 - last P0)
HomenShum added a commit that referenced this pull request Jun 29, 2026
…d) + code-fence buffer & copy (#3/#4/#8)

The fleet's Chat refactor dropped #3 (68ch reading column) and #4 (Stop/Regenerate); re-applied both onto
the current composer (send swaps to Stop wired to cancelJob while longJobActive; Regenerate chip re-runs
the last @NodeAgent request). #8: unterminated code fences mid-stream render as plain text (no longer eat
the rest of the reply) + a hover Copy button on each code block.

Typecheck/build clean.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
HomenShum added a commit that referenced this pull request Jun 29, 2026
fix(chat): re-assert reading column + Stop/Regenerate + code-fence buffer/copy (#3/#4/#8)
HomenShum added a commit that referenced this pull request Jun 29, 2026
#4 made the composer button conditional (longJobActive ? chat-stop : chat-send).
Two send-path tests (specific-model routing, /free alias) rendered with baseStore()
whose long job is queued (non-terminal), so the composer correctly showed Stop and
chat-send was absent -> prod:gate npm test failed. Clear the long job in those two
tests (the sibling empty-CTA test already does this) so they exercise the send path
from a sendable state. 14/14 green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
HomenShum added a commit that referenced this pull request Jun 29, 2026
test(chat): fix chat-send tests broken by #4 Send/Stop swap (unblocks prod:gate)

This branch was successfully deployed

1 active deployment
Preview — 2d1f7d7e Deployed Jun 9, 2026 by vercel[bot]
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