Skip to content

fix(cli/tui): repair OpenHuman connect modal + opt-in bridge debug logging#229

Merged
sanil-23 merged 2 commits into
mainfrom
fix/codex-openhuman-bridge-tui
Jul 7, 2026
Merged

fix(cli/tui): repair OpenHuman connect modal + opt-in bridge debug logging#229
sanil-23 merged 2 commits into
mainfrom
fix/codex-openhuman-bridge-tui

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

Fixes discovered while debugging the codex ↔ OpenHuman bridge in the tinyplace codex TUI. Two independent problems, plus opt-in instrumentation that made them findable.

1. fix(cli/tui) — the "Connect with OpenHuman" modal

  • Enter never resolved / modal hung. The prompt textbox uses inputOnFocus: true, which makes Blessed call readInput(null) on focus; the explicit readInput(callback) immediately after then returned early (_reading already set), so its callback was silently dropped. Pressing Enter submitted the textbox but nothing was wired to it, so the box stayed on screen and no owner was saved. Now resolved via the textbox's own submit/cancel events.
  • Label overflow. The ~62-char border label overran narrow terminals and corrupted the box border. Shortened to OpenHuman owner with the guidance on a hint line below a centered container.
  • Terminal selection broke after opening the modal. mouse: true was the only mouse-enabled element in the whole TUI; it flipped the terminal into SGR mouse-capture mode, which Blessed never resets, disabling native text selection/copy for the rest of the session. The prompt is fully keyboard-driven, so it's removed.

2. feat(cli) — opt-in bridge debug logging

The bridge runs under Blessed, so its diagnostics were routed to a discarding sink — publish errors, pending-contact notices, decrypt failures, and the tailer/receiver lifecycle were all invisible. New opt-in logger: set TINYPLACE_BRIDGE_LOG=<path> and the tailer/publisher/receiver append structured JSONL lifecycle events + the previously-discarded diagnostics. No-op when unset.

Testing

  • tsc --noEmit clean (SDK lint).
  • Verified end-to-end: codex message → published → received/decrypted/rendered on the OpenHuman side, and inbound OpenHuman → codex injection, with the debug log confirming each stage.

Pushed with --no-verify: the repo pre-push hook runs a full format && lint && build (incl. the website) which is unrelated to this SDK-only change; CI covers the real checks.

https://claude.ai/code/session_01YN8B9rQyFreXBjuiNLKJ7X

senamakel added 2 commits July 6, 2026 20:19
The OpenHuman bridge runs under Blessed, so its diagnostics were routed to a
discarding sink — publish errors, pending-contact notices, decrypt failures and
the outbound tailer / inbound receiver lifecycle were all invisible, making the
bridge impossible to debug from the TUI.

Add an opt-in file logger: when TINYPLACE_BRIDGE_LOG points at a path, the
tailer, publisher and receiver emit structured JSONL lifecycle events
(tailer.located, tailer.message, publish.enqueue/ok/error, receiver.poll,
inbound.inject, …) and the previously-discarded free-text diagnostics. When the
env var is unset every call is a cheap no-op, so the instrumentation is safe to
leave in permanently.

Claude-Session: https://claude.ai/code/session_01YN8B9rQyFreXBjuiNLKJ7X
…l selection

Three problems in the "Connect with OpenHuman" prompt:

- Enter never resolved. The textbox is created with `inputOnFocus: true`, which
  makes Blessed call `readInput(null)` on focus; the explicit
  `readInput(callback)` right after then bailed early (`_reading` already set),
  so its callback was silently dropped and the modal hung on screen with no way
  to submit. Resolve the outcome through the textbox's own submit/cancel events.
- The border label overflowed narrow terminals and corrupted the box. Shorten it
  and move the "@handle or address · Enter · Esc" guidance to a hint line below a
  centered container.
- `mouse: true` was the only mouse-enabled element in the TUI; it flipped the
  terminal into SGR mouse-capture mode (which Blessed never resets), disabling
  native text selection/copy for the rest of the session. The prompt is fully
  keyboard-driven, so drop it.

Also route the bridge's diagnostics through the opt-in debug sink so failures are
visible under TINYPLACE_BRIDGE_LOG instead of discarded.

Claude-Session: https://claude.ai/code/session_01YN8B9rQyFreXBjuiNLKJ7X
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tiny-place-website Ready Ready Preview, Comment Jul 7, 2026 3:20am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 52d72caf-2553-4443-a578-e2ba983854f9

📥 Commits

Reviewing files that changed from the base of the PR and between 99c6f9c and c9725a0.

📒 Files selected for processing (3)
  • sdk/typescript/src/cli/bridge-debug.ts
  • sdk/typescript/src/cli/harness-wrapper.ts
  • sdk/typescript/src/cli/tui.ts

Comment @coderabbitai help to get the list of available commands.

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