Skip to content

Fix OpenCode pane scroll input and registry hydration#286

Open
danshapiro wants to merge 5 commits intomainfrom
pr/opencode-scroll
Open

Fix OpenCode pane scroll input and registry hydration#286
danshapiro wants to merge 5 commits intomainfrom
pr/opencode-scroll

Conversation

@danshapiro
Copy link
Copy Markdown
Owner

Summary

  • add provider-declared terminal behavior metadata for renderer and scroll-input policy resolution
  • translate OpenCode wheel and touch scrolling into cursor-key input when the pane is in alt-screen mouse-capture mode
  • stabilize extension-registry hydration by deduping concurrent loads, scoping waits to providers that use extension metadata, and clearing stale metadata when the server instance changes
  • add unit, integration, and e2e regression coverage for the new behavior and hydration paths

Testing

  • npm run check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ff4990c36

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +371 to +372
const shouldResolveProviderBehavior = isTerminal && providerUsesExtensionTerminalBehavior(terminalContent?.mode)
const extensionRegistryReady = useEnsureExtensionsRegistry(shouldResolveProviderBehavior)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Load extension registry before resolving non-OpenCode behavior

useEnsureExtensionsRegistry is now gated by providerUsesExtensionTerminalBehavior, which only returns true for opencode. For any other CLI extension that sets cli.terminalBehavior (the new manifest field added in this commit), a terminal-only startup path never triggers /api/extensions, so providerBehavior stays at defaults and the declared renderer/scroll policy is ignored. This means restored or directly-opened third-party extension terminals can silently run with the wrong behavior until the user manually opens another view that happens to load the registry.

Useful? React with 👍 / 👎.

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