Repository navigation
Long user messages fold and copy; remote chats get the local composer; fix encoded queries - #628
Conversation
A user bubble used Tailwind's break-words (overflow-wrap: break-word), which does not lower min-content width. One unbroken token, such as an API key, made the content-sized, right-aligned bubble wider than its 80% column, and it spilled left under the sidebar. It now uses overflow-wrap: anywhere. Long prompts fold to six lines behind a chevron (aria-expanded and aria-controls). They fold only when at least two more lines would hide. First paint guesses from length; a ResizeObserver then measures the wrapped height. Copy moves to the bubble's top-right on hover or focus and copies the full text. The user branch now honours showCopy, so Bot rows no longer show two Copy actions. Make the chat-follow-bottom find wrap around. A caret that startup can leave in the composer, below the transcript, made the non-wrapping window.find miss message 0 now and then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Layout and indicator
- The remote chat and remote new-chat footers applied the dock inset
twice: they wrapped Composer, which already carries
`aiden-dock-inset chat-content-column`. The composer was 192px
narrower than locally and hit its compact container queries.
- RemoteHostChip names the host where a local chat shows its workspace.
It adds Offline or Needs re-pairing in a soft status fill.
Composer parity
- The model picker lists the host's models (GET /models). It shows the
chat's own model, which windows carry since revision 23. Picking one
sends providerId/modelId with the turn, and the host saves it as the
chat's model.
- The effort control comes from each model's thinkingLevels and default.
Only an explicit pick is sent.
- Saved sends replay the model and effort too, because the host refuses
a reused key with a different body.
- Queue uses the shared local ChatMessageQueue and QueuedMessages. It
waits for each queued turn's run to end (runId === receipt streamId)
before sending the next. Steer still goes to the host's run.
- Failed replies offer Try again, Continue and Switch model. Compaction
and provider sign-in stay on the host.
- Context meter: contract revision 41 (provisional, re-claimed at merge)
adds GET /chats/{id}/context behind chat-context-pressure-v1, for
desktops only. It returns an 11-field allowlisted projection of the
host's own next-request pressure. ContextMeter takes the narrower
ContextMeterPressure, so no field is invented.
Query encoding (also revision 41)
- The host refused any `%` in a URL. A Bot inbox search with a space
therefore failed from desktop (encodeURIComponent), iOS (URLQueryItem)
and Android (raw query). Android's encoded `since` failed the same way.
- Paths still refuse `%`. Query strings now accept well-formed UTF-8
escapes that decode to no control character.
- Desktop, iOS and Android send a space as `+` and keep id, date and
cursor separators literal, so older hosts still read them. Only
characters that cannot travel literally are escaped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-message-overflow-2ebc44
There was a problem hiding this comment.
Important
Two behavioral regressions need correction before merge: reopening a remote pane can dispatch queued work too early, and Find matches in folded message tails remain invisible.
Reviewed changes Full review of the user-message presentation, remote composer and queue lifecycle, context-pressure contract, and cross-platform query encoding.
- User messages: Wrapping, measured six-line folding, disclosure accessibility, top-right copy, and transcript Find/e2e changes.
- Remote composer: Column width, host chip, model/effort selection, exact-body intent recovery, local follow-up queue, steering, and failed-response actions.
- Context contract: Revision 41 route, feature advertisement, authorization, count-only projection, schema/parser validation, and shared meter rendering.
- Query encoding: Host URL validation and desktop, iOS, and Android encoders, tests, fixtures, and documentation.
Validation: TypeScript and 557 focused tests passed. Isolated probes using the real React pane and Chromium-rendered message bubble reproduced both findings. Full Electron and iOS acceptance was not run here; Android verification returned Tool 'shell' timed out after 120000ms. Consider increasing timeoutMs or optimizing the tool implementation.
gpt-6.1-sol | 𝕏
…folds Review on #628: - The queue's wait for an accepted turn's run lived in pane state. Reopening the chat between the receipt and the run's first event let the next queued message go out early; the host refused it and paused the queue. The fence is now kept per host and chat in a module store, set even when the receipt lands after the pane closed. It lifts only when that run is seen ending, or when the host has saved a reply and no run is active, with the two-minute stall fallback. - Find selects a match without focusing it, so a match in a folded tail stayed clipped. A selection inside a folded body now expands it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Important
Two gaps remain in the new fixes: transcript persistence can release the remote queue before run settlement, and expanding a Find match does not necessarily bring it into view.
Reviewed changes Reviewed b781fc492 against the previous Pullfrog-reviewed head 965eacb69, with the full PR diff for context.
- Moved the queue fence: Replaced pane-local accepted-run state with a host/chat store that survives remounts and late receipts.
- Added completion reconciliation: Introduced transcript-based fence release, preserved the stall fallback, and registered focused fence tests.
- Expanded searched messages: Added selection-driven expansion for folded prompts and extended the long-prompt Find test.
Validation: TypeScript passed; all 205 remote-chat and 83 rich-link tests passed. Isolated probes using the real React pane and Chromium-rendered message bubble confirmed the findings below. Full Electron and real paired-Mac acceptance were not run.
gpt-6.1-sol | 𝕏
…es into view Second review on #628: - A transcript ending in the queued turn's reply is not proof the turn is released: the host persists the reply before it drops the turn's active ownership and marks the chat idle. The fence now lifts only when that run is seen ending, or when the host's live chat list showed the chat active and then idle again, plus the stall fallback. - Opening a fold for a Find match did not scroll to it, because Find had already scrolled while the match was clipped. After the fold opens, the selected match is brought into the transcript viewport. The long-prompt e2e test now uses a prompt taller than the window and checks the match is on screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Important
The new activity-based queue fallback can mistake a delayed update from the previous run for completion of the newly accepted turn, sending the next queued message too early.
Reviewed changes Reviewed cdbcdf650 against the previous Pullfrog-reviewed head b781fc492, with the complete PR diff for context.
- Replaced transcript-based queue release with host-feed active/idle observations while retaining the shared fence and stall fallback.
- Added post-expansion Find scrolling and extended browser coverage to assert that a below-viewport match becomes visible.
- Restored read-only question cards inside the remote footer's transcript-column wrapper.
Validation: Both application and e2e type-checks passed, along with 308 focused tests. Standalone Chromium probes confirmed Find visibility with normal and reduced motion and reproduced the queue-ordering finding below using the real remote pane, control, ledger, and queue. Full Electron and real paired-Mac acceptance were not run.
gpt-6.1-sol | 𝕏
Third review on #628: a feed row still showing the previous run as active when the next turn was accepted counted as that turn working, so the previous run's late idle released the new fence. The fence now records the row's activity at acceptance, and only a later change to active counts. Without a reading at acceptance, only the run ending or the stall fallback lifts it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Important
The cached-active case is fixed, but delayed activity transitions from the previous run can still release the next turn's queue fence prematurely.
Reviewed changes Reviewed e8d06b697 against the previous Pullfrog-reviewed head cdbcdf650, with the complete PR diff for context.
- Recorded activity at acceptance in each queued turn's fence rather than treating an already-active row as evidence of that turn starting.
- Required a subsequent activity transition before enabling activity-based settlement.
- Added focused ordering tests for an active baseline and a missing initial activity reading, and updated the implementation notes.
Validation: Application type-check and all 267 focused remote-chat, queue, and host-feed tests passed. An isolated mounted production-pane probe confirmed the original cached-active fix and reproduced the remaining delayed-transition case. Full Electron and real paired-Mac acceptance were not run.
gpt-6.1-sol | 𝕏
Fourth review on #628: the chat row's idle/active activity names no run, so a delayed active-then-idle pair from the previous run could still release the next turn's fence. The fence now lifts only when that run id is seen ending on the run stream, or when the host feed's run.state for it is done, failed or cancelled. The host publishes those only after releasing the turn. The stall fallback stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed 836230ae0 against the previous Pullfrog-reviewed head e8d06b697, with the complete PR diff for context.
- Removed activity-based queue release, so delayed chat-activity transitions from an earlier run no longer release the accepted turn's fence.
- Added run-correlated feed reconciliation, matching the chat and accepted run ID before accepting a terminal host-feed state.
- Updated fence coverage and implementation notes for unobserved runs, prior-run completion, nonterminal states, and terminal outcomes.
Validation: Application type-check and all 290 focused remote-chat, queue, host-feed, and host-run lifecycle tests passed. An isolated probe using the production remote-generation surface, registry, feed, cache, fence, and queue confirmed that earlier-run completion keeps the fence closed and matching completion permits the next message without pausing. Full Electron, real paired-Mac, and native mobile suites were not run for this desktop-only delta.
gpt-6.1-sol | 𝕏
Hermes Review BotConfidence: 5 Engine: SummaryLong user prompts now fold to six lines behind a disclosure chevron without clipping text from DOM find or accessibility trees, wrapping unbroken tokens inside their column via Confidence Score: 5/5Fully traced and verified end-to-end across desktop renderer components, Electron main process IPC and peer operations, OpenAPI/contract fixtures, router validation, and mobile clients (iOS and Android). 📁 Important Files Changed
FindingsNo findings. Sequence DiagramsequenceDiagram
autonumber
participant Renderer as Viewing Mac (Renderer)
participant Main as Viewing Mac (Main)
participant Host as Serving Mac (Host)
Note over Renderer,Host: Turn dispatch & queue fencing
Renderer->>Renderer: sendFencedTurn() sets pending fence (runId: null)
Renderer->>Main: peerOperation("chatSend", model, thinkingLevel)
Main->>Host: POST /chats/{chatId}/turns (providerId, modelId, thinkingLevel)
Host-->>Main: 201 Created { streamId: "run-1" }
Main-->>Renderer: receipt { streamId: "run-1" }
Renderer->>Renderer: setRemoteQueueFence("host:chat", runId: "run-1")
Note over Renderer,Host: Run execution & settlement
Host-->>Main: SSE run event / Feed update (run.state: done)
Main-->>Renderer: Broadcast run settled
Renderer->>Renderer: remoteQueueFenceHolds() returns false; fence cleared
Note over Renderer,Host: Context pressure refresh & next queued message
Renderer->>Main: peerOperation("contextPressure", model)
Main->>Host: GET /chats/{chatId}/context?providerId=&modelId=
Host-->>Main: 200 OK { chatId, pressure: 11-field projection }
Main-->>Renderer: Update ContextMeter
Renderer->>Renderer: useChatMessageQueue dispatches next queued turn
[]
|
very-hermes-bot
left a comment
There was a problem hiding this comment.
Inline review — 1 finding(s) anchored to the diff. See the pinned summary comment for the overview.
Review on #628: only queued sends set the queue fence. A message typed into the composer, or a failure card's Try again, left it open, so a follow-up queued meanwhile could reach the host before that run was observed and be refused as turn_already_active. Every new turn now goes through sendFencedTurn, which fences the chat on the receipt's run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Important
The new send wrapper still leaves a receipt-handoff race that can dispatch a queued follow-up into a busy host and pause the queue.
Reviewed changes Reviewed 9ef8c6804 against the previous Pullfrog-reviewed head 836230ae0, with the complete PR diff for context.
- Added shared send fencing through
sendFencedTurn, capturing the host/chat key before dispatch and recording the accepted run afterward. - Routed typed sends and failure-card retries through the same fenced path used by queued sends.
- Extended fence coverage for accepted, unconfirmed, and refused sends.
Validation: TypeScript and all 237 focused remote-chat/shared-queue tests passed. An isolated mounted production-pane probe reproduced the remaining race in 20/20 iterations with production React. Full Electron, real paired-Mac, and native mobile suites were not run for this desktop-only delta.
gpt-6.1-sol | 𝕏
Review on #628: ChatSessionControl.send clears `sending` before its receipt reaches sendFencedTurn. In that gap the queue was enabled with no fence, could claim a follow-up and send it into the still-running host. sendFencedTurn now installs a pending fence (no run yet) before the send. It swaps in the receipt's run, or releases on a refusal or an unconfirmed outcome (the reconciliation banner then holds the queue). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Important
The receipt-handoff race is fixed, but a refused subsequent send can now erase the earlier accepted run's fence and prematurely dispatch queued work.
Reviewed changes Reviewed 10ec232ae against the previous Pullfrog-reviewed head 9ef8c6804, with the complete PR diff for context.
- Added pending-send fencing before dispatch, maintaining the hold until an accepted run replaces it.
- Added conditional cleanup for refused and unconfirmed sends, and extended the in-flight fence test.
Validation: Application TypeScript and all 237 focused remote-chat/shared-queue tests passed. A mounted production-pane probe confirmed the original handoff fix and reproduced the refused-retry regression below. Full Electron, real paired-Mac, and native mobile suites were not run for this desktop-only delta.
gpt-6.1-sol | 𝕏
Review on #628: a pending fence replaced the accepted run's fence, and a refused attempt then deleted it. A stale failure card's Try again, pressed before that run was observed, so lifted the hold and let the queue send into a busy host. A refused or unconfirmed attempt now puts back the fence it found. The failure card also waits while a fence holds, since a turn sent from here owns the chat until it settles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed f484ebf8f against the previous Pullfrog-reviewed head 10ec232ae, with the complete PR diff for context.
- Preserved accepted-run fencing: Restored the previous fence after a refused or unconfirmed subsequent attempt, without clearing a fence owned by another attempt.
- Disabled premature retries: Included the outstanding fence in the failed-reply actions' busy state.
- Extended behavioral coverage: Added a focused test for retaining A's fence after refused and unconfirmed attempts.
Validation: Application TypeScript and all 238 focused remote-chat/shared-queue tests passed. An additional mounted production-pane probe confirmed that the real Try again button remains disabled before run observation, refused and unconfirmed attempts preserve A's fence across remounts, and queued B sends once after A settles without pausing. Full Electron, real paired-Mac, and native mobile suites were not run for this desktop-only delta.
gpt-6.1-sol | 𝕏
main took revision 41 for chat context pressure (#628). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJBx7KEMfx6whsfUge
Main took revision 41 for composer context pressure (#628) and #631 holds provisional 42, so Bot shared images moves to provisional 43. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJBx7KEMfx6whsfUge
… as Remote revision 44 Main took revision 41 for composer context pressure (#628), #631 holds provisional 42 and Bot shared images moved to 43, so browser recordings moves to provisional 44. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6RJBx7KEMfx6whsfUge

Summary
Long user messages
break-wordsdoesn't lower the bubble's minimum width;overflow-wrap: anywheredoes.aria-expandedandaria-controls, and focusing a hidden link expands the prompt.showCopy.Remote Mac chats match local ones
GET /models.providerId/modelId, and the host saves it as the chat's model, the same rule phones follow.thinkingLevelsand default. Only an explicit pick is sent.GET /chats/{id}/contextsits behindchat-context-pressure-v1and is announced to desktops only.Percent-encoded queries (also revision 41)
%in a URL. A Bot inbox search with a space therefore failed from desktop, iOS (URLQueryItemsends%20) and Android (raw interpolation, which also broke on&and#). Android's encodedsince=failed the same way.%. Query strings accept well-formed UTF-8 escapes that decode to no control character.+and keep id, date and cursor separators literal, so older hosts keep working. Only& + # %, accents and emoji are escaped.Flaky test
chat-follow-bottom.spec.ts"older transcript content remains findable…".window.find()searches forward from the selection and doesn't wrap.Protocol revision
Revision 41 (
AIDEN_REMOTE_CHAT_CONTEXT_PRESSURE_CONTRACT_REVISION) is provisional. Re-claim the next free revision at merge, per AGENTS.md.mainis at 40 as of this PR. The fixtures, the OpenAPI schema and the iOS revision pin are updated.Testing
tsc --noEmitclean; eslint clean on changed files.test:remote-chat: 201 pass.test:rich-links: 83 pass.test:ci:registry: 15 pass.test:aiden-remotechain: 156 + 936 pass.scripts/aiden-remote-lan-transport-spike.test.mjs: 4 failures, environmental. This machine's OpenSSL 4.1 refusesopenssl x509 -days 0. The file is untouched.AidenRemotePhase0Tests,AidenBotContractTests, iPhone 18 Pro simulator): TEST SUCCEEDED. The new query test ran and passed.AidenRemoteClientTest,AidenBotContractTest,AidenRemotePhase0Test): 76/76, run with Android Studio's bundled JBR.chat-shell-interactions.spec.tsandchat-message-queue.spec.ts: 45/45, including the new long-prompt test (wrap, fold, chevron, top-right copy, clipboard).chat-follow-bottomfind test: 60/60 alone, and 15/15 inside full-spec repeats.Intermittent failures seen but not fixed
These came from about 300 local runs of
chat-follow-bottom.spec.ts:finishLmStudioOnboarding(tests/e2e/fixtures.ts:737–740). It happens before any chat opens, so it is unrelated to this branch.expect(copy).toBeInViewport()reported viewport ratio 0 after Shift+Tab, once. The transcript sat around messages 2–4, which were folded.content-visibility: autois skipping keeps its first-paint guess until the row is revealed. The ResizeObserver doesn't report earlier, so its height can change on reveal.Follow-ups noted
Android's other
URLEncoder…replace("+", "%20")call sites (chat summaries cursor, messagesbefore,chatId) still emit%20. Their values match strict id patterns today, so nothing is broken. Moving them toAidenHostQuerywould be the consistent fix.🤖 Generated with Claude Code