Skip to content

[3896 by GPT-6.2 Sol] Sprites: OpenCode login menu renders one character per line with raw escape codes - #3900

Merged
integry merged 1 commit into
3758-epic-runtime-abstraction-sc0from
3896/gpt-6.2-sol-sprites-opencode-login-me-20261129-2303-5pw
Nov 29, 2026
Merged

integry merged 1 commit into
3758-epic-runtime-abstraction-sc0from
3896/gpt-6.2-sol-sprites-opencode-login-me-20261129-2303-5pw

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3896

Branch: 3896/gpt-6.2-sol-sprites-opencode-login-me-20261129-2303-5pw
Commits: ✅ Changes committed (75ea64a)


AI Processing Completed

Execution Details:

Summary:
Fixed #3896. OpenCode 2.4.2 emitted one glyph per line and broke ANSI sequences when its PTY reported zero columns. Sprites and Docker now set the PTY size before launching OpenCode. The dashboard preserves fragmented UTF-8 and escape sequences, redraws the menu in place, and sends the Enter key OpenCode expects.

76 server tests and 11 UI tests passed. A Chromium run with OpenCode 2.4.2 confirmed that the menu stays readable with one-byte output frames and that Up, Down, and Enter work.

Live Fly and Docker verification remains pending. This environment had neither Sprites credentials nor a Docker daemon, so live credential persistence, Ready status, and the Claude, Codex, and Vibe login rechecks remain unverified.

Review digest

Risk-tiered paths

  • High risk (6 files)
    • packages/api/services/agentLoginDocker.ts (+2/−1): auth-looking path
    • packages/api/services/agentLoginRemote.ts (+2/−1): auth-looking path
    • packages/api/services/agentLoginSessionManager.ts (+22/−18): auth-looking path
    • packages/api/services/agentLoginTerminal.ts (+137/−6): auth-looking path
    • packages/core/src/agents/runtime/remoteLogin.ts (+5/−0): auth-looking path
    • packages/core/src/agents/runtime/sprites/spritesLogin.ts (+6/−4): auth-looking path
  • Normal risk (1 file)
    • packages/core/src/index.ts (+1/−1)
  • Low risk (3 files)
    • packages/api/test/agentLoginRoutes.test.ts (+18/−0)
    • packages/api/test/agentLoginTerminal.test.ts (+27/−1)
    • test/remoteAgentLogin.test.ts (+15/−2)

Diff size: 10 files changed, +235/−34 lines

View task for the run's logs and conversation.


This PR was created automatically by ProPR after processing issue #3896.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!


Visual preview

OpenCode provider selection

OpenCode provider selection

OpenCode 2.4.2 running in a local PTY with the Sprites login output handler. The dashboard displays the redrawn menu after Down moves the selection to OpenAI.

Full-size original

Fixed #3896. OpenCode 2.4.2 emitted one glyph per line and broke ANSI sequences when its PTY reported zero columns. Sprites and Docker now set the PTY size before launching OpenCode. The dashboard preserves fragmented UTF-8 and escape sequences, redraws the menu in place, and sends the Enter key OpenCode expects.

76 server tests and 11 UI tests passed. A Chromium run with OpenCode 2.4.2 confirmed that the menu stays readable with one-byte output frames and that Up, Down, and Enter work.

Live Fly and Docker verification remains pending. This environment had neither Sprites credentials nor a Docker daemon, so live credential persistence, Ready status, and the Claude, Codex, and Vibe login rechecks remain unverified.

ProPR-Agent: codex/gpt-6.2-sol
@propr-dev propr-dev Bot changed the title 🔨 [3896 by GPT-6.2 Sol] Sprites: OpenCode login menu renders one character per line with raw escape codes ✅ [3896 by GPT-6.2 Sol] Sprites: OpenCode login menu renders one character per line with raw escape codes Nov 29, 2026
@integry

integry commented Nov 29, 2026

Copy link
Copy Markdown
Owner

Live-tested on a Fly test instance (Sprites runtime, monitoring no repositories). The image was the epic head plus #3894, #3900 and the #3897 fix (dev-combo-5277b5c).

✅ The OpenCode login menu now renders correctly on Sprites. Before this change: one glyph per line, with raw [90m fragments.

  • "Connect an integration" → "Select integration" shows a clean list (Search; Popular: OpenCode, OpenAI, GitHub Copilot, Anthropic, Google; Services…).
  • The Down arrow terminal key moved the selection from OpenCode to OpenAI.

I didn't complete a provider sign-in, since that needs a real account. So the PTY size was the real cause, not the chunked-sanitizer theory in #3896.

@propr-dev

propr-dev Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @integry

Analysis Summary

No follow-up changes were needed for PR #3900. The branch already sets the PTY size before launching OpenCode, and the reported Fly test confirmed that the provider menu renders correctly on Sprites and that Down moves the selection from OpenCode to OpenAI. Provider sign-in remains unverified.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: GPT-6.2 Sol (medium)
  • Time: 4m 39s
  • Tokens: 40,188 (39,949 in / 239 out)
  • Cost: $0.01

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7264779710✓

@propr-dev propr-dev Bot changed the title ✅ [3896 by GPT-6.2 Sol] Sprites: OpenCode login menu renders one character per line with raw escape codes 🔨 [3896 by GPT-6.2 Sol] Sprites: OpenCode login menu renders one character per line with raw escape codes Nov 29, 2026

integry commented Nov 29, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=8 max=10

@propr-dev propr-dev Bot added the ultrafix label Nov 29, 2026
@propr-dev

propr-dev Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@integry integry removed the ultrafix label Nov 29, 2026

integry commented Nov 29, 2026

Copy link
Copy Markdown
Owner

/review

@propr-dev

propr-dev Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

Ready to merge within scope. The PR addresses the zero-column PTY cause and adds focused handling for OpenCode’s interactive redraws. Review was static; no commands were run.

✅ PTY sizing before launch — Docker and Sprites set the terminal dimensions before executing OpenCode, preserving command arguments through exec "$@". The supplied live Sprites report confirms readable menus and working Down navigation.

✅ Fragmented output handling — UTF-8 stream decoding preserves split characters, while the stateful terminal parser handles fragmented escape sequences and cursor-based menu redraws.

✅ Scoped input handling — Enter normalization applies only to OpenCode, matching the dashboard’s newline input without changing other providers’ input behavior.

The authoritative current-head checks report 17 passed and no failures.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Complete provider login smoke tests

The live Sprites verification covered menu rendering and navigation, but stopped before provider authentication. A follow-up covering completed sign-in, credential persistence, and Ready status on Sprites and Docker would strengthen end-to-end confidence. This is optional because the supplied code and tests establish the targeted rendering fix, and no regression in credential handling was identified.

S2: 🟢 Cover terminal retention boundaries

Add focused tests for AgentLoginTerminal at its output limit, including cursor movement after history trimming and status messages appended to the snapshot. The new renderer maintains its own history and cursor state, while the added tests primarily cover short menus. These would provide useful regression coverage without expanding the implementation.

Score

The targeted fix is supported by focused tests, passing current-head checks, and live Sprites confirmation. No merge blockers were identified; complete authentication and Docker smoke testing would provide additional confidence.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 29s
  • Tokens: 51,381 (50,704 in / 677 out)
  • Cost: $0.43

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1 S2

🤖 Review by ProPR

@integry
integry merged commit 3c3555b into 3758-epic-runtime-abstraction-sc0 Nov 29, 2026
57 checks passed
@propr-dev propr-dev Bot changed the title 🔨 [3896 by GPT-6.2 Sol] Sprites: OpenCode login menu renders one character per line with raw escape codes [3896 by GPT-6.2 Sol] Sprites: OpenCode login menu renders one character per line with raw escape codes Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant