Skip to content

feat(bots): answer as a guest in the shared session - #105

Draft
JairEsk wants to merge 6 commits into
mainfrom
jair/hidden-daemon-overflow
Draft

JairEsk wants to merge 6 commits into
mainfrom
jair/hidden-daemon-overflow

Conversation

@JairEsk

@JairEsk JairEsk commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Draft — the feature is not finished yet.

Problem

A @mention or bot_invoke forwarded the prompt to the named bot's own chat, ran the turn there, and copied the reply back. That left two transcripts, a quoted duplicate of every answer, and a queued nudge that landed as a user turn.

Worse, those machine-written prompts were attributed to whoever happened to own the queue row, so one bot's question showed up signed with another bot's name — the reported symptom, where a message from @bobo was rendered as if Roxy had said it. And since reconstructTurn re-prefixed the [@bot] marker on every rebuild, the model eventually started typing the marker itself.

Change

The invited bot now answers in place, the way a group chat works:

  • The queue row keeps the asker's identity (bot_id / bot_username) separately from as_bot_id, which is who should answer.
  • asBotId threads through runSessionTurnrunAgentTurnbuildSystemMessage, so the guest speaks as itself for that one turn.
  • The reply is persisted to the same thread; the forward, the context snapshot, and the quoted answer are gone.
  • reconstructTurn(m, self) no longer marks the bot's own turns, and strips any marker a previous build left behind.
  • Mentions are highlighted in the composer and the transcript so a handoff reads as one.

Still to do

  • Schedules drafted in the new-bot dialog.
  • The transcript export button is debug-only and must be removed before release.

Verification

npm run typecheck, smoke:bots, smoke:shared, smoke:i18n, and smoke:store pass. smoke:app fails on a session without a port does not set PORT, which fails identically on main (confirmed with stash).

FreddyJD and others added 6 commits September 8, 2026 09:05
…tion

Add Facehash bot navigation, persistent roles, schedules, cross-session delegation, and main-process queue ownership. Migrate existing loops in place and cover bot runtime, IPC, and UI behavior.

Co-authored-by: Roxy <299891354+roxy-commits@users.noreply.github.com>
Preserve PR #93 canvas rendering, streaming cadence, and motion settings alongside bot APIs and attribution. Resolve shared imports and combine bot, terminal, and animation harness coverage.

Co-authored-by: Roxy <299891354+roxy-commits@users.noreply.github.com>
Dock bot settings on the left with pinned footer actions, add avatar context menus and whitespace filtering, tighten sidebar spacing, and retain canvas measurements across revisits. Add Force run through the shared queue with IPC and UI regression coverage.

Co-authored-by: Roxy <299891354+roxy-commits@users.noreply.github.com>
# Conflicts:
#	src/main/services/remote.ts
A mention or bot_invoke used to forward the prompt to the named bot's own
chat, run it there, and copy the reply back — two transcripts, a quoted
duplicate of every answer, and a queued nudge that landed as a user turn.
The transcript then attributed those machine-written prompts to whoever
happened to own the row, so a bot's own question showed up signed with
another bot's name (and, with the marker re-prefixed each rebuild, the
model started typing "[@bot]" itself).

Now the invited bot answers in place: the queue row keeps the asker's
identity and carries `as_bot_id`, the guest's identity drives the system
prompt for that one turn, and the reply is persisted to the same thread.
Mentions are highlighted in the composer and the transcript so a handoff
reads as one.

Still in progress: schedules drafted in the new-bot dialog and the dev-only
transcript export.
Conflicts were all in code both sides touched, kept together rather than
picked:

- CanvasTranscript: main's quiet-stream indicator alongside the bot
  identity passed into layout; both feed the same scene and the same
  memo deps.
- ChatView: main's Copilot reconnect banner and the subagent elapsed
  seconds, kept on top of the bots header. Loop state stays deleted —
  loops are gone from this branch.
- store: the Copilot re-auth probe moved into the try block where the
  failure is now handled, so it still runs before the queue wakes.
- canvas harness: both the ?bots and ?copilot entry points.
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.

2 participants