anomalyco / anomalyco/opencode-drive

Document or normalize soft wraps in ui.waitFor text matching

Open
#85 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
TypeScript
Stars
32
Forks
3
Avg merge
12m
Merged PRs (30d)
17

Description

Drive 2.1.0, Bun 1.4.0, OpenCode V2 97303c39dd153b64d7036249b279490201820b19, a 100x32 TUI.

A visible reply can fail ui.waitFor("No sourcebook tools are available yet.") when the substring crosses a terminal soft wrap. The model reply was:

The sourcebook executable is ready, but it is not connected. No sourcebook tools are available yet.

The scripted response completed, but the wait timed out after 5000ms with UiWaitTimeoutError. Adding a paragraph break before “No sourcebook tools…” made the unchanged wait pass. The server-side request/history path was not failing.

It would help to document whether string matching is against physical terminal lines, or offer an opt-in soft-wrap-normalized match. The error object's frame.lines printed as [Object ...] through run, so identifying the wrap required inspecting the recording.

Expected: either a documented physical-line matching contract, or a way to wait for visible prose independently of soft wrapping. No runtime change is needed for the workaround: use a shorter visible substring or a semantic/server-side predicate.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ui.waitFor entry point and reproduce the 100x32 TUI case using the visible reply and the existing wait call. Inspect the recorded frame and frame.lines output to determine the current physical-line behavior. Done means either documenting that matching contract or providing and verifying an opt-in soft-wrap-normalized match, with the chosen scope made explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, typescript
Domain
cli, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.