Skip to content

Session Share: instant Start/Stop + readable Thinking on the phone PWA#318

Merged
mlcyclops merged 2 commits into
masterfrom
feat/share-ux-and-readable-thinking
Jul 19, 2026
Merged

Session Share: instant Start/Stop + readable Thinking on the phone PWA#318
mlcyclops merged 2 commits into
masterfrom
feat/share-ux-and-readable-thinking

Conversation

@mlcyclops

Copy link
Copy Markdown
Owner

Two session-share UX fixes, both reported from live use.

feat(share): instant Start/Stop (P-SHARE.4) — d5f70e3

The Share dock looked frozen on both actions. Start awaited collabSetP2P → a relay-token fetch → collabStart with no UI feedback; Stop awaited the backend before redrawing.

  • Start now disables its button and shows a two-line progress readout under it that narrates each phase — Preparing to share… → (gated) Authorizing this device…Opening the room…, or for P2P Finding a relay…Connecting… — with the relay label. A double-click guard blocks re-entry mid-handshake, and a startFail helper re-enables + toasts on any error.
  • Stop is now optimistic: local teardown is synchronous, the idle body paints instantly from cached serve/p2p/relay config (drawIdleOptimistic, no status round-trip), and the backend collabStop() + a reconciling draw() run in the background — so the button never hangs on a slow socket close.

feat(remote-pwa): readable Thinking on the phone (P-REMOTE.9b) — 909d3a0

Guests watching a turn saw only tool chips. The per-event innerHTML repaint reset every <details> to collapsed (an opened Thinking block snapped shut within ms), and the collapsed row was a bare dim "Thinking" with no gist.

  • pwa_view.ts (pure, tested): thinkingGist() shows the freshest reasoning line in the summary (escaped, clipped, hidden when open); renderItem stamps data-think="<i>" and renders the trailing thinking block open like the desktop's live reasoning, collapsing when the answer starts.
  • app.ts: a tap records intent per index; render() re-applies it after each repaint; cleared on reconnect.
  • Already deployed to lucid-agent.web.app/remote via the addon repo; this carries the source.

Verification

  • renderer tsc clean; pwa_view 15/15 (incl. hostile-text escaping of the gist); collab + share_dock 384/384.
  • .share-prog readout checked against the real styles.css in the browser preview; PWA Thinking checked via DOM geometry in the preview.
  • Live Electron start/stop timing + on-device PWA repaint persistence are QA-gated in-app.

Reconciliation

No overlap with the only other open PR (#282, a Dependabot npm bump touching package.json/bun.lock).

🤖 Generated with Claude Code

mlcyclops and others added 2 commits July 19, 2026 09:00
…summaries, open-state survives repaints (P-REMOTE.9b)

Guests watching a turn saw only tool chips: every streamed event repainted the
transcript with innerHTML, resetting each <details> to collapsed (an opened
Thinking block snapped shut within ms), and the collapsed row was a bare dim
'Thinking' with no gist of the reasoning.

pwa_view.ts (pure, tested): thinkingGist() = the freshest non-empty line,
clipped + escaped, shown in the summary and hidden while open; renderItem
gains (i, activeThinking) - data-think='<i>' keys open-state across repaints,
and the trailing thinking block renders OPEN like the desktop's live
reasoning, collapsing when the answer starts. app.ts: a tap on a Thinking
summary records intent per index; render() re-applies intents after each
repaint; cleared on reconnect.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s + optimistic teardown (P-SHARE.4)

Start and Stop looked frozen: Start awaited collabSetP2P -> relay-token fetch
-> collabStart with zero UI feedback, and Stop awaited the backend before
redrawing.

Start now disables its button and shows a two-line progress readout under it
that narrates each phase (Preparing -> Authorizing this device -> Opening the
room, or Finding a relay -> Connecting for P2P) with the relay label; a
double-click guard and a startFail helper (re-enable + toast) cover re-entry
and errors. Stop is optimistic: local teardown is synchronous, the idle body
paints instantly from cached serve/p2p/relay config (no round-trip), and the
backend collabStop + a reconciling draw run in the background so the button
never hangs.

Verified: renderer tsc clean; collab + share_dock 384/384; the .share-prog
readout checked against the real styles.css in the preview.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mlcyclops
mlcyclops merged commit 4111200 into master Jul 19, 2026
5 checks passed
@mlcyclops
mlcyclops deleted the feat/share-ux-and-readable-thinking branch July 19, 2026 23:34
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